[英]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帶有許多默認情況下處於禁用狀態的功能(因為它們仍處於開發階段或正在分階段運行)。 --harmony
標志啟用所有已完成的功能。
如何啟用所有“進行中”功能?
您可以看一下當前正在“處理”哪些標志
node --v8-options | grep "in progress"
截至本文的輸出看起來像
--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
使用Harmony標志時,不能直接使用“ 進行中 ”標志。 對於“進行中”功能,請使用“ --harmony”標志本身。 如果您想知道正在運行的功能
節點--v8-options | grep“進行中”
使用命令時的大多數標志
節點--v8-options | grep和諧
是“ 進行中 ”,除非默認情況下啟用它們。 驗證運來的將要運行
節點--v8-options | grep -A1和聲
如果默認顯示為true,則應該可以正常工作
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.