# number.parseint

> An ES-spec-compliant Number.parseInt shim/polyfill/replacement that works as far down as ES3

Latest version **1.1.1** (published 2026-01-07) · MIT license · 0 weekly downloads

> **Native alternative:** Number.parseInt — Use native JavaScript (Node 0.10.0+) (https://developer.mozilla.orgGlobal_Objects/Number/parseInt)

## Install

```sh
npm install number.parseint
pnpm add number.parseint
yarn add number.parseint
bun add number.parseint
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2026-01-07 |
| First published | 2021-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >= 0.4 |
| Dependencies | 3 |
| Unpacked size | 16.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Nicolò Ribaudo |
| Maintainers | ljharb |
| Keywords | Number.parseInt, number, parseint, is-finite, log, shim, polyfill, es-shim, API |

## Links

- npm: https://www.npmjs.com/package/number.parseint
- Repository: https://github.com/es-shims/Number.parseInt
- Homepage: https://github.com/es-shims/Number.parseInt#readme
- Issues: https://github.com/es-shims/Number.parseInt/issues
- Funding: https://github.com/es-shims/Number.parseInt?sponsor=1
- npm.io page: https://npm.io/package/number.parseint

## Dependencies (3)

- [parseint](https://npm.io/package/parseint.md) ^2.0.1
- [call-bind](https://npm.io/package/call-bind.md) ^1.0.8
- [define-properties](https://npm.io/package/define-properties.md) ^1.2.1

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 1.1.1 (latest) — 2026-01-07
- 1.1.0 — 2022-05-03
- 1.0.1 — 2021-12-13
- 1.0.0 — 2021-05-17

## README

# Number.parseInt <sup>[![Version Badge][npm-version-svg]][package-url]</sup>

[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][deps-svg]][deps-url]
[![dev dependency status][dev-deps-svg]][dev-deps-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]

[![npm badge][npm-badge-png]][package-url]

An ESnext spec-compliant `Number.parseInt` shim/polyfill/replacement that works as far down as ES3.

This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://tc39.es/ecma262/#sec-number.parseint).

## Getting started

```sh
npm install --save number.parseint
```

## Usage/Examples

```js
console.log(Number.parseInt("-3")); // -3
console.log(Number.parseInt("0x10")); // 16
console.log(Number.parseInt("30", 7)); // 21
console.log(Number.parseInt("ef")); // NaN
```

## Tests

Clone the repo, `npm install`, and run `npm test`

[package-url]: https://npmjs.org/package/number.parseint
[npm-version-svg]: https://versionbadg.es/es-shims/Number.parseInt.svg
[deps-svg]: https://david-dm.org/es-shims/Number.parseInt.svg
[deps-url]: https://david-dm.org/es-shims/Number.parseInt
[dev-deps-svg]: https://david-dm.org/es-shims/Number.parseInt/dev-status.svg
[dev-deps-url]: https://david-dm.org/es-shims/Number.parseInt#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/number.parseint.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/number.parseint.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/number.parseint.svg
[downloads-url]: https://npm-stat.com/charts.html?package=number.parseint
[codecov-image]: https://codecov.io/gh/es-shims/Number.parseInt/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/es-shims/Number.parseInt/
[actions-image]: https://img.shields.io/github/check-runs/es-shims/Number.parseInt/main
[actions-url]: https://github.com/es-shims/Number.parseInt/actions

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