Sha256: 31cd0b45dec6d48f526b612150a9324b99840612ddca37ca39722256a0507453

Contents?: true

Size: 1.45 KB

Versions: 44

Compression:

Stored size: 1.45 KB

Contents

function _asyncIterator(r) {
  var n,
    t,
    o,
    e = 2;
  for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) {
    if (t && null != (n = r[t])) return n.call(r);
    if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r));
    t = "@@asyncIterator", o = "@@iterator";
  }
  throw new TypeError("Object is not async iterable");
}
function AsyncFromSyncIterator(r) {
  function AsyncFromSyncIteratorContinuation(r) {
    if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object."));
    var n = r.done;
    return Promise.resolve(r.value).then(function (r) {
      return {
        value: r,
        done: n
      };
    });
  }
  return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) {
    this.s = r, this.n = r.next;
  }, AsyncFromSyncIterator.prototype = {
    s: null,
    n: null,
    next: function next() {
      return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));
    },
    "return": function _return(r) {
      var n = this.s["return"];
      return void 0 === n ? Promise.resolve({
        value: r,
        done: !0
      }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
    },
    "throw": function _throw(r) {
      var n = this.s["return"];
      return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
    }
  }, new AsyncFromSyncIterator(r);
}
export { _asyncIterator as default };

Version data entries

44 entries across 44 versions & 2 rubygems

Version Path
immosquare-cleaner-0.1.62 node_modules/@babel/runtime/helpers/esm/asyncIterator.js
immosquare-cleaner-0.1.61 node_modules/@babel/runtime/helpers/esm/asyncIterator.js
immosquare-cleaner-0.1.60 node_modules/@babel/runtime/helpers/esm/asyncIterator.js
immosquare-cleaner-0.1.59 node_modules/@babel/runtime/helpers/esm/asyncIterator.js
immosquare-cleaner-0.1.58 node_modules/@babel/runtime/helpers/esm/asyncIterator.js
immosquare-cleaner-0.1.57 node_modules/@babel/runtime/helpers/esm/asyncIterator.js
immosquare-cleaner-0.1.56 node_modules/@babel/runtime/helpers/esm/asyncIterator.js
immosquare-cleaner-0.1.55 node_modules/@babel/runtime/helpers/esm/asyncIterator.js
immosquare-cleaner-0.1.54 node_modules/@babel/runtime/helpers/esm/asyncIterator.js
immosquare-cleaner-0.1.53 node_modules/@babel/runtime/helpers/esm/asyncIterator.js
immosquare-cleaner-0.1.52 node_modules/@babel/runtime/helpers/esm/asyncIterator.js
immosquare-cleaner-0.1.51 node_modules/@babel/runtime/helpers/esm/asyncIterator.js
clapton-0.0.26 lib/clapton/javascripts/node_modules/@babel/runtime/helpers/esm/asyncIterator.js
clapton-0.0.25 lib/clapton/javascripts/node_modules/@babel/runtime/helpers/esm/asyncIterator.js
immosquare-cleaner-0.1.50 node_modules/@babel/runtime/helpers/esm/asyncIterator.js
clapton-0.0.24 lib/clapton/javascripts/node_modules/@babel/runtime/helpers/esm/asyncIterator.js
clapton-0.0.23 lib/clapton/javascripts/node_modules/@babel/runtime/helpers/esm/asyncIterator.js
clapton-0.0.22 lib/clapton/javascripts/node_modules/@babel/runtime/helpers/esm/asyncIterator.js
clapton-0.0.21 lib/clapton/javascripts/node_modules/@babel/runtime/helpers/esm/asyncIterator.js
clapton-0.0.20 lib/clapton/javascripts/node_modules/@babel/runtime/helpers/esm/asyncIterator.js