Comparing version 1.0.2 to 1.1.0
@@ -10,2 +10,12 @@ # Changelog | ||
## [v1.1.0](https://github.com/es-shims/object-is/compare/v1.0.2...v1.1.0) - 2020-04-14 | ||
### Commits | ||
- [New] convert to `es-shim-api` interface [`8749c08`](https://github.com/es-shims/object-is/commit/8749c086cd433c37bca668bbe11e4c91e717292f) | ||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`; add `safe-publish-latest` [`222a2a9`](https://github.com/es-shims/object-is/commit/222a2a9a2eb08be844bf4c619d1eb711d743c6f3) | ||
- [Dev Deps] update `auto-changelog`, `tape` [`1ea6a92`](https://github.com/es-shims/object-is/commit/1ea6a92153695074c4e3f2e2e0ec26b83f6b091a) | ||
- [Dev Deps] update `auto-changelog`; add `aud` [`1d129e0`](https://github.com/es-shims/object-is/commit/1d129e0dfe386a1e39fa4f3ff991198e885299b1) | ||
- [Tests] only audit prod deps [`ad12386`](https://github.com/es-shims/object-is/commit/ad1238688dcfe9170217b6b9a02122369979d221) | ||
## [v1.0.2](https://github.com/es-shims/object-is/compare/v1.0.1...v1.0.2) - 2019-12-15 | ||
@@ -12,0 +22,0 @@ |
28
index.js
'use strict'; | ||
// http://www.ecma-international.org/ecma-262/6.0/#sec-object.is | ||
var define = require('define-properties'); | ||
var numberIsNaN = function (value) { | ||
return value !== value; | ||
}; | ||
var implementation = require('./implementation'); | ||
var getPolyfill = require('./polyfill'); | ||
var shim = require('./shim'); | ||
module.exports = function is(a, b) { | ||
if (a === 0 && b === 0) { | ||
return 1 / a === 1 / b; | ||
} | ||
if (a === b) { | ||
return true; | ||
} | ||
if (numberIsNaN(a) && numberIsNaN(b)) { | ||
return true; | ||
} | ||
return false; | ||
}; | ||
var polyfill = getPolyfill(); | ||
define(polyfill, { | ||
getPolyfill: getPolyfill, | ||
implementation: implementation, | ||
shim: shim | ||
}); | ||
module.exports = polyfill; |
{ | ||
"name": "object-is", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "ES2015-compliant shim for Object.is - differentiates between -0 and +0", | ||
@@ -12,10 +12,12 @@ "author": "Jordan Harband", | ||
"scripts": { | ||
"version": "auto-changelog && git add CHANGELOG.md", | ||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", | ||
"prepublish": "safe-publish-latest", | ||
"pretest": "npm run lint", | ||
"tests-only": "node test", | ||
"test": "npm run tests-only", | ||
"posttest": "npx aud", | ||
"posttest": "npx aud --production", | ||
"coverage": "covert test", | ||
"lint": "eslint ." | ||
"prelint": "es-shim-api", | ||
"lint": "eslint .", | ||
"version": "auto-changelog && git add CHANGELOG.md", | ||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" | ||
}, | ||
@@ -38,12 +40,16 @@ "repository": { | ||
"shim", | ||
"polyfill" | ||
"polyfill", | ||
"es-shim API" | ||
], | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@ljharb/eslint-config": "^15.0.2", | ||
"auto-changelog": "^1.16.2", | ||
"@es-shims/api": "^2.1.2", | ||
"@ljharb/eslint-config": "^16.0.0", | ||
"aud": "^1.1.0", | ||
"auto-changelog": "^2.0.0", | ||
"covert": "^1.1.1", | ||
"eslint": "^6.7.2", | ||
"eslint": "^6.8.0", | ||
"has-symbols": "^1.0.1", | ||
"tape": "^4.11.0" | ||
"safe-publish-latest": "^1.1.4", | ||
"tape": "^5.0.0-next.5" | ||
}, | ||
@@ -50,0 +56,0 @@ "testling": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18380
13
96
9