lilobj
A li'l object inheritance sugar.
Documentation
[obj|arr].extends(properties)
Returns new object with the prototype of the caller and the given properties.
instance.creates(args...)
Returns new object with the prototype of the caller and invokes the construct method with args
instance.isA(prototype)
returns true if the caller has the given prototype
Browser usage
load dist/lilobj.js or dist/lilobj.min.js in you browser and call it like this:
{ var lilobj = ; var beer = lilobjobj; var ale = beer; //returns true ale };
Node usage
Install via npm: npm install lilobj
var lilobj = ; var beer = lilobjobj; var ale = beer; //returns trueale
License
Copyright (c) 2012 August Hovland Licensed under the MIT license.