首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

nodejs v8 兑现 ECMA 5 Mozilla 的一些特性

2012-11-03 
nodejs v8 实现 ECMA 5 Mozilla 的一些特性当开发者写浏览器js时,一些很好内置函数有些浏览器实现了有些却

nodejs v8 实现 ECMA 5 Mozilla 的一些特性

当开发者写浏览器js时,一些很好内置函数有些浏览器实现了有些却没实现,这样导致程序员根本就不用这些函数。

如果你在玩nodejs,可以确定这的是这些好用的内置函数都被统一的实现,不需要自己一遍一遍自己实现。

?

下面的列出一些非常好用的api 片段?,这些方法在v8里内置实现了。

?

注意:v8 实现了

?

?JSON?string and returns the corresponding JavaScript object.

String.prototype
  • trim()?– Trims whitespace from both ends of the string
  • trimRight()?– Trims whitespace from the right side of the string
  • trimLeft()?– Trims whitespace from the left side of the string

    Property Descriptor Defaults
    • value?– undefined
    • get?– undefined
    • set?– undefined
    • writable?– false
    • enumerable?– false
    • configurable?– false

      Missing features
      • Object.__noSuchMethod__?(Mozilla extension, not ECMAScript 5)
      • "use strict";?syntax extension (v8 issue)

        ?

        ?

        ?

        ?

        ?

        ?

        ?

        ?

        ?

        ?

        ?

        ?

        ?

        ?

        ?

热点排行