import Foo from 'foo';
var res = Foo.bar(baz);
console.log(' returned ' + res );
console.log('.......................................');
console.log( res );
My server log shows :
returned [object Promise]
.......................................
{ _bitField: 0,
_fulfillmentHandler0: undefined,
_rejectionHandler0: undefined,
_progressHandler0: undefined,
_promise0: undefined,
_receiver0: undefined,
_settledValue: undefined,
_trace: { [Error] _parent: undefined, _length: 1 } }
I’ve read How do I properly use an NPM module that returns a Promise? from Sept 2015, but a lot has changed since then.
Would someone please point me to the latest best practice example for getting a synchronous result from Foo.bar()
?
Update : I’m using v1.3.3.