You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
370 B
17 lines
370 B
"use strict"; |
|
|
|
/** |
|
* Returns a string representation of the value |
|
* |
|
* @param {*} value |
|
* @returns {string} |
|
*/ |
|
function valueToString(value) { |
|
if (value && value.toString) { |
|
// eslint-disable-next-line @sinonjs/no-prototype-methods/no-prototype-methods |
|
return value.toString(); |
|
} |
|
return String(value); |
|
} |
|
|
|
module.exports = valueToString;
|
|
|