own-keys
Robustly get an object's own property keys (strings and symbols), including non-enumerables when possible
Last updated 4 months ago by ljharb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install own-keys 
SYNC missed versions from official npm registry.

own-keys Version Badge

github actions coverage License Downloads

npm badge

Robustly get an object's own property keys (strings and symbols), including non-enumerables when possible.

Getting started

npm install --save own-keys

Usage/Examples

var ownKeys = require('own-keys');
var assert = require('assert');

assert.deepEqual(ownKeys({ a: 1, b: 2 }), ['a', 'b']);
assert.deepEqual(ownKeys([1, 2, 3]), [0, 1, 2, 'length']);

Tests

Simply clone the repo, npm install, and run npm test

Current Tags

  • 1.0.2                                ...           latest (4 months ago)

3 Versions

  • 1.0.2                                ...           4 months ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Total 6
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 0
Last Month 2
Dependencies (4)
Dev Dependencies (20)

© 2010 - cnpmjs.org x YWFE | Home | YWFE