@cspell/cspell-pipe
Advanced tools
Comparing version 8.10.4 to 8.11.0
export { toDistributableIterable } from './distribute.js'; | ||
export { fork } from './fork.js'; | ||
export { interleave } from './interleave.js'; | ||
@@ -3,0 +4,0 @@ export { asyncIteratorToAsyncIterable, iteratorToIterable } from './iteratorToIterable.js'; |
export { toDistributableIterable } from './distribute.js'; | ||
export { fork } from './fork.js'; | ||
export { interleave } from './interleave.js'; | ||
@@ -3,0 +4,0 @@ export { asyncIteratorToAsyncIterable, iteratorToIterable } from './iteratorToIterable.js'; |
export function* iteratorToIterable(iterator) { | ||
let n; | ||
while (!(n = iterator.next()).done) { | ||
yield n.value; | ||
try { | ||
let n; | ||
while (!(n = iterator.next()).done) { | ||
yield n.value; | ||
} | ||
} | ||
catch (e) { | ||
if (iterator.throw) { | ||
return iterator.throw(e); | ||
} | ||
throw e; | ||
} | ||
finally { | ||
// ensure that clean up happens. | ||
iterator.return?.(); | ||
} | ||
} | ||
export async function* asyncIteratorToAsyncIterable(iterator) { | ||
let n; | ||
while (!(n = await iterator.next()).done) { | ||
yield n.value; | ||
try { | ||
let n; | ||
while (!(n = await iterator.next()).done) { | ||
yield n.value; | ||
} | ||
} | ||
catch (e) { | ||
if (iterator.throw) { | ||
return iterator.throw(e); | ||
} | ||
throw e; | ||
} | ||
finally { | ||
// ensure that clean up happens. | ||
iterator.return?.(); | ||
} | ||
} | ||
//# sourceMappingURL=iteratorToIterable.js.map |
import * as _helpers from './helpers/index.js'; | ||
import * as _operators from './operators/index.js'; | ||
export { interleave, isAsyncIterable, toArray, toAsyncIterable, toDistributableIterable } from './helpers/index.js'; | ||
export { fork, interleave, isAsyncIterable, toArray, toAsyncIterable, toDistributableIterable, } from './helpers/index.js'; | ||
export { opAppend, opAwaitAsync, opBuffer, opConcatMap, opFilter, opFirst, opFlatten, opJoinStrings, opLast, opMap, opSkip, opTake, opTap, opUnique, } from './operators/index.js'; | ||
@@ -5,0 +5,0 @@ export { pipeAsync, pipeSync } from './pipe.js'; |
import * as _helpers from './helpers/index.js'; | ||
import * as _operators from './operators/index.js'; | ||
export { interleave, isAsyncIterable, toArray, toAsyncIterable, toDistributableIterable } from './helpers/index.js'; | ||
export { fork, interleave, isAsyncIterable, toArray, toAsyncIterable, toDistributableIterable, } from './helpers/index.js'; | ||
export { opAppend, opAwaitAsync, opBuffer, opConcatMap, opFilter, opFirst, opFlatten, opJoinStrings, opLast, opMap, opSkip, opTake, opTap, opUnique, } from './operators/index.js'; | ||
@@ -5,0 +5,0 @@ export { pipeAsync, pipeSync } from './pipe.js'; |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "8.10.4", | ||
"version": "8.11.0", | ||
"description": "Library to make working with Iterators/AsyncIterators easier.", | ||
@@ -130,3 +130,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "96707a892a95a7e10dd5894e8cdd8f288b841c2f" | ||
"gitHead": "2b85b2b458b1117870a4f0aee18fb45ce991848d" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50210
67
981