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

Function parseMaxTime

lib/test/angular/1.8.0/angular-animate.js:789–802  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

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

Callers 1

computeCssStylesFunction · 0.70

Calls 1

forEachFunction · 0.70

Tested by

no test coverage detected