Replace trim-right with _.trimEnd (#3502)
This commit is contained in:
parent
829d4497c9
commit
9f8cd91605
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user