Skip to content

Instantly share code, notes, and snippets.

@bearzk
Last active May 7, 2018 13:50
Show Gist options
  • Save bearzk/5ef545bc06c1ec6b728ed9e8047e3845 to your computer and use it in GitHub Desktop.
Save bearzk/5ef545bc06c1ec6b728ed9e8047e3845 to your computer and use it in GitHub Desktop.
[partial function] #js #functional
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