[英]How to enable all node.js harmony “in progress” features?
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 comes with a lot of features that are disabled by default (either because they are still in development or are in staging). node.js带有许多默认情况下处于禁用状态的功能(因为它们仍处于开发阶段或正在分阶段运行)。 The
--harmony
flag enables all completed features. --harmony
标志启用所有已完成的功能。
How to enable all "in progress" features? 如何启用所有“进行中”功能?
You could have a look at what flags are currently "in progress" with 您可以看一下当前正在“处理”哪些标志
node --v8-options | grep "in progress"
The output as of this post looks like 截至本文的输出看起来像
--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)
So you could easily parse it to suit your needs. 因此,您可以轻松地对其进行解析以适合您的需求。
On the subject: https://nodejs.org/en/docs/es6/#which-features-are-in-progress 关于此主题: https : //nodejs.org/en/docs/es6/#which-features-are-in-progress
You cannot directly use the " in progress " flag as you use Harmony flag. 使用Harmony标志时,不能直接使用“ 进行中 ”标志。 for Features "in progress" use the "--harmony" flag itself.
对于“进行中”功能,请使用“ --harmony”标志本身。 If you want to know the features in progress run
如果您想知道正在运行的功能
node --v8-options |
节点--v8-options | grep "in progress"
grep“进行中”
Most flags when you use the command 使用命令时的大多数标志
node --v8-options |
节点--v8-options | grep harmony
grep和谐
are " in progress ", Unless they are enabled by default. 是“ 进行中 ”,除非默认情况下启用它们。 to verify the shipped ones would be to run
验证运来的将要运行
node --v8-options |
节点--v8-options | grep -A1 harmony
grep -A1和声
If the default shows true, then it should work properly 如果默认显示为true,则应该可以正常工作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.