Files: 7aa21412f6c0bd6b84022d67ff8e51711eddb510 / infinite.js
188 bytesRaw
1 | module.exports = function infinite (generate) { |
2 | generate = generate || Math.random |
3 | return function (end, cb) { |
4 | if(end) return cb && cb(end) |
5 | return cb(null, generate()) |
6 | } |
7 | } |
8 | |
9 | |
10 |
Built with git-ssb-web