README
VAMTIGER Commandline Help
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 |
---------------------------------------------------
*/