Have ideas to improve npm?Join in the discussion! »

    util.inherits

    1.0.3 • Public • Published

    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

    Install

    npm i util.inherits

    DownloadsWeekly Downloads

    5,191

    Version

    1.0.3

    License

    MIT

    Last publish

    Collaborators

    • avatar