3b0d0eca9e534c6eb074aae567a4eb0971446e0a
[platform/framework/web/crosswalk-tizen.git] /
1 /**
2  * Converts `value` to a string if it is not one. An empty string is returned
3  * for `null` or `undefined` values.
4  *
5  * @private
6  * @param {*} value The value to process.
7  * @returns {string} Returns the string.
8  */
9 function baseToString(value) {
10   if (typeof value == 'string') {
11     return value;
12   }
13   return value == null ? '' : (value + '');
14 }
15
16 module.exports = baseToString;