flagging
v1.0.1
Flagging
A simple library to parse and process flags in JavaScript strings.
Setup
Yarn: yarn add flagging
NPM: npm i flagging
Example
import * as flagging from "flagging";
let res = flagging.process("--verbose -scale 22 --method fast", {
parseNumbers: true
})
// Returns:
{
verbose: ["verbose"],
scale: ["scale", 22],
method: ["method", "fast"]
}
Contributions
Contribute, steal, republish, I don't care! As long as my code gets some sort of use i'm happy.