Elementals.js

Latest Version: 3.6.4 PRODUCTION 13 April 2018

Number Polyfills

JavaScript's Number object is expanded by Elementals with polyfills for a number of ECMAScript 262-6 functions and properties.

The following are linked to the Mozilla Developer Network pages as I find them easier to digest than the official specification, and because these polyfills are loosly based on the code provided on their site. I simply cut out some parts that seemed... nonsensical.

Number.isInteger is not actually part of any proper specification, but was implemented in FireFox. It's actually a handy distinction from isNaN so we polyfilled it.

Elementals Number Methods and Properties

Polyfills

These link to the Mozilla Developer Network (MDN)

Property Key

  • Object
  • Method or Variable
  • "Constant" Variable

Downloads

Advertisement