MCPcopy
hub / github.com/chartjs/Chart.js / moveNumericKeys

Function moveNumericKeys

src/core/core.controller.js:72–84  ·  view source on GitHub ↗
(obj, start, move)

Source from the content-addressed store, hash-verified

70};
71
72function moveNumericKeys(obj, start, move) {
73 const keys = Object.keys(obj);
74 for (const key of keys) {
75 const intKey = +key;
76 if (intKey >= start) {
77 const value = obj[key];
78 delete obj[key];
79 if (move > 0 || intKey > start) {
80 obj[intKey + move] = value;
81 }
82 }
83 }
84}
85
86/**
87 * @param {ChartEvent} e

Callers 1

_updateHiddenIndicesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected