own-enumerable-keys
v1.0.0
Published
gets own enumerable property names and symbols
Downloads
517
Maintainers
Readme
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.