toString.js 231 B

12345678910111213
  1. /**
  2. * Typecast a value to a String, using an empty string value for null or
  3. * undefined.
  4. */
  5. function toString(val){
  6. return val == null ? '' : val.toString();
  7. }
  8. module.exports = toString;