mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Add async function detection to _.isFunction.
This commit is contained in:
@@ -86,6 +86,7 @@
|
||||
/** `Object#toString` result references. */
|
||||
var argsTag = '[object Arguments]',
|
||||
arrayTag = '[object Array]',
|
||||
asyncTag = '[object AsyncFunction]',
|
||||
boolTag = '[object Boolean]',
|
||||
dateTag = '[object Date]',
|
||||
domExcTag = '[object DOMException]',
|
||||
@@ -11627,7 +11628,7 @@
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
||||
var tag = baseGetTag(value);
|
||||
return tag == funcTag || tag == genTag || tag == proxyTag;
|
||||
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user