I am using arrow functions in my code, thus I need to be using --harmony_arrow_functions option when running the code, e.g.
node --harmony_arrow_functions ./my-script.js
How do I make --harmony_arrow_functions a default option for every time I use node?
Either add a wrapper script in your PATH that sets the command line options.
Or you could define a start script in your package.json.
{
"scripts": {
"start": "node --harmony_arrow_functions my-script.js"
}
}
And run npm start to run your script.