1.5.2 • Published 5 years ago

arguets v1.5.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

ArgueTS

TypeScript arguments parser.

Installation (lib)

npm i arguets or yarn add arguets

(for dev)

  • Clone the repo.
  • Run yarn or npm i

Usage

Docs

Example:

// TypeScript
import ArgueTS, { IOptionDef, IArguments } from "arguets";
const test: string[] = "test 1 2 3 --test OK".split(" ");
const testOpt: IOptionDef = {
	name: "test",
	alias: "t",
	type: "string",
};
const result: IArguments = ArgueTS(test, [testOpt]);
/*
	Result:
	{
		"args": ["test", "1", "2", "3"],
		"options": {"test": "OK"}
	}
*/
// JavaScript
const ArgueTS = require("arguets");
const test = "test 1 2 3 --test OK".split(" ");
const testOpt = {
	name: "test",
	alias: "t",
	type: "string"
};
const result = ArgueTS(test, [testOpt]);
/*
	Result:
	{
		"args": ["test", "1", "2", "3"],
		"options": {"test", "OK"}
	}
*/
1.5.2

5 years ago

1.5.1

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago