Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
661 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var $ = require('../internals/export');
|
---|
3 | var $trimEnd = require('../internals/string-trim').end;
|
---|
4 | var forcedStringTrimMethod = require('../internals/string-trim-forced');
|
---|
5 |
|
---|
6 | var FORCED = forcedStringTrimMethod('trimEnd');
|
---|
7 |
|
---|
8 | var trimEnd = FORCED ? function trimEnd() {
|
---|
9 | return $trimEnd(this);
|
---|
10 | // eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe
|
---|
11 | } : ''.trimEnd;
|
---|
12 |
|
---|
13 | // `String.prototype.{ trimEnd, trimRight }` methods
|
---|
14 | // https://tc39.es/ecma262/#sec-string.prototype.trimend
|
---|
15 | // https://tc39.es/ecma262/#String.prototype.trimright
|
---|
16 | $({ target: 'String', proto: true, forced: FORCED }, {
|
---|
17 | trimEnd: trimEnd,
|
---|
18 | trimRight: trimEnd
|
---|
19 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.