What is the naming convention of NodeJS?
naming-conventions, node.js
Solution
Node's default convention is camelCase. But functions in file system module named according to their respective POSIX C interface functions. For example readdir, readlink. These functions names are well-known by Linux developers and therefore it's often decided to use them as is(as single word), without camelizing.
Problem
I found that the naming conversion of node is a little strange. For instance, in the file system module, the read link function's letters are all lower cased: ``` fs.readlink ``` But the read file function's name are camelized: ``` fs.readFile ``` It confused me. After mistyping for times, I think I shoud ask. So is there a naming convention to help me memorize the api names?