O'Reilly logo
  • ramesh janjyam thinks this is interesting:

If require() does not find an exact match, it attempts to add .js, .json, and .node file extensions. As mentioned in Chapter 1, .js files are interpreted as JavaScript source code, .json files are parsed as JSON source, and .node files are treated as compiled add-on modules. If Node is still unable to find a match, an error is thrown.


Cover of Pro Node.js for Developers


.node == compiled add-on modules