MCPcopy Index your code
hub / github.com/react/react / smartStringify

Function smartStringify

packages/react-devtools-shared/src/devtools/utils.js:244–256  ·  view source on GitHub ↗
(value: any)

Source from the content-addressed store, hash-verified

242}
243
244export function smartStringify(value: any): string {
245 if (typeof value === 'number') {
246 if (Number.isNaN(value)) {
247 return 'NaN';
248 } else if (!Number.isFinite(value)) {
249 return 'Infinity';
250 }
251 } else if (value === undefined) {
252 return 'undefined';
253 }
254
255 return JSON.stringify(value);
256}
257
258const STACK_DELIMETER = /\n\s+at /;
259const STACK_SOURCE_LOCATION = /([^\s]+) \((.+):(.+):(.+)\)/;

Callers 2

useEditableValueReducerFunction · 0.90
useEditableValueFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected