Calling npm module from the function node

I am trying to use world-clock npm module within function node for the first time.
So, I installed module first, added one to the settings.js:

    functionGlobalContext: {

And here's my function:

const wClock=global.get('worldClock');'SYSTEM').toString();
return msg;

Which returns "TypeError: is not a function"
typeof( returns the same, but typeof(wClock) returns "function".
What did I do wrong?

If wClock is a function then you cannot say, it must be wClock(something)`.

Absolutely. But I import the module. That's what makes it weird.

Here's an example from the world-clock npm node documentation:

const clock = require('world-clock')()'SYSTEM').toString() 

So it should work, but it doesn't

Looking at the docs I think you want

It worked! Thanks a lot!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.