Test whether an object looks like a promises-a+ promise.
npm install -S @jswork/next-is-promise
import '@jswork/next-is-promise';
const fn1 = () => {
return new Promise(() => {
setTimeout(() => {
resolve('done');
}, 1000);
});
};
nx.isPromise(fn1()); // true
Code released under the MIT license.