inherit-class

1.0.1 • Public • Published

inherit-class

frozen

Like util.inherits but without any cruft. Aimed at ES5 (IE 10+), does not pollute classes with super_, and uses the same code path in Node and the browser.

Example

var inherits = require('inherit-class')
 
function MyClass() {
  BaseClass.call(this)
}
 
inherits(MyClass, BaseClass)

Install

npm install inherit-class --save

Usage

NPM

inherits(class, superClass)

Overrides the prototype of class so that it inherits from superClass.

License

MIT, see LICENSE.md for details.

Package Sidebar

Install

npm i inherit-class

Weekly Downloads

3

Version

1.0.1

License

MIT

Last publish

Collaborators

  • mattdesl