main

main entry point

Usage no npm install needed!

<script type="module">
  import main from 'https://cdn.skypack.dev/main';
</script>

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