use instance indexOf instead of lodash - #951

This commit is contained in:
Sebastian McKenzie 2015-03-06 23:31:11 +11:00
parent 70b6317865
commit 4df50954a2

View File

@ -1,7 +1,5 @@
#!/usr/bin/env node
var indexOf = require("lodash/array/indexOf");
/**
* This tiny wrapper file checks for known node flags and appends them
* when found, before invoking the "real" _babel-node(1) executable.
@ -13,9 +11,9 @@ var babelArgs = process.argv.slice(2);
var userArgs;
// separate node arguments from script arguments
var argSeparator = indexOf(babelArgs, "--");
var argSeparator = babelArgs.indexOf("--");
if (argSeparator > -1) {
userArgs = babelArgs.slice(argSeparator); // including the --
userArgs = babelArgs.slice(argSeparator); // including the --
babelArgs = babelArgs.slice(0, argSeparator);
}