MCPcopy
hub / github.com/webpack/webpack / isPromise

Function isPromise

test/helpers/prepareOptions.js:14–16  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

12 * @returns {value is Promise<EXPECTED_ANY>} true when thenable
13 */
14const isPromise = (value) =>
15 Boolean(value) &&
16 typeof (/** @type {Promise<EXPECTED_ANY>} */ (value).then) === "function";
17
18/**
19 * @param {ConfigModule} options exported config value

Callers 1

prepareOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected