mai

main

main entry point

Showing:

Popularity

Downloads/wk

185

Maintenance

No Maintenance Data Available

Package

Dependencies

0

Size (min+gzip)

0.2KB

License

MIT

Type Definitions

Built-In

Tree-Shakeable

No?

Categories

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 module is required.

Install

npm i main --save

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100