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

asynciterator

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asynciterator - npm Package Compare versions

Comparing version 3.5.0 to 3.6.0

47

dist/asynciterator.d.ts

@@ -420,2 +420,4 @@ /**

export declare function identity<S>(item: S): typeof item;
/** Key indicating the current consumer of a source. */
export declare const DESTINATION: unique symbol;
/**

@@ -738,2 +740,12 @@ An iterator that synchronously transforms every item from its source

/**
* An iterator that takes a variety of iterable objects as a source.
*/
export declare class WrappingIterator<T> extends AsyncIterator<T> {
protected _source: InternalSource<T> | null;
constructor(source?: MaybePromise<IterableSource<T>>);
set source(value: IterableSource<T>);
read(): T | null;
protected _end(destroy?: boolean): void;
}
/**
Creates an iterator that wraps around a given iterator or readable stream.

@@ -743,11 +755,13 @@ Use this to convert an iterator-like object into a full-featured AsyncIterator.

@function
@param {module:asynciterator.AsyncIterator|Readable} [source] The source this iterator generates items from
@param [source] The source this iterator generates items from
@param {object} [options] Settings of the iterator
@returns {module:asynciterator.AsyncIterator} A new iterator with the items from the given iterator
*/
export declare function wrap<T>(source: EventEmitter | Promise<EventEmitter>, options?: TransformIteratorOptions<T>): TransformIterator<T, T>;
export declare function wrap<T>(source: null | undefined): AsyncIterator<T>;
export declare function wrap<T>(source: MaybePromise<IterableSource<T>>): AsyncIterator<T>;
export declare function wrap<T>(source: MaybePromise<AsyncIterator<T>>, options?: TransformIteratorOptions<T>): AsyncIterator<T>;
/**
Creates an empty iterator.
*/
export declare function empty<T>(): EmptyIterator<T>;
export declare function empty<T>(): AsyncIterator<T>;
/**

@@ -757,3 +771,3 @@ Creates an iterator with a single item.

*/
export declare function single<T>(item: T): SingletonIterator<T>;
export declare function single<T>(item: T): AsyncIterator<T>;
/**

@@ -763,4 +777,14 @@ Creates an iterator for the given array.

*/
export declare function fromArray<T>(items: Iterable<T>): ArrayIterator<T>;
export declare function fromArray<T>(items: Iterable<T>): AsyncIterator<T>;
/**
Creates an iterator for the given Iterator.
@param {Iterable} source the iterator
*/
export declare function fromIterator<T>(source: Iterable<T> | Iterator<T>): AsyncIterator<T>;
/**
Creates an iterator for the given Iterable.
@param {Iterable} source the iterable
*/
export declare function fromIterable<T>(source: Iterable<T> | Iterator<T>): AsyncIterator<T>;
/**
Creates an iterator containing all items from the given iterators.

@@ -775,2 +799,3 @@ @param {Array} items the items

export declare function range(start: number, end: number, step?: number): IntegerIterator;
export declare type IterableSource<T> = T[] | AsyncIterator<T> | EventEmitter | Iterator<T> | Iterable<T>;
export interface SourcedIteratorOptions {

@@ -803,4 +828,14 @@ destroySource?: boolean;

declare type InternalSource<T> = AsyncIterator<T> & {
_destination?: AsyncIterator<any>;
[DESTINATION]?: AsyncIterator<any>;
};
export declare function isFunction(object: any): object is Function;
export declare function isEventEmitter(object: any): object is EventEmitter;
export declare function isPromise<T>(object: any): object is Promise<T>;
export declare function isSourceExpression<T>(object: any): object is SourceExpression<T>;
export declare function isIterable<T>(object: {
[key: string]: any;
}): object is Iterable<T>;
export declare function isIterator<T>(object: {
[key: string]: any;
}): object is Iterator<T>;
export {};

2

package.json
{
"name": "asynciterator",
"version": "3.5.0",
"version": "3.6.0",
"description": "An asynchronous iterator library for advanced object pipelines.",

@@ -5,0 +5,0 @@ "author": "Ruben Verborgh <ruben@verborgh.org> (https://ruben.verborgh.org/)",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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