completed exercise 3.1

This commit is contained in:
counterweight 2025-05-31 22:51:30 +02:00
parent 68aa0e9905
commit 0bd43956c9
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
604 changed files with 67855 additions and 0 deletions

View file

@ -0,0 +1,6 @@
module.exports = isPromise;
module.exports.default = isPromise;
function isPromise(obj) {
return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
}