Keyang's Blog
  • HOME
  • CSVTOJSON
  • PSDETCH
  • UML Editor
  • ARCHIVES
Word of Forks
HOME CSVTOJSON PSDETCH UML Editor ARCHIVES

minimist: a neat cli argv parser

Mar 16, 2016

minimist is a lightweight cli argument (command line arguments) parser:

1
2
3
4
5
6
7
8
9
10
11
require('minimist')("-x 3 -y 4 -n5 -abc --beep=boop foo bar baz");

//output:
{ _: [ 'foo', 'bar', 'baz' ],
x: 3,
y: 4,
n: 5,
a: true,
b: true,
c: true,
beep: 'boop' }
node.js npm
prev: wordpress reverse proxy headers next: css: font-smoothing
©2018 Keyang Xiang