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

Package detail

es-constants

es-shims2kMIT1.0.1

An ES-spec-compliant shim/polyfill/replacement for JS language Math and Number constant values that works as far down as ES3

ecmascript, javascript, polyfill, shim, es-shim API, constants, Math, Number, EPSILON, MAX_VALUE, MIN_VALUE, max, min, MAX_SAFE_INTEGER, MIN_SAFE_INTEGER, safe, integer, POSITIVE_INFINITY, NEGATIVE_INFINITY, E, LN10, LN2, LOG10E, LOG2E, PI, SQRT1_2, SQRT2

readme

es-constants Version Badge

github actions coverage License Downloads

npm badge

An ES-spec-compliant shim/polyfill/replacement for JS language Math and Number constant values that works as far down as ES3.

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

The main export of the package itself is simply an array of the available directory names. It’s sole intended use is for build tooling and testing.

Supported methods

Getting started

npm install --save es-constants

Usage/Examples


var assert = require('assert');
require('./auto'); // shim all of the constants

require('./Number.MAX_VALUE/auto'); // shim the Number.MAX_VALUE constant

Tests

Simply 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.

v1.0.1 - 2023-08-29

Commits

  • [Dev Deps] update @ljharb/eslint-config, aud, tape bc6f481
  • [Deps] remove non-runtime es-abstract dep; use isarray in tests 39ca4e0

v1.0.0 - 2023-05-18

Commits