ECMAScript 5 compatibility shims for legacy (and modern) JavaScript engines
RegExp#toString
in IE 8, which returns flags in the wrong order (#364)Array#sort
on {Chrome, Safari, IE < 9, FF 4} that throws improperly, per ES5 (#354)window.external
makes Object.keys
throwArray#slice
: boxed string access on IE <= 8 (#349)Array#join
: fix IE 6-8 join called on string literal (#352)Error#message
and Error#name
are non-enumerable (#358)Object.getOwnPropertyDescriptor
: In Opera 11.6, propertyIsEnumerable
is a nonshadowable global, like toString
Array#slice.call
node
v5.1
Array#slice
tests (#346)uglify-js
, eslint
, jscs
, uglify-js
, semver
Array#push
: in IE <= 7, Array#push
was not generic (#336)Array#push
in Opera 10.6
has a super weird bug when pushing undefined
Array#join
: In IE <= 7, passing undefined
didn't use the default separator (#333)Error#toString
: prints out the proper message in IE 7 and below (#334)Number#toPrecision
: IE 7 and below incorrectly throw when an explicit undefined
precision is passed (#340)String#lastIndexOf
: ensure the correct length in IE 8parseInt
accepts negative and plus-prefixed hex values (#332)Array#push
instead of relying on Function#call
eslint
, @ljharb/eslint-config
, jscs
undefined
and an absent index (#114)Array#shift
tests (#337)Array#splice
tests (#339)Array#pop
tests, just in case (#338)global
tests in HTML test filesnode
v0.8
tests stay passing.node
v5.0
ms
arg is treated as a signed instead of unsigned int (#329)node
v4.2
eslint
, @ljharb/eslint-config
, jscs
, uglify-js
io.js
v3.1
Object.getPrototypeOf
tests don't fail when engines implement ES6 semanticseslint
, uglify-js
, jscs
; use my personal shared eslint
config