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:
682 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var $ = require('../internals/export');
|
---|
3 | var $trimStart = require('../internals/string-trim').start;
|
---|
4 | var forcedStringTrimMethod = require('../internals/string-trim-forced');
|
---|
5 |
|
---|
6 | var FORCED = forcedStringTrimMethod('trimStart');
|
---|
7 |
|
---|
8 | var trimStart = FORCED ? function trimStart() {
|
---|
9 | return $trimStart(this);
|
---|
10 | // eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe
|
---|
11 | } : ''.trimStart;
|
---|
12 |
|
---|
13 | // `String.prototype.{ trimStart, trimLeft }` methods
|
---|
14 | // https://tc39.es/ecma262/#sec-string.prototype.trimstart
|
---|
15 | // https://tc39.es/ecma262/#String.prototype.trimleft
|
---|
16 | $({ target: 'String', proto: true, forced: FORCED }, {
|
---|
17 | trimStart: trimStart,
|
---|
18 | trimLeft: trimStart
|
---|
19 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.