All files / src/utils get-argv.js

100% Statements 8/8
100% Branches 0/0
100% Functions 3/3
100% Lines 8/8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18    6x 7x 7x 17x 17x     7x   12x         6x  
'use strict';
 
const getArgv = (rawArgs, options) => {
    const optionsHash = {};
    options.forEach(option => {
        optionsHash[option.short] = option;
        optionsHash[option.long] = option;
    });
 
    return rawArgs
        .filter(arg => {
            return !optionsHash[arg];
        })
        .join(' ');
};
 
module.exports = getArgv;