Packages

@repeaterjs/repeater

3.1.0 · 8 Jun 2026MIT15M / weekRepositoryHomepagenpmAtom feed

Your version

10 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 3.x · latest line
  2. 3.1.0

    8 Jun 2026
    • Deprecated

      The @repeaterjs/timers and @repeaterjs/limiters utilities are now folded into the package; the standalone packages are deprecated.

    • ~half the bundle size. Native ESM output (esbuild, no more ES5 down-leveling) takes import { Repeater } from 4.5 KB → 2.1 KB gzipped — same API.

    • New subpath entry points, so you import only what you need:

  3. 3.0.6

    8 May 2024
    • Fix promise returned from push function not resolving when using a buffer.

  4. 3.0.5

    7 Nov 2023
    • Add export maps to package.json files for the TypeScript nodenext

  5. 3.0.4

    2 Sep 2020
    • Fixed memory leaks in static combinator functions race, merge, zip and latest due to Promise.race.

  6. 3.0.3

    3 Aug 2020
    • Fixed missing file in package.json.

  7. 3.0.2

    3 Aug 2020
    • Fixed throw method not catching promises in newer versions of v8 (node.js 12+).

    • Added ESM support for newer versions of node.

  8. 3.0.1

    10 Nov 2019
    • Build files with target set to es5 rather than esnext

  9. 3.0.0

    10 Nov 2019
    • Previously, the n-th call to push resolved to the value passed to the n-th call to Repeater.prototype.next. This was inaccurate insofar as async generators resume the n-th yield with the value passed to the n+1-th call to next. Additionally, async generators completely ignore the first value passed to next entirely. The former behavior of repeaters was confusing insofar as the first call to push would always resolve immediately, because push could not be called until next was called for the first time. In 3.0, the behavior has now been changed so that the n-th call to push resolves to the n+1-th call to next.

      For the most part, code which awaits push will work as expected, except when the code relied on the first call to push resolving immediately. To make sure you’re not relying on the old behavior of push, you should make sure that you await push at the bottom of loops, rather than the top. See the changes to timers as an example.

    • Calling Repeater.prototype.throw will now cause the previous push call to reject, rather than simply stopping the repeater and throwing the error. This means errors thrown into repeaters are now recoverable. If you call push without awaiting or calling then/catch on the returned promise and then call the throw method, the repeater will rethrow the error, preserving the previous behavior. However, if you await push or otherwise call the then or catch methods, it becomes your responsibility to handle errors thrown in via throw and stop the repeater. #43

    • The stop promise no longer resolves to the value passed to Repeater.prototype.return. Instead, it consistently fulfills to undefined when the repeater is stopped. Additionally, calling Repeater.prototype.return will return a result whose value is always whatever was passed to return. In the case of premature returns, the return value of the executor is ignored unless it throws an error. #41

      This change was made because there is no way with async generators to inspect the value passed to return from within the async generator. Additionally, the only way to modify the result returned from the return method would be to put a return statement in a finally block within the async generator, which is typically considered to be a bad practice. Repeaters now uniformly return the value passed to the return method. See #40 for a longer explanation for why we made this change.

  10. 2.x
  11. 2.0.0

    24 Aug 2019
    • Renamed all instances of Channel to Repeater (e.g. Channel to Repeater, ChannelBuffer to RepeaterBuffer). See #18 for the rationale behind this name change.

  12. 1.x
  13. 1.0.0

    22 Aug 2019

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.