Comparing version 4.0.0 to 4.0.1
import BufferList from 'bl/BufferList.js'; | ||
import type { Source } from 'it-stream-types'; | ||
export declare function reader(source: Source<Uint8Array>): AsyncGenerator<BufferList, void, any>; | ||
export interface Reader extends AsyncGenerator<BufferList, void, any> { | ||
next: (...args: [] | [number]) => Promise<IteratorResult<BufferList, void>>; | ||
} | ||
export declare function reader(source: Source<Uint8Array>): Reader; | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "it-reader", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Read an exact number of bytes from a binary (async) iterable", | ||
@@ -5,0 +5,0 @@ "type": "module", |
import BufferList from 'bl/BufferList.js' | ||
import type { Source } from 'it-stream-types' | ||
export interface Reader extends AsyncGenerator<BufferList, void, any> { | ||
next: (...args: [] | [number]) => Promise<IteratorResult<BufferList, void>> | ||
} | ||
export function reader (source: Source<Uint8Array>) { | ||
const reader = (async function * (): AsyncGenerator<BufferList, void, any> { | ||
const reader: Reader = (async function * (): AsyncGenerator<BufferList, void, any> { | ||
// @ts-expect-error first yield in stream is ignored | ||
@@ -7,0 +11,0 @@ let bytes: number | undefined = yield // Allows us to receive 8 when reader.next(8) is called |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12073
89
0