tree: a5d7404e6a2ccfd3720f87fde595af210b7eb668 [path history] [tgz]
  1. HISTORY.md
  2. index.js
  3. package.json
  4. README.md
node_modules/util.inherits/README.md

Build Status

util-inherits

util.inherits with compatibility.

util-inherits will try use Object.setPrototypeOf, if Object.setPrototypeOf is not supported, then Object.create, or manipulate prototype.

  • Browser friendly.
  • Does not rely on node utilities

Install

$ npm install util.inherits --save

Usage

const inherits = require('util.inherits')
const {EventEmitter} = require('events')

function MyClass () {
  // code ...
}

inherits(MyClass, EventEmitter)

License

MIT