Skip to content
This repository has been archived by the owner on Apr 18, 2020. It is now read-only.

Latest commit

 

History

History
84 lines (53 loc) · 3.13 KB

README.md

File metadata and controls

84 lines (53 loc) · 3.13 KB

ECMAScript 5

Implementation of ECMAScript 5

Array

  • Array.isArray
    Return true if a variable is an array, if not false

  • Array.prototype.indexOf
    Returns the first (least) index of an element within the array equal to the specified value, or -1 if none is found

  • Array.prototype.lastIndexOf
    Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found

  • Array.prototype.every
    Returns true if every element in this array satisfies the provided testing function

  • Array.prototype.some
    Returns true if at least one element in this array satisfies the provided testing function

  • Array.prototype.forEach
    Calls a function for each element in the array

  • Array.prototype.map
    Creates a new array with the results of calling a provided function on every element in this array

  • Array.prototype.filter
    Creates a new array with all of the elements of this array for which the provided filtering function returns true

  • Array.prototype.reduce
    Apply a function simultaneously against two values of the array (from left-to-right) as to reduce it to a single value

  • Array.prototype.reduceRight
    Apply a function simultaneously against two values of the array (from right-to-left) as to reduce it to a single value*

String

  • String.prototype.trim
    Removes whitespace from both ends of the string*

Object

  • Object.getPrototypeOf
    Returns the prototype of the specified object*

  • Object.getOwnPropertyNames
    The object whose enumerable and non-enumerable own properties are to be returned*

  • Object.create
    Creates a new object with the specified prototype object and properties*

  • Object.defineProperty
    The defineProperty function is used to add an own property and/or update the attributes of an existing own property of an object*

  • Object.defineProperties
    The defineProperties function is used to add own properties and/or update the attributes of existing own properties of an object*

  • Object.keys
    Returns an array of all own enumerable properties found upon a given object, in the same order as that provided by a for-in loop*

Date

  • Date.prototype.toISOString
    Converts a date to a string following the ISO 8601 Extended Format*

  • Date.now
    Returns the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC*

  • Date.prototype.toJSON
    Provides a String representation of a Date object for use by JSON.stringify*

Function

  • Function.prototype.bind
    Creates a new function that, when called, itself calls this function in the context of the provided <this> value, with a given sequence of arguments preceding any provided when the new function was called*

##.