bloody-inherit
v1.1.0
Published
inherit from an object
Downloads
3
Readme
inherit
inherit from an object
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