test/node_modules/lodash/internal/baseToString.js

14 lines
329 B
JavaScript
Raw Normal View History

2018-12-13 14:35:46 +01:00
/**
* Converts `value` to a string if it's not one. An empty string is returned
* for `null` or `undefined` values.
*
* @private
* @param {*} value The value to process.
* @returns {string} Returns the string.
*/
function baseToString(value) {
return value == null ? '' : (value + '');
}
module.exports = baseToString;