Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
ECMAScript (JavaScript) 5 compatibility methods
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
MIT-LICENSE
README.textile
es5.js

README.textile

Introduction

‘es5.js’ is a set of ECMAScript (aka JavaScript) 5 compatibility methods, allowing to use some ECMAScript on all web browsers.

The methods are defined only if the native methods are not available. This means that on web browsers that implement these methods, native methods will be used instead, hence providing optimal performance.

Implemented Methods

Currently only the following new methods are implemented:

Object.create( proto ) // does not support second parameter

Function.prototype.bind( thisArg [, arg1[, arg2[, ...]]] )

Array.prototype.indexOf    ( searchElement [, fromIndex ] )
Array.prototype.lastIndexOf( searchElement [, fromIndex ] )
Array.prototype.forEach    ( callback [, thisArg ] )
Array.prototype.every      ( callback [, thisArg ] )
Array.prototype.some       ( callback [, thisArg ] )
Array.prototype.map        ( callback [, thisArg ] )
Array.prototype.filter     ( callback [, thisArg ] )
Array.prototype.reduce     ( callback [, initialValue ] )
Array.prototype.reduceRight( callback [, initialValue ] )

For more information on the above methods, and implementation, check:

Something went wrong with that request. Please try again.