Skip to content

Allow Throttle to be piped to some time after instanciation#7

Open
vgire wants to merge 2 commits intoTooTallNate:masterfrom
vgire:master
Open

Allow Throttle to be piped to some time after instanciation#7
vgire wants to merge 2 commits intoTooTallNate:masterfrom
vgire:master

Conversation

@vgire
Copy link

@vgire vgire commented Apr 21, 2017

The following particular edge case does not work:

const throttle = new Throttle(1);
setTimeout(
  () => inputStream.pipe(throttle).pipe(outputStream),
  1000);

startTime is defined in constructor and not when inputStream is piped.
This PR fixes this issue.
Thank you for sharing your great work !

Copy link

@jaredallard jaredallard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments