A small library that processes js object and returns ready for use array of command line args.
npm i @dlukanin/cla-mapper
import {ClaMapper} from 'cla-mapper';
const mapper = new ClaMapper({
opt1: '-o',
opt2: '--opt2',
opt3: '--opt3'
});
mapper.getCommandLineArgs({
opt1: 'val',
opt2: true,
opt3: false
}); // ['-o', 'val', '--opt2']
Lib is MIT licensed