You are reading a single comment by @maze1980 and its replies. Click here to read the full conversation.
  • @Robin: You don't want to modify the library or module itself.

    const MODULE = require('module');
    MODULE.foo();
    //is the same as
    require('module').foo();
    

    You can use a variable if you want to code like this

    MODULE = require('module1');
    MODULE.foo();
    MODULE = require('module2');
    MODULE.foo();
    

    Happy debugging.

About

Avatar for maze1980 @maze1980 started