Replace trim-right with _.trimEnd (#3502)

This commit is contained in:
dlwalsh 2016-05-16 23:53:48 +10:00 committed by Henry Zhu
parent 829d4497c9
commit 9f8cd91605
2 changed files with 1 additions and 3 deletions

View File

@ -10,7 +10,6 @@
"babel-runtime": "^6.0.0",
"lodash": "^4.2.0",
"path-exists": "^1.0.0",
"trim-right": "^1.0.1",
"try-resolve": "^1.0.0"
}
}

View File

@ -1,5 +1,4 @@
import pathExists from "path-exists";
import trimRight from "trim-right";
import resolve from "try-resolve";
import path from "path";
import fs from "fs";
@ -164,7 +163,7 @@ export function multiple(entryLoc, ignore?: Array<string>) {
export function readFile(filename) {
if (pathExists.sync(filename)) {
let file = trimRight(fs.readFileSync(filename, "utf8"));
let file = _.trimEnd(fs.readFileSync(filename, "utf8"));
file = file.replace(/\r\n/g, "\n");
return file;
} else {