Augment.js 为旧浏览器增加现代Javascript的功能支持

 

  • index: http://olivernn.github.com/augment.js/

    Augment.js能给系统内建对象增加现代Javascript功能的支持,但并不会覆盖浏览器已有的实现,它只增加不支持的功能。 

    Array.prototype.every - Checks whether all elements in the array pass the test implemented by the provided function.

  • Array.prototype.filter - Creates a new array with all elements that pass the test implemented by the provided function.

  • Array.prototype.forEach - Executes a provided function once per array element.

  • Array.prototype.indexOf - Returns the first index at which a given element can be found in the array, or -1 if it is not present.

  • Array.isArray - Returns true if a variable is an array, false if it is not.

  • Array.prototype.lastIndexOf - Returns the last index at which a given element can be found in the array, or -1 if it is not present. The array is searched backwards, starting at fromIndex.

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

  • Array.prototype.reduce - Applies a function against an accumulator and each value of the array (from left-to-right) to reduce the array to a single value.

  • Array.prototype.reduceRight - Applies a function against an accumulator and each value of the array (from right-to-left) to reduce the array to a single value.

  • Array.prototype.some - Checks whether any element in the array passes the test implemented by the provided function.

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

  • Date.prototype.toJSON - Returns a JSON representation of the Date object.

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

  • Function.prototype.bind - Returns a new function that, when called, itself calls this function in the context of the provided thisvalue.

  • 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 (the difference being that a for-in loop enumerates properties in the prototype chain as well).

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

  • String.prototype.trim - Trims whitespace from the beginning and end of the string
    .

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值