[READ-ONLY] Mirror of https://github.com/bombshell-dev/args. <1kB CLI flag parser
args args-parser cli command-line command-line-parser node
5

Configure Feed

Select the types of activity you want to include in your feed.

chore: ultraflag -> @bomb.sh/args

Nate Moore (Feb 10, 2025, 10:37 PM -0600) c144a117 5a4e14d7

+24 -16
+1 -1
CHANGELOG.md
··· 1 - # ultraflag 1 + # @bomb.sh/args (fka `ultraflag`) 2 2 3 3 ## 0.2.3 4 4
+12 -8
README.md
··· 1 - # `ultraflag` 1 + # `@bomb.sh/args` 2 2 3 - A <1kB library for parsing CLI flags. Inspired by Deno's `std` [`flags`](https://github.com/denoland/deno_std/blob/main/flags/mod.ts) module. 3 + A <1kB library for parsing CLI flags. Inspired by Deno's `std/cli` [`parseArgs`](https://github.com/denoland/std/blob/main/cli/parse_args.ts) module. 4 4 5 5 ### Features 6 6 ··· 17 17 Basic usage does not require any configuration. 18 18 19 19 ```js 20 - import { parse } from "ultraflag"; 20 + import { parse } from "@bomb.sh/args"; 21 21 22 22 // my-cli build --bundle -rf --a value --b=value --c 1 23 23 const argv = process.argv.slice(2); ··· 42 42 ## Benchmarks 43 43 44 44 ``` 45 - mri x 1,650,986 ops/sec ±0.32% (97 runs sampled) 46 - ultraflag x 1,407,191 ops/sec ±0.38% (99 runs sampled) 47 - minimist x 383,506 ops/sec ±0.28% (99 runs sampled) 48 - node:util x 320,953 ops/sec ±0.35% (98 runs sampled) 49 - yargs-parser x 31,874 ops/sec ±1.32% (92 runs sampled) 45 + mri x 1,650,986 ops/sec ±0.32% (97 runs sampled) 46 + @bomb.sh/args x 1,407,191 ops/sec ±0.38% (99 runs sampled) 47 + minimist x 383,506 ops/sec ±0.28% (99 runs sampled) 48 + node:util x 320,953 ops/sec ±0.35% (98 runs sampled) 49 + yargs-parser x 31,874 ops/sec ±1.32% (92 runs sampled) 50 50 ``` 51 + 52 + ## Acknowledgements 53 + 54 + This package was previously published as `ultraflag` up until `v0.2.3`, when it was transferred to `@bomb.sh/args`.
+9 -5
package.json
··· 1 1 { 2 - "name": "ultraflag", 2 + "name": "@bomb.sh/args", 3 + "publishConfig": { 4 + "access": "public", 5 + "provenance": true 6 + }, 3 7 "type": "module", 4 8 "version": "0.2.3", 5 9 "types": "./dist/index.d.ts", 6 10 "repository": { 7 11 "type": "git", 8 - "url": "https://github.com/natemoo-re/ultraflag" 12 + "url": "https://github.com/bombshell-dev/args" 9 13 }, 10 14 "bugs": { 11 - "url": "https://github.com/natemoo-re/ultraflag/issues" 15 + "url": "https://github.com/bombshell-dev/args/issues" 12 16 }, 13 - "homepage": "https://github.com/natemoo-re/ultraflag#README", 17 + "homepage": "https://github.com/bombshell-dev/args#README", 14 18 "scripts": { 15 19 "build": "node scripts/build.js && tsc -p .", 16 20 "lint": "prettier \"**/*.{js,ts,md}\"", ··· 38 42 "author": { 39 43 "name": "Nate Moore", 40 44 "email": "nate@natemoo.re", 41 - "url": "https://twitter.com/n_moore" 45 + "url": "https://natemoo.re" 42 46 }, 43 47 "license": "MIT", 44 48 "volta": {
+1 -1
scripts/build.js
··· 1 + import colors from 'chalk'; 1 2 import { build } from "esbuild"; 2 3 import { gzipSizeFromFileSync } from 'gzip-size'; 3 4 import bytes from 'pretty-bytes'; 4 - import colors from 'chalk'; 5 5 6 6 async function run() { 7 7 const files = ['src/index.ts'];
+1 -1
test/flags.test.ts
··· 1 - import { parse } from "../src"; 2 1 import { describe, expect, it, test } from "vitest"; 2 + import { parse } from "../src"; 3 3 4 4 describe("flags", () => { 5 5 it("a b c", () => {