MCPcopy
hub / github.com/plotly/dash / stringifyId

Function stringifyId

dash/dash-renderer/src/actions/dependencies.js:115–124  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

113 * JSON.stringify - for the object form - but ensuring keys are sorted
114 */
115export function stringifyId(id) {
116 if (typeof id !== 'object') {
117 return id;
118 }
119 const stringifyVal = v => (v && v.wild) || JSON.stringify(v);
120 const parts = Object.keys(id)
121 .sort()
122 .map(k => JSON.stringify(k) + ':' + stringifyVal(id[k]));
123 return '{' + parts.join(',') + '}';
124}
125
126/*
127 * id dict values can be numbers, strings, and booleans.

Callers 15

getValsKeyFunction · 0.90
isAppReady.jsFile · 0.90
combineIdAndPropFunction · 0.90
getLayoutCallbacksFunction · 0.90
handleClientsideFunction · 0.90
updateComponentFunction · 0.90
inputsToDictFunction · 0.90
__executeFunction · 0.90
recordNodeFunction · 0.90
flattenInputsFunction · 0.90
getStashFunction · 0.90
getIdsFunction · 0.90

Calls 3

stringifyValFunction · 0.85
keysMethod · 0.80
sortMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…