@dot-store/argv

2.3.0 • Public • Published

@dot-store/argv

Parse CLI arguments with dot-store.

cli

Create store

import createStore from "dot-store"
import argv from "@dot-store/argv"

const store = argv(createStore())

Parse argv

Calling with arguments hello -w:

await store.argv("options", process.argv.slice(2), {
  alias: { world: ["w"] },
})

store.get("options")
// {
//   _: ["hello"],
//   w: true,
//   world: true,
// }

Dependencies (2)

Dev Dependencies (20)

Package Sidebar

Install

npm i @dot-store/argv

Weekly Downloads

2

Version

2.3.0

License

MIT

Unpacked Size

7.39 kB

Total Files

5

Last publish

Collaborators

  • winton