Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
Blob.js
==============

Blob.js implements the W3C [`Blob`][1] interface in browsers that do
- Blob.js implements the Blob, File, FileReader and a subset of URL interface in browsers that do
not natively support it.
- Adds the new reading methods
- `blob.text()` A promise resolving into text
- `blob.arrayBuffer()` A promise resolving to `ArrayBuffer`
- `blob.stream()` returns a ReadableStream (Made of ReadableStream or `new Response(blob).body`
- It monkey patches `XMLHttpRequest.prototype.send` to support sending blobs while making sure Content-Type is set in old IE that didn't send blob's type
- It override existing File implementation if they are not constructable (Old Safari & IE mainly)
- `URL` get unprefixed
- `URL.createObjectURL` creates a base64 data url if it's a "fake" Blob

Supported browsers
------------------
Notes
------------------
ArrayBuffer, Promise and the Stream api's are not added, We recommened you to include polyfills for those if you plan to use them.
`readAsArrayBuffer` and `arrayBuffer()`: returns a regular array if typed arrays are not supported.

Blob.js shares the [same supported browsers as FileSaver.js][2].

![Tracking image](https://in.getclicky.com/212712ns.gif)
Supported browsers
------------------

[1]: https://developer.mozilla.org/en-US/docs/Web/API/Blob
[2]: https://github.com/eligrey/FileSaver.js#supported-browsers
Fairly far back as it's uses very old syntax.