Socket
Socket
Sign inDemoInstall

@n1ru4l/push-pull-async-iterable-iterator

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@n1ru4l/push-pull-async-iterable-iterator - npm Package Versions

2

3.2.0

Diff

Changelog

Source

3.2.0

Minor Changes

  • 2d1d87d: Add operators filter and map
  • 2d1d87d: Add helpers withHandlers and withHandlersFrom
n1ru4l
published 3.1.0 •

Changelog

Source

3.1.0

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.

n1ru4l
published 3.0.0 •

Changelog

Source

3.0.0

Major Changes

  • 21a2470: drop support for Node 12; support ESM; use bob-the-bundler for bundling instead of tsdx
n1ru4l
published 2.1.4 •

n1ru4l
published 2.1.3 •

n1ru4l
published 2.1.2 •

n1ru4l
published 2.1.1 •

n1ru4l
published 2.1.0 •

n1ru4l
published 2.0.1 •

n1ru4l
published 2.0.0 •

2
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