SafetyScreen-ui/node_modules/microargs
haozq 723f80cdec first commit 2025-03-29 19:33:58 +08:00
..
.vscode first commit 2025-03-29 19:33:58 +08:00
lib first commit 2025-03-29 19:33:58 +08:00
LICENSE first commit 2025-03-29 19:33:58 +08:00
README.md first commit 2025-03-29 19:33:58 +08:00
package.json first commit 2025-03-29 19:33:58 +08:00
yarn.lock first commit 2025-03-29 19:33:58 +08:00

README.md

microargs node version Build Status npm version

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

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