npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@homebound/activesupport

v2.0.1

Published

This package provides prototype extensions, similar to the Ruby [ActiveSupport](https://guides.rubyonrails.org/active_support_core_extensions.html) project.

Downloads

4,506

Readme

@homebound/activesupport

This package provides prototype extensions, similar to the Ruby ActiveSupport project.

Installation

npm install --save @homebound/activesupport
yarn add @homebound/activesupport

Usage

There are two ways to use this package: install the prototype extensions globally, or import the helpers as plain functions. You can also mix the two.

Global imports (install prototype extensions)

Import a /global subpath purely for its side effects. Everything exported from the matching impl module is installed onto Array.prototype (etc.) and becomes available everywhere in your app.

// Install everything at once (arrays, maps, objects, and temporal types):
import "@homebound/activesupport/global";

[1, null, 2].compact(); // [1, 2]
[1, 2, 3].sum(); // 6

You can also install just a slice to keep the prototype surface small:

import "@homebound/activesupport/array/global";
import "@homebound/activesupport/map/global";
import "@homebound/activesupport/temporal/plainDate/global";

Global imports are side-effectful, so do them once at your app's entry point (e.g. src/index.ts or a setupTests.ts).

Direct imports (no prototype pollution)

If you'd rather not touch the global prototypes, import the helpers as plain functions from the unsuffixed subpath:

import { compact, sum, groupBy } from "@homebound/activesupport/array";
import { getOrCreate } from "@homebound/activesupport/map";
import { addBusinessDays } from "@homebound/activesupport/temporal/plainDate";

compact([1, null, 2]); // [1, 2]
sum([1, 2, 3]); // 6

These subpaths are pure — importing them has no side effects and tree-shakes normally, so you only ship what you use.

Mixing the two

It's fine to install some globals and import others as functions. For example, install the array extensions globally for ergonomic chaining, but keep temporal helpers as explicit function calls:

import "@homebound/activesupport/array/global";
import { addBusinessDays } from "@homebound/activesupport/temporal/plainDate";

const dueDates = records.compact().map((r) => addBusinessDays(r.start, 5));

Documentation

For now, check out the source.