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

Function decodeTargetIndex

src/plugins/plugin.filler/filler.options.js:63–73  ·  view source on GitHub ↗
(firstCh, index, target, count)

Source from the content-addressed store, hash-verified

61}
62
63function decodeTargetIndex(firstCh, index, target, count) {
64 if (firstCh === '-' || firstCh === '+') {
65 target = index + target;
66 }
67
68 if (target === index || target < 0 || target >= count) {
69 return false;
70 }
71
72 return target;
73}
74
75/**
76 * @param {FillTarget | ComplexFillTarget} fill

Callers 1

_decodeFillFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected