MCPcopy
hub / github.com/caolan/async / parseTimes

Function parseTimes

lib/retry.js:98–112  ·  view source on GitHub ↗
(acc, t)

Source from the content-addressed store, hash-verified

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;

Callers 1

retryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…