travel/admin/node_modules/microargs
yaosen 242417d45d init... 2024-06-24 11:28:18 +08:00
..
.idea init... 2024-06-24 11:28:18 +08:00
.eslintrc.json init... 2024-06-24 11:28:18 +08:00
.npmignore init... 2024-06-24 11:28:18 +08:00
.travis.yml init... 2024-06-24 11:28:18 +08:00
LICENSE init... 2024-06-24 11:28:18 +08:00
README.md init... 2024-06-24 11:28:18 +08:00
index.js init... 2024-06-24 11:28:18 +08:00
package.json init... 2024-06-24 11:28:18 +08:00
yarn.lock init... 2024-06-24 11:28:18 +08:00

README.md

microargs node version Build Status npm version

CLI arguments micro parser. Only 25 lines of code, no dependencies.

#!/usr/bin/env node
const args = require('microargs')(process.argv.slice(1));
console.dir(args);
$ script.js -a --foo=bar --boo abc def
{
    params: ['abc', 'def'],
    options: { a: true, foo: 'bar', boo: true }
}