Files
biomedjs/node_modules/lodash/internal/baseToString.js

17 lines
386 B
JavaScript
Raw Permalink Normal View History

2015-04-20 05:31:12 -04:00
/**
* Converts `value` to a string if it is 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) {
if (typeof value == 'string') {
return value;
}
return value == null ? '' : (value + '');
}
module.exports = baseToString;