Skip to content

Commit

Permalink
[fix] Add TransformStream polyfill for Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
nwtgck committed Apr 29, 2019
1 parent 771610e commit 420d439
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 11 deletions.
46 changes: 35 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -31,5 +31,8 @@
"karma-typescript": "^4.0.0",
"power-assert": "^1.6.1",
"typescript": "^3.4.5"
},
"dependencies": {
"web-streams-polyfill": "^2.0.3"
}
}
1 change: 1 addition & 0 deletions src/streams.ts
@@ -1,4 +1,5 @@
/* global ReadableStream TransformStream */
import 'web-streams-polyfill/dist/polyfill';

export function transformStream(readable: ReadableStream<Uint8Array>, transformer: Transformer<Uint8Array, Uint8Array>, oncancel?: ReadableStreamErrorCallback): ReadableStream<Uint8Array> {
try {
Expand Down

0 comments on commit 420d439

Please sign in to comment.