1.0.0 • Published 9 years ago
own-enumerable-keys v1.0.0
own-enumerable-keys
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
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.
1.0.0
9 years ago