Skip to content

Instantly share code, notes, and snippets.

@javarouka
Last active May 15, 2017 15:46
Show Gist options
  • Save javarouka/b48edaa30a7a44f533fe49e73f310658 to your computer and use it in GitHub Desktop.
Save javarouka/b48edaa30a7a44f533fe49e73f310658 to your computer and use it in GitHub Desktop.
javarouka js code
function isThenable(obj) {
return !!obj && (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