fake-require-main

    1.0.2 • Public • Published

    About

    Fakes process.mainModule and require.main for debug and testing purposes.

    NPM Version Build Status

    Usage

     
    // Always overwrite the main module. Use this to code your own conditions for an overwrite.
    require("fake-require-main").fake(require, __filename);
     
    // Overwrite the main module if called by a specific command line application.
    require("fake-require-main").fakeFor(require, __filename, "electron");
     

    See /test/main.js for more details.

    Contributing

    License

    Install

    npm i fake-require-main

    DownloadsWeekly Downloads

    3

    Version

    1.0.2

    License

    MIT

    Last publish

    Collaborators

    • s-a