push-pull-async-iterable-iterator

Create an AsyncIterableIterator from anything while handling back-pressure!

MIT License

Downloads
1.1M
Stars
23
Committers
4

Bot releases are visible (Hide)

push-pull-async-iterable-iterator - v3.2.0 Latest Release

Published by github-actions[bot] almost 3 years ago

Minor Changes

  • 2d1d87d: Add operators filter and map
  • 2d1d87d: Add helpers withHandlers and withHandlersFrom
push-pull-async-iterable-iterator - v3.1.0

Published by github-actions[bot] almost 3 years ago

Minor Changes

  • c1d143c: Change usage of type AsyncIterableIterator to AsyncGenerator.

    This library and other libraries such as graphql-js typed what should be AsyncGenerator as AsyncIterableIterator.

    The main difference between those two types is that on the former the return method is not optional. This resulted in confusion when using TypeScript as the return method is actually always present.

    Here are the TypeScript type definitions for comparison.

    interface AsyncGenerator<T = unknown, TReturn = any, TNext = unknown>
      extends AsyncIterator<T, TReturn, TNext> {
      // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
      next(...args: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
      return(
        value: TReturn | PromiseLike<TReturn>
      ): Promise<IteratorResult<T, TReturn>>;
      throw(e: any): Promise<IteratorResult<T, TReturn>>;
      [Symbol.asyncIterator](): AsyncGenerator<T, TReturn, TNext>;
    }
    
    interface AsyncIterator<T, TReturn = any, TNext = undefined> {
      // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
      next(...args: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
      return?(
        value?: TReturn | PromiseLike<TReturn>
      ): Promise<IteratorResult<T, TReturn>>;
      throw?(e?: any): Promise<IteratorResult<T, TReturn>>;
    }
    
    interface AsyncIterableIterator<T> extends AsyncIterator<T> {
      [Symbol.asyncIterator](): AsyncIterableIterator<T>;
    }
    

    Unfortunately, the name of this library is now a bit misleading. @n1ru4l/push-pull-async-generator might be the be the better pick. For now I will not deprecate and rename it.

push-pull-async-iterable-iterator - v3.0.0

Published by github-actions[bot] over 3 years ago

Major Changes

  • 21a2470: drop support for Node 12; support ESM; use bob-the-bundler for bundling instead of tsdx
push-pull-async-iterable-iterator -

Published by n1ru4l over 3 years ago

push-pull-async-iterable-iterator -

Published by n1ru4l over 3 years ago

  • fix: return should call dispose on sink (#54) e519b4d
  • chore(deps): update dependency typescript to v4.2.4 (#53) 04053fc
  • chore(deps): update dependency tslib to v2.2.0 (#52) f52d687
  • docs: update readme 24d584a
  • chore(deps): update typescript-eslint monorepo to v4.18.0 (#47) 16c7d58
  • chore(deps): update dependency patch-package to v6.4.7 (#46) adfbfcc
  • chore(deps): update dependency size-limit to v4.10.1 (#42) 4e067de
  • chore(deps): update typescript-eslint monorepo to v4.17.0 (#45) 71ecd0c
  • chore(deps): update dependency typescript to v4.2.3 (#43) 91deb19
  • chore(deps): update dependency @size-limit/preset-small-lib to v4.10.1 (#41) 104094e
  • chore(deps): update dependency patch-package to v6.4.6 (#40) c7c798f
  • chore(deps): update dependency patch-package to v6.4.3 (#39) a4a8a40
  • chore(deps): update dependency patch-package to v6.4.2 (#37) 1d08711
  • chore(deps): update typescript-eslint monorepo to v4.16.1 (#38) 2c3b4aa
  • chore(deps): update dependency patch-package to v6.4.0 (#36) acfd85d
  • chore(deps): update dependency typescript to v4.2.2 (#35) dac4006
  • chore(deps): update typescript-eslint monorepo to v4.15.2 (#34) 4a679fe
  • chore(deps): update typescript-eslint monorepo to v4.15.1 (#33) d9c2b88

https://github.com/n1ru4l/push-pull-async-iterable-iterator/compare/v2.1.2...v2.1.3

push-pull-async-iterable-iterator -

Published by n1ru4l over 3 years ago

  • fix: use default instead of import 1bc7945
  • fix: use the correct build script... 9a6b29c

https://github.com/n1ru4l/push-pull-async-iterable-iterator/compare/v2.1.1...v2.1.2

push-pull-async-iterable-iterator -

Published by n1ru4l over 3 years ago

push-pull-async-iterable-iterator -

Published by n1ru4l over 3 years ago

  • feat: set node 12 as the transpile target (#32) 14f852c
  • docs(README): add them badges 51e8525
  • chore(deps): update dependency typescript to v4.1.5 (#30) 5d74c1d
  • chore(deps): update typescript-eslint monorepo to v4.15.0 (#28) a928279
  • chore(deps): update dependency size-limit to v4.9.2 (#26) f14d017
  • chore(deps): update dependency @size-limit/preset-small-lib to v4.9.2 (#25) ff2ae61
  • chore(deps): update typescript-eslint monorepo to v4.14.2 (#27) a6497d4
  • chore(deps): update typescript-eslint monorepo to v4.14.1 (#24) f2c81f7
  • chore(deps): update typescript-eslint monorepo to v4.14.0 (#22) e190856
  • chore(deps): update dependency husky to v4.3.8 (#21) b69f6a4
  • chore(deps): update dependency husky to v4.3.7 (#20) 3202150
  • chore(deps): update dependency tslib to v2.1.0 (#19) 9d842e3
  • chore(deps): update typescript-eslint monorepo to v4.13.0 (#18) 5346714

https://github.com/n1ru4l/push-pull-async-iterable-iterator/compare/v2.0.1...v2.1.0

push-pull-async-iterable-iterator -

Published by n1ru4l almost 4 years ago

  • chore(deps): update actions/setup-node action to v2 (#16) e67edfb
  • chore(deps): update dependency husky to v4.3.6 (#14) ff5b47b
  • fix: issue where values are not propagated correctly if publish and return are called in sequence. 3ec0903
  • chore(deps): update typescript-eslint monorepo to v4.11.1 (#15) 3ac7b71
  • chore(deps): update dependency @types/zen-observable to v0.8.2 (#17) a4ee85a

https://github.com/n1ru4l/push-pull-async-iterable-iterator/compare/v2.0.0...v2.0.1

push-pull-async-iterable-iterator -

Published by n1ru4l almost 4 years ago

  • chore(deps): update dependency typescript to v4.1.3 (#4) 06d9621
  • chore(deps): update typescript-eslint monorepo to v4.9.1 (#13) 80f447e
  • chore(deps): update dependency husky to v4.3.5 (#12) 4119de4
  • feat: re-implement without using Symbol.asyncIterator (#8) 943d0ac
  • chore(deps): update dependency size-limit to v4.9.1 (#9) c22bacd
  • chore(deps): update dependency @size-limit/preset-small-lib to v4.9.1 (#10) 43a1f4c
  • chore(deps): update typescript-eslint monorepo to v4.9.0 (#7) 0a429a9

https://github.com/n1ru4l/push-pull-async-iterable-iterator/compare/v1.0.0...v2.0.0

push-pull-async-iterable-iterator -

Published by n1ru4l almost 4 years ago

  • docs(README): update example 8e745fa
  • Merge pull request #5 from n1ru4l/renovate/typescript-eslint-monorepo 4047231
  • chore(deps): update typescript-eslint monorepo to v4.8.2 03fc068

https://github.com/n1ru4l/push-pull-async-iterable-iterator/compare/v1.0.0-alpha.2...v1.0.0

push-pull-async-iterable-iterator -

Published by n1ru4l almost 4 years ago

  • make examples a bitmore explicit 6cb3a4e
  • add some badges af026b8
  • docs: add some information about the behaviour of the PushPullAsyncIterableIterator 870a04c
  • fix example 3cf2a77
  • fix repo 62ebaf7

https://github.com/n1ru4l/push-pull-async-iterable-iterator/compare/v1.0.0-alpha.1...v1.0.0-alpha.2

Package Rankings
Top 4.22% on Npmjs.org
Top 35.05% on Repo1.maven.org
Badges
Extracted from project README
TypeScript npm version npm downloads Dependents Build Status