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

request: browser support #19

Open
max-mapper opened this issue Feb 15, 2014 · 5 comments
Open

request: browser support #19

max-mapper opened this issue Feb 15, 2014 · 5 comments

Comments

@max-mapper
Copy link

it would be sweet to use this client-side, but some things would need to change first:

  • remove assumption that a filename will be passed in and a folder will be created + extracted to
  • instead have an abstract interface that requests byte ranges (e.g. what getBuffer is doing) but is decoupled from fs. that way it can be hooked up to FileReader in the browser. require('fs') would have to move to separate node-only file from the extraction logic. the extraction logic would be generic so that it can run in the browser or in node
  • also abstract the extraction so that instead of passing in a destination folder you can just get a readable stream for each file file extraction
@sindresorhus
Copy link
Contributor

remove assumption that a filename will be passed in and a folder will be created + extracted to
instead have an abstract interface that requests byte ranges

👍 This should really be the case regardless of browser support. Requiring an actual file makes it hard to use in cases where you just operate in-memory. Like with gulp.

@wibblymat
Copy link
Member

This seems like it would be a very hard thing to do. There are very many places that assume you are using Node. How good is browserify with things like this?

@timdp
Copy link

timdp commented Jan 7, 2015

👍

Would love this. Any decent alternatives yet?

@sindresorhus
Copy link
Contributor

@timdp
Copy link

timdp commented Jan 7, 2015

Right before I saw your comment, I finished writing some Promise wrappers around zip.js. Thanks though. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants