Mon 2018.09.24
re: 'need to add a constructor function'
Thanks @Wilberforce, understand that and constructor isn't necessary, . . . found a different module to emulate, more to the design I have.
Thank you @Gordon, you understood exactly, those examples clear it all up. I actually tried the nesting of a require() inside a deployed module,
ref first code line 1. after: 'The next module can be:'
but was stymied on an issue, causing me to create this post of a simplified version, but can't remember what was blocking progress.
The key to understanding the missing part for the combined module:
exports.C = C; //<------------------------------- Note the added '.C'
@Robin 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.
Mon 2018.09.24
Thanks @Wilberforce, understand that and constructor isn't necessary, . . . found a different module to emulate, more to the design I have.
Thank you @Gordon, you understood exactly, those examples clear it all up. I actually tried the nesting of a require() inside a deployed module,
but was stymied on an issue, causing me to create this post of a simplified version, but can't remember what was blocking progress.
The key to understanding the missing part for the combined module: