import { ParseConfig, run } from "@iamwxq/minigrep"; try { run(ParseConfig.build(Deno.args)); } catch (err) { console.error(`Application error: ${err.message}`); Deno.exit(1); }
I'm nobody! Who are you?
Are you nobody, too?
Then there's a pair of us - don't tell!
They'd banish us, you know.
How dreary to be somebody!
How public, like a frog
To tell your name the livelong day
To an admiring bog!
case sensitive:
deno run --allow-env --allow-read main.ts to poem.txt
output:
Are you nobody, too?
How dreary to be somebody!
case insentitive:
IGNORE_CASE=1 && deno run --allow-env --allow-read main.ts to poem.txt
output:
Are you nobody, too?
How dreary to be somebody!
To tell your name the livelong day
To an admiring bog!
Add Package
deno add jsr:@iamwxq/minigrep
Import symbol
import * as minigrep from "@iamwxq/minigrep";
---- OR ----
Import directly with a jsr specifier
import * as minigrep from "jsr:@iamwxq/minigrep";