set-function-length
npmv1.2.2TypeScriptSet a function's length property
Adopt with care
set-function-length is usable, with caveats. Last published 914 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- DMaintenance: grade D, Poor — a real concern.
Last published 914 days ago.
- BWeight: grade B, Good.
Pulls in 13 transitive packages, about 207 KB installed (at least — some of the tree is still being crawled).
- 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 set-function-length to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Part of this dependency tree has not been crawled yet, so these figures are a lower bound rather than a final total.
Licenses in the dependency tree
Every license you inherit by installing set-function-length, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >= 0.4
- Module format
- CommonJS only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the set-function-length README.
var setFunctionLength = require('set-function-length');
var assert = require('assert');
function zero() {}
function one(_) {}
function two(_, __) {}
assert.equal(zero.length, 0);
assert.equal(one.length, 1);
assert.equal(two.length, 2);
assert.equal(setFunctionLength(zero, 10), zero);
assert.equal(setFunctionLength(one, 11), one);
assert.equal(setFunctionLength(two, 12), two);set-function-length vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| set-function-lengththis page | 0 | 1 | MIT | 2 years ago |
| call-bind | 80.7M | 5 | MIT | 17 hours ago |
| call-bound | 0 | 7 | MIT | 14 hours ago |
| jsesc | 158.9M | 1 | MIT | 19 hours ago |
| eslint | 138.4M | 279 | MIT | 1 day ago |
| es-define-property | 131.3M | 4 | MIT | 14 hours ago |
Dependencies
Declared by set-function-length v1.2.2. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (6)
Dev (26)
Used by
Popular packages that depend on set-function-length.
Relationship graph
Dependencies (left) and dependents (right) of set-function-length.
Frequently installed together
An AST-based pattern checker for JavaScript.
`Object.defineProperty`, but not IE 8's broken one.
string representations of objects in node and the browser
Get and robustly cache all JS language-level intrinsics at first require time
Helper functions around Function call/apply/bind, for use in `call-bind`
Release history
No releases in the last two years, typically about 23 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 1.2.2latest | 2 years ago | 14 KB | MIT |
| 1.2.1 | 2 years ago | 19 KB | MIT |
| 1.2.0 | 2 years ago | 18 KB | MIT |
| 1.1.1 | 2 years ago | 11 KB | MIT |
| 1.1.0 | 2 years ago | 10 KB | MIT |
| 1.0.1 | 2 years ago | 8.7 KB | MIT |
| 1.0.0 | 2 years ago | 7.7 KB | MIT |
Overview
set-function-length is an npm package that set a function's length property. It has 1 known dependents in the graph. The latest version is 1.2.2, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need set a function's length property and value a focused solution.
When not to use it
Consider an alternative if you need to minimize your dependency tree, or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- Large dependency tree (32 direct dependencies) increases install size and audit surface.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use set-function-length?
set-function-length is usable, with caveats. Last published 914 days ago.
How do I install set-function-length?
Run `npm install set-function-length` to add set-function-length to your npm project.
How many dependencies does set-function-length have?
set-function-length declares 32 direct dependencies and pulls in 13 packages in total once its runtime tree is resolved totalling about 207 KB on disk.
What license is set-function-length released under?
set-function-length is distributed under the MIT license.
How popular is set-function-length?
npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on set-function-length.
Is set-function-length still maintained?
The most recent release of set-function-length (v1.2.2) was published 2 years ago.
Does set-function-length run install scripts?
No. set-function-length does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.