biofriction-wp-theme/node_modules/flagged-respawn/lib/reorder.js

19 lines
374 B
JavaScript
Raw Normal View History

2021-10-26 14:18:09 +02:00
var isV8flags = require('./is-v8flags');
module.exports = function(flags, argv) {
if (!argv) {
argv = process.argv;
}
var args = [argv[1]];
argv.slice(2).forEach(function(arg) {
var flag = arg.split('=')[0];
if (isV8flags(flag, flags)) {
args.unshift(arg);
} else {
args.push(arg);
}
});
args.unshift(argv[0]);
return args;
};