object-is

WebJar for object-is

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

object-is
Last Version

Last Version

1.1.5
Release Date

Release Date

Type

Type

jar
Description

Description

object-is
WebJar for object-is
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/es-shims/object-is

Download object-is

How to add to project

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

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : call-bind jar [1.0.2,2)
org.webjars.npm : define-properties jar [1.1.3,2)

Project Modules

There are no modules declared in this project.

#object-is Version Badge

dependency status dev dependency status License Downloads

npm badge

ES2015-compliant shim for Object.is - differentiates between -0 and +0, and can compare to NaN.

Essentially, Object.is returns the same value as === - but true for NaN, and false for -0 and +0.

This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec.

Example

Object.is = require('object-is');
var assert = require('assert');

assert.ok(Object.is());
assert.ok(Object.is(undefined));
assert.ok(Object.is(undefined, undefined));
assert.ok(Object.is(null, null));
assert.ok(Object.is(true, true));
assert.ok(Object.is(false, false));
assert.ok(Object.is('foo', 'foo'));

var arr = [1, 2];
assert.ok(Object.is(arr, arr));
assert.equal(Object.is(arr, [1, 2]), false);

assert.ok(Object.is(0, 0));
assert.ok(Object.is(-0, -0));
assert.equal(Object.is(0, -0), false);

assert.ok(Object.is(NaN, NaN));
assert.ok(Object.is(Infinity, Infinity));
assert.ok(Object.is(-Infinity, -Infinity));

Tests

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

org.webjars.npm

ECMAScript Shims

A community host for shims and polyfills that are compliant to EcmaScript specs.

Versions

Version
1.1.5
1.1.3
1.1.2
1.0.2
1.0.1