wolfgang42 / es6-readline

read a file line by line in es6 async iterator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

es6-readline

es6-readline package will return a line by line async iteractor of the given file path

Installation

npm i es6-readline

Usage

const readline = require('es6-readline')

(async () => {
    const lines = readline('path/to/file')

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

About

read a file line by line in es6 async iterator


Languages

Language:JavaScript 63.3%Language:TypeScript 36.7%