0.0.8 • Published 6 years ago

@dot-event/arg v0.0.8

Weekly downloads
1
License
MIT
Repository
github
Last release
6 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

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago