Open liuruil opened 1 year ago
Promise A+规范要求obj是一个对象或函数,这样写是否是更合理一点 address: https://promisesaplus.com/#point-53
function isPromise(obj) { return !!(obj && (typeof obj === "object" || typeof obj === 'function') && typeof obj.then === "function"); }
Originally posted by @liuruil in https://github.com/Sunny-117/js-challenges/issues/8#issuecomment-1427352574
Promise A+规范要求obj是一个对象或函数,这样写是否是更合理一点 address: https://promisesaplus.com/#point-53
Originally posted by @liuruil in https://github.com/Sunny-117/js-challenges/issues/8#issuecomment-1427352574