@dot-store/argv

Parse CLI arguments with dot-store

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@dot-store/argv
002.3.04 years ago4 years agoMinified + gzip package size for @dot-store/argv in KB

Readme

@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,
// }