process-env-argv
v2.0.4
Published
Easy get arguments from `process.argv` like `-a=1` or `--a=1`
Downloads
14
Readme
process-env-argv
Easy get arguments from process.argv
like -a=1
or --a=1
install
npm i process-env-argv
# or
yarn add process-env-argv
compatible with esm and commonjs
// esm mode
import getArgv from 'process-env-argv';
// commonjs
const getArgv = require('process-env-argv');
// use
getArgv(/* default argv from process */);
example
# terminal
node example.js -a=1 --b=2 -c --d ---e:f=5
{ a: 1, b: 2, c: true, d: true, '-e:f': 5 }