Installation npm i readline-es Usage import { read, readJson, } from './index.js' read(console.log)('./example.txt') readJson(console.log)('./example.json')