Skip to content


Subversion checkout URL

You can clone with
Download ZIP
both browser- and node-friendly inherits() for browserify
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


ATTENTION This package is deprecated and is no longer supported. Please, use Isaac's inherits package instead.

The Story

The idea listed below have been moved to inherits package version 2.0 (and above) to have exactly one canonical 'inherits' package and don't confuse people by having two options.

The Idea

inherits for browserify

inherits function is used in almost every module. It is located in util package and browserify provides you browser-adapted shim of this package. It's good, but the shim is very large, because:

  • it contains polyfill to make inherits work with old browsers
  • it contains a lot of unrelated stuff
  • it contains the shim for process global, because this unrelated stuff depends on it

browserify produces a lot of supportive code for util package. It is ok for large projects, but too much for tiny libraries.

inh is aimed to solve this problem. For node.js it just returns standard inherits implementation from util package, but for browserify it provides browser-specific version (using "browser" key in package.json).

It's recommended to use inh in all your code that can be used on client side.


npm install inh and then use

var inherits = require('inh');

instead of

var inherits = require('util').inherits;
Something went wrong with that request. Please try again.