Bump to v4.16.5.

This commit is contained in:
John-David Dalton
2016-10-30 20:12:25 -07:00
parent 39e2b943dc
commit a3710bba34
116 changed files with 710 additions and 706 deletions

View File

@@ -1,20 +1,12 @@
var isObject = require('./isObject');
var baseGetTag = require('./_baseGetTag'),
isObject = require('./isObject');
/** `Object#toString` result references. */
var funcTag = '[object Function]',
var asyncTag = '[object AsyncFunction]',
funcTag = '[object Function]',
genTag = '[object GeneratorFunction]',
proxyTag = '[object Proxy]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/**
* Checks if `value` is classified as a `Function` object.
*
@@ -33,10 +25,13 @@ var objectToString = objectProto.toString;
* // => false
*/
function isFunction(value) {
if (!isObject(value)) {
return false;
}
// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 9 which returns 'object' for typed array and other constructors.
var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag || tag == proxyTag;
// in Safari 9 which returns 'object' for typed arrays and other constructors.
var tag = baseGetTag(value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
module.exports = isFunction;