This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const myObject = require("./my_module.js"); | |
console.log(`myObject is of type: ${typeof myObject}`); | |
//if myObject has async loaded resources it might not be ready for use | |
myObject(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const myObject = require("./my_module.js"); | |
console.log('*****inside invocation*****'); | |
console.log(`myObject is of type: ${typeof myObject}`); | |
console.log(`myObject.log is of type`, typeof myObject.log); | |
const p = myObject.log(); | |
console.log(`the value of p is currently: ${p}`); | |
p.then(result => { | |
console.log(result); |