pax_global_header00006660000000000000000000000064136172125000014507gustar00rootroot0000000000000052 comment=05c19267a6abf674303f5fa57b09436cedfbf11e number-is-nan-2.0.0/000077500000000000000000000000001361721250000141615ustar00rootroot00000000000000number-is-nan-2.0.0/.editorconfig000066400000000000000000000002571361721250000166420ustar00rootroot00000000000000root = true [*] indent_style = tab end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [*.yml] indent_style = space indent_size = 2 number-is-nan-2.0.0/.gitattributes000066400000000000000000000000231361721250000170470ustar00rootroot00000000000000* text=auto eol=lf number-is-nan-2.0.0/.github/000077500000000000000000000000001361721250000155215ustar00rootroot00000000000000number-is-nan-2.0.0/.github/funding.yml000066400000000000000000000000611361721250000176730ustar00rootroot00000000000000github: sindresorhus tidelift: npm/number-is-nan number-is-nan-2.0.0/.github/security.md000066400000000000000000000002631361721250000177130ustar00rootroot00000000000000# Security Policy To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. number-is-nan-2.0.0/.gitignore000066400000000000000000000000271361721250000161500ustar00rootroot00000000000000node_modules yarn.lock number-is-nan-2.0.0/.npmrc000066400000000000000000000000231361721250000152740ustar00rootroot00000000000000package-lock=false number-is-nan-2.0.0/.travis.yml000066400000000000000000000000551361721250000162720ustar00rootroot00000000000000language: node_js node_js: - '12' - '10' number-is-nan-2.0.0/index.js000066400000000000000000000001541361721250000156260ustar00rootroot00000000000000'use strict'; module.exports = function (value) { return typeof value === 'number' && value !== value; }; number-is-nan-2.0.0/license000066400000000000000000000021251361721250000155260ustar00rootroot00000000000000MIT License Copyright (c) Sindre Sorhus (sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. number-is-nan-2.0.0/package.json000066400000000000000000000011271361721250000164500ustar00rootroot00000000000000{ "name": "number-is-nan", "version": "2.0.0", "description": "ES2015 `Number.isNaN()` ponyfill", "license": "MIT", "repository": "sindresorhus/number-is-nan", "funding": "https://github.com/sponsors/sindresorhus", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=0.10.0" }, "scripts": { "test": "ava" }, "files": [ "index.js" ], "keywords": [ "es2015", "ecmascript", "ponyfill", "polyfill", "shim", "number", "is", "nan", "not" ], "devDependencies": { "ava": "^3.2.0" } } number-is-nan-2.0.0/readme.md000066400000000000000000000016461361721250000157470ustar00rootroot00000000000000# number-is-nan [![Build Status](https://travis-ci.org/sindresorhus/number-is-nan.svg?branch=master)](https://travis-ci.org/sindresorhus/number-is-nan) > ES2015 [`Number.isNaN()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) [ponyfill](https://ponyfill.com) ## Install ``` $ npm install number-is-nan ``` ## Usage ```js const numberIsNan = require('number-is-nan'); numberIsNan(NaN); //=> true numberIsNan('unicorn'); //=> false ``` ---
Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.
number-is-nan-2.0.0/test.js000066400000000000000000000007341361721250000155020ustar00rootroot00000000000000'use strict'; const test = require('ava'); Number.isNaN = undefined; const numberIsNan = require('.'); test('main', t => { t.true(numberIsNan(NaN)); t.false(numberIsNan()); t.false(numberIsNan(true)); t.false(numberIsNan(false)); t.false(numberIsNan(null)); t.false(numberIsNan(0)); t.false(numberIsNan(Infinity)); t.false(numberIsNan(-Infinity)); t.false(numberIsNan('')); t.false(numberIsNan('unicorn')); t.false(numberIsNan({})); t.false(numberIsNan([])); });