Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@dlukanin/cla-mapper

dlukanin492MIT1.2.2TypeScript support: included

Command line args mapper. A small library that processes js object and returns ready for use array of command line args

cla, args, command-line, mapper

readme

cla-mapper

Build status Total alerts Coverage Status

A small library that processes js object and returns ready for use array of command line args.

Install

npm i @dlukanin/cla-mapper

Use

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']

License

Lib is MIT licensed