Skip to content

MICKeyzwo/arguments_parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arguments parser

A simple arguments parser for Deno.

Feature

  • Inspired by Python's argparse module
  • No dependencies
  • Strongly typed APIs

Usage

Write example.ts like below:

import { ArgumentsParser } from "https://deno.land/x/arguments_parser/mod.ts";

const parser = new ArgumentsParser({
    message: {
        names: ["-m", "--message"],
        parser: String
    }
});
const args = parser.parseArgs();
console.log(args.message);

And execute it:

deno run example.ts -m "hello!"
Check .../example.ts
hello!

About

A simple arguments parser for Deno

Resources

Stars

Watchers

Forks

Packages

No packages published