1 2 3 4 5 6 7 8 9 | 15x 12658x 12658x 15x | export default function isFunction( x ) { var getType = {}; // (x || false) guarantees returning of boolean type return ( x || false ) && [ '[object Function]', '[object GeneratorFunction]' ].indexOf( getType.toString.call( x ) ) >= 0; } |