UNPKG

cliss

Version:

CLI Simple, Stupid. Automatic discovery of parameters names. Provides an easy and minimal setup by passing in only a function reference without the need of declaring all expected options names or create a help section by hand. Support to sync / async. Sup

14 lines (11 loc) 215 B
'use strict'; const cliss = require('../../../'); const cliSpec = { name: 'simple-cli', action: (param1 = 'defaultParam1', param2) => `${param1}-${param2}`, }; cliss(cliSpec, { help: { stripAnsi: true } });