(str)
| 785 | } |
| 786 | |
| 787 | function 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 | |
| 802 | function truthyTimingValue(val) { |
| 803 | return val === 0 || val != null; |
no test coverage detected