source: imaps-frontend/node_modules/lodash-es/_baseTrim.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 442 bytes
Line 
1import trimmedEndIndex from './_trimmedEndIndex.js';
2
3/** Used to match leading whitespace. */
4var 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 */
13function baseTrim(string) {
14 return string
15 ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
16 : string;
17}
18
19export default baseTrim;
Note: See TracBrowser for help on using the repository browser.