aboutsummaryrefslogtreecommitdiff
path: root/node_modules/p-is-promise/index.js
blob: 8f64f85804a7bc502cb1f410582f2f1d28986e43 (plain)
1
2
3
4
5
6
7
8
9
10
'use strict';
module.exports = x => (
	x instanceof Promise ||
	(
		x !== null &&
		typeof x === 'object' &&
		typeof x.then === 'function' &&
		typeof x.catch === 'function'
	)
);