vamtiger-commandline-help
TypeScript icon, indicating that this package has built-in type declarations

0.0.10 • Public • Published

Get help text.

Installation

VAMTIGER Commandline Help can be installed using npm or yarn:

npm i vamtiger-commandline-help

or

yarn add vamtiger-commandline-help

Once installed, VAMTIGER Commandline Help can be imported.

import getHelp from 'vamtiger-commandline-help';

or

const getHelp = require('vamtiger-commandline-help').default;

Help text can then be referenced as a string table.

const args = {
    argument: 'Argument',
    anotherArgument: 'Another'
};
const short = {
    argument: 'a',
    anotherArgument: 'A'
}
const description = {
    argument: 'Argument description',
    anotherArgument: 'Another argument description'
};
/*
Args can be named as desired.
They just need to have the same key name mappings.

In this instances the column names will be
Args | Short | Description
*/
const help = getHelp({
    args,
    short,
    description
});

console.log(help);
/*
===================================================
| Args | Short | Description                  |
===================================================
| Argument | a     | Argument description         |
---------------------------------------------------
| Another  | A     | Another argument description |
---------------------------------------------------
*/

Dependents (3)

Package Sidebar

Install

npm i vamtiger-commandline-help

Weekly Downloads

56

Version

0.0.10

License

MIT

Unpacked Size

5.86 kB

Total Files

5

Last publish

Collaborators

  • vamtiger-project