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

Clarify writeFile "data" Documentation #70

Open
amxmln opened this issue Dec 22, 2020 · 0 comments
Open

Clarify writeFile "data" Documentation #70

amxmln opened this issue Dec 22, 2020 · 0 comments

Comments

@amxmln
Copy link

amxmln commented Dec 22, 2020

This is a minor thing, but since I just spent an embarrassingly long amount of time puzzling over it, I figured I’d mention it.

The documentation for fs.writeFile in the README mentions that "data should be a string of a Uint8Array."—which I interpreted as any data has to be converted into a Uint8Array and then encoded into a string. Looking through the source I noticed, however, that the function actually does the encoding for us if a string is passed.

Maybe this could be clarified? It might be just me, but the wording along with the amounts of time I have seen "or" misspelled as "of" really confused me here. 😅

Either way, thank you so much for this library (and the rest of Isomorphic Git!).

Happy holidays, if you celebrate.

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

No branches or pull requests

1 participant