MCPcopy
hub / github.com/posthtml/posthtml / isPromise

Function isPromise

lib/index.js:285–287  ·  view source on GitHub ↗

* Checks if parameter is a Promise (or thenable) object. * * @private * * @param {*} promise - Target `{}` to test * @returns {Boolean}

(promise)

Source from the content-addressed store, hash-verified

283 * @returns {Boolean}
284 */
285function isPromise (promise) {
286 return !!promise && typeof promise.then === 'function'
287}
288
289/**
290 * Simple try/catch helper, if exists, returns result

Callers 2

processMethod · 0.85
nextMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…