This repository has been archived on 2025-07-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
eternos/frontend/node_modules/lodash/_baseTrim.js
T
2025-01-13 09:33:52 +03:00

20 lines
444 B
JavaScript

var trimmedEndIndex = require('./_trimmedEndIndex');
/** Used to match leading whitespace. */
var reTrimStart = /^\s+/;
/**
* The base implementation of `_.trim`.
*
* @private
* @param {string} string The string to trim.
* @returns {string} Returns the trimmed string.
*/
function baseTrim(string) {
return string
? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
: string;
}
module.exports = baseTrim;