picomist
v1.0.3
Published
A barebones package for parsing option strings
Downloads
1
Readme
picomist
A barebones package for parsing option strings
> node ./index.js -i path/to/input/file.js -o path/to/output/file.js -a foo -b bar -c -d baz beep boop
// ./index.js
import { parseArguments } from "picomist";
// or
const { parseArguments } = require("picomist");
console.log(parseArguments(process.argv.split(2)));
// {
// _: [ 'beep', 'boop' ],
// i: 'path/to/input/file.js',
// o: 'path/to/output/file.js',
// a: 'foo',
// b: 'bar',
// c: true,
// d: 'baz'
// }