0.0.8 • Published 5 years ago

@dot-event/arg v0.0.8

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

@dot-event/arg

dot-event cli and url arguments

orbs

Install

npm install dot-event @dot-event/arg @dot-event/store

Setup

const dot = require("dot-event")()
require("@dot-event/arg")(dot)
require("@dot-event/store")(dot)

Auto-detect arguments

const args = dot.arg() // detects args from `process.argv` or `window.location`
args // { _: ["arg"], opt: true }

Manual arguments

const args = dot.arg({
  args: ["arg", "-o"],
  alias: { o: ["opt"] },
})
args // { _: ["arg"], o: true, opt: true }

Options

OptionDescription
saveSave args to store

Credits

This project uses getopts for argument parsing.

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago