var swedishword = require('./today/swedishword'); swedishword.getSwedishWord() .then((d) => { "use strict"; console.log('Wanted result: ' , d); }) .catch((e)=>{ "use strict"; console.error(e); });