Skip to content

afeiship/argv

Repository files navigation

argv

Tiny argv impl.

version license size download

installation

npm install @jswork/argv

usage

import argv from '@jswork/argv';

// node index.js --name=afei --age=18 file1 file2
const { args, opts } = argv();
console.log(args); // [ 'file1', 'file2' ]
console.log(opts); // { name: 'afei', age: '18' }

license

Code released under the MIT license.