# is-number-object

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

Latest version **1.1.1** (published 2024-12-16) · MIT license · 0 weekly downloads

> **Better alternative:** Use Object.prototype.toString.call(v) === "[object Number]" — Consider using a lighter alternative

## Install

```sh
npm install is-number-object
pnpm add is-number-object
yarn add is-number-object
bun add is-number-object
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2024-12-16 |
| First published | 2015-01-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >= 0.4 |
| Dependencies | 2 |
| Unpacked size | 24.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Jordan Harband |
| Maintainers | ljharb |
| Keywords | Number, ES6, toStringTag, @@toStringTag, Number object |

## Links

- npm: https://www.npmjs.com/package/is-number-object
- Repository: https://github.com/inspect-js/is-number-object
- Homepage: https://github.com/inspect-js/is-number-object#readme
- Issues: https://github.com/inspect-js/is-number-object/issues
- Funding: https://github.com/sponsors/ljharb
- npm.io page: https://npm.io/package/is-number-object

## Dependencies (2)

- [call-bound](https://npm.io/package/call-bound.md) ^1.0.3
- [has-tostringtag](https://npm.io/package/has-tostringtag.md) ^1.0.2

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2024-12-16
- 1.1.0 — 2024-12-02
- 1.0.7 — 2022-04-02
- 1.0.6 — 2021-08-06
- 1.0.5 — 2021-05-07
- 1.0.4 — 2019-12-19
- 1.0.3 — 2015-01-30
- 1.0.2 — 2015-01-29
- 1.0.0 — 2015-01-28

## README

# is-number-object <sup>[![Version Badge][2]][1]</sup>

[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][5]][6]
[![dev dependency status][7]][8]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]

[![npm badge][11]][1]

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

## Example

```js
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`

[1]: https://npmjs.org/package/is-number-object
[2]: https://versionbadg.es/inspect-js/is-number-object.svg
[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
[license-image]: https://img.shields.io/npm/l/is-number-object.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/is-number-object.svg
[downloads-url]: https://npm-stat.com/charts.html?package=is-number-object
[codecov-image]: https://codecov.io/gh/inspect-js/is-number-object/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/inspect-js/is-number-object/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-number-object
[actions-url]: https://github.com/inspect-js/is-number-object/actions

---
_Source: https://npm.io/package/is-number-object · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
