UNPKG

reactizzen

Version:

Creates single react component folder structure with multiple flags, upgraded version of not maintained anymore create-react-folder-component library.

25 lines (20 loc) 511 B
/** * Removes options values from node args * * @param {Array} args - Node CMD arguments * @param {Array} argsWithValues * @returns {Array} args */ function removeOptionsFromArgs(args, argsWithValues = []) { const temp = []; if (args.length > 0) { args.reduce((previous, current) => { if (current.charAt(0) !== '-' && !argsWithValues.includes(previous)) { temp.push(current); } return current; }, ''); } return temp; } module.exports = removeOptionsFromArgs;