(str)
| 629 | } |
| 630 | |
| 631 | function 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 | |
| 646 | function truthyTimingValue(val) { |
| 647 | return val === 0 || val != null; |
no test coverage detected