Nitpick for handling badly-behaved thenables: better to save `promise.then` instead of accessing it twice. Also better to test is-object (`typeof promise === "object" || typeof promise === "function"`) instead of is-truthy.