Skip to content

Clarify writeFile "data" Documentation #70

@amxmln

Description

@amxmln

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions