I think this is a better strategy than checking the extension because you can have arbitrary dots int he filename. `require './some.strange.filename'` would fail to find `./some.strange.filename.js` if you rely on `path.extname`.