tiny-bin
Version:
A library for building tiny and beautiful command line apps.
13 lines (12 loc) • 421 B
JavaScript
/* IMPORT */
import Bin from './objects/bin.js';
import ChainableCommandGlobal from './objects/chainable_command_global.js';
import { isObject } from './objects/utils.js';
function bin(name, description) {
const binOptions = isObject(name) ? name : { name, description };
const bin = new Bin(binOptions);
const command = new ChainableCommandGlobal(bin);
return command;
}
/* EXPORT */
export default bin;