Skip to content

Commit cbc7bed

Browse files
committed
change api trimRight -> trimEnd
1 parent 9fcaa24 commit cbc7bed

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/BannerPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const wrapComment = str => {
3333
.split("\n")
3434
.join("\n * ")
3535
.replace(/\s+\n/g, "\n")
36-
.trimRight()}\n */`;
36+
.trimEnd()}\n */`;
3737
};
3838

3939
class BannerPlugin {

lib/Template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ class Template {
217217
if (Array.isArray(s)) {
218218
return s.map(Template.indent).join("\n");
219219
} else {
220-
const str = s.trimRight();
220+
const str = s.trimEnd();
221221
if (!str) return "";
222222
const ind = str[0] === "\n" ? "" : "\t";
223223
return ind + str.replace(/\n([^\n])/g, "\n\t$1");

lib/css/CssParser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ class CssParser extends Parser {
196196
}
197197
if (pos === input.length) break;
198198
}
199-
return [pos, text.trimRight()];
199+
return [pos, text.trimEnd()];
200200
};
201201
const eatExportName = eatUntil(":};/");
202202
const eatExportValue = eatUntil("};/");

lib/stats/DefaultStatsPrinterPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,7 @@ const SIMPLE_ELEMENT_JOINERS = {
11531153
chunkOrigin: items => "> " + joinOneLine(items),
11541154
"errors[].error": joinError(true),
11551155
"warnings[].error": joinError(false),
1156-
loggingGroup: items => joinExplicitNewLine(items, "").trimRight(),
1156+
loggingGroup: items => joinExplicitNewLine(items, "").trimEnd(),
11571157
moduleTraceItem: items => " @ " + joinOneLine(items),
11581158
moduleTraceDependency: joinOneLine
11591159
};

0 commit comments

Comments
 (0)