Use native or lodash util module where full "lodash" is required
This commit is contained in:
committed by
Logan Smyth
parent
5d31316fb1
commit
85b3aec747
@@ -7,7 +7,6 @@ import repl from "repl";
|
||||
import { util } from "babel-core";
|
||||
import * as babel from "babel-core";
|
||||
import vm from "vm";
|
||||
import _ from "lodash";
|
||||
import "babel-polyfill";
|
||||
import register from "babel-register";
|
||||
|
||||
@@ -94,7 +93,7 @@ if (program.eval || program.print) {
|
||||
|
||||
const result = _eval(code, global.__filename);
|
||||
if (program.print) {
|
||||
const output = _.isString(result) ? result : inspect(result);
|
||||
const output = typeof result === "string" ? result : inspect(result);
|
||||
process.stdout.write(output + "\n");
|
||||
}
|
||||
} else {
|
||||
@@ -104,7 +103,7 @@ if (program.eval || program.print) {
|
||||
|
||||
let i = 0;
|
||||
let ignoreNext = false;
|
||||
_.each(args, function (arg, i2) {
|
||||
args.forEach(function (arg, i2) {
|
||||
if (ignoreNext) {
|
||||
ignoreNext = false;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user