The other day I ran into a mysterious mistake. I have a simple program:
C = require('./C')
console.log typeof C
module.exports = ->
val: true
When I import the code into node REPL, I see the following:
a = require('./file.js')
// 'function'
But when I started
Why is the type of object registered differently?
More importantly, since it is Cexported as a function, why is its type registered as an “object”?
source
share