|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
444 bytes
|
| Line | |
|---|
| 1 | var trimmedEndIndex = require('./_trimmedEndIndex');
|
|---|
| 2 |
|
|---|
| 3 | /** Used to match leading whitespace. */
|
|---|
| 4 | var reTrimStart = /^\s+/;
|
|---|
| 5 |
|
|---|
| 6 | /**
|
|---|
| 7 | * The base implementation of `_.trim`.
|
|---|
| 8 | *
|
|---|
| 9 | * @private
|
|---|
| 10 | * @param {string} string The string to trim.
|
|---|
| 11 | * @returns {string} Returns the trimmed string.
|
|---|
| 12 | */
|
|---|
| 13 | function baseTrim(string) {
|
|---|
| 14 | return string
|
|---|
| 15 | ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
|
|---|
| 16 | : string;
|
|---|
| 17 | }
|
|---|
| 18 |
|
|---|
| 19 | module.exports = baseTrim;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.