(acc, t)
| 96 | }; |
| 97 | |
| 98 | function parseTimes(acc, t) { |
| 99 | if (typeof t === 'object') { |
| 100 | acc.times = +t.times || DEFAULT_TIMES; |
| 101 | |
| 102 | acc.intervalFunc = typeof t.interval === 'function' ? |
| 103 | t.interval : |
| 104 | constant(+t.interval || DEFAULT_INTERVAL); |
| 105 | |
| 106 | acc.errorFilter = t.errorFilter; |
| 107 | } else if (typeof t === 'number' || typeof t === 'string') { |
| 108 | acc.times = +t || DEFAULT_TIMES; |
| 109 | } else { |
| 110 | throw new Error("Invalid arguments for async.retry"); |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | if (arguments.length < 3 && typeof opts === 'function') { |
| 115 | callback = task || noop; |
no outgoing calls
no test coverage detected
searching dependent graphs…