main

main entry point

  • main

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
main
1000.0.14 years ago9 years agoMinified + gzip package size for main in KB

Readme

main
Call a function when script is invoked directly (e.g. cli or subprocess).
require('main')(module, () => {
  /*
        [ code to run here ]
  */
})

The callback will NOT run if imported into another module.
Note: The variable modulevm is required.

Install

npm i main --save