Files
lodash/internal/baseToString.js
John-David Dalton 9b7c4d6761 Bump to v3.0.0.
2015-05-19 22:25:55 -07:00

20 lines
435 B
JavaScript

define([], function() {
/**
* 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 + '');
}
return baseToString;
});