own-keys (1.0.1)

Published 2026-02-24 14:02:15 +00:00 by atheaadmin

Installation

registry=
npm install own-keys@1.0.1
"own-keys": "1.0.1"

About this package

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

Dependencies

Dependencies

ID Version
get-intrinsic ^1.2.6
object-keys ^1.1.1
safe-push-apply ^1.0.0

Development Dependencies

ID Version
@arethetypeswrong/cli ^0.17.2
@ljharb/eslint-config ^21.1.1
@ljharb/tsconfig ^0.2.3
@types/get-intrinsic ^1.2.3
@types/isarray ^2.0.3
@types/object-keys ^1.0.3
@types/tape ^5.8.0
auto-changelog ^2.5.0
encoding ^0.1.13
eslint =8.8.0
evalmd ^0.0.19
has-property-descriptors ^1.0.2
has-symbols ^1.1.0
in-publish ^2.0.1
npmignore ^0.3.1
nyc ^10.3.2
safe-publish-latest ^2.0.0
tape ^5.9.0
typescript next

Keywords

own key keys propertykey string symbol enumerable non-enumerable robust
Details
npm
2026-02-24 14:02:15 +00:00
0
Jordan Harband
MIT
latest
4.4 KiB
Assets (1)
Versions (1) View all
1.0.1 2026-02-24