Please do a Deno existence check in io/buffer.ts BufReader.readline
I'd like to use std streams in the browser, and the only reference to the Deno ns after bundling is this reference:
https://github.com/denoland/deno_std/blob/09e24d81ce0bacebe81b3c9f683a6ecf9263fc12/io/buffer.ts#L499
Mind doing an existence check here to make sure it runs in the browser?
Thanks, - John
PRs are welcome
I would say io/buffer.ts isnt intended to be web compatible, especially from a ts perspective given that Deno namespace interfaces are used. for web compat you should rather use web streams.
@crowlKats I'm actually bundling std streams, and the only reference to buffer is the one I pointed out above, seems like it could be elided if the Deno ns is not present with no issues, unless I'm missing something
Can inspect the bundle output here: https://bundle.deno.dev/https://deno.land/[email protected]/streams/mod.ts
@bartlomieju, is the streams module meant to be web compatible? One would think so. However, there doesn't appear to be any explicit mention of that being the case. If so, the checks mentioned above within the streams module might make sense.
Actually, it looks as though the block in question can be deleted anyway.
https://github.com/denoland/deno_std/blob/36fa687ecc30b4a69d6bb498afc501cb06bc20d0/io/buffer.ts#L499-L501
The following block takes care of that same condition.
https://github.com/denoland/deno_std/blob/36fa687ecc30b4a69d6bb498afc501cb06bc20d0/io/buffer.ts#L513-L515
This might fix our issue.
Thank you!!