Files
2023-07-12 16:31:19 +01:00

15 lines
272 B
JavaScript
Executable File

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