Last active
May 7, 2018 13:50
-
-
Save bearzk/5ef545bc06c1ec6b728ed9e8047e3845 to your computer and use it in GitHub Desktop.
[partial function] #js #functional
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 toString = Object.prototype.toString; | |
const isType = type => { | |
return function (obj) { | |
return toString.call(obj) == '[object ' + type + ']'; | |
}; | |
}; | |
const isFunction = isType('Function'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment