-
Notifications
You must be signed in to change notification settings - Fork 32
Create blob backed up by filesystem #55
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #55 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 2 +1
Lines 176 231 +55
Branches 32 36 +4
=========================================
+ Hits 176 231 +55
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't from.js
be included in the files
array in package.json?
have added from.js to files array now |
can't find anything else that needs to be done
just tried it out as a real developer tried to install it: works ok like it better then native fs 🙂 import blobFrom from 'fetch-blob/from.js'
const text = await blobFrom('package.json').text()
const arrayBuffer = await blobFrom('package.json').text()
const stream = blobFrom('package.json').stream()
const chunk = await blobFrom('package.json').slice(5, 10).text() |
haven't been any discussion about how to go about solving this so i have made a first attempt/design at creating a blob backed up by filesystem.
Think this could be useful for ppl who need to to work with FormData for example
This don't add to the bundle size unless you implicit import/require "fetch-blob/from.js"
i first thought about doing something like
blob = Blob.from(path)
but that would make it different from the spec and adds to the bundle cost