isomorphic-git / isomorphic-git/lightning-fs

Clarify writeFile "data" Documentation

Open
#70 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
610
Forks
62
Avg merge
14h 47m
Merged PRs (30d)
1

Description

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. :sweat_smile:

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

Happy holidays, if you celebrate.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.