MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / stringSet

Function stringSet

tests/test_code/js/moment/moment.js:749–764  ·  view source on GitHub ↗
(units, value)

Source from the content-addressed store, hash-verified

747 }
748
749 function stringSet(units, value) {
750 if (typeof units === 'object') {
751 units = normalizeObjectUnits(units);
752 var prioritized = getPrioritizedUnits(units),
753 i;
754 for (i = 0; i < prioritized.length; i++) {
755 this[prioritized[i].unit](units[prioritized[i].unit]);
756 }
757 } else {
758 units = normalizeUnits(units);
759 if (isFunction(this[units])) {
760 return this[units](value);
761 }
762 }
763 return this;
764 }
765
766 var match1 = /\d/, // 0 - 9
767 match2 = /\d\d/, // 00 - 99

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected