Files
actions-ansi-to-html/node_modules/p-is-promise/index.js
T
2025-11-11 06:53:11 -05:00

14 lines
282 B
JavaScript

'use strict';
const isObject = value => value !== null &&
(typeof value === 'object' || typeof value === 'function');
module.exports = value => (
value instanceof Promise ||
(
isObject(value) &&
typeof value.then === 'function' &&
typeof value.catch === 'function'
)
);