phil

0.2.3 • Public • Published

Phil

ES5 polyfill

Provides ECMAScript 5 compatibility on specific methods of native JavaScript objects. Some are full rewrites, like Object.create or Function.bind, others are workarounds for browser quirks, like argument handling in Array.sort, or negative indexes for String.substr.

Getters and setters are only partially emulated in browsers where no substitute is available (eg. IE8). Here the chosen behavior is that getters and setters are accepted by Object.defineProperty, but the getter is immediately evaluated and its result assigned to the property as value.

At this point Phil is not a complete polyfill, as it implements only those methods that are required by Troop-based libraries.

Package Sidebar

Install

npm i phil

Weekly Downloads

0

Version

0.2.3

License

none

Last publish

Collaborators

  • danstocker-legacy