【问题标题】:Is there a list of flags for Node.js?是否有 Node.js 的标志列表?
【发布时间】:2012-09-14 06:47:56
【问题描述】:

我正在尝试查找 Node.js 接受的所有标志的列表,特别是那些用于 ES6-Harmony 功能的标志,但我找不到任何标志。有这样的吗?

【问题讨论】:

    标签: node.js ecmascript-harmony


    【解决方案1】:

    运行node --v8-options。这显示了您可以设置以更改 V8 行为的各种标志

    例如和谐功能的标志显示在此处:

     --harmony_typeof (enable harmony semantics for typeof)
         type: bool  default: false
     --harmony_proxies (enable harmony proxies)
         type: bool  default: false
     --harmony_weakmaps (enable harmony weak maps)
         type: bool  default: false
     --harmony_block_scoping (enable harmony block scoping)
         type: bool  default: false
    

    【讨论】:

      【解决方案2】:

      如果您从 shell 将 --help 开关应用到节点,您将获得可用标志的列表;

      node --help
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-09-08
        • 2020-05-31
        • 1970-01-01
        • 1970-01-01
        • 2014-02-27
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多