Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 964 Bytes

README.md

File metadata and controls

45 lines (32 loc) · 964 Bytes

@funish/argv

npm version npm downloads npm license Contributor Covenant

Programmatically parse command line parameters, powered by Funish.

Getting started

# npm
$ npm install @funish/argv

# yarn
$ yarn add @funish/argv

# pnpm
$ pnpm add @funish/argv

Usage

import { parseArgv } from "@funish/argv";

const argv = parseArgv([
  "-b",
  "--bool",
  "--no-meep",
  "--multi=baz",
  "--foo",
  "bar",
]);
// => { _: [], b: true, bool: true, meep: false, multi: "baz", foo: "bar" }

Interfaces

See it on JSDoc.

License