is-number-object
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -1,16 +0,84 @@ | ||
1.0.3 / 2015-01-29 | ||
================= | ||
* If @@toStringTag is not present, use the old-school Object#toString test. | ||
# Changelog | ||
1.0.2 / 2015-01-29 | ||
================= | ||
* Fix package.json | ||
* Improve optimizability of the non-try/catch part. | ||
All notable changes to this project will be documented in this file. | ||
1.0.1 / 2015-01-29 | ||
================= | ||
* Add early exits for typeof number, or typeof not "object". | ||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
1.0.0 / 2015-01-28 | ||
================= | ||
* Initial release. | ||
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). | ||
## [v1.0.4](https://github.com/inspect-js/is-number-object/compare/v1.0.3...v1.0.4) - 2019-12-19 | ||
### Commits | ||
- [Tests] use shared travis-ci configs [`792b5aa`](https://github.com/inspect-js/is-number-object/commit/792b5aa5e7313ddf5507f7283bb7d5d5c646b11b) | ||
- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v5.12`, `v4.9`; use `nvm install-latest-npm` [`dc66db7`](https://github.com/inspect-js/is-number-object/commit/dc66db7dd1eca0263f6602597eb40601519e912e) | ||
- Update `eslint`, `tape`, `semver`; use my personal shared `eslint` config [`7660fed`](https://github.com/inspect-js/is-number-object/commit/7660fed03a7060eb5c91e74b9a17303d4fac1056) | ||
- [Tests] remove `jscs` [`f1fee97`](https://github.com/inspect-js/is-number-object/commit/f1fee97423478bcc653c844fadda55138d9b9a54) | ||
- [meta] add `auto-changelog` [`4b1c225`](https://github.com/inspect-js/is-number-object/commit/4b1c2253770eb18761a1e8b157772028d6f742c4) | ||
- [meta] remove unused Makefile and associated utilities [`379b979`](https://github.com/inspect-js/is-number-object/commit/379b9793d9c61d7889e53bd9de9578dca9964ebc) | ||
- Update `covert`, `jscs`, `eslint`, `semver` [`16d2af8`](https://github.com/inspect-js/is-number-object/commit/16d2af82a6c93aee614f7a4b2c468411c743e95f) | ||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `is`, `replace`, `semver`, `tape` [`21c0f04`](https://github.com/inspect-js/is-number-object/commit/21c0f0431984b87443c6acb9f003368feb7b4368) | ||
- Update `is`, `tape`, `covert`, `jscs`, `editorconfig-tools`, `nsp`, `eslint`, `semver`. Add `replace`. Use `^` instead of `~`. [`19d6ee3`](https://github.com/inspect-js/is-number-object/commit/19d6ee3a3d4a87764d57316804fd8b882ba5197c) | ||
- Update `eslint` [`d32754b`](https://github.com/inspect-js/is-number-object/commit/d32754bcca0033e01eba531c4353d1239e992203) | ||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `replace` [`1df8165`](https://github.com/inspect-js/is-number-object/commit/1df8165dd63d9f2f78ccb78e905d0a6b3e302884) | ||
- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`675372b`](https://github.com/inspect-js/is-number-object/commit/675372b115fb20b5034f40bcbb5560c6c0512746) | ||
- [readme] clean up readme; remove testling; fix repo URLs [`80e29c4`](https://github.com/inspect-js/is-number-object/commit/80e29c4d6d0811fc361e95ee83b81280bf3ae3f5) | ||
- [Tests] up to `node` `v12.7`, `v10.16`, `v8.16` [`287a968`](https://github.com/inspect-js/is-number-object/commit/287a9687b1fc3d091ec231c06f19a19ff7b0e8f6) | ||
- Test on latest `iojs` and `node` versions. [`11c98a2`](https://github.com/inspect-js/is-number-object/commit/11c98a23b232cb21c7daab797fd63875c2970681) | ||
- [actions] add automatic rebasing / merge commit blocking [`022d026`](https://github.com/inspect-js/is-number-object/commit/022d026129df445f239ba2ecd8d47a2786242d75) | ||
- [meta] create FUNDING.yml [`7f52710`](https://github.com/inspect-js/is-number-object/commit/7f527107168aad7108b7c262d295dcf44e03214d) | ||
- [Dev Deps] update `is`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`bc8cd50`](https://github.com/inspect-js/is-number-object/commit/bc8cd508fe4440168f9b049be3ddf93c56c06c49) | ||
- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`1f9200b`](https://github.com/inspect-js/is-number-object/commit/1f9200b7c56840dc23eeeca5d0ee4f64a0446e08) | ||
- [Tests] up to `node` `v12.11` [`706d50a`](https://github.com/inspect-js/is-number-object/commit/706d50a779b90feb3f4d2ae88d8189d19b913073) | ||
- [Dev Deps] update `jscs` [`e3591a4`](https://github.com/inspect-js/is-number-object/commit/e3591a445b1af25d46632eafea51efa07b4eb6dc) | ||
- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`baf4ee7`](https://github.com/inspect-js/is-number-object/commit/baf4ee749fb65ec12e9cab102e77aa0e14312109) | ||
- Update `nsp`, `eslint` [`61b18d5`](https://github.com/inspect-js/is-number-object/commit/61b18d5b44542fddf4950534d506b20d8c8b1f44) | ||
- Update `eslint`, `semver` [`52e61bd`](https://github.com/inspect-js/is-number-object/commit/52e61bd4334c0a1afacd147fd0bc1e2c1be10df5) | ||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `has-symbols`; add `safe-publish-latest` [`79db7f6`](https://github.com/inspect-js/is-number-object/commit/79db7f610d2bcf5f0d6e8ca834f7402504101072) | ||
- Only apps should have lockfiles [`677b9b4`](https://github.com/inspect-js/is-number-object/commit/677b9b4fb6ad9d7b984cb0f89c8b5a6df143b29a) | ||
- Test on `io.js` `v2.2` [`e8a38b2`](https://github.com/inspect-js/is-number-object/commit/e8a38b2fe73b841b0ed55d9f60573d460a4f2a62) | ||
- [meta] add `funding` field [`85315e7`](https://github.com/inspect-js/is-number-object/commit/85315e75c119a2aef70a766f2ddc1079b64d006b) | ||
- [Dev Deps] update `eslint`, `tape` [`f3581aa`](https://github.com/inspect-js/is-number-object/commit/f3581aaea310546f6ee4612990468d39f058d320) | ||
- [Tests] use `eclint` instead of `editorconfig-tools` [`7b53680`](https://github.com/inspect-js/is-number-object/commit/7b5368071000eb1c715aeeee5ff47ffdbee9fe5c) | ||
- [Dev Deps] update `semver`, `tape` [`d6b524a`](https://github.com/inspect-js/is-number-object/commit/d6b524ac2e8c0240c436cbe8828671e383d51fd5) | ||
- [Dev Deps] Update `tape`, `eslint` [`be19203`](https://github.com/inspect-js/is-number-object/commit/be19203dee0aa70ff8f09823bf880a38b824e1ed) | ||
- Test up to `io.js` `v2.1` [`feb7ba6`](https://github.com/inspect-js/is-number-object/commit/feb7ba63a0816f1d36419ce240f96e9b4e4c90ba) | ||
- Test up to `io.js` `v3.0` [`7be1f0a`](https://github.com/inspect-js/is-number-object/commit/7be1f0a25dc59b6606be9ee1ace38cb7039a59d2) | ||
- [Dev Deps] update `tape` [`d9a2318`](https://github.com/inspect-js/is-number-object/commit/d9a2318bc82477e9321e961def11e28d364e5562) | ||
- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`a6cd411`](https://github.com/inspect-js/is-number-object/commit/a6cd411c6bd92691a48b52683afce584c2c6b21b) | ||
- Test on `io.js` `v2.4` [`46c2e7f`](https://github.com/inspect-js/is-number-object/commit/46c2e7f2ce8ad7f8ab3c1da827d93fc2780eff06) | ||
- Test on `io.js` `v2.3` [`9c344b0`](https://github.com/inspect-js/is-number-object/commit/9c344b0df83628908a1f776a3f2e5fc4fae1d4d2) | ||
- Fix tests for faked @@toStringTag [`f8c446e`](https://github.com/inspect-js/is-number-object/commit/f8c446e9fc320c23807717356e259529f494b9f3) | ||
## [v1.0.3](https://github.com/inspect-js/is-number-object/compare/v1.0.2...v1.0.3) - 2015-01-30 | ||
### Commits | ||
- If @@toStringTag is not present, use the old-school Object#toString test. [`9b2a4df`](https://github.com/inspect-js/is-number-object/commit/9b2a4df6ccf903e89198d4244eeb7f47a7056327) | ||
## [v1.0.2](https://github.com/inspect-js/is-number-object/compare/v1.0.1...v1.0.2) - 2015-01-29 | ||
### Commits | ||
- Improve optimizability of the non-try/catch part. [`7e6be2f`](https://github.com/inspect-js/is-number-object/commit/7e6be2fd2346557fc81bd544ac8745021c50e266) | ||
- Fix package.json [`4f2ebea`](https://github.com/inspect-js/is-number-object/commit/4f2ebeae09c45e1eefeb2c10a011ff2ef0aca921) | ||
## [v1.0.1](https://github.com/inspect-js/is-number-object/compare/v1.0.0...v1.0.1) - 2015-01-29 | ||
### Commits | ||
- Use Object() instead of new Number() [`1aaa746`](https://github.com/inspect-js/is-number-object/commit/1aaa746c26878a0f698aabea4d88215311f2a38d) | ||
- Add early exits for typeof number, or typeof not "object". [`eae4337`](https://github.com/inspect-js/is-number-object/commit/eae43375d3f88e04bb10eabd954e5a6b66ad5305) | ||
## v1.0.0 - 2015-01-28 | ||
### Commits | ||
- Dotfiles. [`9c74e3e`](https://github.com/inspect-js/is-number-object/commit/9c74e3eb2b10398d4022de7c4015531e874f06c8) | ||
- `make release` [`a99e5ae`](https://github.com/inspect-js/is-number-object/commit/a99e5aeb3995a7d543fc5833722bc02011fabad6) | ||
- package.json [`4fed9ef`](https://github.com/inspect-js/is-number-object/commit/4fed9ef7c35ccfc45ca8acd3c92c9cb91c7daa6d) | ||
- Read me [`c91d6ba`](https://github.com/inspect-js/is-number-object/commit/c91d6ba00de79eaaac5fec7c9d8866d61d0abb62) | ||
- Initial commit [`629fb96`](https://github.com/inspect-js/is-number-object/commit/629fb969f076e0802c799b368c7b02556bb0750e) | ||
- Tests. [`a39de62`](https://github.com/inspect-js/is-number-object/commit/a39de624785cc204ed7c0ea5518f1c878870ceb1) | ||
- Implementation. [`aedd91e`](https://github.com/inspect-js/is-number-object/commit/aedd91e6fc23f00852ad1266b6c19f32b7f93a22) |
@@ -17,5 +17,9 @@ 'use strict'; | ||
module.exports = function isNumberObject(value) { | ||
if (typeof value === 'number') { return true; } | ||
if (typeof value !== 'object') { return false; } | ||
if (typeof value === 'number') { | ||
return true; | ||
} | ||
if (typeof value !== 'object') { | ||
return false; | ||
} | ||
return hasToStringTag ? tryNumberObject(value) : toStr.call(value) === numClass; | ||
}; |
{ | ||
"name": "is-number-object", | ||
"version": "1.0.3", | ||
"author": "Jordan Harband", | ||
"version": "1.0.4", | ||
"author": "Jordan Harband <ljharb@gmail.com>", | ||
"funding": { | ||
"url": "https://github.com/sponsors/ljharb" | ||
}, | ||
"description": "Is this value a JS Number object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", | ||
@@ -9,14 +12,16 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "npm run lint && node --harmony --es-staging test.js && npm run security", | ||
"coverage": "covert test.js", | ||
"coverage-quiet": "covert test.js --quiet", | ||
"lint": "npm run jscs && npm run eslint", | ||
"jscs": "jscs test.js *.js", | ||
"eslint": "eslint test.js *.js", | ||
"eccheck": "editorconfig-tools check *.js **/*.js > /dev/null", | ||
"security": "nsp package" | ||
"prepublish": "safe-publish-latest", | ||
"pretest": "npm run lint", | ||
"tests-only": "node --harmony --es-staging test", | ||
"test": "npm run tests-only", | ||
"posttest": "npx aud", | ||
"coverage": "covert test/index.js", | ||
"lint": "eslint .", | ||
"eccheck": "eclint check *.js **/*.js > /dev/null", | ||
"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)\")\"" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/ljharb/is-number-object.git" | ||
"url": "git://github.com/inspect-js/is-number-object.git" | ||
}, | ||
@@ -32,15 +37,16 @@ "keywords": [ | ||
"devDependencies": { | ||
"foreach": "~2.0.5", | ||
"is": "~2.2.0", | ||
"tape": "~3.4.0", | ||
"indexof": "~0.0.1", | ||
"covert": "1.0.0", | ||
"jscs": "~1.10.0", | ||
"editorconfig-tools": "~0.0.1", | ||
"nsp": "~1.0.0", | ||
"eslint": "~0.12.0", | ||
"semver": "~4.2.0" | ||
"@ljharb/eslint-config": "^15.0.2", | ||
"auto-changelog": "^1.16.2", | ||
"covert": "^1.1.1", | ||
"eclint": "^2.8.1", | ||
"eslint": "^6.7.2", | ||
"foreach": "^2.0.5", | ||
"has-symbols": "^1.0.1", | ||
"indexof": "^0.0.1", | ||
"is": "^3.3.0", | ||
"safe-publish-latest": "^1.1.4", | ||
"tape": "^4.12.0" | ||
}, | ||
"testling": { | ||
"files": "test.js", | ||
"files": "test/index.js", | ||
"browsers": [ | ||
@@ -64,4 +70,10 @@ "iexplore/6.0..latest", | ||
"node": ">= 0.4" | ||
}, | ||
"auto-changelog": { | ||
"output": "CHANGELOG.md", | ||
"template": "keepachangelog", | ||
"unreleased": false, | ||
"commitLimit": false, | ||
"backfillLimit": false | ||
} | ||
} | ||
@@ -11,4 +11,2 @@ # is-number-object <sup>[![Version Badge][2]][1]</sup> | ||
[![browser support][9]][10] | ||
Is this value a JS Number object? This module works cross-realm/iframe, and despite ES6 @@toStringTag. | ||
@@ -44,11 +42,9 @@ | ||
[1]: https://npmjs.org/package/is-number-object | ||
[2]: http://vb.teelaun.ch/ljharb/is-number-object.svg | ||
[3]: https://travis-ci.org/ljharb/is-number-object.svg | ||
[4]: https://travis-ci.org/ljharb/is-number-object | ||
[5]: https://david-dm.org/ljharb/is-number-object.svg | ||
[6]: https://david-dm.org/ljharb/is-number-object | ||
[7]: https://david-dm.org/ljharb/is-number-object/dev-status.svg | ||
[8]: https://david-dm.org/ljharb/is-number-object#info=devDependencies | ||
[9]: https://ci.testling.com/ljharb/is-number-object.png | ||
[10]: https://ci.testling.com/ljharb/is-number-object | ||
[2]: http://versionbadg.es/inspect-js/is-number-object.svg | ||
[3]: https://travis-ci.org/inspect-js/is-number-object.svg | ||
[4]: https://travis-ci.org/inspect-js/is-number-object | ||
[5]: https://david-dm.org/inspect-js/is-number-object.svg | ||
[6]: https://david-dm.org/inspect-js/is-number-object | ||
[7]: https://david-dm.org/inspect-js/is-number-object/dev-status.svg | ||
[8]: https://david-dm.org/inspect-js/is-number-object#info=devDependencies | ||
[11]: https://nodei.co/npm/is-number-object.png?downloads=true&stars=true | ||
@@ -55,0 +51,0 @@ [license-image]: http://img.shields.io/npm/l/is-number-object.svg |
Sorry, the diff of this file is not supported yet
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
16520
11
10
56
53