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.