Files
PC-vote/.output/server/node_modules/lodash-es/_baseTrim.js
A1300399510 0647750789 no message
2024-07-22 12:02:37 +08:00

20 lines
442 B
JavaScript

import trimmedEndIndex from './_trimmedEndIndex.js';
/** 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;
}
export default baseTrim;