Run exported JavaScript functions directly from command line
npm i -g run-func
run-func script.js functionName param1 param2
npm i -S run-func
"scripts": { "myFunc": "run-func script.js myFunc param1 param2" }
"scripts": {
"test": "run-func some-module myFunc \"string as parameter\""
},
"dependencies": {
"some-module": "1.0.0"
}
run-func-mem
instead of run-func