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

Function parseMaxTime

test/angular/1.6/angular-animate.js:787–800  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

785}
786
787function parseMaxTime(str) {
788 var maxValue = 0;
789 var values = str.split(/\s*,\s*/);
790 forEach(values, function(value) {
791 // it's always safe to consider only second values and omit `ms` values since
792 // getComputedStyle will always handle the conversion for us
793 if (value.charAt(value.length - 1) === 's') {
794 value = value.substring(0, value.length - 1);
795 }
796 value = parseFloat(value) || 0;
797 maxValue = maxValue ? Math.max(value, maxValue) : value;
798 });
799 return maxValue;
800}
801
802function truthyTimingValue(val) {
803 return val === 0 || val != null;

Callers 1

computeCssStylesFunction · 0.70

Calls 1

forEachFunction · 0.70

Tested by

no test coverage detected