setprototypeof
npmv1.2.0TypeScriptA small polyfill for Object.setprototypeof
Not recommended for new projects
No — setprototypeof should not be adopted for new projects. Last published 2611 days ago.
- AAdoption: grade A, Excellent.
92M downloads per week and 1 known dependents.
- FMaintenance: grade F, Failing.
Last published 2611 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 3.9 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
ISC — 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 setprototypeof 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.
Compatibility
- Node.js
- No constraint declared
- Module format
- CommonJS only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the setprototypeof README.
var setPrototypeOf = require('setprototypeof')
var obj = {}
setPrototypeOf(obj, {
foo: function () {
return 'bar'
}
})
obj.foo() // barsetprototypeof 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 |
|---|---|---|---|---|
| setprototypeofthis page | 92M | 1 | ISC | 7 years ago |
| es-define-property | 131.3M | 4 | MIT | 1 day ago |
| merge-descriptors | 113M | 1 | MIT | 1 day ago |
| is-plain-obj | 112.9M | 1 | MIT | 1 day ago |
| reusify | 91M | 1 | MIT | 1 day ago |
| css.escape | 48.7M | 2 | MIT | 1 day ago |
Dependencies
Declared by setprototypeof v1.2.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (2)
Used by
Popular packages that depend on setprototypeof.
Relationship graph
Dependencies (left) and dependents (right) of setprototypeof.
Frequently installed together
An AST-based pattern checker for JavaScript.
Convert a string of words to a JavaScript identifier
Deprecate all the things
HTTP status utility
Browser-friendly inheritance fully compatible with standard node.js inherits()
Release history
No releases in the last two years, typically about 281 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 1.2.0latest | 7 years ago | 3.9 KB | ISC |
| 1.1.1 | 7 years ago | 3.8 KB | ISC |
| 1.1.0 | 9 years ago | — | ISC |
| 1.0.3 | 9 years ago | — | ISC |
| 1.0.2 | 9 years ago | — | ISC |
| 1.0.1 | 10 years ago | — | ISC |
| 1.0.0 | 11 years ago | — | ISC |
Overview
setprototypeof is an npm package that a small polyfill for Object.setprototypeof. It is extremely widely used, with about 92M downloads per week and 1 known dependents in the graph. The latest version is 1.2.0, released under the ISC license.
Who should use it
Teams working in the npm ecosystem who need a small polyfill for Object.setprototypeof 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 (92M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (ISC).
- Lean dependency tree (2 direct dependencies).
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 setprototypeof?
No — setprototypeof should not be adopted for new projects. Last published 2611 days ago.
How do I install setprototypeof?
Run `npm install setprototypeof` to add setprototypeof to your npm project.
What license is setprototypeof released under?
setprototypeof is distributed under the ISC license.
How popular is setprototypeof?
setprototypeof has approximately 91,950,747 downloads per week and 1 known dependent packages.
Is setprototypeof still maintained?
The most recent release of setprototypeof (v1.2.0) was published 7 years ago.
Does setprototypeof run install scripts?
No. setprototypeof does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.