mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Bump to v4.11.2.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# lodash v4.11.1
|
# lodash v4.11.2
|
||||||
|
|
||||||
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.nth v4.11.1
|
# lodash.nth v4.11.2
|
||||||
|
|
||||||
The [lodash](https://lodash.com/) method `_.nth` exported as a [Node.js](https://nodejs.org/) module.
|
The [lodash](https://lodash.com/) method `_.nth` exported as a [Node.js](https://nodejs.org/) module.
|
||||||
|
|
||||||
@@ -15,4 +15,4 @@ In Node.js:
|
|||||||
var nth = require('lodash.nth');
|
var nth = require('lodash.nth');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [documentation](https://lodash.com/docs#nth) or [package source](https://github.com/lodash/lodash/blob/4.11.1-npm-packages/lodash.nth) for more details.
|
See the [documentation](https://lodash.com/docs#nth) or [package source](https://github.com/lodash/lodash/blob/4.11.2-npm-packages/lodash.nth) for more details.
|
||||||
|
|||||||
@@ -14,9 +14,7 @@ var INFINITY = 1 / 0,
|
|||||||
NAN = 0 / 0;
|
NAN = 0 / 0;
|
||||||
|
|
||||||
/** `Object#toString` result references. */
|
/** `Object#toString` result references. */
|
||||||
var funcTag = '[object Function]',
|
var symbolTag = '[object Symbol]';
|
||||||
genTag = '[object GeneratorFunction]',
|
|
||||||
symbolTag = '[object Symbol]';
|
|
||||||
|
|
||||||
/** Used to match leading and trailing whitespace. */
|
/** Used to match leading and trailing whitespace. */
|
||||||
var reTrim = /^\s+|\s+$/g;
|
var reTrim = /^\s+|\s+$/g;
|
||||||
@@ -41,7 +39,7 @@ var objectProto = Object.prototype;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to resolve the
|
* Used to resolve the
|
||||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.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 objectToString = objectProto.toString;
|
||||||
@@ -103,34 +101,9 @@ function nth(array, n) {
|
|||||||
return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
|
return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if `value` is classified as a `Function` object.
|
|
||||||
*
|
|
||||||
* @static
|
|
||||||
* @memberOf _
|
|
||||||
* @since 0.1.0
|
|
||||||
* @category Lang
|
|
||||||
* @param {*} value The value to check.
|
|
||||||
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
||||||
* @example
|
|
||||||
*
|
|
||||||
* _.isFunction(_);
|
|
||||||
* // => true
|
|
||||||
*
|
|
||||||
* _.isFunction(/abc/);
|
|
||||||
* // => false
|
|
||||||
*/
|
|
||||||
function isFunction(value) {
|
|
||||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
||||||
// in Safari 8 which returns 'object' for typed array and weak map constructors,
|
|
||||||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
|
||||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
|
||||||
return tag == funcTag || tag == genTag;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if `value` is the
|
* Checks if `value` is the
|
||||||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
@@ -247,7 +220,7 @@ function toFinite(value) {
|
|||||||
* Converts `value` to an integer.
|
* Converts `value` to an integer.
|
||||||
*
|
*
|
||||||
* **Note:** This method is loosely based on
|
* **Note:** This method is loosely based on
|
||||||
* [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
|
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
@@ -307,7 +280,7 @@ function toNumber(value) {
|
|||||||
return NAN;
|
return NAN;
|
||||||
}
|
}
|
||||||
if (isObject(value)) {
|
if (isObject(value)) {
|
||||||
var other = isFunction(value.valueOf) ? value.valueOf() : value;
|
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
||||||
value = isObject(other) ? (other + '') : other;
|
value = isObject(other) ? (other + '') : other;
|
||||||
}
|
}
|
||||||
if (typeof value != 'string') {
|
if (typeof value != 'string') {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash.nth",
|
"name": "lodash.nth",
|
||||||
"version": "4.11.1",
|
"version": "4.11.2",
|
||||||
"description": "The lodash method `_.nth` exported as a module.",
|
"description": "The lodash method `_.nth` exported as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
|||||||
Reference in New Issue
Block a user