picomist
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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'
// }

Package Sidebar

Install

npm i picomist

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

5.75 kB

Total Files

6

Last publish

Collaborators

  • nacho-cs