wallet-core/node_modules/babel-runtime/helpers/asyncIterator.js
Florian Dold 82f2b76e25
Reorganize module loading.
We now use webpack instead of SystemJS, effectively bundling modules
into one file (plus commons chunks) for every entry point.  This results
in a much smaller extension size (almost half).  Furthermore we use
yarn/npm even for extension run-time dependencies.  This relieves us
from manually vendoring and building dependencies.  It's also easier to
understand for new developers familiar with node.
2017-04-24 16:14:29 +02:00

32 lines
863 B
JavaScript

"use strict";
exports.__esModule = true;
var _getIterator2 = require("../core-js/get-iterator");
var _getIterator3 = _interopRequireDefault(_getIterator2);
var _iterator = require("../core-js/symbol/iterator");
var _iterator2 = _interopRequireDefault(_iterator);
var _symbol = require("../core-js/symbol");
var _symbol2 = _interopRequireDefault(_symbol);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = function (iterable) {
if (typeof _symbol2.default === "function") {
if (_symbol2.default.asyncIterator) {
var method = iterable[_symbol2.default.asyncIterator];
if (method != null) return method.call(iterable);
}
if (_iterator2.default) {
return (0, _getIterator3.default)(iterable);
}
}
throw new TypeError("Object is not async iterable");
};