Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a list of flags for Node.js?

I'm trying to find a list of all flags that Node.js accepts, specially those for ES6-Harmony features, but I can't find any. Is there anything like this?

like image 602
juandopazo Avatar asked Jun 09 '12 22:06

juandopazo


People also ask

What is Flags in Nodejs?

“A module that allows you to use feature flags (also known as feature flipping) in Node. js. You can enable/disable features programmatically or via an external configuration file. Any changes to the configuration file will update the module without requiring a restart.”

How many types of node js are there?

Modules are of three types: Core Modules. local Modules. Third-party Modules.


2 Answers

Run node --v8-options. That displays the various flags you can set to change the behavior of V8

E.g. The flags for the harmony features show up in there:

 --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
like image 183
jimr Avatar answered Nov 15 '22 15:11

jimr


If you apply the --help switch to node from the shell, you'll get a list of available flags;

node --help
like image 23
foo Avatar answered Nov 15 '22 14:11

foo