JAVASCRIPT   56

isfunction

Guest on 1st May 2022 04:42:00 PM

  1. export default function isFunction(input) {
  2.     return (
  3.         (typeof Function !== 'undefined' && input instanceof Function) ||
  4.         Object.prototype.toString.call(input) === '[object Function]'
  5.     );
  6. }

Raw Paste


Login or Register to edit or fork this paste. It's free.