MCPcopy Create free account
hub / github.com/feiyu563/PrometheusAlert / stringSet

Function stringSet

static/plugins/chart.js/Chart.bundle.js:15540–15554  ·  view source on GitHub ↗
(units, value)

Source from the content-addressed store, hash-verified

15538
15539
15540 function stringSet (units, value) {
15541 if (typeof units === 'object') {
15542 units = normalizeObjectUnits(units);
15543 var prioritized = getPrioritizedUnits(units);
15544 for (var i = 0; i < prioritized.length; i++) {
15545 this[prioritized[i].unit](units[prioritized[i].unit]);
15546 }
15547 } else {
15548 units = normalizeUnits(units);
15549 if (isFunction(this[units])) {
15550 return this[units](value);
15551 }
15552 }
15553 return this;
15554 }
15555
15556 function mod(n, x) {
15557 return ((n % x) + x) % x;

Callers

nothing calls this directly

Calls 4

normalizeObjectUnitsFunction · 0.85
getPrioritizedUnitsFunction · 0.85
normalizeUnitsFunction · 0.85
isFunctionFunction · 0.70

Tested by

no test coverage detected