I've created a very small utility to read a file line by line using the information from #4007 for a project I'm working on.
I can make a pull request to add it to the third-party libs but I think this makes more sense in the standard libs.
What do you think?
https://github.com/JWebCoder/deno_readline
@JWebCoder Actually we've already got some readline functionality built-in to Deno. We use it for the REPL. However it's not exposed to the public.
You can see it in action here: https://github.com/denoland/deno/blob/f6e31603563bad38c663494ddec6a363989b5786/cli/js/repl.ts#L129
So I agree that this is something useful for the standard library, but we have to decide how we're going to expose this internal functionality... It's probably better to iterate on your module outside of std for now.
@ry thank you for the feedback
@nayeemrmn I tested that and its a lot faster, thank you for the tip. Also, I use this readline only for simple files, so the readlines from bufio works perfectly.
Apart from this, bufio has no documentation, is anyone working on that? I can give some help on that if needed.
Apart from this, bufio has no documentation, is anyone working on that? I can give some help on that if needed.
@JWebCoder go ahead, documentation PRs are always welcome :) Seems like this issue is resolved after all, so closing.
Most helpful comment
@ry thank you for the feedback
@nayeemrmn I tested that and its a lot faster, thank you for the tip. Also, I use this readline only for simple files, so the readlines from bufio works perfectly.
Apart from this, bufio has no documentation, is anyone working on that? I can give some help on that if needed.