mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +00:00
Bump to v3.0.0.
This commit is contained in:
16
internal/baseToString.js
Normal file
16
internal/baseToString.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* 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 + '');
|
||||
}
|
||||
|
||||
export default baseToString;
|
||||
Reference in New Issue
Block a user