XXX.on('yyy', ...) will add an event listener to the list of event listeners, rather than replacing the existing one like I think you intend...
XXX.on('yyy', ...)
If you want to remove an event listener, just use USB.removeAllListeners('data')
USB.removeAllListeners('data')
@Gordon 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.
XXX.on('yyy', ...)
will add an event listener to the list of event listeners, rather than replacing the existing one like I think you intend...If you want to remove an event listener, just use
USB.removeAllListeners('data')