mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Bump to v3.0.9.
This commit is contained in:
committed by
John-David Dalton
parent
ad40188e5b
commit
3d45ff3aed
@@ -1,4 +1,4 @@
|
|||||||
# lodash v3.0.8
|
# lodash v3.0.9
|
||||||
|
|
||||||
The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method.
|
The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash._isiterateecall v3.0.8
|
# lodash._isiterateecall v3.0.9
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `isIterateeCall` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `isIterateeCall` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var isIterateeCall = require('lodash._isiterateecall');
|
var isIterateeCall = require('lodash._isiterateecall');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.8-npm-packages/lodash._isiterateecall) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/3.0.9-npm-packages/lodash._isiterateecall) for more details.
|
||||||
|
|||||||
@@ -1,14 +1,10 @@
|
|||||||
/**
|
/** Used to detect unsigned integer values. */
|
||||||
* lodash 3.0.8 (Custom Build) <https://lodash.com/>
|
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
/** Used to detect unsigned integer values. */
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
var reIsUint = /^\d+$/;
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
||||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
||||||
* Available under MIT license <https://lodash.com/license>
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
|
* Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
|
||||||
* of an array-like value.
|
* of an array-like value.
|
||||||
*/
|
*/
|
||||||
var MAX_SAFE_INTEGER = 9007199254740991;
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||||
@@ -58,7 +54,7 @@ function isArrayLike(value) {
|
|||||||
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
||||||
*/
|
*/
|
||||||
function isIndex(value, length) {
|
function isIndex(value, length) {
|
||||||
value = typeof value == 'number' ? value : parseFloat(value);
|
value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
|
||||||
length = length == null ? MAX_SAFE_INTEGER : length;
|
length = length == null ? MAX_SAFE_INTEGER : length;
|
||||||
return value > -1 && value % 1 == 0 && value < length;
|
return value > -1 && value % 1 == 0 && value < length;
|
||||||
}
|
}
|
||||||
@@ -89,7 +85,7 @@ function isIterateeCall(value, index, object) {
|
|||||||
/**
|
/**
|
||||||
* Checks if `value` is a valid array-like length.
|
* Checks if `value` is a valid array-like length.
|
||||||
*
|
*
|
||||||
* **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
|
* **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._isiterateecall",
|
"name": "lodash._isiterateecall",
|
||||||
"version": "3.0.8",
|
"version": "3.0.9",
|
||||||
"description": "The modern build of lodash’s internal `isIterateeCall` as a module.",
|
"description": "The modern build of lodash’s internal `isIterateeCall` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
|||||||
@@ -1,23 +1,47 @@
|
|||||||
The MIT License (MIT)
|
Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||||
|
|
||||||
Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||||
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
|
|
||||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
This software consists of voluntary contributions made by many
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
individuals. For exact contribution history, see the revision history
|
||||||
in the Software without restriction, including without limitation the rights
|
available at https://github.com/lodash/lodash
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
The following license applies to all parts of this software except as
|
||||||
copies or substantial portions of the Software.
|
documented below:
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
====
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
a copy of this software and associated documentation files (the
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
"Software"), to deal in the Software without restriction, including
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
SOFTWARE.
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
|
Copyright and related rights for sample code are waived via CC0. Sample
|
||||||
|
code is defined as all source code displayed within the prose of the
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
|
Files located in the node_modules and vendor directories are externally
|
||||||
|
maintained libraries used by this software which have their own
|
||||||
|
licenses; we recommend you read them, as their terms may differ from the
|
||||||
|
terms above.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash.isarguments v3.0.8
|
# lodash.isarguments v3.0.9
|
||||||
|
|
||||||
The [lodash](https://lodash.com/) method `_.isArguments` exported as a [Node.js](https://nodejs.org/) module.
|
The [lodash](https://lodash.com/) method `_.isArguments` exported as a [Node.js](https://nodejs.org/) module.
|
||||||
|
|
||||||
@@ -15,4 +15,4 @@ In Node.js:
|
|||||||
var isArguments = require('lodash.isarguments');
|
var isArguments = require('lodash.isarguments');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [documentation](https://lodash.com/docs#isArguments) or [package source](https://github.com/lodash/lodash/blob/3.0.8-npm-packages/lodash.isarguments) for more details.
|
See the [documentation](https://lodash.com/docs#isArguments) or [package source](https://github.com/lodash/lodash/blob/3.0.9-npm-packages/lodash.isarguments) for more details.
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
/**
|
/**
|
||||||
* lodash (Custom Build) <https://lodash.com/>
|
* lodash (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modularize exports="npm" -o ./`
|
* Build: `lodash modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||||
|
* Released under MIT license <https://lodash.com/license>
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** Used as references for various `Number` constants. */
|
/** Used as references for various `Number` constants. */
|
||||||
@@ -15,6 +15,19 @@ var argsTag = '[object Arguments]',
|
|||||||
funcTag = '[object Function]',
|
funcTag = '[object Function]',
|
||||||
genTag = '[object GeneratorFunction]';
|
genTag = '[object GeneratorFunction]';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.property` without support for deep paths.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {string} key The key of the property to get.
|
||||||
|
* @returns {Function} Returns the new accessor function.
|
||||||
|
*/
|
||||||
|
function baseProperty(key) {
|
||||||
|
return function(object) {
|
||||||
|
return object == null ? undefined : object[key];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/** Used for built-in method references. */
|
/** Used for built-in method references. */
|
||||||
var objectProto = Object.prototype;
|
var objectProto = Object.prototype;
|
||||||
|
|
||||||
@@ -31,19 +44,6 @@ var objectToString = objectProto.toString;
|
|||||||
/** Built-in value references. */
|
/** Built-in value references. */
|
||||||
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
||||||
|
|
||||||
/**
|
|
||||||
* The base implementation of `_.property` without support for deep paths.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {string} key The key of the property to get.
|
|
||||||
* @returns {Function} Returns the new accessor function.
|
|
||||||
*/
|
|
||||||
function baseProperty(key) {
|
|
||||||
return function(object) {
|
|
||||||
return object == null ? undefined : object[key];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the "length" property value of `object`.
|
* Gets the "length" property value of `object`.
|
||||||
*
|
*
|
||||||
@@ -65,7 +65,7 @@ var getLength = baseProperty('length');
|
|||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @category Lang
|
* @category Lang
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if `value` is correctly classified,
|
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
||||||
* else `false`.
|
* else `false`.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
@@ -147,8 +147,7 @@ function isArrayLikeObject(value) {
|
|||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @category Lang
|
* @category Lang
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if `value` is correctly classified,
|
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
||||||
* else `false`.
|
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.isFunction(_);
|
* _.isFunction(_);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash.isarguments",
|
"name": "lodash.isarguments",
|
||||||
"version": "3.0.8",
|
"version": "3.0.9",
|
||||||
"description": "The lodash method `_.isArguments` exported as a module.",
|
"description": "The lodash method `_.isArguments` exported as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
|||||||
@@ -1,7 +1,17 @@
|
|||||||
Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
Copyright JS Foundation and other contributors <https://js.foundation/>
|
||||||
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
|
|
||||||
|
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||||
|
|
||||||
|
This software consists of voluntary contributions made by many
|
||||||
|
individuals. For exact contribution history, see the revision history
|
||||||
|
available at https://github.com/lodash/lodash
|
||||||
|
|
||||||
|
The following license applies to all parts of this software except as
|
||||||
|
documented below:
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
"Software"), to deal in the Software without restriction, including
|
"Software"), to deal in the Software without restriction, including
|
||||||
@@ -20,3 +30,18 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|||||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
|
Copyright and related rights for sample code are waived via CC0. Sample
|
||||||
|
code is defined as all source code displayed within the prose of the
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
|
Files located in the node_modules and vendor directories are externally
|
||||||
|
maintained libraries used by this software which have their own
|
||||||
|
licenses; we recommend you read them, as their terms may differ from the
|
||||||
|
terms above.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# lodash.isfunction v3.0.8
|
# lodash.isfunction v3.0.9
|
||||||
|
|
||||||
The [lodash](https://lodash.com/) method `_.isFunction` exported as a [Node.js](https://nodejs.org/) module.
|
The [Lodash](https://lodash.com/) method `_.isFunction` exported as a [Node.js](https://nodejs.org/) module.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@@ -15,4 +15,4 @@ In Node.js:
|
|||||||
var isFunction = require('lodash.isfunction');
|
var isFunction = require('lodash.isfunction');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [documentation](https://lodash.com/docs#isFunction) or [package source](https://github.com/lodash/lodash/blob/3.0.8-npm-packages/lodash.isfunction) for more details.
|
See the [documentation](https://lodash.com/docs#isFunction) or [package source](https://github.com/lodash/lodash/blob/3.0.9-npm-packages/lodash.isfunction) for more details.
|
||||||
|
|||||||
@@ -1,25 +1,99 @@
|
|||||||
/**
|
/**
|
||||||
* lodash (Custom Build) <https://lodash.com/>
|
* Lodash (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modularize exports="npm" -o ./`
|
* Build: `lodash modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright JS Foundation and other contributors <https://js.foundation/>
|
||||||
|
* Released under MIT license <https://lodash.com/license>
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** `Object#toString` result references. */
|
/** `Object#toString` result references. */
|
||||||
var funcTag = '[object Function]',
|
var asyncTag = '[object AsyncFunction]',
|
||||||
genTag = '[object GeneratorFunction]';
|
funcTag = '[object Function]',
|
||||||
|
genTag = '[object GeneratorFunction]',
|
||||||
|
nullTag = '[object Null]',
|
||||||
|
proxyTag = '[object Proxy]',
|
||||||
|
undefinedTag = '[object Undefined]';
|
||||||
|
|
||||||
|
/** Detect free variable `global` from Node.js. */
|
||||||
|
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
||||||
|
|
||||||
|
/** Detect free variable `self`. */
|
||||||
|
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
||||||
|
|
||||||
|
/** Used as a reference to the global object. */
|
||||||
|
var root = freeGlobal || freeSelf || Function('return this')();
|
||||||
|
|
||||||
/** Used for built-in method references. */
|
/** Used for built-in method references. */
|
||||||
var objectProto = Object.prototype;
|
var objectProto = Object.prototype;
|
||||||
|
|
||||||
|
/** Used to check objects for own properties. */
|
||||||
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to resolve the
|
* Used to resolve the
|
||||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||||
* of values.
|
* of values.
|
||||||
*/
|
*/
|
||||||
var objectToString = objectProto.toString;
|
var nativeObjectToString = objectProto.toString;
|
||||||
|
|
||||||
|
/** Built-in value references. */
|
||||||
|
var Symbol = root.Symbol,
|
||||||
|
symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `getTag` without fallbacks for buggy environments.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to query.
|
||||||
|
* @returns {string} Returns the `toStringTag`.
|
||||||
|
*/
|
||||||
|
function baseGetTag(value) {
|
||||||
|
if (value == null) {
|
||||||
|
return value === undefined ? undefinedTag : nullTag;
|
||||||
|
}
|
||||||
|
return (symToStringTag && symToStringTag in Object(value))
|
||||||
|
? getRawTag(value)
|
||||||
|
: objectToString(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to query.
|
||||||
|
* @returns {string} Returns the raw `toStringTag`.
|
||||||
|
*/
|
||||||
|
function getRawTag(value) {
|
||||||
|
var isOwn = hasOwnProperty.call(value, symToStringTag),
|
||||||
|
tag = value[symToStringTag];
|
||||||
|
|
||||||
|
try {
|
||||||
|
value[symToStringTag] = undefined;
|
||||||
|
var unmasked = true;
|
||||||
|
} catch (e) {}
|
||||||
|
|
||||||
|
var result = nativeObjectToString.call(value);
|
||||||
|
if (unmasked) {
|
||||||
|
if (isOwn) {
|
||||||
|
value[symToStringTag] = tag;
|
||||||
|
} else {
|
||||||
|
delete value[symToStringTag];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts `value` to a string using `Object.prototype.toString`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to convert.
|
||||||
|
* @returns {string} Returns the converted string.
|
||||||
|
*/
|
||||||
|
function objectToString(value) {
|
||||||
|
return nativeObjectToString.call(value);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if `value` is classified as a `Function` object.
|
* Checks if `value` is classified as a `Function` object.
|
||||||
@@ -39,10 +113,13 @@ var objectToString = objectProto.toString;
|
|||||||
* // => false
|
* // => false
|
||||||
*/
|
*/
|
||||||
function isFunction(value) {
|
function isFunction(value) {
|
||||||
|
if (!isObject(value)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||||
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
||||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
var tag = baseGetTag(value);
|
||||||
return tag == funcTag || tag == genTag;
|
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -72,7 +149,7 @@ function isFunction(value) {
|
|||||||
*/
|
*/
|
||||||
function isObject(value) {
|
function isObject(value) {
|
||||||
var type = typeof value;
|
var type = typeof value;
|
||||||
return !!value && (type == 'object' || type == 'function');
|
return value != null && (type == 'object' || type == 'function');
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = isFunction;
|
module.exports = isFunction;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash.isfunction",
|
"name": "lodash.isfunction",
|
||||||
"version": "3.0.8",
|
"version": "3.0.9",
|
||||||
"description": "The lodash method `_.isFunction` exported as a module.",
|
"description": "The Lodash method `_.isFunction` exported as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -9,7 +9,6 @@
|
|||||||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
"Blaine Bublitz <blaine@iceddev.com> (https://github.com/phated)",
|
|
||||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||||
],
|
],
|
||||||
"repository": "lodash/lodash",
|
"repository": "lodash/lodash",
|
||||||
|
|||||||
Reference in New Issue
Block a user