fleet-docs/node_modules/object-keys
divya-mohan0209 9de94a264c Initial commit 2022-09-22 09:54:31 +05:30
..
test Initial commit 2022-09-22 09:54:31 +05:30
.editorconfig Initial commit 2022-09-22 09:54:31 +05:30
.eslintrc Initial commit 2022-09-22 09:54:31 +05:30
.travis.yml Initial commit 2022-09-22 09:54:31 +05:30
CHANGELOG.md Initial commit 2022-09-22 09:54:31 +05:30
LICENSE Initial commit 2022-09-22 09:54:31 +05:30
README.md Initial commit 2022-09-22 09:54:31 +05:30
implementation.js Initial commit 2022-09-22 09:54:31 +05:30
index.js Initial commit 2022-09-22 09:54:31 +05:30
isArguments.js Initial commit 2022-09-22 09:54:31 +05:30
package.json Initial commit 2022-09-22 09:54:31 +05:30

README.md

#object-keys Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

browser support

An Object.keys shim. Invoke its "shim" method to shim Object.keys if it is unavailable.

Most common usage:

var keys = Object.keys || require('object-keys');

Example

var keys = require('object-keys');
var assert = require('assert');
var obj = {
	a: true,
	b: true,
	c: true
};

assert.deepEqual(keys(obj), ['a', 'b', 'c']);
var keys = require('object-keys');
var assert = require('assert');
/* when Object.keys is not present */
delete Object.keys;
var shimmedKeys = keys.shim();
assert.equal(shimmedKeys, keys);
assert.deepEqual(Object.keys(obj), keys(obj));
var keys = require('object-keys');
var assert = require('assert');
/* when Object.keys is present */
var shimmedKeys = keys.shim();
assert.equal(shimmedKeys, Object.keys);
assert.deepEqual(Object.keys(obj), keys(obj));

Source

Implementation taken directly from es5-shim, with modifications, including from lodash.

Tests

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