Socket
Book a DemoInstallSign in
Socket

faster-readline-iterator

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

faster-readline-iterator

A fster version of readline's implementation of Symbol.asyncIterator

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

test-coverage test

faster-readable-iterator

A faster version for the readline's implementation of Symbol.asyncIterator. With this version, you can achieve a performance 20% to 58% better than with the vanilla one.

how to install

npm i faster-readable-iterator

how to use it

Just get your readline interface:

import { createInterface } from 'readline';
import { getReadlineIterable } from 'faster-readline-iterator';

const interfaceInstance = createInterface({
    input: getLoremIpsumStream(),
});

Then get your iterable from it using getReadlineIterable:

const iterable = getReadlineIterable(interfaceInstance);

for await (const line of iterable) {
    console.log(line);
}

FAQs

Package last updated on 27 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts