首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何启用所有node.js和谐“正在进行”的特性?

如何启用所有node.js和谐“正在进行”的特性?
EN

Stack Overflow用户
提问于 2015-11-30 11:09:42
回答 2查看 1.6K关注 0票数 2
代码语言:javascript
复制
node --v8-options | grep harmony
  --es_staging (enable all completed harmony features)
  --harmony (enable all completed harmony features)
  --harmony_shipping (enable all shipped harmony fetaures)
  --harmony_modules (enable "harmony modules" (in progress))
  --harmony_regexps (enable "harmony regular expression extensions" (in progress))
  --harmony_proxies (enable "harmony proxies" (in progress))
  --harmony_sloppy_function (enable "harmony sloppy function block scoping" (in progress))
  --harmony_sloppy_let (enable "harmony let in sloppy mode" (in progress))
  --harmony_unicode_regexps (enable "harmony unicode regexps" (in progress))
  --harmony_reflect (enable "harmony Reflect API" (in progress))
  --harmony_destructuring (enable "harmony destructuring" (in progress))
  --harmony_default_parameters (enable "harmony default parameters" (in progress))
  --harmony_sharedarraybuffer (enable "harmony sharedarraybuffer" (in progress))
  --harmony_atomics (enable "harmony atomics" (in progress))
  --harmony_simd (enable "harmony simd" (in progress))
  --harmony_array_includes (enable "harmony Array.prototype.includes")
  --harmony_tostring (enable "harmony toString")
  --harmony_concat_spreadable (enable "harmony isConcatSpreadable")
  --harmony_rest_parameters (enable "harmony rest parameters")
  --harmony_sloppy (enable "harmony features in sloppy mode")
  --harmony_arrow_functions (enable "harmony arrow functions")
  --harmony_new_target (enable "harmony new.target")
  --harmony_object_observe (enable "harmony Object.observe")
  --harmony_spreadcalls (enable "harmony spread-calls")
  --harmony_spread_arrays (enable "harmony spread in array literals")
  --harmony_object (enable "harmony Object methods")

node.js附带了许多默认禁用的特性(要么是因为它们还在开发中,要么是在准备中)。--harmony标志启用所有已完成的功能。

如何启用所有“正在进行”的功能?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2015-11-30 11:17:00

您可以查看当前“正在进行的”哪些标志。

代码语言:javascript
复制
node --v8-options | grep "in progress"

这篇文章的输出类似于

代码语言:javascript
复制
--harmony_modules (enable "harmony modules" (in progress))
--harmony_array_includes (enable "harmony Array.prototype.includes" (in progress))
// ...
// (I've removed the other lines, which look like the above)

因此,您可以很容易地解析它以满足您的需要。

主题:https://nodejs.org/en/docs/es6/#which-features-are-in-progress

票数 2
EN

Stack Overflow用户

发布于 2016-07-10 04:20:24

您不能像使用和谐标志那样直接使用"in progress“标志。对于特征“正在进行”,使用“-和谐”标志本身。如果您想知道正在进行中的功能,请运行

节点-V8-选项\ grep“进行中”

使用命令时的大多数标志

节点--V8-选项\ grep和谐

是"in “,除非在默认情况下启用了它们。要验证已发送的文件,需要运行

节点--V8-选项- grep -A1和谐

如果默认值显示为true,则它应该正常工作。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33997211

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档