Created
October 23, 2019 10:16
-
-
Save JamieMason/4487134e61394674084df9fb5a440645 to your computer and use it in GitHub Desktop.
isPromiseLike
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const isPromiseLike = obj => | |
obj !== null && | |
(typeof obj === 'object' || typeof obj === 'function') && | |
typeof obj.then === 'function'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment