X Tutup
Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

process.mainModule DEP0138

This recipe transforms the usage of process.mainModule to use require.main in CommonJS modules.

See DEP0138.

Example

- if (process.mainModule === "mod.js") {
+ if (require.main === "mod.js") {
  	// cli thing
  } else {
  	// module thing
  }
X Tutup