node package manager


Simple propertiesObject creation for use with Object.create()


The propertiesObject is painfully verbose. own is a helper function that makes it easy to create enumerable and writable propertiesObjects from an object literal.

$ npm install own

Use the result of own() as the second parameter in Object.create():

var own = require('own')
var yourObject = Object.create(YOUR_PROTOTYPE, own({ hello: 'world' }))
yourObject.hasOwnProperty('hello') // true 
yourObject.hello // 'world' 

Install the dependencies and run:

$ npm test

MIT License, see LICENSE for details.