biofriction-wp-theme/node_modules/p-is-promise/index.js

11 lines
181 B
JavaScript
Raw Normal View History

2021-10-26 14:18:09 +02:00
'use strict';
module.exports = x => (
x instanceof Promise ||
(
x !== null &&
typeof x === 'object' &&
typeof x.then === 'function' &&
typeof x.catch === 'function'
)
);