c3babedb02bc91a5d3d8c30c5fab59db5f323bebd0adc365c598fe415987009653c4e8c5fa3e4003c1bf2309a9167442ab6bcafe8151cbc908cf76e3ac4221 442 B

12345678910111213141516171819
  1. import trimmedEndIndex from './_trimmedEndIndex.js';
  2. /** Used to match leading whitespace. */
  3. var reTrimStart = /^\s+/;
  4. /**
  5. * The base implementation of `_.trim`.
  6. *
  7. * @private
  8. * @param {string} string The string to trim.
  9. * @returns {string} Returns the trimmed string.
  10. */
  11. function baseTrim(string) {
  12. return string
  13. ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
  14. : string;
  15. }
  16. export default baseTrim;