@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.
@maze1980 started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@Robin: You don't want to modify the library or module itself.
You can use a variable if you want to code like this
Happy debugging.