lib/cli/options-manager.js
function mergeOptions(...opt){
        // extract default (last argument)
        const result = opt.pop();

        // try to find first match
        while (opt.length > 0){
            // extract first argument (priority)
            const o = opt.shift();

            // value set ?
            if (typeof o !== 'undefined' && o !== null){
                return o;
            }
        }

        return result;
    }
function mergeOptions(...opt){
        // extract default (last argument)
        const result = opt.pop();

        // try to find first match
        while (opt.length > 0){
            // extract first argument (priority)
            const o = opt.shift();

            // value set ?
            if (typeof o !== 'undefined' && o !== null){
                return o;
            }
        }

        return result;
    }
function mergeOptions ( ... opt ) { // extract default (last argument) const result = opt . pop ( ) ; // try to find first match while ( opt . length > 0 ) { // extract first argument (priority) const o = opt . shift ( ) ; // value set ? if ( typeof o !== 'undefined' && o !== null ) { return o ; } } return result ; }
utility function to merge different options cli args take presendence over config
utility function to merge different options cli args take presendence over config