var looper = require('looper')

module.exports = function (read) {
  var _abort, _cb
  var loop = looper(function () {
    read(_abort, _cb)
  })
  return function (abort, cb) {
    _abort = abort
    _cb = cb
    loop()
  }
}
