10up-toolkit
Version:
Collection of reusable scripts for 10up development.
16 lines (14 loc) • 337 B
JavaScript
const getArgsFromCLI = (excludePrefixes) => {
const args = process.argv.slice(2);
if (excludePrefixes) {
return args.filter((arg) => {
return !excludePrefixes.some((prefix) => arg.startsWith(prefix));
});
}
return args;
};
module.exports = {
exit: process.exit,
getArgsFromCLI,
getCurrentWorkingDirectory: process.cwd,
};