node-fetch/fetch-blob

Make this deno compatible?

jimmywarting opened this issue · 1 comments

I have recently been thinking how to make this Deno compatible...
two think need to happen then.

  1. have to change to es6 module so this can be imported into any Deno code using import statement.
  2. make node-stream a optional dependency
stream () {
  if (globalThis.ReadableStream?.from) {
    return ReadableStream.from(read(...))
  } else {
    import('stream').then(({Readable}) => Readable.from(read(...)))
  }
}

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...