Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

toString.js 580B

12345678910111213141516171819202122232425262728
  1. var baseToString = require('./_baseToString');
  2. /**
  3. * Converts `value` to a string. An empty string is returned for `null`
  4. * and `undefined` values. The sign of `-0` is preserved.
  5. *
  6. * @static
  7. * @memberOf _
  8. * @since 4.0.0
  9. * @category Lang
  10. * @param {*} value The value to convert.
  11. * @returns {string} Returns the converted string.
  12. * @example
  13. *
  14. * _.toString(null);
  15. * // => ''
  16. *
  17. * _.toString(-0);
  18. * // => '-0'
  19. *
  20. * _.toString([1, 2, 3]);
  21. * // => '1,2,3'
  22. */
  23. function toString(value) {
  24. return value == null ? '' : baseToString(value);
  25. }
  26. module.exports = toString;