0.0.5 • Published 11 months ago

seafret v0.0.5

Weekly downloads
4
License
MIT
Repository
github
Last release
11 months ago

Seafret - Minimal Invariant CLI parser

npm install --save seafret

Example

console

node ./cli.mjs

cli.mjs

import Seafret from "./seafret.mjs";

const cli = new Seafret("0.0.1", "example app");

cli
  .invariant("-go", "Tells the Program to Run")
  .invariant("food", "Food couldnt be found")
  .validate(process.argv);

if (!cli.satisfied.food) {
  console.log("invariant!: ".concat(cli.invariants.food));
  // outputs daym: Food couldnt be found
}
0.0.3

11 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.2

9 years ago

0.0.1

9 years ago