Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

parseint

es-shims1.5kMIT2.0.1

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

parseInt, number, is-finite, log, shim, polyfill, es-shim, API

readme

parseInt Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

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

This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec.

Getting started

npm install --save parseint

Usage/Examples

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

Tests

Clone the repo, npm install, and run npm test

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v2.0.1 - 2024-03-04

Commits

  • [meta] use npmignore to autogenerate an npmignore file 4de0900
  • [meta] simplify exports; remove useless mjs 53b41ba
  • [actions] update rebase action to use reusable workflow c7a8160
  • [Dev Deps] update @es-shims/api, @ljharb/eslint-config, aud, npmignore, tape 5358fb6
  • [Fix] add missing es-abstract dep a85af60
  • [Dev Deps] update aud, tape 294e31a
  • [Deps] update call-bind, define-properties 78f0a67
  • [meta] add missing engines.node 5a17554
  • [Deps] update globalthis ea79228

v2.0.0 - 2022-05-02

Commits