mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-29 05:34:21 +08:00
R=alexrudenko@chromium.org Bug: None Change-Id: I1f8dcaa62c6d5e90f37c34db1fd8fb2ed1a7369c Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5666839 Reviewed-by: Alex Rudenko <alexrudenko@chromium.org> Commit-Queue: Alex Rudenko <alexrudenko@chromium.org> Auto-Submit: Simon Zünd <szuend@chromium.org>
17 lines
367 B
JavaScript
17 lines
367 B
JavaScript
"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;
|