Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

20 linhas
444 B

  1. var trimmedEndIndex = require('./_trimmedEndIndex');
  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. module.exports = baseTrim;