MCPcopy Index your code
hub / github.com/plotly/plotly.js / checkNewContainer

Function checkNewContainer

src/lib/nested_property.js:224–232  ·  view source on GitHub ↗

* make new sub-container as needed. * returns false if there's no container and none is needed * because we're only deleting an attribute

(container, part, nextPart, toDelete)

Source from the content-addressed store, hash-verified

222 * because we're only deleting an attribute
223 */
224function checkNewContainer(container, part, nextPart, toDelete) {
225 if(container[part] === undefined) {
226 if(toDelete) return false;
227
228 if(typeof nextPart === 'number') container[part] = [];
229 else container[part] = {};
230 }
231 return true;
232}
233
234function badContainer(container, propStr, propParts) {
235 return {

Callers 2

npSetFunction · 0.85
setArrayAllFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…