mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Compare commits
18 Commits
3.0.2-npm-
...
3.2.2-npm-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45b95364ef | ||
|
|
2a20de4a1e | ||
|
|
0847978784 | ||
|
|
005ee66119 | ||
|
|
25b977817b | ||
|
|
d2949f0931 | ||
|
|
cf4b24e17c | ||
|
|
f9b785686a | ||
|
|
5ce4a06dfe | ||
|
|
971ec866a8 | ||
|
|
27d65e814a | ||
|
|
f11f2385a6 | ||
|
|
ad40188e5b | ||
|
|
a0c2bf6074 | ||
|
|
cfca777a28 | ||
|
|
b368027e2c | ||
|
|
85f4260a84 | ||
|
|
415e8ce0ed |
@@ -1,4 +1,4 @@
|
|||||||
# lodash v3.0.2
|
# lodash v3.2.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._baseassign v3.0.2
|
# lodash._baseassign v3.2.0
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseAssign` 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 `baseAssign` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var baseAssign = require('lodash._baseassign');
|
var baseAssign = require('lodash._baseassign');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._baseassign) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/3.2.0-npm-packages/lodash._baseassign) for more details.
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.0.2 (Custom Build) <https://lodash.com/>
|
* lodash 3.2.0 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
* Available under MIT license <https://lodash.com/license>
|
||||||
*/
|
*/
|
||||||
@@ -11,33 +11,17 @@ var baseCopy = require('lodash._basecopy'),
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.assign` without support for argument juggling,
|
* The base implementation of `_.assign` without support for argument juggling,
|
||||||
* multiple sources, and `this` binding `customizer` functions.
|
* multiple sources, and `customizer` functions.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Object} object The destination object.
|
* @param {Object} object The destination object.
|
||||||
* @param {Object} source The source object.
|
* @param {Object} source The source object.
|
||||||
* @param {Function} [customizer] The function to customize assigning values.
|
* @returns {Object} Returns `object`.
|
||||||
* @returns {Object} Returns the destination object.
|
|
||||||
*/
|
*/
|
||||||
function baseAssign(object, source, customizer) {
|
function baseAssign(object, source) {
|
||||||
var props = keys(source);
|
return source == null
|
||||||
if (!customizer) {
|
? object
|
||||||
return baseCopy(source, object, props);
|
: baseCopy(source, keys(source), object);
|
||||||
}
|
|
||||||
var index = -1,
|
|
||||||
length = props.length;
|
|
||||||
|
|
||||||
while (++index < length) {
|
|
||||||
var key = props[index],
|
|
||||||
value = object[key],
|
|
||||||
result = customizer(value, source[key], key, object, source);
|
|
||||||
|
|
||||||
if ((result === result ? (result !== value) : (value === value)) ||
|
|
||||||
(typeof value == 'undefined' && !(key in object))) {
|
|
||||||
object[key] = result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return object;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = baseAssign;
|
module.exports = baseAssign;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._baseassign",
|
"name": "lodash._baseassign",
|
||||||
"version": "3.0.2",
|
"version": "3.2.0",
|
||||||
"description": "The modern build of lodash’s internal `baseAssign` as a module.",
|
"description": "The modern build of lodash’s internal `baseAssign` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash._baseat v3.0.2
|
# lodash._baseat v3.0.4
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseAt` 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 `baseAt` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var baseAt = require('lodash._baseat');
|
var baseAt = require('lodash._baseat');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._baseat) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash._baseat) for more details.
|
||||||
|
|||||||
@@ -1,17 +1,13 @@
|
|||||||
/**
|
/** Used to detect unsigned integer values. */
|
||||||
* lodash 3.0.2 (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 = Math.pow(2, 53) - 1;
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.at` without support for string collections
|
* The base implementation of `_.at` without support for string collections
|
||||||
@@ -26,7 +22,7 @@ function baseAt(collection, props) {
|
|||||||
var index = -1,
|
var index = -1,
|
||||||
isNil = collection == null,
|
isNil = collection == null,
|
||||||
isArr = !isNil && isArrayLike(collection),
|
isArr = !isNil && isArrayLike(collection),
|
||||||
length = isArr && collection.length,
|
length = isArr ? collection.length : 0,
|
||||||
propsLength = props.length,
|
propsLength = props.length,
|
||||||
result = Array(propsLength);
|
result = Array(propsLength);
|
||||||
|
|
||||||
@@ -86,7 +82,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 = +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;
|
||||||
}
|
}
|
||||||
@@ -94,7 +90,7 @@ function isIndex(value, length) {
|
|||||||
/**
|
/**
|
||||||
* 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._baseat",
|
"name": "lodash._baseat",
|
||||||
"version": "3.0.2",
|
"version": "3.0.4",
|
||||||
"description": "The modern build of lodash’s internal `baseAt` as a module.",
|
"description": "The modern build of lodash’s internal `baseAt` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
|
Based on Underscore.js, copyright 2009-2015 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
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash._basecallback v3.0.1
|
# lodash._basecallback v3.2.1
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseCallback` 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 `baseCallback` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var baseCallback = require('lodash._basecallback');
|
var baseCallback = require('lodash._basecallback');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._basecallback) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/3.2.1-npm-packages/lodash._basecallback) for more details.
|
||||||
|
|||||||
@@ -1,22 +1,38 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.0.1 (Custom Build) <https://lodash.com/>
|
* lodash 3.2.1 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
* Available under MIT license <https://lodash.com/license>
|
||||||
*/
|
*/
|
||||||
var baseClone = require('lodash._baseclone'),
|
var baseIsEqual = require('lodash._baseisequal'),
|
||||||
baseIsEqual = require('lodash._baseisequal'),
|
|
||||||
baseProperty = require('lodash._baseproperty'),
|
|
||||||
bindCallback = require('lodash._bindcallback'),
|
bindCallback = require('lodash._bindcallback'),
|
||||||
|
isArray = require('lodash.isarray'),
|
||||||
keys = require('lodash.keys');
|
keys = require('lodash.keys');
|
||||||
|
|
||||||
/** Used for native method references. */
|
/** Used to match property names within property paths. */
|
||||||
var objectProto = Object.prototype;
|
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,
|
||||||
|
reIsPlainProp = /^\w*$/,
|
||||||
|
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
|
||||||
|
|
||||||
/** Used to check objects for own properties. */
|
/** Used to match backslashes in property paths. */
|
||||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
var reEscapeChar = /\\(\\)?/g;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts `value` to a string if it is not one. An empty string is returned
|
||||||
|
* for `null` or `undefined` values.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to process.
|
||||||
|
* @returns {string} Returns the string.
|
||||||
|
*/
|
||||||
|
function baseToString(value) {
|
||||||
|
if (typeof value == 'string') {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
return value == null ? '' : (value + '');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.callback` which supports specifying the
|
* The base implementation of `_.callback` which supports specifying the
|
||||||
@@ -31,25 +47,53 @@ var hasOwnProperty = objectProto.hasOwnProperty;
|
|||||||
function baseCallback(func, thisArg, argCount) {
|
function baseCallback(func, thisArg, argCount) {
|
||||||
var type = typeof func;
|
var type = typeof func;
|
||||||
if (type == 'function') {
|
if (type == 'function') {
|
||||||
return (typeof thisArg != 'undefined')
|
return thisArg === undefined
|
||||||
? bindCallback(func, thisArg, argCount)
|
? func
|
||||||
: func;
|
: bindCallback(func, thisArg, argCount);
|
||||||
}
|
}
|
||||||
if (func == null) {
|
if (func == null) {
|
||||||
return identity;
|
return identity;
|
||||||
}
|
}
|
||||||
// Handle "_.property" and "_.matches" style callback shorthands.
|
if (type == 'object') {
|
||||||
return type == 'object'
|
return baseMatches(func);
|
||||||
? baseMatches(func, !argCount)
|
}
|
||||||
: baseProperty(func + '');
|
return thisArg === undefined
|
||||||
|
? property(func)
|
||||||
|
: baseMatchesProperty(func, thisArg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `get` without support for string paths
|
||||||
|
* and default values.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The object to query.
|
||||||
|
* @param {Array} path The path of the property to get.
|
||||||
|
* @param {string} [pathKey] The key representation of path.
|
||||||
|
* @returns {*} Returns the resolved value.
|
||||||
|
*/
|
||||||
|
function baseGet(object, path, pathKey) {
|
||||||
|
if (object == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (pathKey !== undefined && pathKey in toObject(object)) {
|
||||||
|
path = [pathKey];
|
||||||
|
}
|
||||||
|
var index = -1,
|
||||||
|
length = path.length;
|
||||||
|
|
||||||
|
while (object != null && ++index < length) {
|
||||||
|
object = object[path[index]];
|
||||||
|
}
|
||||||
|
return (index && index == length) ? object : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.isMatch` without support for callback
|
* The base implementation of `_.isMatch` without support for callback
|
||||||
* shorthands or `this` binding.
|
* shorthands and `this` binding.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Object} source The object to inspect.
|
* @param {Object} object The object to inspect.
|
||||||
* @param {Array} props The source property names to match.
|
* @param {Array} props The source property names to match.
|
||||||
* @param {Array} values The source values to match.
|
* @param {Array} values The source values to match.
|
||||||
* @param {Array} strictCompareFlags Strict comparison flags for source values.
|
* @param {Array} strictCompareFlags Strict comparison flags for source values.
|
||||||
@@ -57,32 +101,29 @@ function baseCallback(func, thisArg, argCount) {
|
|||||||
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
|
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
|
||||||
*/
|
*/
|
||||||
function baseIsMatch(object, props, values, strictCompareFlags, customizer) {
|
function baseIsMatch(object, props, values, strictCompareFlags, customizer) {
|
||||||
var length = props.length;
|
|
||||||
if (object == null) {
|
|
||||||
return !length;
|
|
||||||
}
|
|
||||||
var index = -1,
|
var index = -1,
|
||||||
|
length = props.length,
|
||||||
noCustomizer = !customizer;
|
noCustomizer = !customizer;
|
||||||
|
|
||||||
while (++index < length) {
|
while (++index < length) {
|
||||||
if ((noCustomizer && strictCompareFlags[index])
|
if ((noCustomizer && strictCompareFlags[index])
|
||||||
? values[index] !== object[props[index]]
|
? values[index] !== object[props[index]]
|
||||||
: !hasOwnProperty.call(object, props[index])
|
: !(props[index] in object)
|
||||||
) {
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
index = -1;
|
index = -1;
|
||||||
while (++index < length) {
|
while (++index < length) {
|
||||||
var key = props[index];
|
var key = props[index],
|
||||||
if (noCustomizer && strictCompareFlags[index]) {
|
objValue = object[key],
|
||||||
var result = hasOwnProperty.call(object, key);
|
srcValue = values[index];
|
||||||
} else {
|
|
||||||
var objValue = object[key],
|
|
||||||
srcValue = values[index];
|
|
||||||
|
|
||||||
|
if (noCustomizer && strictCompareFlags[index]) {
|
||||||
|
var result = objValue !== undefined || (key in object);
|
||||||
|
} else {
|
||||||
result = customizer ? customizer(objValue, srcValue, key) : undefined;
|
result = customizer ? customizer(objValue, srcValue, key) : undefined;
|
||||||
if (typeof result == 'undefined') {
|
if (result === undefined) {
|
||||||
result = baseIsEqual(srcValue, objValue, customizer, true);
|
result = baseIsEqual(srcValue, objValue, customizer, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -94,31 +135,32 @@ function baseIsMatch(object, props, values, strictCompareFlags, customizer) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.matches` which supports specifying whether
|
* The base implementation of `_.matches` which does not clone `source`.
|
||||||
* `source` should be cloned.
|
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Object} source The object of property values to match.
|
* @param {Object} source The object of property values to match.
|
||||||
* @param {boolean} [isCloned] Specify cloning the source object.
|
|
||||||
* @returns {Function} Returns the new function.
|
* @returns {Function} Returns the new function.
|
||||||
*/
|
*/
|
||||||
function baseMatches(source, isCloned) {
|
function baseMatches(source) {
|
||||||
var props = keys(source),
|
var props = keys(source),
|
||||||
length = props.length;
|
length = props.length;
|
||||||
|
|
||||||
|
if (!length) {
|
||||||
|
return constant(true);
|
||||||
|
}
|
||||||
if (length == 1) {
|
if (length == 1) {
|
||||||
var key = props[0],
|
var key = props[0],
|
||||||
value = source[key];
|
value = source[key];
|
||||||
|
|
||||||
if (isStrictComparable(value)) {
|
if (isStrictComparable(value)) {
|
||||||
return function(object) {
|
return function(object) {
|
||||||
return object != null && value === object[key] && hasOwnProperty.call(object, key);
|
if (object == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return object[key] === value && (value !== undefined || (key in toObject(object)));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isCloned) {
|
|
||||||
source = baseClone(source, true);
|
|
||||||
}
|
|
||||||
var values = Array(length),
|
var values = Array(length),
|
||||||
strictCompareFlags = Array(length);
|
strictCompareFlags = Array(length);
|
||||||
|
|
||||||
@@ -128,10 +170,124 @@ function baseMatches(source, isCloned) {
|
|||||||
strictCompareFlags[length] = isStrictComparable(value);
|
strictCompareFlags[length] = isStrictComparable(value);
|
||||||
}
|
}
|
||||||
return function(object) {
|
return function(object) {
|
||||||
return baseIsMatch(object, props, values, strictCompareFlags);
|
return object != null && baseIsMatch(toObject(object), props, values, strictCompareFlags);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.matchesProperty` which does not which does
|
||||||
|
* not clone `value`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {string} path The path of the property to get.
|
||||||
|
* @param {*} value The value to compare.
|
||||||
|
* @returns {Function} Returns the new function.
|
||||||
|
*/
|
||||||
|
function baseMatchesProperty(path, value) {
|
||||||
|
var isArr = isArray(path),
|
||||||
|
isCommon = isKey(path) && isStrictComparable(value),
|
||||||
|
pathKey = (path + '');
|
||||||
|
|
||||||
|
path = toPath(path);
|
||||||
|
return function(object) {
|
||||||
|
if (object == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var key = pathKey;
|
||||||
|
object = toObject(object);
|
||||||
|
if ((isArr || !isCommon) && !(key in object)) {
|
||||||
|
object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
|
||||||
|
if (object == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
key = last(path);
|
||||||
|
object = toObject(object);
|
||||||
|
}
|
||||||
|
return object[key] === value
|
||||||
|
? (value !== undefined || (key in object))
|
||||||
|
: baseIsEqual(value, object[key], null, true);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 function.
|
||||||
|
*/
|
||||||
|
function baseProperty(key) {
|
||||||
|
return function(object) {
|
||||||
|
return object == null ? undefined : object[key];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A specialized version of `baseProperty` which supports deep paths.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array|string} path The path of the property to get.
|
||||||
|
* @returns {Function} Returns the new function.
|
||||||
|
*/
|
||||||
|
function basePropertyDeep(path) {
|
||||||
|
var pathKey = (path + '');
|
||||||
|
path = toPath(path);
|
||||||
|
return function(object) {
|
||||||
|
return baseGet(object, path, pathKey);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.slice` without an iteratee call guard.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to slice.
|
||||||
|
* @param {number} [start=0] The start position.
|
||||||
|
* @param {number} [end=array.length] The end position.
|
||||||
|
* @returns {Array} Returns the slice of `array`.
|
||||||
|
*/
|
||||||
|
function baseSlice(array, start, end) {
|
||||||
|
var index = -1,
|
||||||
|
length = array.length;
|
||||||
|
|
||||||
|
start = start == null ? 0 : (+start || 0);
|
||||||
|
if (start < 0) {
|
||||||
|
start = -start > length ? 0 : (length + start);
|
||||||
|
}
|
||||||
|
end = (end === undefined || end > length) ? length : (+end || 0);
|
||||||
|
if (end < 0) {
|
||||||
|
end += length;
|
||||||
|
}
|
||||||
|
length = start > end ? 0 : ((end - start) >>> 0);
|
||||||
|
start >>>= 0;
|
||||||
|
|
||||||
|
var result = Array(length);
|
||||||
|
while (++index < length) {
|
||||||
|
result[index] = array[index + start];
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is a property name and not a property path.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @param {Object} [object] The object to query keys on.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
||||||
|
*/
|
||||||
|
function isKey(value, object) {
|
||||||
|
var type = typeof value;
|
||||||
|
if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (isArray(value)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var result = !reIsDeepProp.test(value);
|
||||||
|
return result || (object != null && value in toObject(object));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
|
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
|
||||||
*
|
*
|
||||||
@@ -141,14 +297,59 @@ function baseMatches(source, isCloned) {
|
|||||||
* equality comparisons, else `false`.
|
* equality comparisons, else `false`.
|
||||||
*/
|
*/
|
||||||
function isStrictComparable(value) {
|
function isStrictComparable(value) {
|
||||||
return value === value && (value === 0 ? ((1 / value) > 0) : !isObject(value));
|
return value === value && !isObject(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if `value` is the language type of `Object`.
|
* Converts `value` to an object if it is not one.
|
||||||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
||||||
*
|
*
|
||||||
* **Note:** See the [ES5 spec](https://es5.github.io/#x8) for more details.
|
* @private
|
||||||
|
* @param {*} value The value to process.
|
||||||
|
* @returns {Object} Returns the object.
|
||||||
|
*/
|
||||||
|
function toObject(value) {
|
||||||
|
return isObject(value) ? value : Object(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts `value` to property path array if it is not one.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to process.
|
||||||
|
* @returns {Array} Returns the property path array.
|
||||||
|
*/
|
||||||
|
function toPath(value) {
|
||||||
|
if (isArray(value)) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
var result = [];
|
||||||
|
baseToString(value).replace(rePropName, function(match, number, quote, string) {
|
||||||
|
result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the last element of `array`.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Array
|
||||||
|
* @param {Array} array The array to query.
|
||||||
|
* @returns {*} Returns the last element of `array`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.last([1, 2, 3]);
|
||||||
|
* // => 3
|
||||||
|
*/
|
||||||
|
function last(array) {
|
||||||
|
var length = array ? array.length : 0;
|
||||||
|
return length ? array[length - 1] : undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
||||||
|
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
@@ -170,7 +371,29 @@ function isObject(value) {
|
|||||||
// Avoid a V8 JIT bug in Chrome 19-20.
|
// Avoid a V8 JIT bug in Chrome 19-20.
|
||||||
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
||||||
var type = typeof value;
|
var type = typeof value;
|
||||||
return type == 'function' || (value && type == 'object') || false;
|
return type == 'function' || (!!value && type == 'object');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a function that returns `value`.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Utility
|
||||||
|
* @param {*} value The value to return from the new function.
|
||||||
|
* @returns {Function} Returns the new function.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* var object = { 'user': 'fred' };
|
||||||
|
* var getter = _.constant(object);
|
||||||
|
*
|
||||||
|
* getter() === object;
|
||||||
|
* // => true
|
||||||
|
*/
|
||||||
|
function constant(value) {
|
||||||
|
return function() {
|
||||||
|
return value;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -184,6 +407,7 @@ function isObject(value) {
|
|||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* var object = { 'user': 'fred' };
|
* var object = { 'user': 'fred' };
|
||||||
|
*
|
||||||
* _.identity(object) === object;
|
* _.identity(object) === object;
|
||||||
* // => true
|
* // => true
|
||||||
*/
|
*/
|
||||||
@@ -191,4 +415,30 @@ function identity(value) {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a function which returns the property value at `path` on a
|
||||||
|
* given object.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Utility
|
||||||
|
* @param {Array|string} path The path of the property to get.
|
||||||
|
* @returns {Function} Returns the new function.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* var objects = [
|
||||||
|
* { 'a': { 'b': { 'c': 2 } } },
|
||||||
|
* { 'a': { 'b': { 'c': 1 } } }
|
||||||
|
* ];
|
||||||
|
*
|
||||||
|
* _.map(objects, _.property('a.b.c'));
|
||||||
|
* // => [2, 1]
|
||||||
|
*
|
||||||
|
* _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');
|
||||||
|
* // => [1, 2]
|
||||||
|
*/
|
||||||
|
function property(path) {
|
||||||
|
return isKey(path) ? baseProperty(path) : basePropertyDeep(path);
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = baseCallback;
|
module.exports = baseCallback;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._basecallback",
|
"name": "lodash._basecallback",
|
||||||
"version": "3.0.1",
|
"version": "3.2.1",
|
||||||
"description": "The modern build of lodash’s internal `baseCallback` as a module.",
|
"description": "The modern build of lodash’s internal `baseCallback` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
@@ -16,10 +16,9 @@
|
|||||||
"repository": "lodash/lodash",
|
"repository": "lodash/lodash",
|
||||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lodash._baseclone": "^3.0.0",
|
|
||||||
"lodash._baseisequal": "^3.0.0",
|
"lodash._baseisequal": "^3.0.0",
|
||||||
"lodash._baseproperty": "^3.0.0",
|
|
||||||
"lodash._bindcallback": "^3.0.0",
|
"lodash._bindcallback": "^3.0.0",
|
||||||
|
"lodash.isarray": "^3.0.0",
|
||||||
"lodash.keys": "^3.0.0"
|
"lodash.keys": "^3.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash._baseclone v3.0.1
|
# lodash._baseclone v3.2.1
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseClone` 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 `baseClone` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var baseClone = require('lodash._baseclone');
|
var baseClone = require('lodash._baseclone');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._baseclone) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/3.2.1-npm-packages/lodash._baseclone) for more details.
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.0.1 (Custom Build) <https://lodash.com/>
|
* lodash 3.2.1 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
* Available under MIT license <https://lodash.com/license>
|
||||||
*/
|
*/
|
||||||
var arrayCopy = require('lodash._arraycopy'),
|
var arrayCopy = require('lodash._arraycopy'),
|
||||||
arrayEach = require('lodash._arrayeach'),
|
arrayEach = require('lodash._arrayeach'),
|
||||||
baseCopy = require('lodash._basecopy'),
|
baseAssign = require('lodash._baseassign'),
|
||||||
baseFor = require('lodash._basefor'),
|
baseFor = require('lodash._basefor'),
|
||||||
|
getNative = require('lodash._getnative'),
|
||||||
isArray = require('lodash.isarray'),
|
isArray = require('lodash.isarray'),
|
||||||
isNative = require('lodash.isnative'),
|
|
||||||
keys = require('lodash.keys');
|
keys = require('lodash.keys');
|
||||||
|
|
||||||
/** `Object#toString` result references. */
|
/** `Object#toString` result references. */
|
||||||
@@ -71,10 +71,10 @@ var hasOwnProperty = objectProto.hasOwnProperty;
|
|||||||
var objToString = objectProto.toString;
|
var objToString = objectProto.toString;
|
||||||
|
|
||||||
/** Native method references. */
|
/** Native method references. */
|
||||||
var ArrayBuffer = isNative(ArrayBuffer = global.ArrayBuffer) && ArrayBuffer,
|
var ArrayBuffer = getNative(global, 'ArrayBuffer'),
|
||||||
bufferSlice = isNative(bufferSlice = ArrayBuffer && new ArrayBuffer(0).slice) && bufferSlice,
|
bufferSlice = getNative(ArrayBuffer && new ArrayBuffer(0), 'slice'),
|
||||||
floor = Math.floor,
|
floor = Math.floor,
|
||||||
Uint8Array = isNative(Uint8Array = global.Uint8Array) && Uint8Array;
|
Uint8Array = getNative(global, 'Uint8Array');
|
||||||
|
|
||||||
/** Used to clone array buffers. */
|
/** Used to clone array buffers. */
|
||||||
var Float64Array = (function() {
|
var Float64Array = (function() {
|
||||||
@@ -82,10 +82,10 @@ var Float64Array = (function() {
|
|||||||
// where the array buffer's `byteLength` is not a multiple of the typed
|
// where the array buffer's `byteLength` is not a multiple of the typed
|
||||||
// array's `BYTES_PER_ELEMENT`.
|
// array's `BYTES_PER_ELEMENT`.
|
||||||
try {
|
try {
|
||||||
var func = isNative(func = global.Float64Array) && func,
|
var func = getNative(global, 'Float64Array'),
|
||||||
result = new func(new ArrayBuffer(10), 0, 1) && func;
|
result = new func(new ArrayBuffer(10), 0, 1) && func;
|
||||||
} catch(e) {}
|
} catch(e) {}
|
||||||
return result;
|
return result || null;
|
||||||
}());
|
}());
|
||||||
|
|
||||||
/** Used as the size, in bytes, of each `Float64Array` element. */
|
/** Used as the size, in bytes, of each `Float64Array` element. */
|
||||||
@@ -110,7 +110,7 @@ function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {
|
|||||||
if (customizer) {
|
if (customizer) {
|
||||||
result = object ? customizer(value, key, object) : customizer(value);
|
result = object ? customizer(value, key, object) : customizer(value);
|
||||||
}
|
}
|
||||||
if (typeof result != 'undefined') {
|
if (result !== undefined) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
if (!isObject(value)) {
|
if (!isObject(value)) {
|
||||||
@@ -129,7 +129,7 @@ function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {
|
|||||||
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
||||||
result = initCloneObject(isFunc ? {} : value);
|
result = initCloneObject(isFunc ? {} : value);
|
||||||
if (!isDeep) {
|
if (!isDeep) {
|
||||||
return baseCopy(value, result, keys(value));
|
return baseAssign(result, value);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return cloneableTags[tag]
|
return cloneableTags[tag]
|
||||||
@@ -241,7 +241,6 @@ function initCloneObject(object) {
|
|||||||
* **Note:** This function only supports cloning values with tags of
|
* **Note:** This function only supports cloning values with tags of
|
||||||
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @private
|
* @private
|
||||||
* @param {Object} object The object to clone.
|
* @param {Object} object The object to clone.
|
||||||
* @param {string} tag The `toStringTag` of the object to clone.
|
* @param {string} tag The `toStringTag` of the object to clone.
|
||||||
@@ -299,7 +298,7 @@ function isObject(value) {
|
|||||||
// Avoid a V8 JIT bug in Chrome 19-20.
|
// Avoid a V8 JIT bug in Chrome 19-20.
|
||||||
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
||||||
var type = typeof value;
|
var type = typeof value;
|
||||||
return type == 'function' || (!!value && type == 'object');
|
return !!value && (type == 'object' || type == 'function');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._baseclone",
|
"name": "lodash._baseclone",
|
||||||
"version": "3.0.1",
|
"version": "3.2.1",
|
||||||
"description": "The modern build of lodash’s internal `baseClone` as a module.",
|
"description": "The modern build of lodash’s internal `baseClone` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
@@ -18,10 +18,10 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lodash._arraycopy": "^3.0.0",
|
"lodash._arraycopy": "^3.0.0",
|
||||||
"lodash._arrayeach": "^3.0.0",
|
"lodash._arrayeach": "^3.0.0",
|
||||||
"lodash._basecopy": "^3.0.0",
|
"lodash._baseassign": "^3.0.0",
|
||||||
"lodash._basefor": "^3.0.0",
|
"lodash._basefor": "^3.0.0",
|
||||||
|
"lodash._getnative": "^3.0.0",
|
||||||
"lodash.isarray": "^3.0.0",
|
"lodash.isarray": "^3.0.0",
|
||||||
"lodash.isnative": "^3.0.0",
|
|
||||||
"lodash.keys": "^3.0.0"
|
"lodash.keys": "^3.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash._basecreate v3.0.2
|
# lodash._basecreate v3.0.3
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseCreate` 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 `baseCreate` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var baseCreate = require('lodash._basecreate');
|
var baseCreate = require('lodash._basecreate');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._basecreate) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._basecreate) for more details.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.0.2 (Custom Build) <https://lodash.com/>
|
* lodash 3.0.3 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
@@ -21,7 +21,7 @@ var baseCreate = (function() {
|
|||||||
if (isObject(prototype)) {
|
if (isObject(prototype)) {
|
||||||
object.prototype = prototype;
|
object.prototype = prototype;
|
||||||
var result = new object;
|
var result = new object;
|
||||||
object.prototype = null;
|
object.prototype = undefined;
|
||||||
}
|
}
|
||||||
return result || {};
|
return result || {};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._basecreate",
|
"name": "lodash._basecreate",
|
||||||
"version": "3.0.2",
|
"version": "3.0.3",
|
||||||
"description": "The modern build of lodash’s internal `baseCreate` as a module.",
|
"description": "The modern build of lodash’s internal `baseCreate` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
|
Based on Underscore.js, copyright 2009-2015 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
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash._basedelay v3.0.1
|
# lodash._basedelay v3.1.0
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseDelay` 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 `baseDelay` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var baseDelay = require('lodash._basedelay');
|
var baseDelay = require('lodash._basedelay');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._basedelay) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._basedelay) for more details.
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.0.1 (Custom Build) <https://lodash.com/>
|
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
* Available under MIT license <https://lodash.com/license>
|
||||||
*/
|
*/
|
||||||
var baseSlice = require('lodash._baseslice');
|
|
||||||
|
|
||||||
/** Used as the `TypeError` message for "Functions" methods. */
|
/** Used as the `TypeError` message for "Functions" methods. */
|
||||||
var FUNC_ERROR_TEXT = 'Expected a function';
|
var FUNC_ERROR_TEXT = 'Expected a function';
|
||||||
@@ -18,14 +17,14 @@ var FUNC_ERROR_TEXT = 'Expected a function';
|
|||||||
* @private
|
* @private
|
||||||
* @param {Function} func The function to delay.
|
* @param {Function} func The function to delay.
|
||||||
* @param {number} wait The number of milliseconds to delay invocation.
|
* @param {number} wait The number of milliseconds to delay invocation.
|
||||||
* @param {Object} args The `arguments` object to slice and provide to `func`.
|
* @param {Object} args The arguments provide to `func`.
|
||||||
* @returns {number} Returns the timer id.
|
* @returns {number} Returns the timer id.
|
||||||
*/
|
*/
|
||||||
function baseDelay(func, wait, args, fromIndex) {
|
function baseDelay(func, wait, args) {
|
||||||
if (typeof func != 'function') {
|
if (typeof func != 'function') {
|
||||||
throw new TypeError(FUNC_ERROR_TEXT);
|
throw new TypeError(FUNC_ERROR_TEXT);
|
||||||
}
|
}
|
||||||
return setTimeout(function() { func.apply(undefined, baseSlice(args, fromIndex)); }, wait);
|
return setTimeout(function() { func.apply(undefined, args); }, wait);
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = baseDelay;
|
module.exports = baseDelay;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._basedelay",
|
"name": "lodash._basedelay",
|
||||||
"version": "3.0.1",
|
"version": "3.1.0",
|
||||||
"description": "The modern build of lodash’s internal `baseDelay` as a module.",
|
"description": "The modern build of lodash’s internal `baseDelay` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
@@ -14,8 +14,5 @@
|
|||||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||||
],
|
],
|
||||||
"repository": "lodash/lodash",
|
"repository": "lodash/lodash",
|
||||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
|
||||||
"dependencies": {
|
|
||||||
"lodash._baseslice": "^3.0.0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash._basedifference v3.0.2
|
# lodash._basedifference v3.0.3
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseDifference` 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 `baseDifference` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var baseDifference = require('lodash._basedifference');
|
var baseDifference = require('lodash._basedifference');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._basedifference) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._basedifference) for more details.
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.0.2 (Custom Build) <https://lodash.com/>
|
* lodash 3.0.3 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
* Available under MIT license <https://lodash.com/license>
|
||||||
*/
|
*/
|
||||||
@@ -10,6 +10,9 @@ var baseIndexOf = require('lodash._baseindexof'),
|
|||||||
cacheIndexOf = require('lodash._cacheindexof'),
|
cacheIndexOf = require('lodash._cacheindexof'),
|
||||||
createCache = require('lodash._createcache');
|
createCache = require('lodash._createcache');
|
||||||
|
|
||||||
|
/** Used as the size to enable large array optimizations. */
|
||||||
|
var LARGE_ARRAY_SIZE = 200;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.difference` which accepts a single array
|
* The base implementation of `_.difference` which accepts a single array
|
||||||
* of values to exclude.
|
* of values to exclude.
|
||||||
@@ -29,7 +32,7 @@ function baseDifference(array, values) {
|
|||||||
var index = -1,
|
var index = -1,
|
||||||
indexOf = baseIndexOf,
|
indexOf = baseIndexOf,
|
||||||
isCommon = true,
|
isCommon = true,
|
||||||
cache = (isCommon && values.length >= 200) ? createCache(values) : null,
|
cache = (isCommon && values.length >= LARGE_ARRAY_SIZE) ? createCache(values) : null,
|
||||||
valuesLength = values.length;
|
valuesLength = values.length;
|
||||||
|
|
||||||
if (cache) {
|
if (cache) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._basedifference",
|
"name": "lodash._basedifference",
|
||||||
"version": "3.0.2",
|
"version": "3.0.3",
|
||||||
"description": "The modern build of lodash’s internal `baseDifference` as a module.",
|
"description": "The modern build of lodash’s internal `baseDifference` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash._baseeach v3.0.2
|
# lodash._baseeach v3.0.4
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseEach` 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 `baseEach` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var baseEach = require('lodash._baseeach');
|
var baseEach = require('lodash._baseeach');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._baseeach) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash._baseeach) for more details.
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.0.2 (Custom Build) <https://lodash.com/>
|
* lodash 3.0.4 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
* Available under MIT license <https://lodash.com/license>
|
||||||
*/
|
*/
|
||||||
var keys = require('lodash.keys');
|
var keys = require('lodash.keys');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 = Math.pow(2, 53) - 1;
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.forEach` without support for callback
|
* The base implementation of `_.forEach` without support for callback
|
||||||
@@ -28,7 +28,7 @@ var baseEach = createBaseEach(baseForOwn);
|
|||||||
/**
|
/**
|
||||||
* The base implementation of `baseForIn` and `baseForOwn` which iterates
|
* The base implementation of `baseForIn` and `baseForOwn` which iterates
|
||||||
* over `object` properties returned by `keysFunc` invoking `iteratee` for
|
* over `object` properties returned by `keysFunc` invoking `iteratee` for
|
||||||
* each property. Iterator functions may exit iteration early by explicitly
|
* each property. Iteratee functions may exit iteration early by explicitly
|
||||||
* returning `false`.
|
* returning `false`.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
@@ -52,6 +52,19 @@ function baseForOwn(object, iteratee) {
|
|||||||
return baseFor(object, iteratee, keys);
|
return baseFor(object, iteratee, keys);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 function.
|
||||||
|
*/
|
||||||
|
function baseProperty(key) {
|
||||||
|
return function(object) {
|
||||||
|
return object == null ? undefined : object[key];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a `baseEach` or `baseEachRight` function.
|
* Creates a `baseEach` or `baseEachRight` function.
|
||||||
*
|
*
|
||||||
@@ -62,7 +75,7 @@ function baseForOwn(object, iteratee) {
|
|||||||
*/
|
*/
|
||||||
function createBaseEach(eachFunc, fromRight) {
|
function createBaseEach(eachFunc, fromRight) {
|
||||||
return function(collection, iteratee) {
|
return function(collection, iteratee) {
|
||||||
var length = collection ? collection.length : 0;
|
var length = collection ? getLength(collection) : 0;
|
||||||
if (!isLength(length)) {
|
if (!isLength(length)) {
|
||||||
return eachFunc(collection, iteratee);
|
return eachFunc(collection, iteratee);
|
||||||
}
|
}
|
||||||
@@ -102,10 +115,22 @@ function createBaseFor(fromRight) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the "length" property value of `object`.
|
||||||
|
*
|
||||||
|
* **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
|
||||||
|
* that affects Safari on at least iOS 8.1-8.3 ARM64.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The object to query.
|
||||||
|
* @returns {*} Returns the "length" value.
|
||||||
|
*/
|
||||||
|
var getLength = baseProperty('length');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.
|
||||||
@@ -116,7 +141,7 @@ function isLength(value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts `value` to an object if it is not one.
|
* Converts `value` to an object if it's not one.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {*} value The value to process.
|
* @param {*} value The value to process.
|
||||||
@@ -150,7 +175,7 @@ function isObject(value) {
|
|||||||
// Avoid a V8 JIT bug in Chrome 19-20.
|
// Avoid a V8 JIT bug in Chrome 19-20.
|
||||||
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
||||||
var type = typeof value;
|
var type = typeof value;
|
||||||
return type == 'function' || (!!value && type == 'object');
|
return !!value && (type == 'object' || type == 'function');
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = baseEach;
|
module.exports = baseEach;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._baseeach",
|
"name": "lodash._baseeach",
|
||||||
"version": "3.0.2",
|
"version": "3.0.4",
|
||||||
"description": "The modern build of lodash’s internal `baseEach` as a module.",
|
"description": "The modern build of lodash’s internal `baseEach` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash._baseeachright v3.0.2
|
# lodash._baseeachright v3.0.3
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseEachRight` 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 `baseEachRight` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var baseEachRight = require('lodash._baseeachright');
|
var baseEachRight = require('lodash._baseeachright');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._baseeachright) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._baseeachright) for more details.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.0.2 (Custom Build) <https://lodash.com/>
|
* lodash 3.0.3 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
@@ -10,10 +10,10 @@ var baseForRight = require('lodash._baseforright'),
|
|||||||
keys = require('lodash.keys');
|
keys = require('lodash.keys');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 = Math.pow(2, 53) - 1;
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.forEachRight` without support for callback
|
* The base implementation of `_.forEachRight` without support for callback
|
||||||
@@ -93,7 +93,7 @@ var getLength = baseProperty('length');
|
|||||||
/**
|
/**
|
||||||
* 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.
|
||||||
@@ -104,7 +104,7 @@ function isLength(value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts `value` to an object if it is not one.
|
* Converts `value` to an object if it's not one.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {*} value The value to process.
|
* @param {*} value The value to process.
|
||||||
@@ -138,7 +138,7 @@ function isObject(value) {
|
|||||||
// Avoid a V8 JIT bug in Chrome 19-20.
|
// Avoid a V8 JIT bug in Chrome 19-20.
|
||||||
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
||||||
var type = typeof value;
|
var type = typeof value;
|
||||||
return type == 'function' || (!!value && type == 'object');
|
return !!value && (type == 'object' || type == 'function');
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = baseEachRight;
|
module.exports = baseEachRight;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._baseeachright",
|
"name": "lodash._baseeachright",
|
||||||
"version": "3.0.2",
|
"version": "3.0.3",
|
||||||
"description": "The modern build of lodash’s internal `baseEachRight` as a module.",
|
"description": "The modern build of lodash’s internal `baseEachRight` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash._baseflatten v3.0.1
|
# lodash._baseflatten v3.1.4
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseFlatten` 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 `baseFlatten` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var baseFlatten = require('lodash._baseflatten');
|
var baseFlatten = require('lodash._baseflatten');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._baseflatten) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/3.1.4-npm-packages/lodash._baseflatten) for more details.
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.0.1 (Custom Build) <https://lodash.com/>
|
* lodash 3.1.4 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
* Available under MIT license <https://lodash.com/license>
|
||||||
*/
|
*/
|
||||||
@@ -17,15 +17,33 @@ var isArguments = require('lodash.isarguments'),
|
|||||||
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
||||||
*/
|
*/
|
||||||
function isObjectLike(value) {
|
function isObjectLike(value) {
|
||||||
return (value && typeof value == 'object') || false;
|
return !!value && typeof value == 'object';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used as the maximum length of an array-like value.
|
* Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
|
||||||
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
|
* of an array-like value.
|
||||||
* for more details.
|
|
||||||
*/
|
*/
|
||||||
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Appends the elements of `values` to `array`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to modify.
|
||||||
|
* @param {Array} values The values to append.
|
||||||
|
* @returns {Array} Returns `array`.
|
||||||
|
*/
|
||||||
|
function arrayPush(array, values) {
|
||||||
|
var index = -1,
|
||||||
|
length = values.length,
|
||||||
|
offset = array.length;
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
array[offset + index] = values[index];
|
||||||
|
}
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.flatten` with added support for restricting
|
* The base implementation of `_.flatten` with added support for restricting
|
||||||
@@ -34,44 +52,73 @@ var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
|
|||||||
* @private
|
* @private
|
||||||
* @param {Array} array The array to flatten.
|
* @param {Array} array The array to flatten.
|
||||||
* @param {boolean} [isDeep] Specify a deep flatten.
|
* @param {boolean} [isDeep] Specify a deep flatten.
|
||||||
* @param {boolean} [isStrict] Restrict flattening to arrays and `arguments` objects.
|
* @param {boolean} [isStrict] Restrict flattening to arrays-like objects.
|
||||||
* @param {number} [fromIndex=0] The index to start from.
|
* @param {Array} [result=[]] The initial result value.
|
||||||
* @returns {Array} Returns the new flattened array.
|
* @returns {Array} Returns the new flattened array.
|
||||||
*/
|
*/
|
||||||
function baseFlatten(array, isDeep, isStrict, fromIndex) {
|
function baseFlatten(array, isDeep, isStrict, result) {
|
||||||
var index = fromIndex == null ? -1 : (fromIndex - 1),
|
result || (result = []);
|
||||||
length = array.length,
|
|
||||||
resIndex = -1,
|
var index = -1,
|
||||||
result = [];
|
length = array.length;
|
||||||
|
|
||||||
while (++index < length) {
|
while (++index < length) {
|
||||||
var value = array[index];
|
var value = array[index];
|
||||||
|
if (isObjectLike(value) && isArrayLike(value) &&
|
||||||
if (isObjectLike(value) && isLength(value.length) && (isArray(value) || isArguments(value))) {
|
(isStrict || isArray(value) || isArguments(value))) {
|
||||||
if (isDeep) {
|
if (isDeep) {
|
||||||
// Recursively flatten arrays (susceptible to call stack limits).
|
// Recursively flatten arrays (susceptible to call stack limits).
|
||||||
value = baseFlatten(value, isDeep, isStrict);
|
baseFlatten(value, isDeep, isStrict, result);
|
||||||
}
|
} else {
|
||||||
var valIndex = -1,
|
arrayPush(result, value);
|
||||||
valLength = value.length;
|
|
||||||
|
|
||||||
result.length += valLength;
|
|
||||||
while (++valIndex < valLength) {
|
|
||||||
result[++resIndex] = value[valIndex];
|
|
||||||
}
|
}
|
||||||
} else if (!isStrict) {
|
} else if (!isStrict) {
|
||||||
result[++resIndex] = value;
|
result[result.length] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 function.
|
||||||
|
*/
|
||||||
|
function baseProperty(key) {
|
||||||
|
return function(object) {
|
||||||
|
return object == null ? undefined : object[key];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the "length" property value of `object`.
|
||||||
|
*
|
||||||
|
* **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
|
||||||
|
* that affects Safari on at least iOS 8.1-8.3 ARM64.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The object to query.
|
||||||
|
* @returns {*} Returns the "length" value.
|
||||||
|
*/
|
||||||
|
var getLength = baseProperty('length');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is array-like.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
||||||
|
*/
|
||||||
|
function isArrayLike(value) {
|
||||||
|
return value != null && isLength(getLength(value));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if `value` is a valid array-like length.
|
* Checks if `value` is a valid array-like length.
|
||||||
*
|
*
|
||||||
* **Note:** This function is based on ES `ToLength`. See the
|
* **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||||
* [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)
|
|
||||||
* for more details.
|
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._baseflatten",
|
"name": "lodash._baseflatten",
|
||||||
"version": "3.0.1",
|
"version": "3.1.4",
|
||||||
"description": "The modern build of lodash’s internal `baseFlatten` as a module.",
|
"description": "The modern build of lodash’s internal `baseFlatten` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
# lodash._basefor v3.0.2
|
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseFor` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
Using npm:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ {sudo -H} npm i -g npm
|
|
||||||
$ npm i --save lodash._basefor
|
|
||||||
```
|
|
||||||
|
|
||||||
In Node.js/io.js:
|
|
||||||
|
|
||||||
```js
|
|
||||||
var baseFor = require('lodash._basefor');
|
|
||||||
```
|
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._basefor) for more details.
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
/**
|
|
||||||
* lodash 3.0.2 (Custom Build) <https://lodash.com/>
|
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
|
||||||
* 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>
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The base implementation of `baseForIn` and `baseForOwn` which iterates
|
|
||||||
* over `object` properties returned by `keysFunc` invoking `iteratee` for
|
|
||||||
* each property. Iteratee functions may exit iteration early by explicitly
|
|
||||||
* returning `false`.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {Object} object The object to iterate over.
|
|
||||||
* @param {Function} iteratee The function invoked per iteration.
|
|
||||||
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
||||||
* @returns {Object} Returns `object`.
|
|
||||||
*/
|
|
||||||
var baseFor = createBaseFor();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a base function for `_.forIn` or `_.forInRight`.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
||||||
* @returns {Function} Returns the new base function.
|
|
||||||
*/
|
|
||||||
function createBaseFor(fromRight) {
|
|
||||||
return function(object, iteratee, keysFunc) {
|
|
||||||
var iterable = toObject(object),
|
|
||||||
props = keysFunc(object),
|
|
||||||
length = props.length,
|
|
||||||
index = fromRight ? length : -1;
|
|
||||||
|
|
||||||
while ((fromRight ? index-- : ++index < length)) {
|
|
||||||
var key = props[index];
|
|
||||||
if (iteratee(iterable[key], key, iterable) === false) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return object;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts `value` to an object if it's not one.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {*} value The value to process.
|
|
||||||
* @returns {Object} Returns the object.
|
|
||||||
*/
|
|
||||||
function toObject(value) {
|
|
||||||
return isObject(value) ? value : Object(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
|
||||||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
||||||
*
|
|
||||||
* @static
|
|
||||||
* @memberOf _
|
|
||||||
* @category Lang
|
|
||||||
* @param {*} value The value to check.
|
|
||||||
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
||||||
* @example
|
|
||||||
*
|
|
||||||
* _.isObject({});
|
|
||||||
* // => true
|
|
||||||
*
|
|
||||||
* _.isObject([1, 2, 3]);
|
|
||||||
* // => true
|
|
||||||
*
|
|
||||||
* _.isObject(1);
|
|
||||||
* // => false
|
|
||||||
*/
|
|
||||||
function isObject(value) {
|
|
||||||
// Avoid a V8 JIT bug in Chrome 19-20.
|
|
||||||
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
|
||||||
var type = typeof value;
|
|
||||||
return !!value && (type == 'object' || type == 'function');
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = baseFor;
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash._baseindexof v3.0.0
|
# lodash._baseindexof v3.1.0
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseIndexOf` 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 `baseIndexOf` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var baseIndexOf = require('lodash._baseindexof');
|
var baseIndexOf = require('lodash._baseindexof');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._baseindexof) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._baseindexof) for more details.
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
|
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
* Available under MIT license <https://lodash.com/license>
|
||||||
*/
|
*/
|
||||||
@@ -13,14 +13,24 @@
|
|||||||
* @private
|
* @private
|
||||||
* @param {Array} array The array to search.
|
* @param {Array} array The array to search.
|
||||||
* @param {*} value The value to search for.
|
* @param {*} value The value to search for.
|
||||||
* @param {number} [fromIndex=0] The index to search from.
|
* @param {number} fromIndex The index to search from.
|
||||||
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.indexOf` without support for binary searches.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to search.
|
||||||
|
* @param {*} value The value to search for.
|
||||||
|
* @param {number} fromIndex The index to search from.
|
||||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||||
*/
|
*/
|
||||||
function baseIndexOf(array, value, fromIndex) {
|
function baseIndexOf(array, value, fromIndex) {
|
||||||
if (value !== value) {
|
if (value !== value) {
|
||||||
return indexOfNaN(array, fromIndex);
|
return indexOfNaN(array, fromIndex);
|
||||||
}
|
}
|
||||||
var index = (fromIndex || 0) - 1,
|
var index = fromIndex - 1,
|
||||||
length = array.length;
|
length = array.length;
|
||||||
|
|
||||||
while (++index < length) {
|
while (++index < length) {
|
||||||
@@ -33,17 +43,16 @@ function baseIndexOf(array, value, fromIndex) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the index at which the first occurrence of `NaN` is found in `array`.
|
* Gets the index at which the first occurrence of `NaN` is found in `array`.
|
||||||
* If `fromRight` is provided elements of `array` are iterated from right to left.
|
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Array} array The array to search.
|
* @param {Array} array The array to search.
|
||||||
* @param {number} [fromIndex] The index to search from.
|
* @param {number} fromIndex The index to search from.
|
||||||
* @param {boolean} [fromRight] Specify iterating from right to left.
|
* @param {boolean} [fromRight] Specify iterating from right to left.
|
||||||
* @returns {number} Returns the index of the matched `NaN`, else `-1`.
|
* @returns {number} Returns the index of the matched `NaN`, else `-1`.
|
||||||
*/
|
*/
|
||||||
function indexOfNaN(array, fromIndex, fromRight) {
|
function indexOfNaN(array, fromIndex, fromRight) {
|
||||||
var length = array.length,
|
var length = array.length,
|
||||||
index = fromRight ? (fromIndex || length) : ((fromIndex || 0) - 1);
|
index = fromIndex + (fromRight ? 0 : -1);
|
||||||
|
|
||||||
while ((fromRight ? index-- : ++index < length)) {
|
while ((fromRight ? index-- : ++index < length)) {
|
||||||
var other = array[index];
|
var other = array[index];
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._baseindexof",
|
"name": "lodash._baseindexof",
|
||||||
"version": "3.0.0",
|
"version": "3.1.0",
|
||||||
"description": "The modern build of lodash’s internal `baseIndexOf` as a module.",
|
"description": "The modern build of lodash’s internal `baseIndexOf` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash._baseisequal v3.0.2
|
# lodash._baseisequal v3.0.7
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseIsEqual` 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 `baseIsEqual` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var baseIsEqual = require('lodash._baseisequal');
|
var baseIsEqual = require('lodash._baseisequal');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._baseisequal) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/3.0.7-npm-packages/lodash._baseisequal) for more details.
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.0.2 (Custom Build) <https://lodash.com/>
|
* lodash 3.0.7 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
* Available under MIT license <https://lodash.com/license>
|
||||||
*/
|
*/
|
||||||
@@ -21,6 +21,17 @@ var argsTag = '[object Arguments]',
|
|||||||
regexpTag = '[object RegExp]',
|
regexpTag = '[object RegExp]',
|
||||||
stringTag = '[object String]';
|
stringTag = '[object String]';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is object-like.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
||||||
|
*/
|
||||||
|
function isObjectLike(value) {
|
||||||
|
return !!value && typeof value == 'object';
|
||||||
|
}
|
||||||
|
|
||||||
/** Used for native method references. */
|
/** Used for native method references. */
|
||||||
var objectProto = Object.prototype;
|
var objectProto = Object.prototype;
|
||||||
|
|
||||||
@@ -28,12 +39,33 @@ var objectProto = Object.prototype;
|
|||||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to resolve the `toStringTag` of values.
|
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||||
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
|
* of values.
|
||||||
* for more details.
|
|
||||||
*/
|
*/
|
||||||
var objToString = objectProto.toString;
|
var objToString = objectProto.toString;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A specialized version of `_.some` for arrays without support for callback
|
||||||
|
* shorthands and `this` binding.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to iterate over.
|
||||||
|
* @param {Function} predicate The function invoked per iteration.
|
||||||
|
* @returns {boolean} Returns `true` if any element passes the predicate check,
|
||||||
|
* else `false`.
|
||||||
|
*/
|
||||||
|
function arraySome(array, predicate) {
|
||||||
|
var index = -1,
|
||||||
|
length = array.length;
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
if (predicate(array[index], index, array)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.isEqual` without support for `this` binding
|
* The base implementation of `_.isEqual` without support for `this` binding
|
||||||
* `customizer` functions.
|
* `customizer` functions.
|
||||||
@@ -42,27 +74,19 @@ var objToString = objectProto.toString;
|
|||||||
* @param {*} value The value to compare.
|
* @param {*} value The value to compare.
|
||||||
* @param {*} other The other value to compare.
|
* @param {*} other The other value to compare.
|
||||||
* @param {Function} [customizer] The function to customize comparing values.
|
* @param {Function} [customizer] The function to customize comparing values.
|
||||||
* @param {boolean} [isWhere] Specify performing partial comparisons.
|
* @param {boolean} [isLoose] Specify performing partial comparisons.
|
||||||
* @param {Array} [stackA] Tracks traversed `value` objects.
|
* @param {Array} [stackA] Tracks traversed `value` objects.
|
||||||
* @param {Array} [stackB] Tracks traversed `other` objects.
|
* @param {Array} [stackB] Tracks traversed `other` objects.
|
||||||
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
||||||
*/
|
*/
|
||||||
function baseIsEqual(value, other, customizer, isWhere, stackA, stackB) {
|
function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) {
|
||||||
// Exit early for identical values.
|
|
||||||
if (value === other) {
|
if (value === other) {
|
||||||
// Treat `+0` vs. `-0` as not equal.
|
return true;
|
||||||
return value !== 0 || (1 / value == 1 / other);
|
|
||||||
}
|
}
|
||||||
var valType = typeof value,
|
if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
|
||||||
othType = typeof other;
|
|
||||||
|
|
||||||
// Exit early for unlike primitive values.
|
|
||||||
if ((valType != 'function' && valType != 'object' && othType != 'function' && othType != 'object') ||
|
|
||||||
value == null || other == null) {
|
|
||||||
// Return `false` unless both values are `NaN`.
|
|
||||||
return value !== value && other !== other;
|
return value !== value && other !== other;
|
||||||
}
|
}
|
||||||
return baseIsEqualDeep(value, other, baseIsEqual, customizer, isWhere, stackA, stackB);
|
return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -75,12 +99,12 @@ function baseIsEqual(value, other, customizer, isWhere, stackA, stackB) {
|
|||||||
* @param {Object} other The other object to compare.
|
* @param {Object} other The other object to compare.
|
||||||
* @param {Function} equalFunc The function to determine equivalents of values.
|
* @param {Function} equalFunc The function to determine equivalents of values.
|
||||||
* @param {Function} [customizer] The function to customize comparing objects.
|
* @param {Function} [customizer] The function to customize comparing objects.
|
||||||
* @param {boolean} [isWhere] Specify performing partial comparisons.
|
* @param {boolean} [isLoose] Specify performing partial comparisons.
|
||||||
* @param {Array} [stackA=[]] Tracks traversed `value` objects.
|
* @param {Array} [stackA=[]] Tracks traversed `value` objects.
|
||||||
* @param {Array} [stackB=[]] Tracks traversed `other` objects.
|
* @param {Array} [stackB=[]] Tracks traversed `other` objects.
|
||||||
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
||||||
*/
|
*/
|
||||||
function baseIsEqualDeep(object, other, equalFunc, customizer, isWhere, stackA, stackB) {
|
function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
|
||||||
var objIsArr = isArray(object),
|
var objIsArr = isArray(object),
|
||||||
othIsArr = isArray(other),
|
othIsArr = isArray(other),
|
||||||
objTag = arrayTag,
|
objTag = arrayTag,
|
||||||
@@ -109,11 +133,13 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, isWhere, stackA,
|
|||||||
if (isSameTag && !(objIsArr || objIsObj)) {
|
if (isSameTag && !(objIsArr || objIsObj)) {
|
||||||
return equalByTag(object, other, objTag);
|
return equalByTag(object, other, objTag);
|
||||||
}
|
}
|
||||||
var valWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
|
if (!isLoose) {
|
||||||
othWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
|
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
|
||||||
|
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
|
||||||
|
|
||||||
if (valWrapped || othWrapped) {
|
if (objIsWrapped || othIsWrapped) {
|
||||||
return equalFunc(valWrapped ? object.value() : object, othWrapped ? other.value() : other, customizer, isWhere, stackA, stackB);
|
return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!isSameTag) {
|
if (!isSameTag) {
|
||||||
return false;
|
return false;
|
||||||
@@ -133,7 +159,7 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, isWhere, stackA,
|
|||||||
stackA.push(object);
|
stackA.push(object);
|
||||||
stackB.push(other);
|
stackB.push(other);
|
||||||
|
|
||||||
var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isWhere, stackA, stackB);
|
var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB);
|
||||||
|
|
||||||
stackA.pop();
|
stackA.pop();
|
||||||
stackB.pop();
|
stackB.pop();
|
||||||
@@ -150,48 +176,43 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, isWhere, stackA,
|
|||||||
* @param {Array} other The other array to compare.
|
* @param {Array} other The other array to compare.
|
||||||
* @param {Function} equalFunc The function to determine equivalents of values.
|
* @param {Function} equalFunc The function to determine equivalents of values.
|
||||||
* @param {Function} [customizer] The function to customize comparing arrays.
|
* @param {Function} [customizer] The function to customize comparing arrays.
|
||||||
* @param {boolean} [isWhere] Specify performing partial comparisons.
|
* @param {boolean} [isLoose] Specify performing partial comparisons.
|
||||||
* @param {Array} [stackA] Tracks traversed `value` objects.
|
* @param {Array} [stackA] Tracks traversed `value` objects.
|
||||||
* @param {Array} [stackB] Tracks traversed `other` objects.
|
* @param {Array} [stackB] Tracks traversed `other` objects.
|
||||||
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
|
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
|
||||||
*/
|
*/
|
||||||
function equalArrays(array, other, equalFunc, customizer, isWhere, stackA, stackB) {
|
function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) {
|
||||||
var index = -1,
|
var index = -1,
|
||||||
arrLength = array.length,
|
arrLength = array.length,
|
||||||
othLength = other.length,
|
othLength = other.length;
|
||||||
result = true;
|
|
||||||
|
|
||||||
if (arrLength != othLength && !(isWhere && othLength > arrLength)) {
|
if (arrLength != othLength && !(isLoose && othLength > arrLength)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Deep compare the contents, ignoring non-numeric properties.
|
// Ignore non-index properties.
|
||||||
while (result && ++index < arrLength) {
|
while (++index < arrLength) {
|
||||||
var arrValue = array[index],
|
var arrValue = array[index],
|
||||||
othValue = other[index];
|
othValue = other[index],
|
||||||
|
result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined;
|
||||||
|
|
||||||
result = undefined;
|
if (result !== undefined) {
|
||||||
if (customizer) {
|
if (result) {
|
||||||
result = isWhere
|
continue;
|
||||||
? customizer(othValue, arrValue, index)
|
|
||||||
: customizer(arrValue, othValue, index);
|
|
||||||
}
|
|
||||||
if (typeof result == 'undefined') {
|
|
||||||
// Recursively compare arrays (susceptible to call stack limits).
|
|
||||||
if (isWhere) {
|
|
||||||
var othIndex = othLength;
|
|
||||||
while (othIndex--) {
|
|
||||||
othValue = other[othIndex];
|
|
||||||
result = (arrValue && arrValue === othValue) || equalFunc(arrValue, othValue, customizer, isWhere, stackA, stackB);
|
|
||||||
if (result) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
result = (arrValue && arrValue === othValue) || equalFunc(arrValue, othValue, customizer, isWhere, stackA, stackB);
|
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// Recursively compare arrays (susceptible to call stack limits).
|
||||||
|
if (isLoose) {
|
||||||
|
if (!arraySome(other, function(othValue) {
|
||||||
|
return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);
|
||||||
|
})) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return !!result;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -202,7 +223,7 @@ function equalArrays(array, other, equalFunc, customizer, isWhere, stackA, stack
|
|||||||
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Object} value The object to compare.
|
* @param {Object} object The object to compare.
|
||||||
* @param {Object} other The other object to compare.
|
* @param {Object} other The other object to compare.
|
||||||
* @param {string} tag The `toStringTag` of the objects to compare.
|
* @param {string} tag The `toStringTag` of the objects to compare.
|
||||||
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
||||||
@@ -222,8 +243,7 @@ function equalByTag(object, other, tag) {
|
|||||||
// Treat `NaN` vs. `NaN` as equal.
|
// Treat `NaN` vs. `NaN` as equal.
|
||||||
return (object != +object)
|
return (object != +object)
|
||||||
? other != +other
|
? other != +other
|
||||||
// But, treat `-0` vs. `+0` as not equal.
|
: object == +other;
|
||||||
: (object == 0 ? ((1 / object) == (1 / other)) : object == +other);
|
|
||||||
|
|
||||||
case regexpTag:
|
case regexpTag:
|
||||||
case stringTag:
|
case stringTag:
|
||||||
@@ -243,48 +263,41 @@ function equalByTag(object, other, tag) {
|
|||||||
* @param {Object} other The other object to compare.
|
* @param {Object} other The other object to compare.
|
||||||
* @param {Function} equalFunc The function to determine equivalents of values.
|
* @param {Function} equalFunc The function to determine equivalents of values.
|
||||||
* @param {Function} [customizer] The function to customize comparing values.
|
* @param {Function} [customizer] The function to customize comparing values.
|
||||||
* @param {boolean} [isWhere] Specify performing partial comparisons.
|
* @param {boolean} [isLoose] Specify performing partial comparisons.
|
||||||
* @param {Array} [stackA] Tracks traversed `value` objects.
|
* @param {Array} [stackA] Tracks traversed `value` objects.
|
||||||
* @param {Array} [stackB] Tracks traversed `other` objects.
|
* @param {Array} [stackB] Tracks traversed `other` objects.
|
||||||
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
||||||
*/
|
*/
|
||||||
function equalObjects(object, other, equalFunc, customizer, isWhere, stackA, stackB) {
|
function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
|
||||||
var objProps = keys(object),
|
var objProps = keys(object),
|
||||||
objLength = objProps.length,
|
objLength = objProps.length,
|
||||||
othProps = keys(other),
|
othProps = keys(other),
|
||||||
othLength = othProps.length;
|
othLength = othProps.length;
|
||||||
|
|
||||||
if (objLength != othLength && !isWhere) {
|
if (objLength != othLength && !isLoose) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var hasCtor,
|
var index = objLength;
|
||||||
index = -1;
|
while (index--) {
|
||||||
|
var key = objProps[index];
|
||||||
while (++index < objLength) {
|
if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) {
|
||||||
var key = objProps[index],
|
|
||||||
result = hasOwnProperty.call(other, key);
|
|
||||||
|
|
||||||
if (result) {
|
|
||||||
var objValue = object[key],
|
|
||||||
othValue = other[key];
|
|
||||||
|
|
||||||
result = undefined;
|
|
||||||
if (customizer) {
|
|
||||||
result = isWhere
|
|
||||||
? customizer(othValue, objValue, key)
|
|
||||||
: customizer(objValue, othValue, key);
|
|
||||||
}
|
|
||||||
if (typeof result == 'undefined') {
|
|
||||||
// Recursively compare objects (susceptible to call stack limits).
|
|
||||||
result = (objValue && objValue === othValue) || equalFunc(objValue, othValue, customizer, isWhere, stackA, stackB);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!result) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
hasCtor || (hasCtor = key == 'constructor');
|
|
||||||
}
|
}
|
||||||
if (!hasCtor) {
|
var skipCtor = isLoose;
|
||||||
|
while (++index < objLength) {
|
||||||
|
key = objProps[index];
|
||||||
|
var objValue = object[key],
|
||||||
|
othValue = other[key],
|
||||||
|
result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined;
|
||||||
|
|
||||||
|
// Recursively compare objects (susceptible to call stack limits).
|
||||||
|
if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
skipCtor || (skipCtor = key == 'constructor');
|
||||||
|
}
|
||||||
|
if (!skipCtor) {
|
||||||
var objCtor = object.constructor,
|
var objCtor = object.constructor,
|
||||||
othCtor = other.constructor;
|
othCtor = other.constructor;
|
||||||
|
|
||||||
@@ -299,4 +312,31 @@ function equalObjects(object, other, equalFunc, customizer, isWhere, stackA, sta
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
||||||
|
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isObject({});
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject([1, 2, 3]);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject(1);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isObject(value) {
|
||||||
|
// Avoid a V8 JIT bug in Chrome 19-20.
|
||||||
|
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
||||||
|
var type = typeof value;
|
||||||
|
return !!value && (type == 'object' || type == 'function');
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = baseIsEqual;
|
module.exports = baseIsEqual;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._baseisequal",
|
"name": "lodash._baseisequal",
|
||||||
"version": "3.0.2",
|
"version": "3.0.7",
|
||||||
"description": "The modern build of lodash’s internal `baseIsEqual` as a module.",
|
"description": "The modern build of lodash’s internal `baseIsEqual` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
|||||||
20
lodash._baseismatch/README.md
Normal file
20
lodash._baseismatch/README.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# lodash._baseismatch v3.1.3
|
||||||
|
|
||||||
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseIsMatch` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Using npm:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ {sudo -H} npm i -g npm
|
||||||
|
$ npm i --save lodash._baseismatch
|
||||||
|
```
|
||||||
|
|
||||||
|
In Node.js/io.js:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var baseIsMatch = require('lodash._baseismatch');
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [package source](https://github.com/lodash/lodash/blob/3.1.3-npm-packages/lodash._baseismatch) for more details.
|
||||||
97
lodash._baseismatch/index.js
Normal file
97
lodash._baseismatch/index.js
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
/**
|
||||||
|
* lodash 3.1.3 (Custom Build) <https://lodash.com/>
|
||||||
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
* 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>
|
||||||
|
*/
|
||||||
|
var baseIsEqual = require('lodash._baseisequal');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.isMatch` without support for callback
|
||||||
|
* shorthands and `this` binding.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The object to inspect.
|
||||||
|
* @param {Array} matchData The propery names, values, and compare flags to match.
|
||||||
|
* @param {Function} [customizer] The function to customize comparing objects.
|
||||||
|
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
|
||||||
|
*/
|
||||||
|
function baseIsMatch(object, matchData, customizer) {
|
||||||
|
var index = matchData.length,
|
||||||
|
length = index,
|
||||||
|
noCustomizer = !customizer;
|
||||||
|
|
||||||
|
if (object == null) {
|
||||||
|
return !length;
|
||||||
|
}
|
||||||
|
object = toObject(object);
|
||||||
|
while (index--) {
|
||||||
|
var data = matchData[index];
|
||||||
|
if ((noCustomizer && data[2])
|
||||||
|
? data[1] !== object[data[0]]
|
||||||
|
: !(data[0] in object)
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while (++index < length) {
|
||||||
|
data = matchData[index];
|
||||||
|
var key = data[0],
|
||||||
|
objValue = object[key],
|
||||||
|
srcValue = data[1];
|
||||||
|
|
||||||
|
if (noCustomizer && data[2]) {
|
||||||
|
if (objValue === undefined && !(key in object)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
var result = customizer ? customizer(objValue, srcValue, key) : undefined;
|
||||||
|
if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts `value` to an object if it's not one.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to process.
|
||||||
|
* @returns {Object} Returns the object.
|
||||||
|
*/
|
||||||
|
function toObject(value) {
|
||||||
|
return isObject(value) ? value : Object(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
||||||
|
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isObject({});
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject([1, 2, 3]);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject(1);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isObject(value) {
|
||||||
|
// Avoid a V8 JIT bug in Chrome 19-20.
|
||||||
|
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
||||||
|
var type = typeof value;
|
||||||
|
return !!value && (type == 'object' || type == 'function');
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = baseIsMatch;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._basefor",
|
"name": "lodash._baseismatch",
|
||||||
"version": "3.0.2",
|
"version": "3.1.3",
|
||||||
"description": "The modern build of lodash’s internal `baseFor` as a module.",
|
"description": "The modern build of lodash’s internal `baseIsMatch` 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",
|
||||||
@@ -14,5 +14,8 @@
|
|||||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||||
],
|
],
|
||||||
"repository": "lodash/lodash",
|
"repository": "lodash/lodash",
|
||||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
|
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||||
|
"dependencies": {
|
||||||
|
"lodash._baseisequal": "^3.0.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
20
lodash._basematches/README.md
Normal file
20
lodash._basematches/README.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# lodash._basematches v3.2.0
|
||||||
|
|
||||||
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseMatches` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Using npm:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ {sudo -H} npm i -g npm
|
||||||
|
$ npm i --save lodash._basematches
|
||||||
|
```
|
||||||
|
|
||||||
|
In Node.js/io.js:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var baseMatches = require('lodash._basematches');
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [package source](https://github.com/lodash/lodash/blob/3.2.0-npm-packages/lodash._basematches) for more details.
|
||||||
104
lodash._basematches/index.js
Normal file
104
lodash._basematches/index.js
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
/**
|
||||||
|
* lodash 3.2.0 (Custom Build) <https://lodash.com/>
|
||||||
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
* 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>
|
||||||
|
*/
|
||||||
|
var baseIsMatch = require('lodash._baseismatch'),
|
||||||
|
pairs = require('lodash.pairs');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.matches` which does not clone `source`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} source The object of property values to match.
|
||||||
|
* @returns {Function} Returns the new function.
|
||||||
|
*/
|
||||||
|
function baseMatches(source) {
|
||||||
|
var matchData = getMatchData(source);
|
||||||
|
if (matchData.length == 1 && matchData[0][2]) {
|
||||||
|
var key = matchData[0][0],
|
||||||
|
value = matchData[0][1];
|
||||||
|
|
||||||
|
return function(object) {
|
||||||
|
if (object == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return object[key] === value && (value !== undefined || (key in toObject(object)));
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return function(object) {
|
||||||
|
return baseIsMatch(object, matchData);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the propery names, values, and compare flags of `object`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The object to query.
|
||||||
|
* @returns {Array} Returns the match data of `object`.
|
||||||
|
*/
|
||||||
|
function getMatchData(object) {
|
||||||
|
var result = pairs(object),
|
||||||
|
length = result.length;
|
||||||
|
|
||||||
|
while (length--) {
|
||||||
|
result[length][2] = isStrictComparable(result[length][1]);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` if suitable for strict
|
||||||
|
* equality comparisons, else `false`.
|
||||||
|
*/
|
||||||
|
function isStrictComparable(value) {
|
||||||
|
return value === value && !isObject(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts `value` to an object if it's not one.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to process.
|
||||||
|
* @returns {Object} Returns the object.
|
||||||
|
*/
|
||||||
|
function toObject(value) {
|
||||||
|
return isObject(value) ? value : Object(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
||||||
|
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isObject({});
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject([1, 2, 3]);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject(1);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isObject(value) {
|
||||||
|
// Avoid a V8 JIT bug in Chrome 19-20.
|
||||||
|
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
||||||
|
var type = typeof value;
|
||||||
|
return !!value && (type == 'object' || type == 'function');
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = baseMatches;
|
||||||
22
lodash._basematches/package.json
Normal file
22
lodash._basematches/package.json
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"name": "lodash._basematches",
|
||||||
|
"version": "3.2.0",
|
||||||
|
"description": "The modern build of lodash’s internal `baseMatches` as a module.",
|
||||||
|
"homepage": "https://lodash.com/",
|
||||||
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
"license": "MIT",
|
||||||
|
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"contributors": [
|
||||||
|
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
|
||||||
|
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
|
||||||
|
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
||||||
|
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||||
|
],
|
||||||
|
"repository": "lodash/lodash",
|
||||||
|
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||||
|
"dependencies": {
|
||||||
|
"lodash._baseismatch": "^3.0.0",
|
||||||
|
"lodash.pairs": "^3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
20
lodash._basematchesproperty/README.md
Normal file
20
lodash._basematchesproperty/README.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# lodash._basematchesproperty v3.2.1
|
||||||
|
|
||||||
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseMatchesProperty` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Using npm:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ {sudo -H} npm i -g npm
|
||||||
|
$ npm i --save lodash._basematchesproperty
|
||||||
|
```
|
||||||
|
|
||||||
|
In Node.js/io.js:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var baseMatchesProperty = require('lodash._basematchesproperty');
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [package source](https://github.com/lodash/lodash/blob/3.2.1-npm-packages/lodash._basematchesproperty) for more details.
|
||||||
82
lodash._basematchesproperty/index.js
Normal file
82
lodash._basematchesproperty/index.js
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
/**
|
||||||
|
* lodash 3.2.1 (Custom Build) <https://lodash.com/>
|
||||||
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
|
||||||
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
|
* Available under MIT license <https://lodash.com/license>
|
||||||
|
*/
|
||||||
|
var baseIsEqual = require('lodash._baseisequal');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.matchesProperty` which does not coerce `key`
|
||||||
|
* to a string.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {string} key The key of the property to get.
|
||||||
|
* @param {*} value The value to compare.
|
||||||
|
* @returns {Function} Returns the new function.
|
||||||
|
*/
|
||||||
|
function baseMatchesProperty(key, value) {
|
||||||
|
if (isStrictComparable(value)) {
|
||||||
|
return function(object) {
|
||||||
|
return object != null && object[key] === value &&
|
||||||
|
(typeof value != 'undefined' || (key in toObject(object)));
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return function(object) {
|
||||||
|
return object != null && baseIsEqual(value, object[key], null, true);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` if suitable for strict
|
||||||
|
* equality comparisons, else `false`.
|
||||||
|
*/
|
||||||
|
function isStrictComparable(value) {
|
||||||
|
return value === value && (value === 0 ? ((1 / value) > 0) : !isObject(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts `value` to an object if it is not one.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to process.
|
||||||
|
* @returns {Object} Returns the object.
|
||||||
|
*/
|
||||||
|
function toObject(value) {
|
||||||
|
return isObject(value) ? value : Object(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
||||||
|
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isObject({});
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject([1, 2, 3]);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject(1);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isObject(value) {
|
||||||
|
// Avoid a V8 JIT bug in Chrome 19-20.
|
||||||
|
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
||||||
|
var type = typeof value;
|
||||||
|
return type == 'function' || (!!value && type == 'object');
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = baseMatchesProperty;
|
||||||
21
lodash._basematchesproperty/package.json
Normal file
21
lodash._basematchesproperty/package.json
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"name": "lodash._basematchesproperty",
|
||||||
|
"version": "3.2.1",
|
||||||
|
"description": "The modern build of lodash’s internal `baseMatchesProperty` as a module.",
|
||||||
|
"homepage": "https://lodash.com/",
|
||||||
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
"license": "MIT",
|
||||||
|
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"contributors": [
|
||||||
|
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
|
||||||
|
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
|
||||||
|
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
||||||
|
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||||
|
],
|
||||||
|
"repository": "lodash/lodash",
|
||||||
|
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||||
|
"dependencies": {
|
||||||
|
"lodash._baseisequal": "^3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# lodash._basereduce v3.0.2
|
|
||||||
|
|
||||||
The internal [lodash](https://lodash.com/) function `baseReduce` exported as a [Node.js](https://nodejs.org/) module.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
Using npm:
|
|
||||||
```bash
|
|
||||||
$ {sudo -H} npm i -g npm
|
|
||||||
$ npm i --save lodash._basereduce
|
|
||||||
```
|
|
||||||
|
|
||||||
In Node.js:
|
|
||||||
```js
|
|
||||||
var baseReduce = require('lodash._basereduce');
|
|
||||||
```
|
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._basereduce) for more details.
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
/**
|
|
||||||
* lodash 3.0.2 (Custom Build) <https://lodash.com/>
|
|
||||||
* Build: `lodash modularize exports="npm" -o ./`
|
|
||||||
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
||||||
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
||||||
* Available under MIT license <https://lodash.com/license>
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The base implementation of `_.reduce` and `_.reduceRight`, without support
|
|
||||||
* for iteratee shorthands, which iterates over `collection` using `eachFunc`.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {Array|Object} collection The collection to iterate over.
|
|
||||||
* @param {Function} iteratee The function invoked per iteration.
|
|
||||||
* @param {*} accumulator The initial value.
|
|
||||||
* @param {boolean} initAccum Specify using the first or last element of
|
|
||||||
* `collection` as the initial value.
|
|
||||||
* @param {Function} eachFunc The function to iterate over `collection`.
|
|
||||||
* @returns {*} Returns the accumulated value.
|
|
||||||
*/
|
|
||||||
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
|
|
||||||
eachFunc(collection, function(value, index, collection) {
|
|
||||||
accumulator = initAccum
|
|
||||||
? (initAccum = false, value)
|
|
||||||
: iteratee(accumulator, value, index, collection);
|
|
||||||
});
|
|
||||||
return accumulator;
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = baseReduce;
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash._baseslice v3.0.2
|
# lodash._baseslice v3.0.3
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseSlice` 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 `baseSlice` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var baseSlice = require('lodash._baseslice');
|
var baseSlice = require('lodash._baseslice');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._baseslice) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._baseslice) for more details.
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.0.2 (Custom Build) <https://lodash.com/>
|
* lodash 3.0.3 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
* Available under MIT license <https://lodash.com/license>
|
||||||
*/
|
*/
|
||||||
@@ -24,7 +24,7 @@ function baseSlice(array, start, end) {
|
|||||||
if (start < 0) {
|
if (start < 0) {
|
||||||
start = -start > length ? 0 : (length + start);
|
start = -start > length ? 0 : (length + start);
|
||||||
}
|
}
|
||||||
end = (typeof end == 'undefined' || end > length) ? length : (+end || 0);
|
end = (end === undefined || end > length) ? length : (+end || 0);
|
||||||
if (end < 0) {
|
if (end < 0) {
|
||||||
end += length;
|
end += length;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._baseslice",
|
"name": "lodash._baseslice",
|
||||||
"version": "3.0.2",
|
"version": "3.0.3",
|
||||||
"description": "The modern build of lodash’s internal `baseSlice` as a module.",
|
"description": "The modern build of lodash’s internal `baseSlice` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash._baseuniq v3.0.2
|
# lodash._baseuniq v3.0.3
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseUniq` 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 `baseUniq` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var baseUniq = require('lodash._baseuniq');
|
var baseUniq = require('lodash._baseuniq');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._baseuniq) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._baseuniq) for more details.
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.0.2 (Custom Build) <https://lodash.com/>
|
* lodash 3.0.3 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
* Available under MIT license <https://lodash.com/license>
|
||||||
*/
|
*/
|
||||||
@@ -10,6 +10,9 @@ var baseIndexOf = require('lodash._baseindexof'),
|
|||||||
cacheIndexOf = require('lodash._cacheindexof'),
|
cacheIndexOf = require('lodash._cacheindexof'),
|
||||||
createCache = require('lodash._createcache');
|
createCache = require('lodash._createcache');
|
||||||
|
|
||||||
|
/** Used as the size to enable large array optimizations. */
|
||||||
|
var LARGE_ARRAY_SIZE = 200;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.uniq` without support for callback shorthands
|
* The base implementation of `_.uniq` without support for callback shorthands
|
||||||
* and `this` binding.
|
* and `this` binding.
|
||||||
@@ -17,14 +20,14 @@ var baseIndexOf = require('lodash._baseindexof'),
|
|||||||
* @private
|
* @private
|
||||||
* @param {Array} array The array to inspect.
|
* @param {Array} array The array to inspect.
|
||||||
* @param {Function} [iteratee] The function invoked per iteration.
|
* @param {Function} [iteratee] The function invoked per iteration.
|
||||||
* @returns {Array} Returns the new duplicate-value-free array.
|
* @returns {Array} Returns the new duplicate free array.
|
||||||
*/
|
*/
|
||||||
function baseUniq(array, iteratee) {
|
function baseUniq(array, iteratee) {
|
||||||
var index = -1,
|
var index = -1,
|
||||||
indexOf = baseIndexOf,
|
indexOf = baseIndexOf,
|
||||||
length = array.length,
|
length = array.length,
|
||||||
isCommon = true,
|
isCommon = true,
|
||||||
isLarge = isCommon && length >= 200,
|
isLarge = isCommon && length >= LARGE_ARRAY_SIZE,
|
||||||
seen = isLarge ? createCache() : null,
|
seen = isLarge ? createCache() : null,
|
||||||
result = [];
|
result = [];
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._baseuniq",
|
"name": "lodash._baseuniq",
|
||||||
"version": "3.0.2",
|
"version": "3.0.3",
|
||||||
"description": "The modern build of lodash’s internal `baseUniq` as a module.",
|
"description": "The modern build of lodash’s internal `baseUniq` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash._binaryindexby v3.0.2
|
# lodash._binaryindexby v3.0.3
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `binaryIndexBy` 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 `binaryIndexBy` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var binaryIndexBy = require('lodash._binaryindexby');
|
var binaryIndexBy = require('lodash._binaryindexby');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._binaryindexby) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._binaryindexby) for more details.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.0.2 (Custom Build) <https://lodash.com/>
|
* lodash 3.0.3 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
@@ -7,11 +7,9 @@
|
|||||||
* Available under MIT license <https://lodash.com/license>
|
* Available under MIT license <https://lodash.com/license>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** Native method references. */
|
|
||||||
var floor = Math.floor;
|
|
||||||
|
|
||||||
/* Native method references for those with the same name as other `lodash` methods. */
|
/* Native method references for those with the same name as other `lodash` methods. */
|
||||||
var nativeMin = Math.min;
|
var nativeFloor = Math.floor,
|
||||||
|
nativeMin = Math.min;
|
||||||
|
|
||||||
/** Used as references for the maximum length and index of an array. */
|
/** Used as references for the maximum length and index of an array. */
|
||||||
var MAX_ARRAY_LENGTH = 4294967295,
|
var MAX_ARRAY_LENGTH = 4294967295,
|
||||||
@@ -40,7 +38,7 @@ function binaryIndexBy(array, value, iteratee, retHighest) {
|
|||||||
valIsUndef = value === undefined;
|
valIsUndef = value === undefined;
|
||||||
|
|
||||||
while (low < high) {
|
while (low < high) {
|
||||||
var mid = floor((low + high) / 2),
|
var mid = nativeFloor((low + high) / 2),
|
||||||
computed = iteratee(array[mid]),
|
computed = iteratee(array[mid]),
|
||||||
isDef = computed !== undefined,
|
isDef = computed !== undefined,
|
||||||
isReflexive = computed === computed;
|
isReflexive = computed === computed;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._binaryindexby",
|
"name": "lodash._binaryindexby",
|
||||||
"version": "3.0.2",
|
"version": "3.0.3",
|
||||||
"description": "The modern build of lodash’s internal `binaryIndexBy` as a module.",
|
"description": "The modern build of lodash’s internal `binaryIndexBy` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
|
Based on Underscore.js, copyright 2009-2015 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
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash._createassigner v3.0.1
|
# lodash._createassigner v3.1.1
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createAssigner` 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 `createAssigner` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var createAssigner = require('lodash._createassigner');
|
var createAssigner = require('lodash._createassigner');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._createassigner) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash._createassigner) for more details.
|
||||||
|
|||||||
@@ -1,57 +1,49 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.0.1 (Custom Build) <https://lodash.com/>
|
* lodash 3.1.1 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
* Available under MIT license <https://lodash.com/license>
|
||||||
*/
|
*/
|
||||||
var bindCallback = require('lodash._bindcallback'),
|
var bindCallback = require('lodash._bindcallback'),
|
||||||
isIterateeCall = require('lodash._isiterateecall');
|
isIterateeCall = require('lodash._isiterateecall'),
|
||||||
|
restParam = require('lodash.restparam');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a function that assigns properties of source object(s) to a given
|
* Creates a `_.assign`, `_.defaults`, or `_.merge` function.
|
||||||
* destination object.
|
|
||||||
*
|
|
||||||
* **Note:** This function is used to create `_.assign`, `_.defaults`, and `_.merge`.
|
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Function} assigner The function to assign values.
|
* @param {Function} assigner The function to assign values.
|
||||||
* @returns {Function} Returns the new assigner function.
|
* @returns {Function} Returns the new assigner function.
|
||||||
*/
|
*/
|
||||||
function createAssigner(assigner) {
|
function createAssigner(assigner) {
|
||||||
return function() {
|
return restParam(function(object, sources) {
|
||||||
var args = arguments,
|
var index = -1,
|
||||||
length = args.length,
|
length = object == null ? 0 : sources.length,
|
||||||
object = args[0];
|
customizer = length > 2 ? sources[length - 2] : undefined,
|
||||||
|
guard = length > 2 ? sources[2] : undefined,
|
||||||
|
thisArg = length > 1 ? sources[length - 1] : undefined;
|
||||||
|
|
||||||
if (length < 2 || object == null) {
|
if (typeof customizer == 'function') {
|
||||||
return object;
|
|
||||||
}
|
|
||||||
var customizer = args[length - 2],
|
|
||||||
thisArg = args[length - 1],
|
|
||||||
guard = args[3];
|
|
||||||
|
|
||||||
if (length > 3 && typeof customizer == 'function') {
|
|
||||||
customizer = bindCallback(customizer, thisArg, 5);
|
customizer = bindCallback(customizer, thisArg, 5);
|
||||||
length -= 2;
|
length -= 2;
|
||||||
} else {
|
} else {
|
||||||
customizer = (length > 2 && typeof thisArg == 'function') ? thisArg : null;
|
customizer = typeof thisArg == 'function' ? thisArg : undefined;
|
||||||
length -= (customizer ? 1 : 0);
|
length -= (customizer ? 1 : 0);
|
||||||
}
|
}
|
||||||
if (guard && isIterateeCall(args[1], args[2], guard)) {
|
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
||||||
customizer = length == 3 ? null : customizer;
|
customizer = length < 3 ? undefined : customizer;
|
||||||
length = 2;
|
length = 1;
|
||||||
}
|
}
|
||||||
var index = 0;
|
|
||||||
while (++index < length) {
|
while (++index < length) {
|
||||||
var source = args[index];
|
var source = sources[index];
|
||||||
if (source) {
|
if (source) {
|
||||||
assigner(object, source, customizer);
|
assigner(object, source, customizer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return object;
|
return object;
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = createAssigner;
|
module.exports = createAssigner;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._createassigner",
|
"name": "lodash._createassigner",
|
||||||
"version": "3.0.1",
|
"version": "3.1.1",
|
||||||
"description": "The modern build of lodash’s internal `createAssigner` as a module.",
|
"description": "The modern build of lodash’s internal `createAssigner` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
@@ -17,6 +17,7 @@
|
|||||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lodash._bindcallback": "^3.0.0",
|
"lodash._bindcallback": "^3.0.0",
|
||||||
"lodash._isiterateecall": "^3.0.0"
|
"lodash._isiterateecall": "^3.0.0",
|
||||||
|
"lodash.restparam": "^3.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash._createcache v3.0.1
|
# lodash._createcache v3.1.2
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createCache` 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 `createCache` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var createCache = require('lodash._createcache');
|
var createCache = require('lodash._createcache');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._createcache) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/3.1.2-npm-packages/lodash._createcache) for more details.
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.0.1 (Custom Build) <https://lodash.com/>
|
* lodash 3.1.2 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
* Available under MIT license <https://lodash.com/license>
|
||||||
*/
|
*/
|
||||||
var isNative = require('lodash.isnative');
|
var getNative = require('lodash._getnative');
|
||||||
|
|
||||||
/** Native method references. */
|
/** Native method references. */
|
||||||
var Set = isNative(Set = global.Set) && Set;
|
var Set = getNative(global, 'Set');
|
||||||
|
|
||||||
/* Native method references for those with the same name as other `lodash` methods. */
|
/* Native method references for those with the same name as other `lodash` methods. */
|
||||||
var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate;
|
var nativeCreate = getNative(Object, 'create');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -54,9 +54,9 @@ function cachePush(value) {
|
|||||||
* @param {Array} [values] The values to cache.
|
* @param {Array} [values] The values to cache.
|
||||||
* @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`.
|
* @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`.
|
||||||
*/
|
*/
|
||||||
var createCache = !(nativeCreate && Set) ? constant(null) : function(values) {
|
function createCache(values) {
|
||||||
return new SetCache(values);
|
return (nativeCreate && Set) ? new SetCache(values) : null;
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
||||||
@@ -82,29 +82,7 @@ function isObject(value) {
|
|||||||
// Avoid a V8 JIT bug in Chrome 19-20.
|
// Avoid a V8 JIT bug in Chrome 19-20.
|
||||||
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
||||||
var type = typeof value;
|
var type = typeof value;
|
||||||
return type == 'function' || (!!value && type == 'object');
|
return !!value && (type == 'object' || type == 'function');
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a function that returns `value`.
|
|
||||||
*
|
|
||||||
* @static
|
|
||||||
* @memberOf _
|
|
||||||
* @category Utility
|
|
||||||
* @param {*} value The value to return from the new function.
|
|
||||||
* @returns {Function} Returns the new function.
|
|
||||||
* @example
|
|
||||||
*
|
|
||||||
* var object = { 'user': 'fred' };
|
|
||||||
* var getter = _.constant(object);
|
|
||||||
*
|
|
||||||
* getter() === object;
|
|
||||||
* // => true
|
|
||||||
*/
|
|
||||||
function constant(value) {
|
|
||||||
return function() {
|
|
||||||
return value;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add functions to the `Set` cache.
|
// Add functions to the `Set` cache.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._createcache",
|
"name": "lodash._createcache",
|
||||||
"version": "3.0.1",
|
"version": "3.1.2",
|
||||||
"description": "The modern build of lodash’s internal `createCache` as a module.",
|
"description": "The modern build of lodash’s internal `createCache` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
@@ -16,6 +16,6 @@
|
|||||||
"repository": "lodash/lodash",
|
"repository": "lodash/lodash",
|
||||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lodash.isnative": "^3.0.0"
|
"lodash._getnative": "^3.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,18 @@
|
|||||||
# lodash._createwrapper v3.0.2
|
# lodash._createwrapper v3.2.0
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createWrapper` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
The internal [lodash](https://lodash.com/) function `createWrapper` exported as a [Node.js](https://nodejs.org/) module.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Using npm:
|
Using npm:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ {sudo -H} npm i -g npm
|
$ {sudo -H} npm i -g npm
|
||||||
$ npm i --save lodash._createwrapper
|
$ npm i --save lodash._createwrapper
|
||||||
```
|
```
|
||||||
|
|
||||||
In Node.js/io.js:
|
In Node.js:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var createWrapper = require('lodash._createwrapper');
|
var createWrapper = require('lodash._createwrapper');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._createwrapper) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/3.2.0-npm-packages/lodash._createwrapper) for more details.
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.0.2 (Custom Build) <https://lodash.com/>
|
* lodash 3.2.0 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
* Available under MIT license <https://lodash.com/license>
|
||||||
*/
|
*/
|
||||||
var arrayCopy = require('lodash._arraycopy'),
|
var root = require('lodash._root');
|
||||||
baseCreate = require('lodash._basecreate'),
|
|
||||||
replaceHolders = require('lodash._replaceholders');
|
|
||||||
|
|
||||||
/** Used to compose bitmasks for wrapper metadata. */
|
/** Used to compose bitmasks for wrapper metadata. */
|
||||||
var BIND_FLAG = 1,
|
var BIND_FLAG = 1,
|
||||||
@@ -18,21 +16,134 @@ var BIND_FLAG = 1,
|
|||||||
CURRY_RIGHT_FLAG = 16,
|
CURRY_RIGHT_FLAG = 16,
|
||||||
PARTIAL_FLAG = 32,
|
PARTIAL_FLAG = 32,
|
||||||
PARTIAL_RIGHT_FLAG = 64,
|
PARTIAL_RIGHT_FLAG = 64,
|
||||||
ARY_FLAG = 256;
|
ARY_FLAG = 128,
|
||||||
|
FLIP_FLAG = 512;
|
||||||
|
|
||||||
/** Used as the `TypeError` message for "Functions" methods. */
|
/** Used as the `TypeError` message for "Functions" methods. */
|
||||||
var FUNC_ERROR_TEXT = 'Expected a function';
|
var FUNC_ERROR_TEXT = 'Expected a function';
|
||||||
|
|
||||||
/* Native method references for those with the same name as other `lodash` methods. */
|
/** Used as references for various `Number` constants. */
|
||||||
|
var INFINITY = 1 / 0,
|
||||||
|
MAX_SAFE_INTEGER = 9007199254740991,
|
||||||
|
MAX_INTEGER = 1.7976931348623157e+308,
|
||||||
|
NAN = 0 / 0;
|
||||||
|
|
||||||
|
/** Used as the internal argument placeholder. */
|
||||||
|
var PLACEHOLDER = '__lodash_placeholder__';
|
||||||
|
|
||||||
|
/** `Object#toString` result references. */
|
||||||
|
var funcTag = '[object Function]',
|
||||||
|
genTag = '[object GeneratorFunction]';
|
||||||
|
|
||||||
|
/** Used to match leading and trailing whitespace. */
|
||||||
|
var reTrim = /^\s+|\s+$/g;
|
||||||
|
|
||||||
|
/** Used to detect bad signed hexadecimal string values. */
|
||||||
|
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
||||||
|
|
||||||
|
/** Used to detect binary string values. */
|
||||||
|
var reIsBinary = /^0b[01]+$/i;
|
||||||
|
|
||||||
|
/** Used to detect octal string values. */
|
||||||
|
var reIsOctal = /^0o[0-7]+$/i;
|
||||||
|
|
||||||
|
/** Used to detect unsigned integer values. */
|
||||||
|
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
||||||
|
|
||||||
|
/** Built-in method references without a dependency on `root`. */
|
||||||
|
var freeParseInt = parseInt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A faster alternative to `Function#apply`, this function invokes `func`
|
||||||
|
* with the `this` binding of `thisArg` and the arguments of `args`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Function} func The function to invoke.
|
||||||
|
* @param {*} thisArg The `this` binding of `func`.
|
||||||
|
* @param {...*} args The arguments to invoke `func` with.
|
||||||
|
* @returns {*} Returns the result of `func`.
|
||||||
|
*/
|
||||||
|
function apply(func, thisArg, args) {
|
||||||
|
var length = args.length;
|
||||||
|
switch (length) {
|
||||||
|
case 0: return func.call(thisArg);
|
||||||
|
case 1: return func.call(thisArg, args[0]);
|
||||||
|
case 2: return func.call(thisArg, args[0], args[1]);
|
||||||
|
case 3: return func.call(thisArg, args[0], args[1], args[2]);
|
||||||
|
}
|
||||||
|
return func.apply(thisArg, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is a valid array-like index.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
||||||
|
*/
|
||||||
|
function isIndex(value, length) {
|
||||||
|
value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
|
||||||
|
length = length == null ? MAX_SAFE_INTEGER : length;
|
||||||
|
return value > -1 && value % 1 == 0 && value < length;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replaces all `placeholder` elements in `array` with an internal placeholder
|
||||||
|
* and returns an array of their indexes.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to modify.
|
||||||
|
* @param {*} placeholder The placeholder to replace.
|
||||||
|
* @returns {Array} Returns the new array of placeholder indexes.
|
||||||
|
*/
|
||||||
|
function replaceHolders(array, placeholder) {
|
||||||
|
var index = -1,
|
||||||
|
length = array.length,
|
||||||
|
resIndex = -1,
|
||||||
|
result = [];
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
if (array[index] === placeholder) {
|
||||||
|
array[index] = PLACEHOLDER;
|
||||||
|
result[++resIndex] = index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Used for built-in method references. */
|
||||||
|
var objectProto = Object.prototype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||||
|
* of values.
|
||||||
|
*/
|
||||||
|
var objectToString = objectProto.toString;
|
||||||
|
|
||||||
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||||
var nativeMax = Math.max,
|
var nativeMax = Math.max,
|
||||||
nativeMin = Math.min;
|
nativeMin = Math.min;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used as the maximum length of an array-like value.
|
* The base implementation of `_.create` without support for assigning
|
||||||
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
|
* properties to the created object.
|
||||||
* for more details.
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} prototype The object to inherit from.
|
||||||
|
* @returns {Object} Returns the new object.
|
||||||
*/
|
*/
|
||||||
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
|
var baseCreate = (function() {
|
||||||
|
function object() {}
|
||||||
|
return function(prototype) {
|
||||||
|
if (isObject(prototype)) {
|
||||||
|
object.prototype = prototype;
|
||||||
|
var result = new object;
|
||||||
|
object.prototype = undefined;
|
||||||
|
}
|
||||||
|
return result || {};
|
||||||
|
};
|
||||||
|
}());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an array that is the composition of partially applied arguments,
|
* Creates an array that is the composition of partially applied arguments,
|
||||||
@@ -50,7 +161,7 @@ function composeArgs(args, partials, holders) {
|
|||||||
argsLength = nativeMax(args.length - holdersLength, 0),
|
argsLength = nativeMax(args.length - holdersLength, 0),
|
||||||
leftIndex = -1,
|
leftIndex = -1,
|
||||||
leftLength = partials.length,
|
leftLength = partials.length,
|
||||||
result = Array(argsLength + leftLength);
|
result = Array(leftLength + argsLength);
|
||||||
|
|
||||||
while (++leftIndex < leftLength) {
|
while (++leftIndex < leftLength) {
|
||||||
result[leftIndex] = partials[leftIndex];
|
result[leftIndex] = partials[leftIndex];
|
||||||
@@ -86,31 +197,52 @@ function composeArgsRight(args, partials, holders) {
|
|||||||
while (++argsIndex < argsLength) {
|
while (++argsIndex < argsLength) {
|
||||||
result[argsIndex] = args[argsIndex];
|
result[argsIndex] = args[argsIndex];
|
||||||
}
|
}
|
||||||
var pad = argsIndex;
|
var offset = argsIndex;
|
||||||
while (++rightIndex < rightLength) {
|
while (++rightIndex < rightLength) {
|
||||||
result[pad + rightIndex] = partials[rightIndex];
|
result[offset + rightIndex] = partials[rightIndex];
|
||||||
}
|
}
|
||||||
while (++holdersIndex < holdersLength) {
|
while (++holdersIndex < holdersLength) {
|
||||||
result[pad + holders[holdersIndex]] = args[argsIndex++];
|
result[offset + holders[holdersIndex]] = args[argsIndex++];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a function that wraps `func` and invokes it with the `this`
|
* Copies the values of `source` to `array`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} source The array to copy values from.
|
||||||
|
* @param {Array} [array=[]] The array to copy values to.
|
||||||
|
* @returns {Array} Returns `array`.
|
||||||
|
*/
|
||||||
|
function copyArray(source, array) {
|
||||||
|
var index = -1,
|
||||||
|
length = source.length;
|
||||||
|
|
||||||
|
array || (array = Array(length));
|
||||||
|
while (++index < length) {
|
||||||
|
array[index] = source[index];
|
||||||
|
}
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a function that wraps `func` to invoke it with the optional `this`
|
||||||
* binding of `thisArg`.
|
* binding of `thisArg`.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Function} func The function to bind.
|
* @param {Function} func The function to wrap.
|
||||||
|
* @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
|
||||||
* @param {*} [thisArg] The `this` binding of `func`.
|
* @param {*} [thisArg] The `this` binding of `func`.
|
||||||
* @returns {Function} Returns the new bound function.
|
* @returns {Function} Returns the new wrapped function.
|
||||||
*/
|
*/
|
||||||
function createBindWrapper(func, thisArg) {
|
function createBaseWrapper(func, bitmask, thisArg) {
|
||||||
var Ctor = createCtorWrapper(func);
|
var isBind = bitmask & BIND_FLAG,
|
||||||
|
Ctor = createCtorWrapper(func);
|
||||||
|
|
||||||
function wrapper() {
|
function wrapper() {
|
||||||
var fn = (this && this !== global && this instanceof wrapper) ? Ctor : func;
|
var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
|
||||||
return fn.apply(thisArg, arguments);
|
return fn.apply(isBind ? thisArg : this, arguments);
|
||||||
}
|
}
|
||||||
return wrapper;
|
return wrapper;
|
||||||
}
|
}
|
||||||
@@ -125,8 +257,22 @@ function createBindWrapper(func, thisArg) {
|
|||||||
*/
|
*/
|
||||||
function createCtorWrapper(Ctor) {
|
function createCtorWrapper(Ctor) {
|
||||||
return function() {
|
return function() {
|
||||||
|
// Use a `switch` statement to work with class constructors.
|
||||||
|
// See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
|
||||||
|
// for more details.
|
||||||
|
var args = arguments;
|
||||||
|
switch (args.length) {
|
||||||
|
case 0: return new Ctor;
|
||||||
|
case 1: return new Ctor(args[0]);
|
||||||
|
case 2: return new Ctor(args[0], args[1]);
|
||||||
|
case 3: return new Ctor(args[0], args[1], args[2]);
|
||||||
|
case 4: return new Ctor(args[0], args[1], args[2], args[3]);
|
||||||
|
case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
|
||||||
|
case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
|
||||||
|
case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
|
||||||
|
}
|
||||||
var thisBinding = baseCreate(Ctor.prototype),
|
var thisBinding = baseCreate(Ctor.prototype),
|
||||||
result = Ctor.apply(thisBinding, arguments);
|
result = Ctor.apply(thisBinding, args);
|
||||||
|
|
||||||
// Mimic the constructor's `return` behavior.
|
// Mimic the constructor's `return` behavior.
|
||||||
// See https://es5.github.io/#x13.2.2 for more details.
|
// See https://es5.github.io/#x13.2.2 for more details.
|
||||||
@@ -135,12 +281,46 @@ function createCtorWrapper(Ctor) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a function that wraps `func` and invokes it with optional `this`
|
* Creates a function that wraps `func` to enable currying.
|
||||||
* binding of, partial application, and currying.
|
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Function|string} func The function or method name to reference.
|
* @param {Function} func The function to wrap.
|
||||||
* @param {number} bitmask The bitmask of flags. See `createWrapper` for more details.
|
* @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
|
||||||
|
* @param {number} arity The arity of `func`.
|
||||||
|
* @returns {Function} Returns the new wrapped function.
|
||||||
|
*/
|
||||||
|
function createCurryWrapper(func, bitmask, arity) {
|
||||||
|
var Ctor = createCtorWrapper(func);
|
||||||
|
|
||||||
|
function wrapper() {
|
||||||
|
var length = arguments.length,
|
||||||
|
index = length,
|
||||||
|
args = Array(length),
|
||||||
|
fn = (this && this !== root && this instanceof wrapper) ? Ctor : func,
|
||||||
|
placeholder = wrapper.placeholder;
|
||||||
|
|
||||||
|
while (index--) {
|
||||||
|
args[index] = arguments[index];
|
||||||
|
}
|
||||||
|
var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
|
||||||
|
? []
|
||||||
|
: replaceHolders(args, placeholder);
|
||||||
|
|
||||||
|
length -= holders.length;
|
||||||
|
return length < arity
|
||||||
|
? createRecurryWrapper(func, bitmask, createHybridWrapper, placeholder, undefined, args, holders, undefined, undefined, arity - length)
|
||||||
|
: apply(fn, this, args);
|
||||||
|
}
|
||||||
|
return wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a function that wraps `func` to invoke it with optional `this`
|
||||||
|
* binding of `thisArg`, partial application, and currying.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Function|string} func The function or method name to wrap.
|
||||||
|
* @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
|
||||||
* @param {*} [thisArg] The `this` binding of `func`.
|
* @param {*} [thisArg] The `this` binding of `func`.
|
||||||
* @param {Array} [partials] The arguments to prepend to those provided to the new function.
|
* @param {Array} [partials] The arguments to prepend to those provided to the new function.
|
||||||
* @param {Array} [holders] The `partials` placeholder indexes.
|
* @param {Array} [holders] The `partials` placeholder indexes.
|
||||||
@@ -156,15 +336,11 @@ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partials
|
|||||||
isBind = bitmask & BIND_FLAG,
|
isBind = bitmask & BIND_FLAG,
|
||||||
isBindKey = bitmask & BIND_KEY_FLAG,
|
isBindKey = bitmask & BIND_KEY_FLAG,
|
||||||
isCurry = bitmask & CURRY_FLAG,
|
isCurry = bitmask & CURRY_FLAG,
|
||||||
isCurryBound = bitmask & CURRY_BOUND_FLAG,
|
isCurryRight = bitmask & CURRY_RIGHT_FLAG,
|
||||||
isCurryRight = bitmask & CURRY_RIGHT_FLAG;
|
isFlip = bitmask & FLIP_FLAG,
|
||||||
|
Ctor = isBindKey ? undefined : createCtorWrapper(func);
|
||||||
var Ctor = !isBindKey && createCtorWrapper(func),
|
|
||||||
key = func;
|
|
||||||
|
|
||||||
function wrapper() {
|
function wrapper() {
|
||||||
// Avoid `arguments` object use disqualifying optimizations by
|
|
||||||
// converting it to an array before providing it to other functions.
|
|
||||||
var length = arguments.length,
|
var length = arguments.length,
|
||||||
index = length,
|
index = length,
|
||||||
args = Array(length);
|
args = Array(length);
|
||||||
@@ -184,64 +360,51 @@ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partials
|
|||||||
|
|
||||||
length -= argsHolders.length;
|
length -= argsHolders.length;
|
||||||
if (length < arity) {
|
if (length < arity) {
|
||||||
var newArgPos = argPos ? arrayCopy(argPos) : null,
|
return createRecurryWrapper(func, bitmask, createHybridWrapper, placeholder, thisArg, args, argsHolders, argPos, ary, arity - length);
|
||||||
newArity = nativeMax(arity - length, 0),
|
|
||||||
newsHolders = isCurry ? argsHolders : null,
|
|
||||||
newHoldersRight = isCurry ? null : argsHolders,
|
|
||||||
newPartials = isCurry ? args : null,
|
|
||||||
newPartialsRight = isCurry ? null : args;
|
|
||||||
|
|
||||||
bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG);
|
|
||||||
bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);
|
|
||||||
|
|
||||||
if (!isCurryBound) {
|
|
||||||
bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
|
|
||||||
}
|
|
||||||
var result = createHybridWrapper(func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, newArity);
|
|
||||||
result.placeholder = placeholder;
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var thisBinding = isBind ? thisArg : this;
|
var thisBinding = isBind ? thisArg : this,
|
||||||
if (isBindKey) {
|
fn = isBindKey ? thisBinding[func] : func;
|
||||||
func = thisBinding[key];
|
|
||||||
}
|
|
||||||
if (argPos) {
|
if (argPos) {
|
||||||
args = reorder(args, argPos);
|
args = reorder(args, argPos);
|
||||||
|
} else if (isFlip && args.length > 1) {
|
||||||
|
args.reverse();
|
||||||
}
|
}
|
||||||
if (isAry && ary < args.length) {
|
if (isAry && ary < args.length) {
|
||||||
args.length = ary;
|
args.length = ary;
|
||||||
}
|
}
|
||||||
var fn = (this && this !== global && this instanceof wrapper) ? (Ctor || createCtorWrapper(func)) : func;
|
if (this && this !== root && this instanceof wrapper) {
|
||||||
|
fn = Ctor || createCtorWrapper(fn);
|
||||||
|
}
|
||||||
return fn.apply(thisBinding, args);
|
return fn.apply(thisBinding, args);
|
||||||
}
|
}
|
||||||
return wrapper;
|
return wrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a function that wraps `func` and invokes it with the optional `this`
|
* Creates a function that wraps `func` to invoke it with the optional `this`
|
||||||
* binding of `thisArg` and the `partials` prepended to those provided to
|
* binding of `thisArg` and the `partials` prepended to those provided to
|
||||||
* the wrapper.
|
* the wrapper.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Function} func The function to partially apply arguments to.
|
* @param {Function} func The function to wrap.
|
||||||
* @param {number} bitmask The bitmask of flags. See `createWrapper` for more details.
|
* @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
|
||||||
* @param {*} thisArg The `this` binding of `func`.
|
* @param {*} thisArg The `this` binding of `func`.
|
||||||
* @param {Array} partials The arguments to prepend to those provided to the new function.
|
* @param {Array} partials The arguments to prepend to those provided to the new function.
|
||||||
* @returns {Function} Returns the new bound function.
|
* @returns {Function} Returns the new wrapped function.
|
||||||
*/
|
*/
|
||||||
function createPartialWrapper(func, bitmask, thisArg, partials) {
|
function createPartialWrapper(func, bitmask, thisArg, partials) {
|
||||||
var isBind = bitmask & BIND_FLAG,
|
var isBind = bitmask & BIND_FLAG,
|
||||||
Ctor = createCtorWrapper(func);
|
Ctor = createCtorWrapper(func);
|
||||||
|
|
||||||
function wrapper() {
|
function wrapper() {
|
||||||
// Avoid `arguments` object use disqualifying optimizations by
|
|
||||||
// converting it to an array before providing it `func`.
|
|
||||||
var argsIndex = -1,
|
var argsIndex = -1,
|
||||||
argsLength = arguments.length,
|
argsLength = arguments.length,
|
||||||
leftIndex = -1,
|
leftIndex = -1,
|
||||||
leftLength = partials.length,
|
leftLength = partials.length,
|
||||||
args = Array(argsLength + leftLength);
|
args = Array(leftLength + argsLength),
|
||||||
|
fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
|
||||||
|
|
||||||
while (++leftIndex < leftLength) {
|
while (++leftIndex < leftLength) {
|
||||||
args[leftIndex] = partials[leftIndex];
|
args[leftIndex] = partials[leftIndex];
|
||||||
@@ -249,19 +412,54 @@ function createPartialWrapper(func, bitmask, thisArg, partials) {
|
|||||||
while (argsLength--) {
|
while (argsLength--) {
|
||||||
args[leftIndex++] = arguments[++argsIndex];
|
args[leftIndex++] = arguments[++argsIndex];
|
||||||
}
|
}
|
||||||
var fn = (this && this !== global && this instanceof wrapper) ? Ctor : func;
|
return apply(fn, isBind ? thisArg : this, args);
|
||||||
return fn.apply(isBind ? thisArg : this, args);
|
|
||||||
}
|
}
|
||||||
return wrapper;
|
return wrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a function that wraps `func` to continue currying.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Function} func The function to wrap.
|
||||||
|
* @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
|
||||||
|
* @param {Function} wrapFunc The function to create the `func` wrapper.
|
||||||
|
* @param {*} placeholder The placeholder to replace.
|
||||||
|
* @param {*} [thisArg] The `this` binding of `func`.
|
||||||
|
* @param {Array} [partials] The arguments to prepend to those provided to the new function.
|
||||||
|
* @param {Array} [holders] The `partials` placeholder indexes.
|
||||||
|
* @param {Array} [argPos] The argument positions of the new function.
|
||||||
|
* @param {number} [ary] The arity cap of `func`.
|
||||||
|
* @param {number} [arity] The arity of `func`.
|
||||||
|
* @returns {Function} Returns the new wrapped function.
|
||||||
|
*/
|
||||||
|
function createRecurryWrapper(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
|
||||||
|
var isCurry = bitmask & CURRY_FLAG,
|
||||||
|
newArgPos = argPos ? copyArray(argPos) : undefined,
|
||||||
|
newsHolders = isCurry ? holders : undefined,
|
||||||
|
newHoldersRight = isCurry ? undefined : holders,
|
||||||
|
newPartials = isCurry ? partials : undefined,
|
||||||
|
newPartialsRight = isCurry ? undefined : partials;
|
||||||
|
|
||||||
|
bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG);
|
||||||
|
bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);
|
||||||
|
|
||||||
|
if (!(bitmask & CURRY_BOUND_FLAG)) {
|
||||||
|
bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
|
||||||
|
}
|
||||||
|
var result = wrapFunc(func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, arity);
|
||||||
|
|
||||||
|
result.placeholder = placeholder;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a function that either curries or invokes `func` with optional
|
* Creates a function that either curries or invokes `func` with optional
|
||||||
* `this` binding and partially applied arguments.
|
* `this` binding and partially applied arguments.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Function|string} func The function or method name to reference.
|
* @param {Function|string} func The function or method name to wrap.
|
||||||
* @param {number} bitmask The bitmask of flags.
|
* @param {number} bitmask The bitmask of wrapper flags.
|
||||||
* The bitmask may be composed of the following flags:
|
* The bitmask may be composed of the following flags:
|
||||||
* 1 - `_.bind`
|
* 1 - `_.bind`
|
||||||
* 2 - `_.bindKey`
|
* 2 - `_.bindKey`
|
||||||
@@ -288,45 +486,44 @@ function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, a
|
|||||||
var length = partials ? partials.length : 0;
|
var length = partials ? partials.length : 0;
|
||||||
if (!length) {
|
if (!length) {
|
||||||
bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG);
|
bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG);
|
||||||
partials = holders = null;
|
partials = holders = undefined;
|
||||||
}
|
}
|
||||||
length -= (holders ? holders.length : 0);
|
ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
|
||||||
|
arity = arity === undefined ? arity : toInteger(arity);
|
||||||
|
length -= holders ? holders.length : 0;
|
||||||
|
|
||||||
if (bitmask & PARTIAL_RIGHT_FLAG) {
|
if (bitmask & PARTIAL_RIGHT_FLAG) {
|
||||||
var partialsRight = partials,
|
var partialsRight = partials,
|
||||||
holdersRight = holders;
|
holdersRight = holders;
|
||||||
|
|
||||||
partials = holders = null;
|
partials = holders = undefined;
|
||||||
}
|
}
|
||||||
var newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity];
|
var newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity];
|
||||||
|
|
||||||
newData[9] = arity == null
|
func = newData[0];
|
||||||
|
bitmask = newData[1];
|
||||||
|
thisArg = newData[2];
|
||||||
|
partials = newData[3];
|
||||||
|
holders = newData[4];
|
||||||
|
arity = newData[9] = newData[9] == null
|
||||||
? (isBindKey ? 0 : func.length)
|
? (isBindKey ? 0 : func.length)
|
||||||
: (nativeMax(arity - length, 0) || 0);
|
: nativeMax(newData[9] - length, 0);
|
||||||
|
|
||||||
if (bitmask == BIND_FLAG) {
|
if (!arity && bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG)) {
|
||||||
var result = createBindWrapper(newData[0], newData[2]);
|
bitmask &= ~(CURRY_FLAG | CURRY_RIGHT_FLAG);
|
||||||
} else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !newData[4].length) {
|
}
|
||||||
result = createPartialWrapper.apply(undefined, newData);
|
if (!bitmask || bitmask == BIND_FLAG) {
|
||||||
|
var result = createBaseWrapper(func, bitmask, thisArg);
|
||||||
|
} else if (bitmask == CURRY_FLAG || bitmask == CURRY_RIGHT_FLAG) {
|
||||||
|
result = createCurryWrapper(func, bitmask, arity);
|
||||||
|
} else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !holders.length) {
|
||||||
|
result = createPartialWrapper(func, bitmask, thisArg, partials);
|
||||||
} else {
|
} else {
|
||||||
result = createHybridWrapper.apply(undefined, newData);
|
result = createHybridWrapper.apply(undefined, newData);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if `value` is a valid array-like index.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {*} value The value to check.
|
|
||||||
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
||||||
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
||||||
*/
|
|
||||||
function isIndex(value, length) {
|
|
||||||
value = +value;
|
|
||||||
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
||||||
return value > -1 && value % 1 == 0 && value < length;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reorder `array` according to the specified indexes where the element at
|
* Reorder `array` according to the specified indexes where the element at
|
||||||
* the first index is assigned as the first element, the element at
|
* the first index is assigned as the first element, the element at
|
||||||
@@ -340,7 +537,7 @@ function isIndex(value, length) {
|
|||||||
function reorder(array, indexes) {
|
function reorder(array, indexes) {
|
||||||
var arrLength = array.length,
|
var arrLength = array.length,
|
||||||
length = nativeMin(indexes.length, arrLength),
|
length = nativeMin(indexes.length, arrLength),
|
||||||
oldArray = arrayCopy(array);
|
oldArray = copyArray(array);
|
||||||
|
|
||||||
while (length--) {
|
while (length--) {
|
||||||
var index = indexes[length];
|
var index = indexes[length];
|
||||||
@@ -350,10 +547,32 @@ function reorder(array, indexes) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if `value` is the language type of `Object`.
|
* Checks if `value` is classified as a `Function` object.
|
||||||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
||||||
*
|
*
|
||||||
* **Note:** See the [ES5 spec](https://es5.github.io/#x8) for more details.
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is correctly classified, 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 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 [language type](https://es5.github.io/#x8) of `Object`.
|
||||||
|
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
@@ -368,14 +587,89 @@ function reorder(array, indexes) {
|
|||||||
* _.isObject([1, 2, 3]);
|
* _.isObject([1, 2, 3]);
|
||||||
* // => true
|
* // => true
|
||||||
*
|
*
|
||||||
* _.isObject(1);
|
* _.isObject(_.noop);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject(null);
|
||||||
* // => false
|
* // => false
|
||||||
*/
|
*/
|
||||||
function isObject(value) {
|
function isObject(value) {
|
||||||
// Avoid a V8 JIT bug in Chrome 19-20.
|
|
||||||
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
|
||||||
var type = typeof value;
|
var type = typeof value;
|
||||||
return type == 'function' || (value && type == 'object') || false;
|
return !!value && (type == 'object' || type == 'function');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts `value` to an integer.
|
||||||
|
*
|
||||||
|
* **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to convert.
|
||||||
|
* @returns {number} Returns the converted integer.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.toInteger(3);
|
||||||
|
* // => 3
|
||||||
|
*
|
||||||
|
* _.toInteger(Number.MIN_VALUE);
|
||||||
|
* // => 0
|
||||||
|
*
|
||||||
|
* _.toInteger(Infinity);
|
||||||
|
* // => 1.7976931348623157e+308
|
||||||
|
*
|
||||||
|
* _.toInteger('3');
|
||||||
|
* // => 3
|
||||||
|
*/
|
||||||
|
function toInteger(value) {
|
||||||
|
if (!value) {
|
||||||
|
return value === 0 ? value : 0;
|
||||||
|
}
|
||||||
|
value = toNumber(value);
|
||||||
|
if (value === INFINITY || value === -INFINITY) {
|
||||||
|
var sign = (value < 0 ? -1 : 1);
|
||||||
|
return sign * MAX_INTEGER;
|
||||||
|
}
|
||||||
|
var remainder = value % 1;
|
||||||
|
return value === value ? (remainder ? value - remainder : value) : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts `value` to a number.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to process.
|
||||||
|
* @returns {number} Returns the number.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.toNumber(3);
|
||||||
|
* // => 3
|
||||||
|
*
|
||||||
|
* _.toNumber(Number.MIN_VALUE);
|
||||||
|
* // => 5e-324
|
||||||
|
*
|
||||||
|
* _.toNumber(Infinity);
|
||||||
|
* // => Infinity
|
||||||
|
*
|
||||||
|
* _.toNumber('3');
|
||||||
|
* // => 3
|
||||||
|
*/
|
||||||
|
function toNumber(value) {
|
||||||
|
if (isObject(value)) {
|
||||||
|
var other = isFunction(value.valueOf) ? value.valueOf() : value;
|
||||||
|
value = isObject(other) ? (other + '') : other;
|
||||||
|
}
|
||||||
|
if (typeof value != 'string') {
|
||||||
|
return value === 0 ? value : +value;
|
||||||
|
}
|
||||||
|
value = value.replace(reTrim, '');
|
||||||
|
var isBinary = reIsBinary.test(value);
|
||||||
|
return (isBinary || reIsOctal.test(value))
|
||||||
|
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
||||||
|
: (reIsBadHex.test(value) ? NAN : +value);
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = createWrapper;
|
module.exports = createWrapper;
|
||||||
|
|||||||
@@ -1,23 +1,19 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._createwrapper",
|
"name": "lodash._createwrapper",
|
||||||
"version": "3.0.2",
|
"version": "3.2.0",
|
||||||
"description": "The modern build of lodash’s internal `createWrapper` as a module.",
|
"description": "The internal lodash function `createWrapper` 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",
|
||||||
"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/)",
|
||||||
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
|
"Blaine Bublitz <blaine@iceddev.com> (https://github.com/phated)",
|
||||||
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
|
|
||||||
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
|
||||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||||
],
|
],
|
||||||
"repository": "lodash/lodash",
|
"repository": "lodash/lodash",
|
||||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lodash._arraycopy": "^3.0.0",
|
"lodash._root": "^3.0.0"
|
||||||
"lodash._basecreate": "^3.0.0",
|
|
||||||
"lodash._replaceholders": "^3.0.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
|
Based on Underscore.js, copyright 2009-2015 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
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash._isiterateecall v3.0.2
|
# 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.2-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,18 +1,49 @@
|
|||||||
/**
|
/** Used to detect unsigned integer values. */
|
||||||
* lodash 3.0.2 (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.7.0 <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 of an array-like value.
|
* Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
|
||||||
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
|
* of an array-like value.
|
||||||
* for more details.
|
|
||||||
*/
|
*/
|
||||||
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 function.
|
||||||
|
*/
|
||||||
|
function baseProperty(key) {
|
||||||
|
return function(object) {
|
||||||
|
return object == null ? undefined : object[key];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the "length" property value of `object`.
|
||||||
|
*
|
||||||
|
* **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
|
||||||
|
* that affects Safari on at least iOS 8.1-8.3 ARM64.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The object to query.
|
||||||
|
* @returns {*} Returns the "length" value.
|
||||||
|
*/
|
||||||
|
var getLength = baseProperty('length');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is array-like.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
||||||
|
*/
|
||||||
|
function isArrayLike(value) {
|
||||||
|
return value != null && isLength(getLength(value));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if `value` is a valid array-like index.
|
* Checks if `value` is a valid array-like index.
|
||||||
@@ -23,7 +54,7 @@ var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
|
|||||||
* @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 = +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;
|
||||||
}
|
}
|
||||||
@@ -42,22 +73,19 @@ function isIterateeCall(value, index, object) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var type = typeof index;
|
var type = typeof index;
|
||||||
if (type == 'number') {
|
if (type == 'number'
|
||||||
var length = object.length,
|
? (isArrayLike(object) && isIndex(index, object.length))
|
||||||
prereq = isLength(length) && isIndex(index, length);
|
: (type == 'string' && index in object)) {
|
||||||
} else {
|
var other = object[index];
|
||||||
prereq = type == 'string' && index in object;
|
return value === value ? (value === other) : (other !== other);
|
||||||
}
|
}
|
||||||
var other = object[index];
|
return false;
|
||||||
return prereq && (value === value ? value === other : other !== other);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if `value` is a valid array-like length.
|
* Checks if `value` is a valid array-like length.
|
||||||
*
|
*
|
||||||
* **Note:** This function is based on ES `ToLength`. See the
|
* **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||||
* [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)
|
|
||||||
* for more details.
|
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
@@ -68,11 +96,9 @@ function isLength(value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if `value` is the language type of `Object`.
|
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
||||||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||||
*
|
*
|
||||||
* **Note:** See the [ES5 spec](https://es5.github.io/#x8) for more details.
|
|
||||||
*
|
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Lang
|
* @category Lang
|
||||||
@@ -93,7 +119,7 @@ function isObject(value) {
|
|||||||
// Avoid a V8 JIT bug in Chrome 19-20.
|
// Avoid a V8 JIT bug in Chrome 19-20.
|
||||||
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
||||||
var type = typeof value;
|
var type = typeof value;
|
||||||
return type == 'function' || (value && type == 'object') || false;
|
return !!value && (type == 'object' || type == 'function');
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = isIterateeCall;
|
module.exports = isIterateeCall;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._isiterateecall",
|
"name": "lodash._isiterateecall",
|
||||||
"version": "3.0.2",
|
"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,4 +1,4 @@
|
|||||||
# lodash._toiterable v3.0.2
|
# lodash._toiterable v3.0.4
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `toIterable` 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 `toIterable` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var toIterable = require('lodash._toiterable');
|
var toIterable = require('lodash._toiterable');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._toiterable) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash._toiterable) for more details.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.0.2 (Custom Build) <https://lodash.com/>
|
* lodash 3.0.4 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
@@ -10,10 +10,10 @@ var baseValues = require('lodash._basevalues'),
|
|||||||
keys = require('lodash.keys');
|
keys = require('lodash.keys');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 = Math.pow(2, 53) - 1;
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.property` without support for deep paths.
|
* The base implementation of `_.property` without support for deep paths.
|
||||||
@@ -32,7 +32,7 @@ function baseProperty(key) {
|
|||||||
* Gets the "length" property value of `object`.
|
* Gets the "length" property value of `object`.
|
||||||
*
|
*
|
||||||
* **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
|
* **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
|
||||||
* in Safari on iOS 8.1 ARM64.
|
* that affects Safari on at least iOS 8.1-8.3 ARM64.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Object} object The object to query.
|
* @param {Object} object The object to query.
|
||||||
@@ -40,10 +40,21 @@ function baseProperty(key) {
|
|||||||
*/
|
*/
|
||||||
var getLength = baseProperty('length');
|
var getLength = baseProperty('length');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is array-like.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
||||||
|
*/
|
||||||
|
function isArrayLike(value) {
|
||||||
|
return value != null && isLength(getLength(value));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.
|
||||||
@@ -54,7 +65,7 @@ function isLength(value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts `value` to an array-like object if it is not one.
|
* Converts `value` to an array-like object if it's not one.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {*} value The value to process.
|
* @param {*} value The value to process.
|
||||||
@@ -64,7 +75,7 @@ function toIterable(value) {
|
|||||||
if (value == null) {
|
if (value == null) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
if (!isLength(getLength(value))) {
|
if (!isArrayLike(value)) {
|
||||||
return values(value);
|
return values(value);
|
||||||
}
|
}
|
||||||
return isObject(value) ? value : Object(value);
|
return isObject(value) ? value : Object(value);
|
||||||
@@ -94,7 +105,7 @@ function isObject(value) {
|
|||||||
// Avoid a V8 JIT bug in Chrome 19-20.
|
// Avoid a V8 JIT bug in Chrome 19-20.
|
||||||
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
||||||
var type = typeof value;
|
var type = typeof value;
|
||||||
return type == 'function' || (!!value && type == 'object');
|
return !!value && (type == 'object' || type == 'function');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._toiterable",
|
"name": "lodash._toiterable",
|
||||||
"version": "3.0.2",
|
"version": "3.0.4",
|
||||||
"description": "The modern build of lodash’s internal `toIterable` as a module.",
|
"description": "The modern build of lodash’s internal `toIterable` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
Based on Underscore.js, copyright 2009-2015 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
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
|||||||
@@ -1,20 +1,18 @@
|
|||||||
# lodash.ary v3.0.2
|
# lodash.ary v3.1.0
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.ary` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
The [lodash](https://lodash.com/) method `_.ary` exported as a [Node.js](https://nodejs.org/) module.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Using npm:
|
Using npm:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ {sudo -H} npm i -g npm
|
$ {sudo -H} npm i -g npm
|
||||||
$ npm i --save lodash.ary
|
$ npm i --save lodash.ary
|
||||||
```
|
```
|
||||||
|
|
||||||
In Node.js/io.js:
|
In Node.js:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var ary = require('lodash.ary');
|
var ary = require('lodash.ary');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [documentation](https://lodash.com/docs#ary) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.ary) for more details.
|
See the [documentation](https://lodash.com/docs#ary) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.ary) for more details.
|
||||||
|
|||||||
@@ -1,22 +1,18 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.0.2 (Custom Build) <https://lodash.com/>
|
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
* Available under MIT license <https://lodash.com/license>
|
||||||
*/
|
*/
|
||||||
var createWrapper = require('lodash._createwrapper'),
|
var createWrapper = require('lodash._createwrapper');
|
||||||
isIterateeCall = require('lodash._isiterateecall');
|
|
||||||
|
|
||||||
/** Used to compose bitmasks for wrapper metadata. */
|
/** Used to compose bitmasks for wrapper metadata. */
|
||||||
var ARY_FLAG = 128;
|
var ARY_FLAG = 128;
|
||||||
|
|
||||||
/* Native method references for those with the same name as other `lodash` methods. */
|
|
||||||
var nativeMax = Math.max;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a function that accepts up to `n` arguments ignoring any
|
* Creates a function that accepts up to `n` arguments, ignoring any
|
||||||
* additional arguments.
|
* additional arguments.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
@@ -24,7 +20,7 @@ var nativeMax = Math.max;
|
|||||||
* @category Function
|
* @category Function
|
||||||
* @param {Function} func The function to cap arguments for.
|
* @param {Function} func The function to cap arguments for.
|
||||||
* @param {number} [n=func.length] The arity cap.
|
* @param {number} [n=func.length] The arity cap.
|
||||||
* @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
|
* @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
|
||||||
* @returns {Function} Returns the new function.
|
* @returns {Function} Returns the new function.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
@@ -32,10 +28,8 @@ var nativeMax = Math.max;
|
|||||||
* // => [6, 8, 10]
|
* // => [6, 8, 10]
|
||||||
*/
|
*/
|
||||||
function ary(func, n, guard) {
|
function ary(func, n, guard) {
|
||||||
if (guard && isIterateeCall(func, n, guard)) {
|
n = guard ? undefined : n;
|
||||||
n = undefined;
|
n = (func && n == null) ? func.length : n;
|
||||||
}
|
|
||||||
n = (func && n == null) ? func.length : nativeMax(+n || 0, 0);
|
|
||||||
return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n);
|
return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +1,20 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash.ary",
|
"name": "lodash.ary",
|
||||||
"version": "3.0.2",
|
"version": "3.1.0",
|
||||||
"description": "The modern build of lodash’s `_.ary` as a module.",
|
"description": "The lodash method `_.ary` 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",
|
||||||
"keywords": "lodash, lodash-modularized, stdlib, util",
|
"keywords": "lodash, lodash-modularized, stdlib, util, ary",
|
||||||
"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/)",
|
||||||
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
|
"Blaine Bublitz <blaine@iceddev.com> (https://github.com/phated)",
|
||||||
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
|
|
||||||
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
|
||||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||||
],
|
],
|
||||||
"repository": "lodash/lodash",
|
"repository": "lodash/lodash",
|
||||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lodash._createwrapper": "^3.0.0",
|
"lodash._createwrapper": "^3.0.0"
|
||||||
"lodash._isiterateecall": "^3.0.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
|
Based on Underscore.js, copyright 2009-2015 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
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash.assign v3.0.0
|
# lodash.assign v3.2.0
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.assign` 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/) `_.assign` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var assign = require('lodash.assign');
|
var assign = require('lodash.assign');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [documentation](https://lodash.com/docs#assign) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.assign) for more details.
|
See the [documentation](https://lodash.com/docs#assign) or [package source](https://github.com/lodash/lodash/blob/3.2.0-npm-packages/lodash.assign) for more details.
|
||||||
|
|||||||
@@ -1,28 +1,61 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
|
* lodash 3.2.0 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
* Available under MIT license <https://lodash.com/license>
|
||||||
*/
|
*/
|
||||||
var baseAssign = require('lodash._baseassign'),
|
var baseAssign = require('lodash._baseassign'),
|
||||||
createAssigner = require('lodash._createassigner');
|
createAssigner = require('lodash._createassigner'),
|
||||||
|
keys = require('lodash.keys');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A specialized version of `_.assign` for customizing assigned values without
|
||||||
|
* support for argument juggling, multiple sources, and `this` binding `customizer`
|
||||||
|
* functions.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The destination object.
|
||||||
|
* @param {Object} source The source object.
|
||||||
|
* @param {Function} customizer The function to customize assigned values.
|
||||||
|
* @returns {Object} Returns `object`.
|
||||||
|
*/
|
||||||
|
function assignWith(object, source, customizer) {
|
||||||
|
var index = -1,
|
||||||
|
props = keys(source),
|
||||||
|
length = props.length;
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
var key = props[index],
|
||||||
|
value = object[key],
|
||||||
|
result = customizer(value, source[key], key, object, source);
|
||||||
|
|
||||||
|
if ((result === result ? (result !== value) : (value === value)) ||
|
||||||
|
(value === undefined && !(key in object))) {
|
||||||
|
object[key] = result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assigns own enumerable properties of source object(s) to the destination
|
* Assigns own enumerable properties of source object(s) to the destination
|
||||||
* object. Subsequent sources overwrite property assignments of previous sources.
|
* object. Subsequent sources overwrite property assignments of previous sources.
|
||||||
* If `customizer` is provided it is invoked to produce the assigned values.
|
* If `customizer` is provided it's invoked to produce the assigned values.
|
||||||
* The `customizer` is bound to `thisArg` and invoked with five arguments:
|
* The `customizer` is bound to `thisArg` and invoked with five arguments:
|
||||||
* (objectValue, sourceValue, key, object, source).
|
* (objectValue, sourceValue, key, object, source).
|
||||||
*
|
*
|
||||||
|
* **Note:** This method mutates `object` and is based on
|
||||||
|
* [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign).
|
||||||
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @alias extend
|
* @alias extend
|
||||||
* @category Object
|
* @category Object
|
||||||
* @param {Object} object The destination object.
|
* @param {Object} object The destination object.
|
||||||
* @param {...Object} [sources] The source objects.
|
* @param {...Object} [sources] The source objects.
|
||||||
* @param {Function} [customizer] The function to customize assigning values.
|
* @param {Function} [customizer] The function to customize assigned values.
|
||||||
* @param {*} [thisArg] The `this` binding of `customizer`.
|
* @param {*} [thisArg] The `this` binding of `customizer`.
|
||||||
* @returns {Object} Returns `object`.
|
* @returns {Object} Returns `object`.
|
||||||
* @example
|
* @example
|
||||||
@@ -32,12 +65,16 @@ var baseAssign = require('lodash._baseassign'),
|
|||||||
*
|
*
|
||||||
* // using a customizer callback
|
* // using a customizer callback
|
||||||
* var defaults = _.partialRight(_.assign, function(value, other) {
|
* var defaults = _.partialRight(_.assign, function(value, other) {
|
||||||
* return typeof value == 'undefined' ? other : value;
|
* return _.isUndefined(value) ? other : value;
|
||||||
* });
|
* });
|
||||||
*
|
*
|
||||||
* defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
|
* defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
|
||||||
* // => { 'user': 'barney', 'age': 36 }
|
* // => { 'user': 'barney', 'age': 36 }
|
||||||
*/
|
*/
|
||||||
var assign = createAssigner(baseAssign);
|
var assign = createAssigner(function(object, source, customizer) {
|
||||||
|
return customizer
|
||||||
|
? assignWith(object, source, customizer)
|
||||||
|
: baseAssign(object, source);
|
||||||
|
});
|
||||||
|
|
||||||
module.exports = assign;
|
module.exports = assign;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash.assign",
|
"name": "lodash.assign",
|
||||||
"version": "3.0.0",
|
"version": "3.2.0",
|
||||||
"description": "The modern build of lodash’s `_.assign` as a module.",
|
"description": "The modern build of lodash’s `_.assign` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
@@ -18,6 +18,7 @@
|
|||||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lodash._baseassign": "^3.0.0",
|
"lodash._baseassign": "^3.0.0",
|
||||||
"lodash._createassigner": "^3.0.0"
|
"lodash._createassigner": "^3.0.0",
|
||||||
|
"lodash.keys": "^3.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
|
Based on Underscore.js, copyright 2009-2015 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
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash.at v3.0.0
|
# lodash.at v3.2.0
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.at` 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/) `_.at` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var at = require('lodash.at');
|
var at = require('lodash.at');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [documentation](https://lodash.com/docs#at) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.at) for more details.
|
See the [documentation](https://lodash.com/docs#at) or [package source](https://github.com/lodash/lodash/blob/3.2.0-npm-packages/lodash.at) for more details.
|
||||||
|
|||||||
@@ -1,36 +1,14 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
|
* lodash 3.2.0 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
* Available under MIT license <https://lodash.com/license>
|
||||||
*/
|
*/
|
||||||
var baseAt = require('lodash._baseat'),
|
var baseAt = require('lodash._baseat'),
|
||||||
baseFlatten = require('lodash._baseflatten'),
|
baseFlatten = require('lodash._baseflatten'),
|
||||||
toIterable = require('lodash._toiterable');
|
restParam = require('lodash.restparam');
|
||||||
|
|
||||||
/**
|
|
||||||
* Used as the maximum length of an array-like value.
|
|
||||||
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
|
|
||||||
* for more details.
|
|
||||||
*/
|
|
||||||
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if `value` is a valid array-like length.
|
|
||||||
*
|
|
||||||
* **Note:** This function is based on ES `ToLength`. See the
|
|
||||||
* [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)
|
|
||||||
* for more details.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {*} value The value to check.
|
|
||||||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
||||||
*/
|
|
||||||
function isLength(value) {
|
|
||||||
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an array of elements corresponding to the given keys, or indexes,
|
* Creates an array of elements corresponding to the given keys, or indexes,
|
||||||
@@ -49,15 +27,11 @@ function isLength(value) {
|
|||||||
* _.at(['a', 'b', 'c'], [0, 2]);
|
* _.at(['a', 'b', 'c'], [0, 2]);
|
||||||
* // => ['a', 'c']
|
* // => ['a', 'c']
|
||||||
*
|
*
|
||||||
* _.at(['fred', 'barney', 'pebbles'], 0, 2);
|
* _.at(['barney', 'fred', 'pebbles'], 0, 2);
|
||||||
* // => ['fred', 'pebbles']
|
* // => ['barney', 'pebbles']
|
||||||
*/
|
*/
|
||||||
function at(collection) {
|
var at = restParam(function(collection, props) {
|
||||||
var length = collection ? collection.length : 0;
|
return baseAt(collection, baseFlatten(props));
|
||||||
if (isLength(length)) {
|
});
|
||||||
collection = toIterable(collection);
|
|
||||||
}
|
|
||||||
return baseAt(collection, baseFlatten(arguments, false, false, 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = at;
|
module.exports = at;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash.at",
|
"name": "lodash.at",
|
||||||
"version": "3.0.0",
|
"version": "3.2.0",
|
||||||
"description": "The modern build of lodash’s `_.at` as a module.",
|
"description": "The modern build of lodash’s `_.at` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
@@ -19,6 +19,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lodash._baseat": "^3.0.0",
|
"lodash._baseat": "^3.0.0",
|
||||||
"lodash._baseflatten": "^3.0.0",
|
"lodash._baseflatten": "^3.0.0",
|
||||||
"lodash._toiterable": "^3.0.0"
|
"lodash.restparam": "^3.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user