remover.js 305 B

12345678910111213
  1. var isV8flags = require('./is-v8flags');
  2. module.exports = function(flags, argv) {
  3. var args = argv.slice(0, 1);
  4. for (var i = 1, n = argv.length; i < n; i++) {
  5. var arg = argv[i];
  6. var flag = arg.split('=')[0];
  7. if (!isV8flags(flag, flags)) {
  8. args.push(arg);
  9. }
  10. }
  11. return args;
  12. };