MCPcopy Index your code
hub / github.com/totaljs/framework / counter_minmax

Function counter_minmax

nosql.js:3883–3893  ·  view source on GitHub ↗
(opt, val)

Source from the content-addressed store, hash-verified

3881}
3882
3883function counter_minmax(opt, val) {
3884 var index = val.indexOf('X');
3885 switch (opt.type2) {
3886 case 'min':
3887 return +val.substring(0, index);
3888 case 'max':
3889 return +val.substring(index + 1);
3890 case 'avg':
3891 return ((+val.substring(0, index)) + (+val.substring(index + 1))) / 2;
3892 }
3893}
3894
3895function counter_parse_years(value, year, opt) {
3896

Callers 8

nosql.jsFile · 0.85
counter_parse_statsFunction · 0.85
counter_parse_yearsFunction · 0.85
counter_parse_monthsFunction · 0.85
counter_parse_daysFunction · 0.85
counter_parse_years_allFunction · 0.85
counter_parse_months_allFunction · 0.85
counter_parse_days_allFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected