Skip to content

[Aesthetics] Why is it called "fs.readdirSync" and "fs.readFileSync"? #9664

@cookiengineer

Description

@cookiengineer

Hey guys,

this is kind of not an issue and more of a discussion because I'm not sure where to ask about this.

Are there any naming guidelines for APIs in the node.js world?

When doing nodeschools, I realize that many people get APIs wrong and can't remember camelcased APIs correctly. The best example is fs.readdirSync and fs.readFileSync.

Why is it not called fs.readDirSync like everything else in the node.js API? How do you decide to name an API? Are there API guidelines available for third-party package implementors and maintainers?

PS: Sorry if this is a meta discussion; but I actually think that something like a naming scheme for APIs is pretty important as it lowers the entry barriers for newcomers to the node.js world and eases up googling node.js APIs all the time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionIssues that look for answers.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions