pax_global_header00006660000000000000000000000064136172115360014517gustar00rootroot0000000000000052 comment=1001187ed027a76051c066408358e769fb61786e is-finite-1.1.0/000077500000000000000000000000001361721153600134055ustar00rootroot00000000000000is-finite-1.1.0/.editorconfig000066400000000000000000000002571361721153600160660ustar00rootroot00000000000000root = 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 is-finite-1.1.0/.gitattributes000066400000000000000000000000231361721153600162730ustar00rootroot00000000000000* text=auto eol=lf is-finite-1.1.0/.github/000077500000000000000000000000001361721153600147455ustar00rootroot00000000000000is-finite-1.1.0/.github/funding.yml000066400000000000000000000001631361721153600171220ustar00rootroot00000000000000github: sindresorhus open_collective: sindresorhus tidelift: npm/is-finite custom: https://sindresorhus.com/donate is-finite-1.1.0/.github/security.md000066400000000000000000000002631361721153600171370ustar00rootroot00000000000000# Security Policy To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. is-finite-1.1.0/.gitignore000066400000000000000000000000271361721153600153740ustar00rootroot00000000000000node_modules yarn.lock is-finite-1.1.0/.npmrc000066400000000000000000000000231361721153600145200ustar00rootroot00000000000000package-lock=false is-finite-1.1.0/.travis.yml000066400000000000000000000000551361721153600155160ustar00rootroot00000000000000language: node_js node_js: - '12' - '10' is-finite-1.1.0/index.js000066400000000000000000000002571361721153600150560ustar00rootroot00000000000000'use strict'; module.exports = Number.isFinite || function (value) { return !(typeof value !== 'number' || value !== value || value === Infinity || value === -Infinity); }; is-finite-1.1.0/license000066400000000000000000000021251361721153600147520ustar00rootroot00000000000000MIT 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. is-finite-1.1.0/package.json000066400000000000000000000010721361721153600156730ustar00rootroot00000000000000{ "name": "is-finite", "version": "1.1.0", "description": "ES2015 Number.isFinite() ponyfill", "license": "MIT", "repository": "sindresorhus/is-finite", "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", "ponyfill", "polyfill", "shim", "number", "finite", "is" ], "devDependencies": { "ava": "^3.2.0" } } is-finite-1.1.0/readme.md000066400000000000000000000016131361721153600151650ustar00rootroot00000000000000# is-finite [![Build Status](https://travis-ci.org/sindresorhus/is-finite.svg?branch=master)](https://travis-ci.org/sindresorhus/is-finite) > ES2015 [`Number.isFinite()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite) [ponyfill](https://ponyfill.com) ## Install ``` $ npm install is-finite ``` ## Usage ```js var numIsFinite = require('is-finite'); numIsFinite(4); //=> true numIsFinite(Infinity); //=> 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.
is-finite-1.1.0/test.js000066400000000000000000000005401361721153600147210ustar00rootroot00000000000000const test = require('ava'); Number.isFinite = undefined; const isFinite = require('.'); test('main', t => { t.true(isFinite(0)); t.true(isFinite(100)); t.true(isFinite(-100)); t.true(isFinite(4e44)); t.false(isFinite('0')); t.false(isFinite(NaN)); t.false(isFinite(undefined)); t.false(isFinite(Infinity)); t.false(isFinite(-Infinity)); });