UNPKG

386 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = isPromise;
7
8/**
9 * Returns true if the value acts like a Promise, i.e. has a "then" function,
10 * otherwise returns false.
11 */
12// eslint-disable-next-line no-redeclare
13function isPromise(value) {
14 return typeof (value === null || value === void 0 ? void 0 : value.then) === 'function';
15}