1.0.0 • Published 9 years ago

own-enumerable-keys v1.0.0

Weekly downloads
62
License
MIT
Repository
github
Last release
9 years ago

own-enumerable-keys

frozen

Gets own property names and Symbols that are enumerable.

Implementation from Sindre Sorhus' object-assign ponyfill.

Install

npm install own-enumerable-keys --save

Example

var keys = require('own-enumerable-keys')
var zip = Symbol('zip')

var obj = {
  foo: 'bar',
  blah: 'foo',
  [zip]: 'foobar'
}

keys(obj)
//=> ['foo', 'blah', Symbol(zip)]

Usage

NPM

keys = ownEnumerableKeys(obj)

For the given obj, returns a list of keys which represent its enumerable and own property and Symbol names.

See also:

License

MIT, see LICENSE.md for details.