UNPKG

iterama

Version:

Composable functional (async) iterable helpers

16 lines 785 B
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _wrapAsyncGenerator from "@babel/runtime/helpers/esm/wrapAsyncGenerator"; import _awaitAsyncGenerator from "@babel/runtime/helpers/esm/awaitAsyncGenerator"; import _asyncIterator from "@babel/runtime/helpers/esm/asyncIterator"; import _asyncGeneratorDelegate from "@babel/runtime/helpers/esm/asyncGeneratorDelegate"; export var startWithAsync = function startWithAsync(value) { return function (iterable) { return _defineProperty({}, Symbol.asyncIterator, function () { return _wrapAsyncGenerator(function* () { yield value; yield* _asyncGeneratorDelegate(_asyncIterator(iterable), _awaitAsyncGenerator); })(); }); }; }; //# sourceMappingURL=start-with-async.js.map