import { __asyncGenerator as c, __generator as i, __await as n } from "./index-tslib.es6.js";
import { isFunction as o } from "./index-isFunction.js";
function f(r) {
  return c(this, arguments, function() {
    var a, t, s, u;
    return i(this, function(e) {
      switch (e.label) {
        case 0:
          a = r.getReader(), e.label = 1;
        case 1:
          e.trys.push([1, , 9, 10]), e.label = 2;
        case 2:
          return [4, n(a.read())];
        case 3:
          return t = e.sent(), s = t.value, u = t.done, u ? [4, n(void 0)] : [3, 5];
        case 4:
          return [2, e.sent()];
        case 5:
          return [4, n(s)];
        case 6:
          return [4, e.sent()];
        case 7:
          return e.sent(), [3, 2];
        case 8:
          return [3, 10];
        case 9:
          return a.releaseLock(), [7];
        case 10:
          return [2];
      }
    });
  });
}
function v(r) {
  return o(r == null ? void 0 : r.getReader);
}
export {
  v as isReadableStreamLike,
  f as readableStreamLikeToAsyncGenerator
};
