[Javascript] Check Promise is Promise
const isPromise = obj => Boolean(obj) && typeof obj.then === 'function';
This can be a tool save into your toolbox.
const isPromise = obj => Boolean(obj) && typeof obj.then === 'function';
This can be a tool save into your toolbox.