I have a huge JSONL file I need to parse.
It's really huge, so I can't download it.
I wanted to do something like this:
import { request } from "https";
request(operation.url, async (res) => {
try {
const rl = readline.createInterface({
input: res,
crlfDelay: Infinity,
});
for await (const line of rl) {
yield JSON.parse(line);
}
} catch (error) { }
}).end();
But the callback is not a generator, so this ain't working.
Is there something else I can try?