mirror of
https://kevinblog.sytes.net/Code/Jibo-Revival-Group/jibo-cli.git
synced 2026-06-15 12:56:23 +00:00
14 lines
329 B
JavaScript
14 lines
329 B
JavaScript
|
|
/**
|
||
|
|
* 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;
|