Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 9, 2024 via pnpm

setprototypeof 1.2.0

A small polyfill for Object.setprototypeof
Package summary
Share
0
issues
1
license
1
ISC
Package created
4 Feb 2015
Version published
18 Jul 2019
Maintainers
1
Total deps
1
Direct deps
0
License
ISC

Issues

0
This package has no issues

Licenses

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
setprototypeof@1.2.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of setprototypeof 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does setprototypeof do?

SetPrototypeOf is a minimalistic, cross-platform npm package that serves as a polyfill for Object.setPrototypeOf. This package provides a function that allows you to set the prototype of an object after the object has been created -- a feature that is supported across all modern browsers and at least dating back to IE8. In other words, it allows you to dynamically add new properties or methods to the prototype of an existing object, enhancing the object's functionalities dynamically.

How do you use setprototypeof?

To use SetPrototypeOf in your project, you must first install it via npm command npm install --save setprototypeof. After installation is complete, you can import it in your JavaScript files using the require keyword, or for TypeScript, use the import keyword. Here's a quick JavaScript example:

// Require the module
var setPrototypeOf = require('setprototypeof');

// Initialize an object
var obj = {};

// Use setPrototypeOf to add new functionalities to the object's prototype
setPrototypeOf(obj, {
  foo: function () {
    return 'bar';
  }
});

// Call the newly added function
console.log(obj.foo()); // Outputs: bar

And for TypeScript:

// Import the module
import setPrototypeOf from 'setprototypeof';

After importing, you can use it exactly as shown in the JavaScript example.

Where are the setprototypeof docs?

The documentation for SetPrototypeOf resides in the README file of its GitHub repository. The readme file contains all the necessary information about what the package does and how to use it. For additional queries or in-depth exploration, you should refer to the official JavaScript documentation on Object.setPrototypeOf, as SetPrototypeOf is essentially a polyfill for it. You can access the SetPrototypeOf's GitHub repository at the following URL: https://github.com/wesleytodd/setprototypeof.