Closed mattdesl closed 8 years ago
This code is a common alternative to the require.main check for whether a module is being run directly:
require.main
if (!module.parent) console.log("Run as app!")
fixed in 1.7.0
1.7.0
This code is a common alternative to the
require.main
check for whether a module is being run directly: