Skip to content
Advertisement

Tag: es6-promise

How to check if an object is a Promise?

Whether it’s an ES6 Promise or a Bluebird Promise, Q Promise, etc. How do I test to see if a given object is a Promise? Answer How a promise library decides If it has a .then function – that’s the only standard promise libraries use. The Promises/A+ specification has a notion called thenable which is basically “an object with a

Advertisement