own-keys
Robustly get an object's own property keys (strings and symbols), including non-enumerables when possible
Last updated a year ago by ljharb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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.1                                ...           latest (a year ago)

2 Versions

  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 36
This Month 54
Last Day 2
Last Week 25
Last Month 70
Dependencies (3)
Dev Dependencies (19)
Dependents (2)

Copyright 2013 - present © cnpmjs.org | Home |