Make this deno compatible?
jimmywarting opened this issue · 1 comments
jimmywarting commented
I have recently been thinking how to make this Deno compatible...
two think need to happen then.
- have to change to es6 module so this can be imported into any Deno code using
import
statement. - make node-stream a optional dependency
stream () {
if (globalThis.ReadableStream?.from) {
return ReadableStream.from(read(...))
} else {
import('stream').then(({Readable}) => Readable.from(read(...)))
}
}
jimmywarting commented
Deno already have Blob+File implementation but it don't have a byte sequence #40
Actually deno should change there code so it's similar to this package
Oh, and
3) we can't use Buffer either...