mirror of
https://github.com/Instadapp/Swap-Aggregator-Subgraph.git
synced 2024-07-29 21:57:12 +00:00
11 lines
201 B
JavaScript
11 lines
201 B
JavaScript
'use strict'
|
|
module.exports = function infinite (generate) {
|
|
generate = generate || Math.random
|
|
return function (end, cb) {
|
|
if(end) return cb && cb(end)
|
|
return cb(null, generate())
|
|
}
|
|
}
|
|
|
|
|