Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mergeiterator

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mergeiterator - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 1.3.1
fix:
* change ts return type to AsyncGenerator
## 1.3.0

@@ -2,0 +8,0 @@

23

dist/mergeiterator.js

@@ -227,12 +227,15 @@ "use strict";

const stopIterator = iterator => PromiseTry(() => iterator.return ? iterator.return() : {
done: true,
value: undefined
}).then(({
done,
value
}) => Promise.resolve(value).then(v => ({
done,
value: v
})));
const stopIterator = iterator => PromiseTry(() => {
const ret = iterator.return;
return !ret ? {
done: true,
value: undefined
} : Promise.resolve(ret.call(iterator)).then(({
done,
value
}) => Promise.resolve(value).then(v => ({
done,
value: v
})));
});

@@ -239,0 +242,0 @@ const PromiseTry = func => {

{
"name": "mergeiterator",
"version": "1.3.0",
"version": "1.3.1",
"description": "merges async iterators",

@@ -50,3 +50,3 @@ "license": "MIT",

"dependencies": {
"type-any-iterable": "^1.0.3"
"type-any-iterable": "^1.0.5"
},

@@ -72,7 +72,7 @@ "peerDependencies": {},

"eslint-config-prettier": "^6.9.0",
"eslint-plugin-flowtype": "^4.5.2",
"eslint-plugin-flowtype": "^4.5.3",
"eslint-plugin-flowtype-errors": "^4.1.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-prettier": "^3.1.2",
"flow-bin": "^0.114.0",
"flow-bin": "^0.115.0",
"flow-copy-source": "^2.0.9",

@@ -79,0 +79,0 @@ "flow-typed": "^2.6.2",

import { AnyIterable } from "type-any-iterable"
export default function merge<T>(sequences: AnyIterable<AnyIterable<T>>): AsyncIterable<T>
export default function merge<T>(sequences: AnyIterable<AnyIterable<T>>): AsyncGenerator<T>

@@ -181,5 +181,8 @@ // @flow

const stopIterator = iterator =>
PromiseTry(() => (iterator.return ? iterator.return() : { done: true, value: undefined })).then(({ done, value }) =>
Promise.resolve(value).then(v => ({ done, value: v })),
)
PromiseTry(() => {
const ret = iterator.return
return !ret
? { done: true, value: undefined }
: Promise.resolve(ret.call(iterator)).then(({ done, value }) => Promise.resolve(value).then(v => ({ done, value: v })))
})

@@ -186,0 +189,0 @@ const PromiseTry = func => {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc