</>PackageGraphPackageGraph

reusify

npmv1.1.0TypeScript

Reuse objects and functions with style

Adopt with care

reusify is usable, with caveats. Last published 561 days ago.

  • AAdoption: grade A, Excellent.

    91M downloads per week and 1 known dependents.

  • CMaintenance: grade C, Fair — worth a look.

    Last published 561 days ago.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 11 KB installed.

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • ALicense: grade A, Excellent.

    MIT — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding reusify to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

11 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

Longest resolved dependency chain below this package.

Compatibility

Node.js
iojs >=1.0.0, node >=0.10.0
Module format
CommonJS only
TypeScript
Types included
Install scripts
None

Quick start

A usage example from the reusify README.

var reusify = require('reusify')
var fib = require('reusify/benchmarks/fib')
var instance = reusify(MyObject)

// get an object from the cache,
// or creates a new one when cache is empty
var obj = instance.get()

// set the state
obj.num = 100
obj.func()

// reset the state.
// if the state contains any external object
Example truncated — see the full README.

reusify vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
reusifythis page91M1MIT1 year ago
rfdc46.8M3MIT1 day ago
generate-function12M1MIT1 day ago
define-lazy-prop01MIT1 day ago
@nodable/entities02MIT1 day ago
callsites136.7M1MIT1 day ago

Dependencies

Declared by reusify v1.1.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (7)

@types/node ^22.9.0c8 ^10.1.2eslint ^9.13.0neostandard ^0.12.0pre-commit ^1.2.2tape ^5.0.0typescript ^5.2.2

Used by

Popular packages that depend on reusify.

Relationship graph

Dependencies (left) and dependents (right) of reusify.

fastqreusify
reusify dependencies dependents

Frequently installed together

Release history

1 release in the last two years, typically about 112 days apart.

Recent versions of reusify
VersionPublishedSizeLicense
1.1.0latest1 year ago11 KBMIT
1.0.48 years agoMIT
1.0.39 years agoMIT
1.0.29 years agoMIT
1.0.110 years agoMIT
1.0.011 years agoMIT

Overview

reusify is an npm package that reuse objects and functions with style. It is extremely widely used, with about 91M downloads per week and 1 known dependents in the graph. The latest version is 1.1.0, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need reuse objects and functions with style and value a battle-tested, widely-adopted solution.

When not to use it

Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.

Pros

  • Large, well-established user base (91M weekly downloads).
  • Ships TypeScript type definitions.
  • Clear open-source license (MIT).

Cons

  • No significant drawbacks detected from available metadata.

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Frequently asked questions

Should I use reusify?

reusify is usable, with caveats. Last published 561 days ago.

How do I install reusify?

Run `npm install reusify` to add reusify to your npm project.

What license is reusify released under?

reusify is distributed under the MIT license.

How popular is reusify?

reusify has approximately 91,012,364 downloads per week and 1 known dependent packages.

Is reusify still maintained?

The most recent release of reusify (v1.1.0) was published 1 year ago.

Does reusify run install scripts?

No. reusify does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.