object-keys

WebJar for object-keys

License

License

MIT
Categories

Categories

KeY Data Data Formats Formal Verification
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

object-keys
Last Version

Last Version

1.1.1
Release Date

Release Date

Type

Type

jar
Description

Description

object-keys
WebJar for object-keys
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/ljharb/object-keys

Download object-keys

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/object-keys/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>object-keys</artifactId>
    <version>1.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/object-keys/
implementation 'org.webjars.npm:object-keys:1.1.1'
// https://jarcasting.com/artifacts/org.webjars.npm/object-keys/
implementation ("org.webjars.npm:object-keys:1.1.1")
'org.webjars.npm:object-keys:jar:1.1.1'
<dependency org="org.webjars.npm" name="object-keys" rev="1.1.1">
  <artifact name="object-keys" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='object-keys', version='1.1.1')
)
libraryDependencies += "org.webjars.npm" % "object-keys" % "1.1.1"
[org.webjars.npm/object-keys "1.1.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

#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

Versions

Version
1.1.1
1.1.0
1.0.12
1.0.11
1.0.10
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
0.5.0
0.4.0