MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / parseMaxTime

Function parseMaxTime

lib/test/angular/1.4.3/angular-animate.js:631–644  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

629}
630
631function parseMaxTime(str) {
632 var maxValue = 0;
633 var values = str.split(/\s*,\s*/);
634 forEach(values, function(value) {
635 // it's always safe to consider only second values and omit `ms` values since
636 // getComputedStyle will always handle the conversion for us
637 if (value.charAt(value.length - 1) == 's') {
638 value = value.substring(0, value.length - 1);
639 }
640 value = parseFloat(value) || 0;
641 maxValue = maxValue ? Math.max(value, maxValue) : value;
642 });
643 return maxValue;
644}
645
646function truthyTimingValue(val) {
647 return val === 0 || val != null;

Callers 1

computeCssStylesFunction · 0.70

Calls 1

forEachFunction · 0.70

Tested by

no test coverage detected