Bump to v4.17.21

This commit is contained in:
Benjamin Tan
2021-02-20 23:26:06 +08:00
parent f2e7063ee4
commit c6e281b878
14 changed files with 280 additions and 179 deletions

19
_baseTrim.js Normal file
View File

@@ -0,0 +1,19 @@
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;