iteragain
Advanced tools
Comparing version 0.6.1 to 0.7.0
@@ -6,14 +6,7 @@ "use strict"; | ||
const toIterator_1 = require("./toIterator"); | ||
function* concatGen(...args) { | ||
let next; | ||
for (const arg of args) { | ||
const iterator = (0, toIterator_1.default)(arg); | ||
while (!(next = iterator.next()).done) | ||
yield next.value; | ||
} | ||
} | ||
const ConcatIterator_1 = require("./internal/ConcatIterator"); | ||
function concat(...args) { | ||
return new ExtendedIterator_1.default(concatGen(...args)); | ||
return new ExtendedIterator_1.default(new ConcatIterator_1.default(args.map(toIterator_1.default))); | ||
} | ||
exports.concat = concat; | ||
exports.default = concat; |
{ | ||
"name": "iteragain", | ||
"version": "0.6.1", | ||
"version": "0.7.0", | ||
"description": "Javascript ES6 Iterable/Iterator utilities.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
39214
44
773