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

it-reader

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

it-reader - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

5

dist/src/index.d.ts
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

2

package.json
{
"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

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