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 Jun 22, 2024 via pnpm

inherits 2.0.4

Browser-friendly inheritance fully compatible with standard node.js inherits()
Package summary
Share
0
issues
1
license
1
ISC
Package created
7 Apr 2011
Version published
19 Jun 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:
inherits@2.0.4
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 inherits 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does inherits do?

The "inherits" package, available on NPM, enables browser-friendly inheritance that is entirely compatible with the standard node.js inherits() function. It is designed to provide a standard implementation of the "inherits" function from the node.js util module in a node environment. However, it also offers a browser-friendly alternative implementation. This makes it ideal for developers who are looking to include the "inherits" function in their client-side code, but do not wish to include the entire "util" package, which tends to be large and unnecessary if the "inherits" function is all they need.

How do you use inherits?

To use the "inherits" package in your JavaScript project, you will first need to install it via NPM. Once installed, you can require it in your JavaScript file using the require syntax. Afterwards, you can use the function as per the standard node.js inherits() function. Here's a basic usage example:

var inherits = require('inherits');
// You can now use `inherits` in your project

It's important to note that there are differences between version ~1.0 and ~2.0 of this package. The latter uses super_ instead of super for referencing the superclass. Furthermore, the newer version overwrites the current prototype, while the older version preserves any existing fields on it. Therefore, exercise caution when switching from version ~1.0 to ~2.0.

Where are the inherits docs?

The documentation for the "inherits" package can be found on its GitHub repository: isaacs/inherits. This includes the instructions on how to use it, various intricacies of its implementation, and differences across its versions. It's an excellent resource to understand how you can use the "inherits" function in both node.js and browser environments in the most efficient way. For more in-depth information on the inherits() function, you can also refer to the official Node.js documentation: Node.js util.inherits.