eightqueen
V2EX  ›  Node.js

nodejs 对 es6 支持情况怎么样啊?

  •  
  •   eightqueen · Jun 22, 2015 · 8073 views
    This topic created in 4013 days ago, the information mentioned may be changed or developed.

    所有特性都支持要到什么时候?

    5 replies    2015-06-23 17:31:59 +08:00
    bruce55
        1
    bruce55  
       Jun 22, 2015   ❤️ 1
    yakczh
        2
    yakczh  
       Jun 22, 2015
    http://fortunejs.com/

    ```A
    import fortune from 'fortune'
    import http from 'http'

    const app = fortune.create()
    const server = http.createServer(fortune.net.http(app))
    ```
    写起来跟python差不多,终于可以不用蛋疼的缩进了
    zhangxiao
        3
    zhangxiao  
       Jun 23, 2015
    babel, babel-node
    coolicer
        4
    coolicer  
       Jun 23, 2015
    可以通过楼上这些从 es6 to es5实现
    hussion
        5
    hussion  
       Jun 23, 2015
    支持情况主要取决于v8的支持情况,个人觉得到nodejs 2.0版本发布的时候,有可能完全支持ES6全部特性
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   908 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 49ms · UTC 21:34 · PVG 05:34 · LAX 14:34 · JFK 17:34
    ♥ Do have faith in what you're doing.