Home

Awesome

inherit

inherit from an object

browser support

Build Status

install

$ npm install bloody-inherit

require

var inherit = require("bloody-inherit")

api

inherit(proto) > object

creates an object that inherits from proto using prototypal inhertance (uses Object.create when available).

example

var proto = {
  value : 1
}
var object = inherit(proto)
object.value // 1
proto.value = 2
object.value // 2