artdaq_node_server  v1_00_08
 All Classes Namespaces Files Variables Pages
isFunction.js
1 var baseGetTag = require('./_baseGetTag'),
2  isObject = require('./isObject');
3 
5 var asyncTag = '[object AsyncFunction]',
6  funcTag = '[object Function]',
7  genTag = '[object GeneratorFunction]',
8  proxyTag = '[object Proxy]';
9 
27 function isFunction(value) {
28  if (!isObject(value)) {
29  return false;
30  }
31  // The use of `Object#toString` avoids issues with the `typeof` operator
32  // in Safari 9 which returns 'object' for typed arrays and other constructors.
33  var tag = baseGetTag(value);
34  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
35 }
36 
37 module.exports = isFunction;