| 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;
|