A javascript file foo.js has the following content:
function foo(param){
console.log('foo called with params');
console.log(param);
}
module.exports.foo = foo;
How can I call this function from within a package.json script?
"scripts": {
"foo": "node foo.js foo(1)",
},
Just returns
node foo.js foo(1)
I.e., the function is not invoked.