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

Function parseMaxTime

lib/test/angular/1.5.0/angular-animate.js:806–819  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

804}
805
806function parseMaxTime(str) {
807 var maxValue = 0;
808 var values = str.split(/\s*,\s*/);
809 forEach(values, function(value) {
810 // it's always safe to consider only second values and omit `ms` values since
811 // getComputedStyle will always handle the conversion for us
812 if (value.charAt(value.length - 1) == 's') {
813 value = value.substring(0, value.length - 1);
814 }
815 value = parseFloat(value) || 0;
816 maxValue = maxValue ? Math.max(value, maxValue) : value;
817 });
818 return maxValue;
819}
820
821function truthyTimingValue(val) {
822 return val === 0 || val != null;

Callers 1

computeCssStylesFunction · 0.70

Calls 1

forEachFunction · 0.70

Tested by

no test coverage detected