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

Adding a string and a promise of string give different results. #325

Open
dduponchel opened this issue Jul 31, 2016 · 0 comments
Open

Adding a string and a promise of string give different results. #325

dduponchel opened this issue Jul 31, 2016 · 0 comments
Labels

Comments

@dduponchel
Copy link
Collaborator

When I add a string without the binary option, it is treated as an unicode string.

zip.file("txt", "é");
zip.file("txt").async("text").then((txt) => console.log(txt));
> é

When I add a promise of string without the binary option, it is treated as a binary string.

zip.file("txt", Promise.resolve("é"));
zip.file("txt").async("text").then((txt) => console.log(txt));
> 

Expected: same behavior between the two use cases.

Note to self: also fix the documentation of binary which is quite confusing.

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

No branches or pull requests

1 participant