0.1.1 • Published 12 months ago

lil-argv v0.1.1

Weekly downloads
-
License
0BSD
Repository
-
Last release
12 months ago

lil-argv

a Lil Argv parser for ECMAScript CLI applications

This module sucks for command line argument parsing! Don't use it for complex CLI applications. It is perfect for applications with just a few simple options and for personal applications (where you don't have to (re)teach users how to pass arguments since this module sucks (see the examples and tests for details)). Woah! I just nested parenthesis in English like it's Lisp or something!

// example.js
import { argv } from "lil-argv"
console.log(argv())
node example.js -a beep -b boop
{
  a: "beep",
  b: "boop",
}
node example.js -x 3 -y 4 -n5 -abc --beep=boop --no-ding foo bar baz
{
  x: "3",
  y: "4",
  n5: true,
  abc: true,
  beep: "boop",
  "no-ding": "foo bar baz",
}

install

pnpm add lil-argv
npm install lil-argv
yarn add lil-argv
0.1.1

12 months ago

0.1.0

1 year ago