trymodule
trymodule copied to clipboard
fix promise detection
Functions are objects and are valid thenables:
"promise" is an object or function with a then method whose behavior conforms to this specification. [1]
This PR uses is-promise to detect promises in a spec-compliant way.
[1] https://promisesaplus.com/#terminology