own

own

Simple `propertiesObject` creation for use with `Object.create()`

Showing:

Popularity

Downloads/wk

364

GitHub Stars

0

Maintenance

Last Commit

7yrs ago

Contributors

1

Package

Dependencies

0

Size (min+gzip)

0.3KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Own

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.

Build Status

Installation

$ npm install own

Usage

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'

Tests

Install the dependencies and run:

$ npm test

License

MIT License, see LICENSE for details.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100