is-number-object <sup>Version Badge</sup>

github actions coverage dependency status dev dependency status License Downloads

npm badge

Is this value a JS Number object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.

Example

var isNumber = require('is-number-object');
var assert = require('assert');

assert.notOk(isNumber(undefined));
assert.notOk(isNumber(null));
assert.notOk(isNumber(false));
assert.notOk(isNumber(true));
assert.notOk(isNumber('foo'));
assert.notOk(isNumber(function () {}));
assert.notOk(isNumber([]));
assert.notOk(isNumber({}));
assert.notOk(isNumber(/a/g));
assert.notOk(isNumber(new RegExp('a', 'g')));
assert.notOk(isNumber(new Date()));

assert.ok(isNumber(42));
assert.ok(isNumber(NaN));
assert.ok(isNumber(Infinity));
assert.ok(isNumber(new Number(42)));

Tests

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

is-number-object - Installation

To install is-number-object via this registry, you'll need to install via the --registry parameter with your package manager.

n

NPM

npm install is-number-object --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Yarn

yarn config set registry https://js.registry.sudovanilla.org
yarn install is-number-object

Learn more about the config option.

PNPM

pnpm install is-number-object --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Bun Logo

Bun

bun install is-number-object --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Learn more about setting this up in your bunfig.toml configuration.


For Deno, add the following to your .npmrc file in your directory:

registry="https://js.registry.sudovanilla.org"

Then run the deno install command.

is-number-object - Download

Download Tarball (v1.1.1)

Integrity sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==
SHASUM 144b21e95a1bc148205dcc2814a9134ec41b2541
Tarball https://js.registry.sudovanilla.org/is-number-object/-/is-number-object-1.1.1.tgz