mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 14:37:49 +00:00
Compare commits
16 Commits
3.1.2-npm-
...
3.3.6-npm-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f9ad20a7f | ||
|
|
fbdd63d3ad | ||
|
|
9a9ba47586 | ||
|
|
61a48333a2 | ||
|
|
25afac45b7 | ||
|
|
0423d77228 | ||
|
|
343b869a68 | ||
|
|
4b3679034c | ||
|
|
45b95364ef | ||
|
|
2a20de4a1e | ||
|
|
0847978784 | ||
|
|
005ee66119 | ||
|
|
25b977817b | ||
|
|
d2949f0931 | ||
|
|
cf4b24e17c | ||
|
|
f9b785686a |
@@ -1,4 +1,4 @@
|
||||
# lodash v3.1.2
|
||||
# lodash v3.3.6
|
||||
|
||||
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.1.1
|
||||
# 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.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var baseAssign = require('lodash._baseassign');
|
||||
```
|
||||
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.1.1-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,5 +1,5 @@
|
||||
/**
|
||||
* lodash 3.1.1 (Custom Build) <https://lodash.com/>
|
||||
* 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>
|
||||
@@ -7,12 +7,8 @@
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
var baseCopy = require('lodash._basecopy'),
|
||||
isNative = require('lodash.isnative'),
|
||||
keys = require('lodash.keys');
|
||||
|
||||
/** Native method references. */
|
||||
var getOwnPropertySymbols = isNative(getOwnPropertySymbols = Object.getOwnPropertySymbols) && getOwnPropertySymbols;
|
||||
|
||||
/**
|
||||
* The base implementation of `_.assign` without support for argument juggling,
|
||||
* multiple sources, and `customizer` functions.
|
||||
@@ -22,81 +18,10 @@ var getOwnPropertySymbols = isNative(getOwnPropertySymbols = Object.getOwnProper
|
||||
* @param {Object} source The source object.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
var baseAssign = function(object, source) {
|
||||
function baseAssign(object, source) {
|
||||
return source == null
|
||||
? object
|
||||
: baseCopy(source, getSymbols(source), baseCopy(source, keys(source), object));
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates an array of the own symbols of `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of symbols.
|
||||
*/
|
||||
var getSymbols = !getOwnPropertySymbols ? constant([]) : function(object) {
|
||||
return getOwnPropertySymbols(toObject(object));
|
||||
};
|
||||
|
||||
/**
|
||||
* 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');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
};
|
||||
: baseCopy(source, keys(source), object);
|
||||
}
|
||||
|
||||
module.exports = baseAssign;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash._baseassign",
|
||||
"version": "3.1.1",
|
||||
"version": "3.2.0",
|
||||
"description": "The modern build of lodash’s internal `baseAssign` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -17,7 +17,6 @@
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._basecopy": "^3.0.0",
|
||||
"lodash.isnative": "^3.0.0",
|
||||
"lodash.keys": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash._basecallback v3.1.2
|
||||
# lodash._basecallback v3.3.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.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var baseCallback = require('lodash._basecallback');
|
||||
```
|
||||
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.1.2-npm-packages/lodash._basecallback) for more details.
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.3.1-npm-packages/lodash._basecallback) for more details.
|
||||
|
||||
@@ -1,20 +1,35 @@
|
||||
/**
|
||||
* lodash 3.1.2 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.3.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.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
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
var baseIsEqual = require('lodash._baseisequal'),
|
||||
bindCallback = require('lodash._bindcallback'),
|
||||
keys = require('lodash.keys');
|
||||
isArray = require('lodash.isarray'),
|
||||
pairs = require('lodash.pairs');
|
||||
|
||||
/** Used for native method references. */
|
||||
var objectProto = Object.prototype;
|
||||
/** Used to match property names within property paths. */
|
||||
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,
|
||||
reIsPlainProp = /^\w*$/,
|
||||
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
/** Used to match backslashes in property paths. */
|
||||
var reEscapeChar = /\\(\\)?/g;
|
||||
|
||||
/**
|
||||
* Converts `value` to a string if it's 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) {
|
||||
return value == null ? '' : (value + '');
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.callback` which supports specifying the
|
||||
@@ -29,9 +44,9 @@ var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
function baseCallback(func, thisArg, argCount) {
|
||||
var type = typeof func;
|
||||
if (type == 'function') {
|
||||
return (typeof thisArg != 'undefined')
|
||||
? bindCallback(func, thisArg, argCount)
|
||||
: func;
|
||||
return thisArg === undefined
|
||||
? func
|
||||
: bindCallback(func, thisArg, argCount);
|
||||
}
|
||||
if (func == null) {
|
||||
return identity;
|
||||
@@ -39,55 +54,80 @@ function baseCallback(func, thisArg, argCount) {
|
||||
if (type == 'object') {
|
||||
return baseMatches(func);
|
||||
}
|
||||
return typeof thisArg == 'undefined'
|
||||
? baseProperty(func + '')
|
||||
: baseMatchesProperty(func + '', thisArg);
|
||||
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 = 0,
|
||||
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
|
||||
* shorthands or `this` binding.
|
||||
* shorthands and `this` binding.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to inspect.
|
||||
* @param {Array} props The source property names to match.
|
||||
* @param {Array} values The source values to match.
|
||||
* @param {Array} strictCompareFlags Strict comparison flags for source values.
|
||||
* @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, props, values, strictCompareFlags, customizer) {
|
||||
var length = props.length;
|
||||
function baseIsMatch(object, matchData, customizer) {
|
||||
var index = matchData.length,
|
||||
length = index,
|
||||
noCustomizer = !customizer;
|
||||
|
||||
if (object == null) {
|
||||
return !length;
|
||||
}
|
||||
var index = -1,
|
||||
noCustomizer = !customizer;
|
||||
|
||||
while (++index < length) {
|
||||
if ((noCustomizer && strictCompareFlags[index])
|
||||
? values[index] !== object[props[index]]
|
||||
: !hasOwnProperty.call(object, props[index])
|
||||
object = toObject(object);
|
||||
while (index--) {
|
||||
var data = matchData[index];
|
||||
if ((noCustomizer && data[2])
|
||||
? data[1] !== object[data[0]]
|
||||
: !(data[0] in object)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
index = -1;
|
||||
while (++index < length) {
|
||||
var key = props[index];
|
||||
if (noCustomizer && strictCompareFlags[index]) {
|
||||
var result = hasOwnProperty.call(object, key);
|
||||
} else {
|
||||
var objValue = object[key],
|
||||
srcValue = values[index];
|
||||
data = matchData[index];
|
||||
var key = data[0],
|
||||
objValue = object[key],
|
||||
srcValue = data[1];
|
||||
|
||||
result = customizer ? customizer(objValue, srcValue, key) : undefined;
|
||||
if (typeof result == 'undefined') {
|
||||
result = baseIsEqual(srcValue, objValue, customizer, true);
|
||||
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;
|
||||
}
|
||||
}
|
||||
if (!result) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -101,54 +141,59 @@ function baseIsMatch(object, props, values, strictCompareFlags, customizer) {
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function baseMatches(source) {
|
||||
var props = keys(source),
|
||||
length = props.length;
|
||||
var matchData = getMatchData(source);
|
||||
if (matchData.length == 1 && matchData[0][2]) {
|
||||
var key = matchData[0][0],
|
||||
value = matchData[0][1];
|
||||
|
||||
if (length == 1) {
|
||||
var key = props[0],
|
||||
value = source[key];
|
||||
|
||||
if (isStrictComparable(value)) {
|
||||
return function(object) {
|
||||
return object != null && object[key] === value && hasOwnProperty.call(object, key);
|
||||
};
|
||||
}
|
||||
}
|
||||
var values = Array(length),
|
||||
strictCompareFlags = Array(length);
|
||||
|
||||
while (length--) {
|
||||
value = source[props[length]];
|
||||
values[length] = value;
|
||||
strictCompareFlags[length] = isStrictComparable(value);
|
||||
}
|
||||
return function(object) {
|
||||
return baseIsMatch(object, props, values, strictCompareFlags);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
if (object == null) {
|
||||
return false;
|
||||
}
|
||||
return object[key] === value && (value !== undefined || (key in toObject(object)));
|
||||
};
|
||||
}
|
||||
return function(object) {
|
||||
return object != null && baseIsEqual(value, object[key], null, true);
|
||||
return baseIsMatch(object, matchData);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.property` which does not coerce `key` to a string.
|
||||
* The base implementation of `_.matchesProperty` which does not clone `srcValue`.
|
||||
*
|
||||
* @private
|
||||
* @param {string} path The path of the property to get.
|
||||
* @param {*} srcValue The value to compare.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function baseMatchesProperty(path, srcValue) {
|
||||
var isArr = isArray(path),
|
||||
isCommon = isKey(path) && isStrictComparable(srcValue),
|
||||
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] === srcValue
|
||||
? (srcValue !== undefined || (key in object))
|
||||
: baseIsEqual(srcValue, object[key], undefined, true);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.property` without support for deep paths.
|
||||
*
|
||||
* @private
|
||||
* @param {string} key The key of the property to get.
|
||||
@@ -160,6 +205,89 @@ function baseProperty(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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 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. `===`.
|
||||
*
|
||||
@@ -169,14 +297,59 @@ function baseProperty(key) {
|
||||
* equality comparisons, else `false`.
|
||||
*/
|
||||
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`.
|
||||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
* Converts `value` to an object if it's not one.
|
||||
*
|
||||
* **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's 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
|
||||
* @memberOf _
|
||||
@@ -198,7 +371,7 @@ 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') || false;
|
||||
return !!value && (type == 'object' || type == 'function');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -220,4 +393,30 @@ function identity(value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that 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;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash._basecallback",
|
||||
"version": "3.1.2",
|
||||
"version": "3.3.1",
|
||||
"description": "The modern build of lodash’s internal `baseCallback` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -18,6 +18,7 @@
|
||||
"dependencies": {
|
||||
"lodash._baseisequal": "^3.0.0",
|
||||
"lodash._bindcallback": "^3.0.0",
|
||||
"lodash.keys": "^3.0.0"
|
||||
"lodash.isarray": "^3.0.0",
|
||||
"lodash.pairs": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash._baseclone v3.1.0
|
||||
# lodash._baseclone v3.3.0
|
||||
|
||||
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');
|
||||
```
|
||||
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._baseclone) for more details.
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.3.0-npm-packages/lodash._baseclone) for more details.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.3.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>
|
||||
@@ -11,7 +11,6 @@ var arrayCopy = require('lodash._arraycopy'),
|
||||
baseAssign = require('lodash._baseassign'),
|
||||
baseFor = require('lodash._basefor'),
|
||||
isArray = require('lodash.isarray'),
|
||||
isNative = require('lodash.isnative'),
|
||||
keys = require('lodash.keys');
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
@@ -65,31 +64,14 @@ var objectProto = Object.prototype;
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
|
||||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objToString = objectProto.toString;
|
||||
|
||||
/** Native method references. */
|
||||
var ArrayBuffer = isNative(ArrayBuffer = global.ArrayBuffer) && ArrayBuffer,
|
||||
bufferSlice = isNative(bufferSlice = ArrayBuffer && new ArrayBuffer(0).slice) && bufferSlice,
|
||||
floor = Math.floor,
|
||||
Uint8Array = isNative(Uint8Array = global.Uint8Array) && Uint8Array;
|
||||
|
||||
/** Used to clone array buffers. */
|
||||
var Float64Array = (function() {
|
||||
// Safari 5 errors when using an array buffer to initialize a typed array
|
||||
// where the array buffer's `byteLength` is not a multiple of the typed
|
||||
// array's `BYTES_PER_ELEMENT`.
|
||||
try {
|
||||
var func = isNative(func = global.Float64Array) && func,
|
||||
result = new func(new ArrayBuffer(10), 0, 1) && func;
|
||||
} catch(e) {}
|
||||
return result;
|
||||
}());
|
||||
|
||||
/** Used as the size, in bytes, of each `Float64Array` element. */
|
||||
var FLOAT64_BYTES_PER_ELEMENT = Float64Array ? Float64Array.BYTES_PER_ELEMENT : 0;
|
||||
var ArrayBuffer = global.ArrayBuffer,
|
||||
Uint8Array = global.Uint8Array;
|
||||
|
||||
/**
|
||||
* The base implementation of `_.clone` without support for argument juggling
|
||||
@@ -137,7 +119,7 @@ function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {
|
||||
: (object ? value : {});
|
||||
}
|
||||
}
|
||||
// Check for circular references and return corresponding clone.
|
||||
// Check for circular references and return its corresponding clone.
|
||||
stackA || (stackA = []);
|
||||
stackB || (stackB = []);
|
||||
|
||||
@@ -179,26 +161,11 @@ function baseForOwn(object, iteratee) {
|
||||
* @returns {ArrayBuffer} Returns the cloned array buffer.
|
||||
*/
|
||||
function bufferClone(buffer) {
|
||||
return bufferSlice.call(buffer, 0);
|
||||
}
|
||||
if (!bufferSlice) {
|
||||
// PhantomJS has `ArrayBuffer` and `Uint8Array` but not `Float64Array`.
|
||||
bufferClone = !(ArrayBuffer && Uint8Array) ? constant(null) : function(buffer) {
|
||||
var byteLength = buffer.byteLength,
|
||||
floatLength = Float64Array ? floor(byteLength / FLOAT64_BYTES_PER_ELEMENT) : 0,
|
||||
offset = floatLength * FLOAT64_BYTES_PER_ELEMENT,
|
||||
result = new ArrayBuffer(byteLength);
|
||||
var result = new ArrayBuffer(buffer.byteLength),
|
||||
view = new Uint8Array(result);
|
||||
|
||||
if (floatLength) {
|
||||
var view = new Float64Array(result, 0, floatLength);
|
||||
view.set(new Float64Array(buffer, 0, floatLength));
|
||||
}
|
||||
if (byteLength != offset) {
|
||||
view = new Uint8Array(result, offset);
|
||||
view.set(new Uint8Array(buffer, offset));
|
||||
}
|
||||
return result;
|
||||
};
|
||||
view.set(new Uint8Array(buffer));
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -298,29 +265,7 @@ 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');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
};
|
||||
return !!value && (type == 'object' || type == 'function');
|
||||
}
|
||||
|
||||
module.exports = baseClone;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash._baseclone",
|
||||
"version": "3.1.0",
|
||||
"version": "3.3.0",
|
||||
"description": "The modern build of lodash’s internal `baseClone` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -21,7 +21,6 @@
|
||||
"lodash._baseassign": "^3.0.0",
|
||||
"lodash._basefor": "^3.0.0",
|
||||
"lodash.isarray": "^3.0.0",
|
||||
"lodash.isnative": "^3.0.0",
|
||||
"lodash.keys": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash._baseflatten v3.1.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.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var baseFlatten = require('lodash._baseflatten');
|
||||
```
|
||||
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.1.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.1.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.1.4 (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>
|
||||
* 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>
|
||||
*/
|
||||
@@ -21,10 +21,29 @@ function isObjectLike(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
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
|
||||
@@ -32,42 +51,74 @@ var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to flatten.
|
||||
* @param {boolean} isDeep Specify a deep flatten.
|
||||
* @param {boolean} isStrict Restrict flattening to arrays and `arguments` objects.
|
||||
* @param {boolean} [isDeep] Specify a deep flatten.
|
||||
* @param {boolean} [isStrict] Restrict flattening to arrays-like objects.
|
||||
* @param {Array} [result=[]] The initial result value.
|
||||
* @returns {Array} Returns the new flattened array.
|
||||
*/
|
||||
function baseFlatten(array, isDeep, isStrict) {
|
||||
function baseFlatten(array, isDeep, isStrict, result) {
|
||||
result || (result = []);
|
||||
|
||||
var index = -1,
|
||||
length = array.length,
|
||||
resIndex = -1,
|
||||
result = [];
|
||||
length = array.length;
|
||||
|
||||
while (++index < length) {
|
||||
var value = array[index];
|
||||
|
||||
if (isObjectLike(value) && isLength(value.length) && (isArray(value) || isArguments(value))) {
|
||||
if (isObjectLike(value) && isArrayLike(value) &&
|
||||
(isStrict || isArray(value) || isArguments(value))) {
|
||||
if (isDeep) {
|
||||
// Recursively flatten arrays (susceptible to call stack limits).
|
||||
value = baseFlatten(value, isDeep, isStrict);
|
||||
}
|
||||
var valIndex = -1,
|
||||
valLength = value.length;
|
||||
|
||||
result.length += valLength;
|
||||
while (++valIndex < valLength) {
|
||||
result[++resIndex] = value[valIndex];
|
||||
baseFlatten(value, isDeep, isStrict, result);
|
||||
} else {
|
||||
arrayPush(result, value);
|
||||
}
|
||||
} else if (!isStrict) {
|
||||
result[++resIndex] = value;
|
||||
result[result.length] = value;
|
||||
}
|
||||
}
|
||||
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.
|
||||
*
|
||||
* **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
|
||||
* @param {*} value The value to check.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash._baseflatten",
|
||||
"version": "3.1.1",
|
||||
"version": "3.1.4",
|
||||
"description": "The modern build of lodash’s internal `baseFlatten` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash._baseismatch v3.1.2
|
||||
# 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.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var baseIsMatch = require('lodash._baseismatch');
|
||||
```
|
||||
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.1.2-npm-packages/lodash._baseismatch) for more details.
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.1.3-npm-packages/lodash._baseismatch) for more details.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* lodash 3.1.2 (Custom Build) <https://lodash.com/>
|
||||
* 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>
|
||||
@@ -14,44 +14,84 @@ var baseIsEqual = require('lodash._baseisequal');
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to inspect.
|
||||
* @param {Array} props The source property names to match.
|
||||
* @param {Array} values The source values to match.
|
||||
* @param {Array} strictCompareFlags Strict comparison flags for source values.
|
||||
* @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, props, values, strictCompareFlags, customizer) {
|
||||
var index = -1,
|
||||
length = props.length,
|
||||
function baseIsMatch(object, matchData, customizer) {
|
||||
var index = matchData.length,
|
||||
length = index,
|
||||
noCustomizer = !customizer;
|
||||
|
||||
while (++index < length) {
|
||||
if ((noCustomizer && strictCompareFlags[index])
|
||||
? values[index] !== object[props[index]]
|
||||
: !(props[index] in object)
|
||||
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;
|
||||
}
|
||||
}
|
||||
index = -1;
|
||||
while (++index < length) {
|
||||
var key = props[index],
|
||||
data = matchData[index];
|
||||
var key = data[0],
|
||||
objValue = object[key],
|
||||
srcValue = values[index];
|
||||
srcValue = data[1];
|
||||
|
||||
if (noCustomizer && strictCompareFlags[index]) {
|
||||
var result = objValue !== undefined || (key in object);
|
||||
} else {
|
||||
result = customizer ? customizer(objValue, srcValue, key) : undefined;
|
||||
if (result === undefined) {
|
||||
result = baseIsEqual(srcValue, objValue, customizer, true);
|
||||
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;
|
||||
}
|
||||
}
|
||||
if (!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,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash._baseismatch",
|
||||
"version": "3.1.2",
|
||||
"version": "3.1.3",
|
||||
"description": "The modern build of lodash’s internal `baseIsMatch` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
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/>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash._basematches v3.1.2
|
||||
# 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.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var baseMatches = require('lodash._basematches');
|
||||
```
|
||||
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.1.2-npm-packages/lodash._basematches) for more details.
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.2.0-npm-packages/lodash._basematches) for more details.
|
||||
|
||||
@@ -1,19 +1,13 @@
|
||||
/**
|
||||
* lodash 3.1.2 (Custom Build) <https://lodash.com/>
|
||||
* 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.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
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
var baseIsMatch = require('lodash._baseismatch'),
|
||||
keys = require('lodash.keys');
|
||||
|
||||
/** Used for native method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
pairs = require('lodash.pairs');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.matches` which does not clone `source`.
|
||||
@@ -23,32 +17,40 @@ var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function baseMatches(source) {
|
||||
var props = keys(source),
|
||||
length = props.length;
|
||||
var matchData = getMatchData(source);
|
||||
if (matchData.length == 1 && matchData[0][2]) {
|
||||
var key = matchData[0][0],
|
||||
value = matchData[0][1];
|
||||
|
||||
if (length == 1) {
|
||||
var key = props[0],
|
||||
value = source[key];
|
||||
|
||||
if (isStrictComparable(value)) {
|
||||
return function(object) {
|
||||
return object != null && object[key] === value && hasOwnProperty.call(object, key);
|
||||
};
|
||||
}
|
||||
}
|
||||
var values = Array(length),
|
||||
strictCompareFlags = Array(length);
|
||||
|
||||
while (length--) {
|
||||
value = source[props[length]];
|
||||
values[length] = value;
|
||||
strictCompareFlags[length] = isStrictComparable(value);
|
||||
return function(object) {
|
||||
if (object == null) {
|
||||
return false;
|
||||
}
|
||||
return object[key] === value && (value !== undefined || (key in toObject(object)));
|
||||
};
|
||||
}
|
||||
return function(object) {
|
||||
return baseIsMatch(object, props, values, strictCompareFlags);
|
||||
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. `===`.
|
||||
*
|
||||
@@ -58,14 +60,23 @@ function baseMatches(source) {
|
||||
* equality comparisons, else `false`.
|
||||
*/
|
||||
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`.
|
||||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
* Converts `value` to an object if it's not one.
|
||||
*
|
||||
* **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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 _
|
||||
@@ -87,7 +98,7 @@ 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') || false;
|
||||
return !!value && (type == 'object' || type == 'function');
|
||||
}
|
||||
|
||||
module.exports = baseMatches;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash._basematches",
|
||||
"version": "3.1.2",
|
||||
"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",
|
||||
@@ -17,6 +17,6 @@
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._baseismatch": "^3.0.0",
|
||||
"lodash.keys": "^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.3.2
|
||||
|
||||
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.3.2-npm-packages/lodash._basematchesproperty) for more details.
|
||||
141
lodash._basematchesproperty/index.js
Normal file
141
lodash._basematchesproperty/index.js
Normal file
@@ -0,0 +1,141 @@
|
||||
/**
|
||||
* lodash 3.3.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>
|
||||
*/
|
||||
var baseGet = require('lodash._baseget'),
|
||||
baseIsEqual = require('lodash._baseisequal'),
|
||||
baseSlice = require('lodash._baseslice'),
|
||||
toPath = require('lodash._topath'),
|
||||
isArray = require('lodash.isarray');
|
||||
|
||||
/** Used to match property names within property paths. */
|
||||
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,
|
||||
reIsPlainProp = /^\w*$/;
|
||||
|
||||
/**
|
||||
* The base implementation of `_.matchesProperty` which does not clone `srcValue`.
|
||||
*
|
||||
* @private
|
||||
* @param {string} path The path of the property to get.
|
||||
* @param {*} srcValue The value to compare.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function baseMatchesProperty(path, srcValue) {
|
||||
var isArr = isArray(path),
|
||||
isCommon = isKey(path) && isStrictComparable(srcValue),
|
||||
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] === srcValue
|
||||
? (srcValue !== undefined || (key in object))
|
||||
: baseIsEqual(srcValue, object[key], undefined, true);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 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. `===`.
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
* @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 = baseMatchesProperty;
|
||||
25
lodash._basematchesproperty/package.json
Normal file
25
lodash._basematchesproperty/package.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "lodash._basematchesproperty",
|
||||
"version": "3.3.2",
|
||||
"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._baseget": "^3.0.0",
|
||||
"lodash._baseisequal": "^3.0.0",
|
||||
"lodash._baseslice": "^3.0.0",
|
||||
"lodash._topath": "^3.0.0",
|
||||
"lodash.isarray": "^3.0.0"
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash._createwrapper v3.1.1
|
||||
# lodash._createwrapper v3.2.0
|
||||
|
||||
The internal [lodash](https://lodash.com/) function `createWrapper` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var createWrapper = require('lodash._createwrapper');
|
||||
```
|
||||
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.1.1-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,11 +1,12 @@
|
||||
/**
|
||||
* lodash 3.1.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.2.0 (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>
|
||||
*/
|
||||
var root = require('lodash._root');
|
||||
|
||||
/** Used to compose bitmasks for wrapper metadata. */
|
||||
var BIND_FLAG = 1,
|
||||
@@ -49,41 +50,9 @@ var reIsOctal = /^0o[0-7]+$/i;
|
||||
/** Used to detect unsigned integer values. */
|
||||
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
||||
|
||||
/** Used to determine if values are of the language type `Object`. */
|
||||
var objectTypes = {
|
||||
'function': true,
|
||||
'object': true
|
||||
};
|
||||
|
||||
/** Built-in method references without a dependency on `root`. */
|
||||
var freeParseInt = parseInt;
|
||||
|
||||
/** Detect free variable `exports`. */
|
||||
var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
|
||||
|
||||
/** Detect free variable `module`. */
|
||||
var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
|
||||
|
||||
/** Detect free variable `global` from Node.js. */
|
||||
var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
|
||||
|
||||
/** Detect free variable `self`. */
|
||||
var freeSelf = checkGlobal(objectTypes[typeof self] && self);
|
||||
|
||||
/** Detect free variable `window`. */
|
||||
var freeWindow = checkGlobal(objectTypes[typeof window] && window);
|
||||
|
||||
/** Detect `this` as the global object. */
|
||||
var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
|
||||
|
||||
/**
|
||||
* Used as a reference to the global object.
|
||||
*
|
||||
* The `this` value is used if it's the global object to avoid Greasemonkey's
|
||||
* restricted `window` object, otherwise the `window` object is used.
|
||||
*/
|
||||
var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
|
||||
|
||||
/**
|
||||
* A faster alternative to `Function#apply`, this function invokes `func`
|
||||
* with the `this` binding of `thisArg` and the arguments of `args`.
|
||||
@@ -105,17 +74,6 @@ function apply(func, thisArg, args) {
|
||||
return func.apply(thisArg, args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a global object.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {null|Object} Returns `value` if it's a global object, else `null`.
|
||||
*/
|
||||
function checkGlobal(value) {
|
||||
return (value && value.Object === Object) ? value : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a valid array-like index.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash._createwrapper",
|
||||
"version": "3.1.1",
|
||||
"version": "3.2.0",
|
||||
"description": "The internal lodash function `createWrapper` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -12,5 +12,8 @@
|
||||
"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.\"" }
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._root": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.assign v3.1.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.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var assign = require('lodash.assign');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#assign) or [package source](https://github.com/lodash/lodash/blob/3.1.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,5 +1,5 @@
|
||||
/**
|
||||
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||
* 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>
|
||||
@@ -8,16 +8,8 @@
|
||||
*/
|
||||
var baseAssign = require('lodash._baseassign'),
|
||||
createAssigner = require('lodash._createassigner'),
|
||||
isNative = require('lodash.isnative'),
|
||||
keys = require('lodash.keys');
|
||||
|
||||
/** Used for native method references. */
|
||||
var arrayProto = Array.prototype;
|
||||
|
||||
/** Native method references. */
|
||||
var getOwnPropertySymbols = isNative(getOwnPropertySymbols = Object.getOwnPropertySymbols) && getOwnPropertySymbols,
|
||||
push = arrayProto.push;
|
||||
|
||||
/**
|
||||
* A specialized version of `_.assign` for customizing assigned values without
|
||||
* support for argument juggling, multiple sources, and `this` binding `customizer`
|
||||
@@ -30,10 +22,8 @@ var getOwnPropertySymbols = isNative(getOwnPropertySymbols = Object.getOwnProper
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function assignWith(object, source, customizer) {
|
||||
var props = keys(source);
|
||||
push.apply(props, getSymbols(source));
|
||||
|
||||
var index = -1,
|
||||
props = keys(source),
|
||||
length = props.length;
|
||||
|
||||
while (++index < length) {
|
||||
@@ -49,64 +39,15 @@ function assignWith(object, source, customizer) {
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of the own symbols of `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of symbols.
|
||||
*/
|
||||
var getSymbols = !getOwnPropertySymbols ? constant([]) : function(object) {
|
||||
return getOwnPropertySymbols(toObject(object));
|
||||
};
|
||||
|
||||
/**
|
||||
* 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');
|
||||
}
|
||||
|
||||
/**
|
||||
* Assigns own enumerable properties of source object(s) to the destination
|
||||
* 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:
|
||||
* (objectValue, sourceValue, key, object, source).
|
||||
*
|
||||
* **Note:** This method mutates `object` and is based on
|
||||
* [`Object.assign`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign).
|
||||
* [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -136,26 +77,4 @@ var assign = createAssigner(function(object, source, customizer) {
|
||||
: baseAssign(object, source);
|
||||
});
|
||||
|
||||
/**
|
||||
* 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;
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = assign;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.assign",
|
||||
"version": "3.1.0",
|
||||
"version": "3.2.0",
|
||||
"description": "The modern build of lodash’s `_.assign` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -19,7 +19,6 @@
|
||||
"dependencies": {
|
||||
"lodash._baseassign": "^3.0.0",
|
||||
"lodash._createassigner": "^3.0.0",
|
||||
"lodash.isnative": "^3.0.0",
|
||||
"lodash.keys": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.at v3.1.1
|
||||
# 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.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var at = require('lodash.at');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#at) or [package source](https://github.com/lodash/lodash/blob/3.1.1-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,5 +1,5 @@
|
||||
/**
|
||||
* lodash 3.1.1 (Custom Build) <https://lodash.com/>
|
||||
* 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>
|
||||
@@ -8,53 +8,8 @@
|
||||
*/
|
||||
var baseAt = require('lodash._baseat'),
|
||||
baseFlatten = require('lodash._baseflatten'),
|
||||
toIterable = require('lodash._toiterable'),
|
||||
restParam = require('lodash.restparam');
|
||||
|
||||
/**
|
||||
* Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
|
||||
* of an array-like value.
|
||||
*/
|
||||
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
|
||||
|
||||
/**
|
||||
* 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)
|
||||
* in Safari on iOS 8.1 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.
|
||||
*
|
||||
* **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
|
||||
*
|
||||
* @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,
|
||||
* of `collection`. Keys may be specified as individual arguments or as arrays
|
||||
@@ -76,10 +31,6 @@ function isLength(value) {
|
||||
* // => ['barney', 'pebbles']
|
||||
*/
|
||||
var at = restParam(function(collection, props) {
|
||||
var length = collection ? getLength(collection) : 0;
|
||||
if (isLength(length)) {
|
||||
collection = toIterable(collection);
|
||||
}
|
||||
return baseAt(collection, baseFlatten(props));
|
||||
});
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.at",
|
||||
"version": "3.1.1",
|
||||
"version": "3.2.0",
|
||||
"description": "The modern build of lodash’s `_.at` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -19,7 +19,6 @@
|
||||
"dependencies": {
|
||||
"lodash._baseat": "^3.0.0",
|
||||
"lodash._baseflatten": "^3.0.0",
|
||||
"lodash._toiterable": "^3.0.0",
|
||||
"lodash.restparam": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
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/>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.attempt v3.1.0
|
||||
# lodash.attempt v3.3.0
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.attempt` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var attempt = require('lodash.attempt');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#attempt) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.attempt) for more details.
|
||||
See the [documentation](https://lodash.com/docs#attempt) or [package source](https://github.com/lodash/lodash/blob/3.3.0-npm-packages/lodash.attempt) for more details.
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
/**
|
||||
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.3.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.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
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
var baseSlice = require('lodash._baseslice'),
|
||||
isError = require('lodash.iserror');
|
||||
var isError = require('lodash.iserror'),
|
||||
restParam = require('lodash.restparam');
|
||||
|
||||
/**
|
||||
* Attempts to invoke `func`, returning either the result or the caught error
|
||||
* object. Any additional arguments are provided to `func` when it is invoked.
|
||||
* object. Any additional arguments are provided to `func` when it's invoked.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Utility
|
||||
* @param {*} func The function to attempt.
|
||||
* @param {Function} func The function to attempt.
|
||||
* @returns {*} Returns the `func` result or error object.
|
||||
* @example
|
||||
*
|
||||
@@ -29,12 +29,12 @@ var baseSlice = require('lodash._baseslice'),
|
||||
* elements = [];
|
||||
* }
|
||||
*/
|
||||
function attempt(func) {
|
||||
var attempt = restParam(function(func, args) {
|
||||
try {
|
||||
return func.apply(undefined, baseSlice(arguments, 1));
|
||||
return func.apply(undefined, args);
|
||||
} catch(e) {
|
||||
return isError(e) ? e : new Error(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = attempt;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.attempt",
|
||||
"version": "3.1.0",
|
||||
"version": "3.3.0",
|
||||
"description": "The modern build of lodash’s `_.attempt` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -17,7 +17,7 @@
|
||||
"repository": "lodash/lodash",
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._baseslice": "^3.0.0",
|
||||
"lodash.iserror": "^3.0.0"
|
||||
"lodash.iserror": "^3.0.0",
|
||||
"lodash.restparam": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
23
lodash.callback/LICENSE
Normal file
23
lodash.callback/LICENSE
Normal file
@@ -0,0 +1,23 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
||||
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,6 +1,10 @@
|
||||
# lodash.callback v3.1.1
|
||||
# lodash.callback v3.3.3
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.callback` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
The [lodash](https://lodash.com/) method `_.callback` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
## Discontinued
|
||||
|
||||
This package has been discontinued in favor of [lodash.iteratee](https://www.npmjs.com/package/lodash.iteratee).
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -17,4 +21,4 @@ In Node.js/io.js:
|
||||
var callback = require('lodash.callback');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#callback) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.callback) for more details.
|
||||
See the [documentation](https://lodash.com/docs#callback) or [package source](https://github.com/lodash/lodash/blob/3.3.3-npm-packages/lodash.callback) for more details.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* lodash 3.1.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.3.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.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
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
@@ -62,7 +62,7 @@ function isObjectLike(value) {
|
||||
*/
|
||||
function callback(func, thisArg, guard) {
|
||||
if (guard && isIterateeCall(func, thisArg, guard)) {
|
||||
thisArg = null;
|
||||
thisArg = undefined;
|
||||
}
|
||||
return isObjectLike(func)
|
||||
? matches(func)
|
||||
@@ -70,7 +70,7 @@ function callback(func, thisArg, guard) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function which performs a deep comparison between a given object
|
||||
* Creates a function that performs a deep comparison between a given object
|
||||
* and `source`, returning `true` if the given object has equivalent property
|
||||
* values, else `false`.
|
||||
*
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
{
|
||||
"name": "lodash.callback",
|
||||
"version": "3.1.1",
|
||||
"description": "The modern build of lodash’s `_.callback` as a module.",
|
||||
"version": "3.3.3",
|
||||
"description": "The lodash method `_.callback` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
"license": "MIT",
|
||||
"keywords": "lodash, lodash-modularized, stdlib, util",
|
||||
"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/)",
|
||||
"Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
|
||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||
],
|
||||
"repository": "lodash/lodash",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.deburr v3.1.2
|
||||
# lodash.deburr v3.2.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.deburr` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var deburr = require('lodash.deburr');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#deburr) or [package source](https://github.com/lodash/lodash/blob/3.1.2-npm-packages/lodash.deburr) for more details.
|
||||
See the [documentation](https://lodash.com/docs#deburr) or [package source](https://github.com/lodash/lodash/blob/3.2.0-npm-packages/lodash.deburr) for more details.
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
/**
|
||||
* lodash 3.1.2 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.2.0 (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>
|
||||
*/
|
||||
var root = require('lodash._root');
|
||||
|
||||
/** Used as references for various `Number` constants. */
|
||||
var INFINITY = 1 / 0;
|
||||
@@ -50,49 +51,6 @@ var deburredLetters = {
|
||||
'\xdf': 'ss'
|
||||
};
|
||||
|
||||
/** Used to determine if values are of the language type `Object`. */
|
||||
var objectTypes = {
|
||||
'function': true,
|
||||
'object': true
|
||||
};
|
||||
|
||||
/** Detect free variable `exports`. */
|
||||
var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
|
||||
|
||||
/** Detect free variable `module`. */
|
||||
var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
|
||||
|
||||
/** Detect free variable `global` from Node.js. */
|
||||
var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
|
||||
|
||||
/** Detect free variable `self`. */
|
||||
var freeSelf = checkGlobal(objectTypes[typeof self] && self);
|
||||
|
||||
/** Detect free variable `window`. */
|
||||
var freeWindow = checkGlobal(objectTypes[typeof window] && window);
|
||||
|
||||
/** Detect `this` as the global object. */
|
||||
var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
|
||||
|
||||
/**
|
||||
* Used as a reference to the global object.
|
||||
*
|
||||
* The `this` value is used if it's the global object to avoid Greasemonkey's
|
||||
* restricted `window` object, otherwise the `window` object is used.
|
||||
*/
|
||||
var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
|
||||
|
||||
/**
|
||||
* Checks if `value` is a global object.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {null|Object} Returns `value` if it's a global object, else `null`.
|
||||
*/
|
||||
function checkGlobal(value) {
|
||||
return (value && value.Object === Object) ? value : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.deburr",
|
||||
"version": "3.1.2",
|
||||
"version": "3.2.0",
|
||||
"description": "The lodash method `_.deburr` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -13,5 +13,8 @@
|
||||
"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.\"" }
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._root": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.difference v3.1.0
|
||||
# lodash.difference v3.2.2
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.difference` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var difference = require('lodash.difference');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#difference) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.difference) for more details.
|
||||
See the [documentation](https://lodash.com/docs#difference) or [package source](https://github.com/lodash/lodash/blob/3.2.2-npm-packages/lodash.difference) for more details.
|
||||
|
||||
@@ -1,24 +1,85 @@
|
||||
/**
|
||||
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.2.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.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
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
var baseDifference = require('lodash._basedifference'),
|
||||
baseFlatten = require('lodash._baseflatten'),
|
||||
isArguments = require('lodash.isarguments'),
|
||||
isArray = require('lodash.isarray'),
|
||||
restParam = require('lodash.restparam');
|
||||
|
||||
/**
|
||||
* Creates an array excluding all values of the provided arrays using
|
||||
* `SameValueZero` for equality comparisons.
|
||||
* Checks if `value` is object-like.
|
||||
*
|
||||
* **Note:** [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
|
||||
* comparisons are like strict equality comparisons, e.g. `===`, except that
|
||||
* `NaN` matches `NaN`.
|
||||
* @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 as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
|
||||
* of an array-like value.
|
||||
*/
|
||||
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 length.
|
||||
*
|
||||
* **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||
*
|
||||
* @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 unique `array` values not included in the other
|
||||
* provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* for equality comparisons.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -32,7 +93,7 @@ var baseDifference = require('lodash._basedifference'),
|
||||
* // => [1, 3]
|
||||
*/
|
||||
var difference = restParam(function(array, values) {
|
||||
return (isArray(array) || isArguments(array))
|
||||
return (isObjectLike(array) && isArrayLike(array))
|
||||
? baseDifference(array, baseFlatten(values, false, true))
|
||||
: [];
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.difference",
|
||||
"version": "3.1.0",
|
||||
"version": "3.2.2",
|
||||
"description": "The modern build of lodash’s `_.difference` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -19,8 +19,6 @@
|
||||
"dependencies": {
|
||||
"lodash._basedifference": "^3.0.0",
|
||||
"lodash._baseflatten": "^3.0.0",
|
||||
"lodash.isarguments": "^3.0.0",
|
||||
"lodash.isarray": "^3.0.0",
|
||||
"lodash.restparam": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.endswith v3.1.2
|
||||
# lodash.endswith v3.2.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.endsWith` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var endsWith = require('lodash.endswith');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#endsWith) or [package source](https://github.com/lodash/lodash/blob/3.1.2-npm-packages/lodash.endswith) for more details.
|
||||
See the [documentation](https://lodash.com/docs#endsWith) or [package source](https://github.com/lodash/lodash/blob/3.2.0-npm-packages/lodash.endswith) for more details.
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
/**
|
||||
* lodash 3.1.2 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.2.0 (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>
|
||||
*/
|
||||
var root = require('lodash._root');
|
||||
|
||||
/** Used as references for various `Number` constants. */
|
||||
var INFINITY = 1 / 0,
|
||||
@@ -29,52 +30,9 @@ var reIsBinary = /^0b[01]+$/i;
|
||||
/** Used to detect octal string values. */
|
||||
var reIsOctal = /^0o[0-7]+$/i;
|
||||
|
||||
/** Used to determine if values are of the language type `Object`. */
|
||||
var objectTypes = {
|
||||
'function': true,
|
||||
'object': true
|
||||
};
|
||||
|
||||
/** Built-in method references without a dependency on `root`. */
|
||||
var freeParseInt = parseInt;
|
||||
|
||||
/** Detect free variable `exports`. */
|
||||
var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
|
||||
|
||||
/** Detect free variable `module`. */
|
||||
var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
|
||||
|
||||
/** Detect free variable `global` from Node.js. */
|
||||
var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
|
||||
|
||||
/** Detect free variable `self`. */
|
||||
var freeSelf = checkGlobal(objectTypes[typeof self] && self);
|
||||
|
||||
/** Detect free variable `window`. */
|
||||
var freeWindow = checkGlobal(objectTypes[typeof window] && window);
|
||||
|
||||
/** Detect `this` as the global object. */
|
||||
var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
|
||||
|
||||
/**
|
||||
* Used as a reference to the global object.
|
||||
*
|
||||
* The `this` value is used if it's the global object to avoid Greasemonkey's
|
||||
* restricted `window` object, otherwise the `window` object is used.
|
||||
*/
|
||||
var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
|
||||
|
||||
/**
|
||||
* Checks if `value` is a global object.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {null|Object} Returns `value` if it's a global object, else `null`.
|
||||
*/
|
||||
function checkGlobal(value) {
|
||||
return (value && value.Object === Object) ? value : null;
|
||||
}
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.endswith",
|
||||
"version": "3.1.2",
|
||||
"version": "3.2.0",
|
||||
"description": "The lodash method `_.endsWith` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -13,5 +13,8 @@
|
||||
"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.\"" }
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._root": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.escape v3.1.2
|
||||
# lodash.escape v3.2.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.escape` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var escape = require('lodash.escape');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#escape) or [package source](https://github.com/lodash/lodash/blob/3.1.2-npm-packages/lodash.escape) for more details.
|
||||
See the [documentation](https://lodash.com/docs#escape) or [package source](https://github.com/lodash/lodash/blob/3.2.0-npm-packages/lodash.escape) for more details.
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
/**
|
||||
* lodash 3.1.2 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.2.0 (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>
|
||||
*/
|
||||
var root = require('lodash._root');
|
||||
|
||||
/** Used as references for various `Number` constants. */
|
||||
var INFINITY = 1 / 0;
|
||||
@@ -27,49 +28,6 @@ var htmlEscapes = {
|
||||
'`': '`'
|
||||
};
|
||||
|
||||
/** Used to determine if values are of the language type `Object`. */
|
||||
var objectTypes = {
|
||||
'function': true,
|
||||
'object': true
|
||||
};
|
||||
|
||||
/** Detect free variable `exports`. */
|
||||
var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
|
||||
|
||||
/** Detect free variable `module`. */
|
||||
var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
|
||||
|
||||
/** Detect free variable `global` from Node.js. */
|
||||
var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
|
||||
|
||||
/** Detect free variable `self`. */
|
||||
var freeSelf = checkGlobal(objectTypes[typeof self] && self);
|
||||
|
||||
/** Detect free variable `window`. */
|
||||
var freeWindow = checkGlobal(objectTypes[typeof window] && window);
|
||||
|
||||
/** Detect `this` as the global object. */
|
||||
var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
|
||||
|
||||
/**
|
||||
* Used as a reference to the global object.
|
||||
*
|
||||
* The `this` value is used if it's the global object to avoid Greasemonkey's
|
||||
* restricted `window` object, otherwise the `window` object is used.
|
||||
*/
|
||||
var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
|
||||
|
||||
/**
|
||||
* Checks if `value` is a global object.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {null|Object} Returns `value` if it's a global object, else `null`.
|
||||
*/
|
||||
function checkGlobal(value) {
|
||||
return (value && value.Object === Object) ? value : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `_.escape` to convert characters to HTML entities.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.escape",
|
||||
"version": "3.1.2",
|
||||
"version": "3.2.0",
|
||||
"description": "The lodash method `_.escape` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -13,5 +13,8 @@
|
||||
"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.\"" }
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._root": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.every v3.1.0
|
||||
# lodash.every v3.2.3
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.every` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var every = require('lodash.every');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#every) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.every) for more details.
|
||||
See the [documentation](https://lodash.com/docs#every) or [package source](https://github.com/lodash/lodash/blob/3.2.3-npm-packages/lodash.every) for more details.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.2.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.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
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
@@ -82,9 +82,9 @@ function baseEvery(collection, predicate) {
|
||||
function every(collection, predicate, thisArg) {
|
||||
var func = isArray(collection) ? arrayEvery : baseEvery;
|
||||
if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
|
||||
predicate = null;
|
||||
predicate = undefined;
|
||||
}
|
||||
if (typeof predicate != 'function' || typeof thisArg != 'undefined') {
|
||||
if (typeof predicate != 'function' || thisArg !== undefined) {
|
||||
predicate = baseCallback(predicate, thisArg, 3);
|
||||
}
|
||||
return func(collection, predicate);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.every",
|
||||
"version": "3.1.0",
|
||||
"version": "3.2.3",
|
||||
"description": "The modern build of lodash’s `_.every` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -21,6 +21,7 @@
|
||||
"lodash._basecallback": "^3.0.0",
|
||||
"lodash._baseeach": "^3.0.0",
|
||||
"lodash._isiterateecall": "^3.0.0",
|
||||
"lodash.isarray": "^3.0.0"
|
||||
"lodash.isarray": "^3.0.0",
|
||||
"lodash.keys": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,17 @@
|
||||
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
|
||||
Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||
|
||||
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/lodash/lodash
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
@@ -20,3 +30,18 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
====
|
||||
|
||||
Copyright and related rights for sample code are waived via CC0. Sample
|
||||
code is defined as all source code displayed within the prose of the
|
||||
documentation.
|
||||
|
||||
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
====
|
||||
|
||||
Files located in the node_modules and vendor directories are externally
|
||||
maintained libraries used by this software which have their own
|
||||
licenses; we recommend you read them, as their terms may differ from the
|
||||
terms above.
|
||||
18
lodash.fill/README.md
Normal file
18
lodash.fill/README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# lodash.fill v3.3.6
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.fill` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
```bash
|
||||
$ {sudo -H} npm i -g npm
|
||||
$ npm i --save lodash.fill
|
||||
```
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
var fill = require('lodash.fill');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#fill) or [package source](https://github.com/lodash/lodash/blob/3.3.6-npm-packages/lodash.fill) for more details.
|
||||
554
lodash.fill/index.js
Normal file
554
lodash.fill/index.js
Normal file
@@ -0,0 +1,554 @@
|
||||
/**
|
||||
* lodash (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modularize exports="npm" -o ./`
|
||||
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/
|
||||
|
||||
/** 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 references for the maximum length and index of an array. */
|
||||
var MAX_ARRAY_LENGTH = 4294967295;
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var funcTag = '[object Function]',
|
||||
genTag = '[object GeneratorFunction]',
|
||||
symbolTag = '[object Symbol]';
|
||||
|
||||
/** 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;
|
||||
|
||||
/** 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;
|
||||
|
||||
/**
|
||||
* The base implementation of `_.clamp` which doesn't coerce arguments to numbers.
|
||||
*
|
||||
* @private
|
||||
* @param {number} number The number to clamp.
|
||||
* @param {number} [lower] The lower bound.
|
||||
* @param {number} upper The upper bound.
|
||||
* @returns {number} Returns the clamped number.
|
||||
*/
|
||||
function baseClamp(number, lower, upper) {
|
||||
if (number === number) {
|
||||
if (upper !== undefined) {
|
||||
number = number <= upper ? number : upper;
|
||||
}
|
||||
if (lower !== undefined) {
|
||||
number = number >= lower ? number : lower;
|
||||
}
|
||||
}
|
||||
return number;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.fill` without an iteratee call guard.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to fill.
|
||||
* @param {*} value The value to fill `array` with.
|
||||
* @param {number} [start=0] The start position.
|
||||
* @param {number} [end=array.length] The end position.
|
||||
* @returns {Array} Returns `array`.
|
||||
*/
|
||||
function baseFill(array, value, start, end) {
|
||||
var length = array.length;
|
||||
|
||||
start = toInteger(start);
|
||||
if (start < 0) {
|
||||
start = -start > length ? 0 : (length + start);
|
||||
}
|
||||
end = (end === undefined || end > length) ? length : toInteger(end);
|
||||
if (end < 0) {
|
||||
end += length;
|
||||
}
|
||||
end = start > end ? 0 : toLength(end);
|
||||
while (start < end) {
|
||||
array[start++] = value;
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.property` without support for deep paths.
|
||||
*
|
||||
* @private
|
||||
* @param {string} key The key of the property to get.
|
||||
* @returns {Function} Returns the new accessor function.
|
||||
*/
|
||||
function baseProperty(key) {
|
||||
return function(object) {
|
||||
return object == null ? undefined : object[key];
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the "length" property value of `object`.
|
||||
*
|
||||
* **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 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) {
|
||||
length = length == null ? MAX_SAFE_INTEGER : length;
|
||||
return !!length &&
|
||||
(typeof value == 'number' || reIsUint.test(value)) &&
|
||||
(value > -1 && value % 1 == 0 && value < length);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given arguments are from an iteratee call.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The potential iteratee value argument.
|
||||
* @param {*} index The potential iteratee index or key argument.
|
||||
* @param {*} object The potential iteratee object argument.
|
||||
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
|
||||
* else `false`.
|
||||
*/
|
||||
function isIterateeCall(value, index, object) {
|
||||
if (!isObject(object)) {
|
||||
return false;
|
||||
}
|
||||
var type = typeof index;
|
||||
if (type == 'number'
|
||||
? (isArrayLike(object) && isIndex(index, object.length))
|
||||
: (type == 'string' && index in object)
|
||||
) {
|
||||
return eq(object[index], value);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fills elements of `array` with `value` from `start` up to, but not
|
||||
* including, `end`.
|
||||
*
|
||||
* **Note:** This method mutates `array`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 3.2.0
|
||||
* @category Array
|
||||
* @param {Array} array The array to fill.
|
||||
* @param {*} value The value to fill `array` with.
|
||||
* @param {number} [start=0] The start position.
|
||||
* @param {number} [end=array.length] The end position.
|
||||
* @returns {Array} Returns `array`.
|
||||
* @example
|
||||
*
|
||||
* var array = [1, 2, 3];
|
||||
*
|
||||
* _.fill(array, 'a');
|
||||
* console.log(array);
|
||||
* // => ['a', 'a', 'a']
|
||||
*
|
||||
* _.fill(Array(3), 2);
|
||||
* // => [2, 2, 2]
|
||||
*
|
||||
* _.fill([4, 6, 8, 10], '*', 1, 3);
|
||||
* // => [4, '*', '*', 10]
|
||||
*/
|
||||
function fill(array, value, start, end) {
|
||||
var length = array ? array.length : 0;
|
||||
if (!length) {
|
||||
return [];
|
||||
}
|
||||
if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
|
||||
start = 0;
|
||||
end = length;
|
||||
}
|
||||
return baseFill(array, value, start, end);
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to compare.
|
||||
* @param {*} other The other value to compare.
|
||||
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
||||
* @example
|
||||
*
|
||||
* var object = { 'user': 'fred' };
|
||||
* var other = { 'user': 'fred' };
|
||||
*
|
||||
* _.eq(object, object);
|
||||
* // => true
|
||||
*
|
||||
* _.eq(object, other);
|
||||
* // => false
|
||||
*
|
||||
* _.eq('a', 'a');
|
||||
* // => true
|
||||
*
|
||||
* _.eq('a', Object('a'));
|
||||
* // => false
|
||||
*
|
||||
* _.eq(NaN, NaN);
|
||||
* // => true
|
||||
*/
|
||||
function eq(value, other) {
|
||||
return value === other || (value !== value && other !== other);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is array-like. A value is considered array-like if it's
|
||||
* not a function and has a `value.length` that's an integer greater than or
|
||||
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isArrayLike([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isArrayLike(document.body.children);
|
||||
* // => true
|
||||
*
|
||||
* _.isArrayLike('abc');
|
||||
* // => true
|
||||
*
|
||||
* _.isArrayLike(_.noop);
|
||||
* // => false
|
||||
*/
|
||||
function isArrayLike(value) {
|
||||
return value != null && isLength(getLength(value)) && !isFunction(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Function` object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is 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 and weak map constructors,
|
||||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This function is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length,
|
||||
* else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isLength(3);
|
||||
* // => true
|
||||
*
|
||||
* _.isLength(Number.MIN_VALUE);
|
||||
* // => false
|
||||
*
|
||||
* _.isLength(Infinity);
|
||||
* // => false
|
||||
*
|
||||
* _.isLength('3');
|
||||
* // => false
|
||||
*/
|
||||
function isLength(value) {
|
||||
return typeof value == 'number' &&
|
||||
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is the
|
||||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @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(_.noop);
|
||||
* // => true
|
||||
*
|
||||
* _.isObject(null);
|
||||
* // => false
|
||||
*/
|
||||
function isObject(value) {
|
||||
var type = typeof value;
|
||||
return !!value && (type == 'object' || type == 'function');
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
||||
* and has a `typeof` result of "object".
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isObjectLike({});
|
||||
* // => true
|
||||
*
|
||||
* _.isObjectLike([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isObjectLike(_.noop);
|
||||
* // => false
|
||||
*
|
||||
* _.isObjectLike(null);
|
||||
* // => false
|
||||
*/
|
||||
function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Symbol` primitive or object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is correctly classified,
|
||||
* else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isSymbol(Symbol.iterator);
|
||||
* // => true
|
||||
*
|
||||
* _.isSymbol('abc');
|
||||
* // => false
|
||||
*/
|
||||
function isSymbol(value) {
|
||||
return typeof value == 'symbol' ||
|
||||
(isObjectLike(value) && objectToString.call(value) == symbolTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `value` to a finite number.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.12.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to convert.
|
||||
* @returns {number} Returns the converted number.
|
||||
* @example
|
||||
*
|
||||
* _.toFinite(3.2);
|
||||
* // => 3.2
|
||||
*
|
||||
* _.toFinite(Number.MIN_VALUE);
|
||||
* // => 5e-324
|
||||
*
|
||||
* _.toFinite(Infinity);
|
||||
* // => 1.7976931348623157e+308
|
||||
*
|
||||
* _.toFinite('3.2');
|
||||
* // => 3.2
|
||||
*/
|
||||
function toFinite(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;
|
||||
}
|
||||
return value === value ? value : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to convert.
|
||||
* @returns {number} Returns the converted integer.
|
||||
* @example
|
||||
*
|
||||
* _.toInteger(3.2);
|
||||
* // => 3
|
||||
*
|
||||
* _.toInteger(Number.MIN_VALUE);
|
||||
* // => 0
|
||||
*
|
||||
* _.toInteger(Infinity);
|
||||
* // => 1.7976931348623157e+308
|
||||
*
|
||||
* _.toInteger('3.2');
|
||||
* // => 3
|
||||
*/
|
||||
function toInteger(value) {
|
||||
var result = toFinite(value),
|
||||
remainder = result % 1;
|
||||
|
||||
return result === result ? (remainder ? result - remainder : result) : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `value` to an integer suitable for use as the length of an
|
||||
* array-like object.
|
||||
*
|
||||
* **Note:** This method is based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to convert.
|
||||
* @returns {number} Returns the converted integer.
|
||||
* @example
|
||||
*
|
||||
* _.toLength(3.2);
|
||||
* // => 3
|
||||
*
|
||||
* _.toLength(Number.MIN_VALUE);
|
||||
* // => 0
|
||||
*
|
||||
* _.toLength(Infinity);
|
||||
* // => 4294967295
|
||||
*
|
||||
* _.toLength('3.2');
|
||||
* // => 3
|
||||
*/
|
||||
function toLength(value) {
|
||||
return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `value` to a number.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to process.
|
||||
* @returns {number} Returns the number.
|
||||
* @example
|
||||
*
|
||||
* _.toNumber(3.2);
|
||||
* // => 3.2
|
||||
*
|
||||
* _.toNumber(Number.MIN_VALUE);
|
||||
* // => 5e-324
|
||||
*
|
||||
* _.toNumber(Infinity);
|
||||
* // => Infinity
|
||||
*
|
||||
* _.toNumber('3.2');
|
||||
* // => 3.2
|
||||
*/
|
||||
function toNumber(value) {
|
||||
if (typeof value == 'number') {
|
||||
return value;
|
||||
}
|
||||
if (isSymbol(value)) {
|
||||
return NAN;
|
||||
}
|
||||
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 = fill;
|
||||
17
lodash.fill/package.json
Normal file
17
lodash.fill/package.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "lodash.fill",
|
||||
"version": "3.3.6",
|
||||
"description": "The lodash method `_.fill` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
"license": "MIT",
|
||||
"keywords": "lodash-modularized, fill",
|
||||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"contributors": [
|
||||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
|
||||
"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.\"" }
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.find v3.1.0
|
||||
# lodash.find v3.2.1
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.find` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var find = require('lodash.find');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#find) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.find) for more details.
|
||||
See the [documentation](https://lodash.com/docs#find) or [package source](https://github.com/lodash/lodash/blob/3.2.1-npm-packages/lodash.find) for more details.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||
* 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>
|
||||
* 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>
|
||||
*/
|
||||
@@ -28,7 +28,7 @@ function createFind(eachFunc, fromRight) {
|
||||
return index > -1 ? collection[index] : undefined;
|
||||
}
|
||||
return baseFind(collection, predicate, eachFunc);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.find",
|
||||
"version": "3.1.0",
|
||||
"version": "3.2.1",
|
||||
"description": "The modern build of lodash’s `_.find` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -21,6 +21,7 @@
|
||||
"lodash._baseeach": "^3.0.0",
|
||||
"lodash._basefind": "^3.0.0",
|
||||
"lodash._basefindindex": "^3.0.0",
|
||||
"lodash.isarray": "^3.0.0"
|
||||
"lodash.isarray": "^3.0.0",
|
||||
"lodash.keys": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.findindex v3.1.0
|
||||
# lodash.findindex v3.2.1
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.findIndex` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var findIndex = require('lodash.findindex');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#findIndex) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.findindex) for more details.
|
||||
See the [documentation](https://lodash.com/docs#findIndex) or [package source](https://github.com/lodash/lodash/blob/3.2.1-npm-packages/lodash.findindex) for more details.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||
* 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>
|
||||
* 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>
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.findindex",
|
||||
"version": "3.1.0",
|
||||
"version": "3.2.1",
|
||||
"description": "The modern build of lodash’s `_.findIndex` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -18,6 +18,7 @@
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._basecallback": "^3.0.0",
|
||||
"lodash._basefindindex": "^3.0.0"
|
||||
"lodash._basefindindex": "^3.0.0",
|
||||
"lodash.isarray": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.findlast v3.1.0
|
||||
# lodash.findlast v3.2.1
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.findLast` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var findLast = require('lodash.findlast');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#findLast) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.findlast) for more details.
|
||||
See the [documentation](https://lodash.com/docs#findLast) or [package source](https://github.com/lodash/lodash/blob/3.2.1-npm-packages/lodash.findlast) for more details.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||
* 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>
|
||||
* 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>
|
||||
*/
|
||||
@@ -28,7 +28,7 @@ function createFind(eachFunc, fromRight) {
|
||||
return index > -1 ? collection[index] : undefined;
|
||||
}
|
||||
return baseFind(collection, predicate, eachFunc);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.findlast",
|
||||
"version": "3.1.0",
|
||||
"version": "3.2.1",
|
||||
"description": "The modern build of lodash’s `_.findLast` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -21,6 +21,7 @@
|
||||
"lodash._baseeachright": "^3.0.0",
|
||||
"lodash._basefind": "^3.0.0",
|
||||
"lodash._basefindindex": "^3.0.0",
|
||||
"lodash.isarray": "^3.0.0"
|
||||
"lodash.isarray": "^3.0.0",
|
||||
"lodash.keys": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.findlastindex v3.1.0
|
||||
# lodash.findlastindex v3.2.1
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.findLastIndex` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var findLastIndex = require('lodash.findlastindex');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#findLastIndex) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.findlastindex) for more details.
|
||||
See the [documentation](https://lodash.com/docs#findLastIndex) or [package source](https://github.com/lodash/lodash/blob/3.2.1-npm-packages/lodash.findlastindex) for more details.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||
* 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>
|
||||
* 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>
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.findlastindex",
|
||||
"version": "3.1.0",
|
||||
"version": "3.2.1",
|
||||
"description": "The modern build of lodash’s `_.findLastIndex` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -18,6 +18,7 @@
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._basecallback": "^3.0.0",
|
||||
"lodash._basefindindex": "^3.0.0"
|
||||
"lodash._basefindindex": "^3.0.0",
|
||||
"lodash.isarray": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,17 @@
|
||||
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
|
||||
Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||
|
||||
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/lodash/lodash
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
@@ -20,3 +30,18 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
====
|
||||
|
||||
Copyright and related rights for sample code are waived via CC0. Sample
|
||||
code is defined as all source code displayed within the prose of the
|
||||
documentation.
|
||||
|
||||
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
====
|
||||
|
||||
Files located in the node_modules and vendor directories are externally
|
||||
maintained libraries used by this software which have their own
|
||||
licenses; we recommend you read them, as their terms may differ from the
|
||||
terms above.
|
||||
@@ -1,20 +1,18 @@
|
||||
# lodash.flow v3.1.0
|
||||
# lodash.flow v3.3.0
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.flow` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
The [lodash](https://lodash.com/) method `_.flow` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
|
||||
```bash
|
||||
$ {sudo -H} npm i -g npm
|
||||
$ npm i --save lodash.flow
|
||||
```
|
||||
|
||||
In Node.js/io.js:
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
var flow = require('lodash.flow');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#flow) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.flow) for more details.
|
||||
See the [documentation](https://lodash.com/docs#flow) or [package source](https://github.com/lodash/lodash/blob/3.3.0-npm-packages/lodash.flow) for more details.
|
||||
|
||||
@@ -1,23 +1,63 @@
|
||||
/**
|
||||
* lodash 3.1.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.2 <http://underscorejs.org/LICENSE>
|
||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
* lodash (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modularize exports="npm" -o ./`
|
||||
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/
|
||||
var createComposer = require('lodash._createcomposer');
|
||||
var baseFlatten = require('lodash._baseflatten'),
|
||||
rest = require('lodash.rest');
|
||||
|
||||
/** Used as the `TypeError` message for "Functions" methods. */
|
||||
var FUNC_ERROR_TEXT = 'Expected a function';
|
||||
|
||||
/**
|
||||
* Creates a function that returns the result of invoking the provided
|
||||
* functions with the `this` binding of the created function, where each
|
||||
* successive invocation is supplied the return value of the previous.
|
||||
* Creates a `_.flow` or `_.flowRight` function.
|
||||
*
|
||||
* @private
|
||||
* @param {boolean} [fromRight] Specify iterating from right to left.
|
||||
* @returns {Function} Returns the new flow function.
|
||||
*/
|
||||
function createFlow(fromRight) {
|
||||
return rest(function(funcs) {
|
||||
funcs = baseFlatten(funcs, 1);
|
||||
|
||||
var length = funcs.length,
|
||||
index = length;
|
||||
|
||||
if (fromRight) {
|
||||
funcs.reverse();
|
||||
}
|
||||
while (index--) {
|
||||
if (typeof funcs[index] != 'function') {
|
||||
throw new TypeError(FUNC_ERROR_TEXT);
|
||||
}
|
||||
}
|
||||
return function() {
|
||||
var index = 0,
|
||||
result = length ? funcs[index].apply(this, arguments) : arguments[0];
|
||||
|
||||
while (++index < length) {
|
||||
result = funcs[index].call(this, result);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that returns the result of invoking the given functions
|
||||
* with the `this` binding of the created function, where each successive
|
||||
* invocation is supplied the return value of the previous.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Function
|
||||
* @param {...Function} [funcs] Functions to invoke.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @since 3.0.0
|
||||
* @category Util
|
||||
* @param {...(Function|Function[])} [funcs] Functions to invoke.
|
||||
* @returns {Function} Returns the new composite function.
|
||||
* @see _.flowRight
|
||||
* @example
|
||||
*
|
||||
* function square(n) {
|
||||
@@ -28,6 +68,6 @@ var createComposer = require('lodash._createcomposer');
|
||||
* addSquare(1, 2);
|
||||
* // => 9
|
||||
*/
|
||||
var flow = createComposer();
|
||||
var flow = createFlow();
|
||||
|
||||
module.exports = flow;
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
{
|
||||
"name": "lodash.flow",
|
||||
"version": "3.1.0",
|
||||
"description": "The modern build of lodash’s `_.flow` as a module.",
|
||||
"version": "3.3.0",
|
||||
"description": "The lodash method `_.flow` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
"license": "MIT",
|
||||
"keywords": "lodash, lodash-modularized, stdlib, util",
|
||||
"keywords": "lodash-modularized, flow",
|
||||
"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/)",
|
||||
"Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
|
||||
"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._createcomposer": "^3.0.0"
|
||||
"lodash._baseflatten": "~4.2.0",
|
||||
"lodash.rest": "^4.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
47
lodash.flowright/LICENSE
Normal file
47
lodash.flowright/LICENSE
Normal file
@@ -0,0 +1,47 @@
|
||||
Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||
|
||||
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/lodash/lodash
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
====
|
||||
|
||||
Copyright and related rights for sample code are waived via CC0. Sample
|
||||
code is defined as all source code displayed within the prose of the
|
||||
documentation.
|
||||
|
||||
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
====
|
||||
|
||||
Files located in the node_modules and vendor directories are externally
|
||||
maintained libraries used by this software which have their own
|
||||
licenses; we recommend you read them, as their terms may differ from the
|
||||
terms above.
|
||||
@@ -1,20 +1,18 @@
|
||||
# lodash.flowright v3.1.0
|
||||
# lodash.flowright v3.3.0
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.flowRight` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
The [lodash](https://lodash.com/) method `_.flowRight` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
|
||||
```bash
|
||||
$ {sudo -H} npm i -g npm
|
||||
$ npm i --save lodash.flowright
|
||||
```
|
||||
|
||||
In Node.js/io.js:
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
var flowRight = require('lodash.flowright');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#flowRight) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.flowright) for more details.
|
||||
See the [documentation](https://lodash.com/docs#flowRight) or [package source](https://github.com/lodash/lodash/blob/3.3.0-npm-packages/lodash.flowright) for more details.
|
||||
|
||||
@@ -1,23 +1,62 @@
|
||||
/**
|
||||
* lodash 3.1.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.2 <http://underscorejs.org/LICENSE>
|
||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
* lodash (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modularize exports="npm" -o ./`
|
||||
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/
|
||||
var createComposer = require('lodash._createcomposer');
|
||||
var baseFlatten = require('lodash._baseflatten'),
|
||||
rest = require('lodash.rest');
|
||||
|
||||
/** Used as the `TypeError` message for "Functions" methods. */
|
||||
var FUNC_ERROR_TEXT = 'Expected a function';
|
||||
|
||||
/**
|
||||
* Creates a `_.flow` or `_.flowRight` function.
|
||||
*
|
||||
* @private
|
||||
* @param {boolean} [fromRight] Specify iterating from right to left.
|
||||
* @returns {Function} Returns the new flow function.
|
||||
*/
|
||||
function createFlow(fromRight) {
|
||||
return rest(function(funcs) {
|
||||
funcs = baseFlatten(funcs, 1);
|
||||
|
||||
var length = funcs.length,
|
||||
index = length;
|
||||
|
||||
if (fromRight) {
|
||||
funcs.reverse();
|
||||
}
|
||||
while (index--) {
|
||||
if (typeof funcs[index] != 'function') {
|
||||
throw new TypeError(FUNC_ERROR_TEXT);
|
||||
}
|
||||
}
|
||||
return function() {
|
||||
var index = 0,
|
||||
result = length ? funcs[index].apply(this, arguments) : arguments[0];
|
||||
|
||||
while (++index < length) {
|
||||
result = funcs[index].call(this, result);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is like `_.flow` except that it creates a function that
|
||||
* invokes the provided functions from right to left.
|
||||
* invokes the given functions from right to left.
|
||||
*
|
||||
* @static
|
||||
* @since 3.0.0
|
||||
* @memberOf _
|
||||
* @alias backflow, compose
|
||||
* @category Function
|
||||
* @param {...Function} [funcs] Functions to invoke.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @category Util
|
||||
* @param {...(Function|Function[])} [funcs] Functions to invoke.
|
||||
* @returns {Function} Returns the new composite function.
|
||||
* @see _.flow
|
||||
* @example
|
||||
*
|
||||
* function square(n) {
|
||||
@@ -28,6 +67,6 @@ var createComposer = require('lodash._createcomposer');
|
||||
* addSquare(1, 2);
|
||||
* // => 9
|
||||
*/
|
||||
var flowRight = createComposer(true);
|
||||
var flowRight = createFlow(true);
|
||||
|
||||
module.exports = flowRight;
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
{
|
||||
"name": "lodash.flowright",
|
||||
"version": "3.1.0",
|
||||
"description": "The modern build of lodash’s `_.flowRight` as a module.",
|
||||
"version": "3.3.0",
|
||||
"description": "The lodash method `_.flowRight` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
"license": "MIT",
|
||||
"keywords": "lodash, lodash-modularized, stdlib, util",
|
||||
"keywords": "lodash-modularized, flowright",
|
||||
"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/)",
|
||||
"Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
|
||||
"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._createcomposer": "^3.0.0"
|
||||
"lodash._baseflatten": "~4.2.0",
|
||||
"lodash.rest": "^4.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.has v3.1.1
|
||||
# lodash.has v3.2.1
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.has` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var has = require('lodash.has');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#has) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.has) for more details.
|
||||
See the [documentation](https://lodash.com/docs#has) or [package source](https://github.com/lodash/lodash/blob/3.2.1-npm-packages/lodash.has) for more details.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* lodash 3.1.1 (Custom Build) <https://lodash.com/>
|
||||
* 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.3 <http://underscorejs.org/LICENSE>
|
||||
@@ -9,18 +9,42 @@
|
||||
var baseGet = require('lodash._baseget'),
|
||||
baseSlice = require('lodash._baseslice'),
|
||||
toPath = require('lodash._topath'),
|
||||
isArguments = require('lodash.isarguments'),
|
||||
isArray = require('lodash.isarray');
|
||||
|
||||
/** Used to match property names within property paths. */
|
||||
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,
|
||||
reIsPlainProp = /^\w*$/;
|
||||
|
||||
/** Used to detect unsigned integer values. */
|
||||
var reIsUint = /^\d+$/;
|
||||
|
||||
/** Used for native method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
|
||||
* of an array-like value.
|
||||
*/
|
||||
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a property name and not a property path.
|
||||
*
|
||||
@@ -42,7 +66,20 @@ function isKey(value, object) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `value` to an object if it is not one.
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||
*
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `value` to an object if it's not one.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to process.
|
||||
@@ -94,7 +131,7 @@ 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');
|
||||
return !!value && (type == 'object' || type == 'function');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -127,10 +164,14 @@ function has(object, path) {
|
||||
if (!result && !isKey(path)) {
|
||||
path = toPath(path);
|
||||
object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
|
||||
if (object == null) {
|
||||
return false;
|
||||
}
|
||||
path = last(path);
|
||||
result = object != null && hasOwnProperty.call(object, path);
|
||||
result = hasOwnProperty.call(object, path);
|
||||
}
|
||||
return result;
|
||||
return result || (isLength(object.length) && isIndex(path, object.length) &&
|
||||
(isArray(object) || isArguments(object)));
|
||||
}
|
||||
|
||||
module.exports = has;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.has",
|
||||
"version": "3.1.1",
|
||||
"version": "3.2.1",
|
||||
"description": "The modern build of lodash’s `_.has` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -20,6 +20,7 @@
|
||||
"lodash._baseget": "^3.0.0",
|
||||
"lodash._baseslice": "^3.0.0",
|
||||
"lodash._topath": "^3.0.0",
|
||||
"lodash.isarguments": "^3.0.0",
|
||||
"lodash.isarray": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.includes v3.1.2
|
||||
# lodash.includes v3.1.3
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.includes` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var includes = require('lodash.includes');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#includes) or [package source](https://github.com/lodash/lodash/blob/3.1.2-npm-packages/lodash.includes) for more details.
|
||||
See the [documentation](https://lodash.com/docs#includes) or [package source](https://github.com/lodash/lodash/blob/3.1.3-npm-packages/lodash.includes) for more details.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* lodash 3.1.2 (Custom Build) <https://lodash.com/>
|
||||
* 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>
|
||||
@@ -17,7 +17,7 @@ var baseIndexOf = require('lodash._baseindexof'),
|
||||
var nativeMax = Math.max;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||
@@ -50,7 +50,7 @@ var getLength = baseProperty('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
|
||||
* @param {*} value The value to check.
|
||||
@@ -61,9 +61,9 @@ function isLength(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is in `collection` using
|
||||
* [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
|
||||
* for equality comparisons. If `fromIndex` is negative, it is used as the offset
|
||||
* Checks if `target` is in `collection` using
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* for equality comparisons. If `fromIndex` is negative, it's used as the offset
|
||||
* from the end of `collection`.
|
||||
*
|
||||
* @static
|
||||
@@ -95,17 +95,14 @@ function includes(collection, target, fromIndex, guard) {
|
||||
collection = values(collection);
|
||||
length = collection.length;
|
||||
}
|
||||
if (!length) {
|
||||
return false;
|
||||
}
|
||||
if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) {
|
||||
fromIndex = 0;
|
||||
} else {
|
||||
fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0);
|
||||
}
|
||||
return (typeof collection == 'string' || !isArray(collection) && isString(collection))
|
||||
? (fromIndex < length && collection.indexOf(target, fromIndex) > -1)
|
||||
: (baseIndexOf(collection, target, fromIndex) > -1);
|
||||
? (fromIndex <= length && collection.indexOf(target, fromIndex) > -1)
|
||||
: (!!length && baseIndexOf(collection, target, fromIndex) > -1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.includes",
|
||||
"version": "3.1.2",
|
||||
"version": "3.1.3",
|
||||
"description": "The modern build of lodash’s `_.includes` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
47
lodash.inrange/LICENSE
Normal file
47
lodash.inrange/LICENSE
Normal file
@@ -0,0 +1,47 @@
|
||||
Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||
|
||||
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/lodash/lodash
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
====
|
||||
|
||||
Copyright and related rights for sample code are waived via CC0. Sample
|
||||
code is defined as all source code displayed within the prose of the
|
||||
documentation.
|
||||
|
||||
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
====
|
||||
|
||||
Files located in the node_modules and vendor directories are externally
|
||||
maintained libraries used by this software which have their own
|
||||
licenses; we recommend you read them, as their terms may differ from the
|
||||
terms above.
|
||||
18
lodash.inrange/README.md
Normal file
18
lodash.inrange/README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# lodash.inrange v3.3.6
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.inRange` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
```bash
|
||||
$ {sudo -H} npm i -g npm
|
||||
$ npm i --save lodash.inrange
|
||||
```
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
var inRange = require('lodash.inrange');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#inRange) or [package source](https://github.com/lodash/lodash/blob/3.3.6-npm-packages/lodash.inrange) for more details.
|
||||
269
lodash.inrange/index.js
Normal file
269
lodash.inrange/index.js
Normal file
@@ -0,0 +1,269 @@
|
||||
/**
|
||||
* lodash (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modularize exports="npm" -o ./`
|
||||
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/
|
||||
|
||||
/** Used as references for various `Number` constants. */
|
||||
var INFINITY = 1 / 0,
|
||||
MAX_INTEGER = 1.7976931348623157e+308,
|
||||
NAN = 0 / 0;
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var symbolTag = '[object Symbol]';
|
||||
|
||||
/** 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;
|
||||
|
||||
/** Built-in method references without a dependency on `root`. */
|
||||
var freeParseInt = parseInt;
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeMax = Math.max,
|
||||
nativeMin = Math.min;
|
||||
|
||||
/**
|
||||
* The base implementation of `_.inRange` which doesn't coerce arguments.
|
||||
*
|
||||
* @private
|
||||
* @param {number} number The number to check.
|
||||
* @param {number} start The start of the range.
|
||||
* @param {number} end The end of the range.
|
||||
* @returns {boolean} Returns `true` if `number` is in the range, else `false`.
|
||||
*/
|
||||
function baseInRange(number, start, end) {
|
||||
return number >= nativeMin(start, end) && number < nativeMax(start, end);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is the
|
||||
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @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(_.noop);
|
||||
* // => true
|
||||
*
|
||||
* _.isObject(null);
|
||||
* // => false
|
||||
*/
|
||||
function isObject(value) {
|
||||
var type = typeof value;
|
||||
return !!value && (type == 'object' || type == 'function');
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
||||
* and has a `typeof` result of "object".
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isObjectLike({});
|
||||
* // => true
|
||||
*
|
||||
* _.isObjectLike([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isObjectLike(_.noop);
|
||||
* // => false
|
||||
*
|
||||
* _.isObjectLike(null);
|
||||
* // => false
|
||||
*/
|
||||
function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Symbol` primitive or object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isSymbol(Symbol.iterator);
|
||||
* // => true
|
||||
*
|
||||
* _.isSymbol('abc');
|
||||
* // => false
|
||||
*/
|
||||
function isSymbol(value) {
|
||||
return typeof value == 'symbol' ||
|
||||
(isObjectLike(value) && objectToString.call(value) == symbolTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `value` to a finite number.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.12.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to convert.
|
||||
* @returns {number} Returns the converted number.
|
||||
* @example
|
||||
*
|
||||
* _.toFinite(3.2);
|
||||
* // => 3.2
|
||||
*
|
||||
* _.toFinite(Number.MIN_VALUE);
|
||||
* // => 5e-324
|
||||
*
|
||||
* _.toFinite(Infinity);
|
||||
* // => 1.7976931348623157e+308
|
||||
*
|
||||
* _.toFinite('3.2');
|
||||
* // => 3.2
|
||||
*/
|
||||
function toFinite(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;
|
||||
}
|
||||
return value === value ? value : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `value` to a number.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to process.
|
||||
* @returns {number} Returns the number.
|
||||
* @example
|
||||
*
|
||||
* _.toNumber(3.2);
|
||||
* // => 3.2
|
||||
*
|
||||
* _.toNumber(Number.MIN_VALUE);
|
||||
* // => 5e-324
|
||||
*
|
||||
* _.toNumber(Infinity);
|
||||
* // => Infinity
|
||||
*
|
||||
* _.toNumber('3.2');
|
||||
* // => 3.2
|
||||
*/
|
||||
function toNumber(value) {
|
||||
if (typeof value == 'number') {
|
||||
return value;
|
||||
}
|
||||
if (isSymbol(value)) {
|
||||
return NAN;
|
||||
}
|
||||
if (isObject(value)) {
|
||||
var other = typeof value.valueOf == 'function' ? 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `n` is between `start` and up to, but not including, `end`. If
|
||||
* `end` is not specified, it's set to `start` with `start` then set to `0`.
|
||||
* If `start` is greater than `end` the params are swapped to support
|
||||
* negative ranges.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 3.3.0
|
||||
* @category Number
|
||||
* @param {number} number The number to check.
|
||||
* @param {number} [start=0] The start of the range.
|
||||
* @param {number} end The end of the range.
|
||||
* @returns {boolean} Returns `true` if `number` is in the range, else `false`.
|
||||
* @see _.range, _.rangeRight
|
||||
* @example
|
||||
*
|
||||
* _.inRange(3, 2, 4);
|
||||
* // => true
|
||||
*
|
||||
* _.inRange(4, 8);
|
||||
* // => true
|
||||
*
|
||||
* _.inRange(4, 2);
|
||||
* // => false
|
||||
*
|
||||
* _.inRange(2, 2);
|
||||
* // => false
|
||||
*
|
||||
* _.inRange(1.2, 2);
|
||||
* // => true
|
||||
*
|
||||
* _.inRange(5.2, 4);
|
||||
* // => false
|
||||
*
|
||||
* _.inRange(-3, -2, -6);
|
||||
* // => true
|
||||
*/
|
||||
function inRange(number, start, end) {
|
||||
start = toFinite(start);
|
||||
if (end === undefined) {
|
||||
end = start;
|
||||
start = 0;
|
||||
} else {
|
||||
end = toFinite(end);
|
||||
}
|
||||
number = toNumber(number);
|
||||
return baseInRange(number, start, end);
|
||||
}
|
||||
|
||||
module.exports = inRange;
|
||||
17
lodash.inrange/package.json
Normal file
17
lodash.inrange/package.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "lodash.inrange",
|
||||
"version": "3.3.6",
|
||||
"description": "The lodash method `_.inRange` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
"license": "MIT",
|
||||
"keywords": "lodash-modularized, inrange",
|
||||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"contributors": [
|
||||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
|
||||
"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.\"" }
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.intersection v3.1.0
|
||||
# lodash.intersection v3.2.0
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.intersection` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var intersection = require('lodash.intersection');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#intersection) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.intersection) for more details.
|
||||
See the [documentation](https://lodash.com/docs#intersection) or [package source](https://github.com/lodash/lodash/blob/3.2.0-npm-packages/lodash.intersection) for more details.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||
* 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>
|
||||
@@ -8,13 +8,14 @@
|
||||
*/
|
||||
var baseIndexOf = require('lodash._baseindexof'),
|
||||
cacheIndexOf = require('lodash._cacheindexof'),
|
||||
createCache = require('lodash._createcache');
|
||||
createCache = require('lodash._createcache'),
|
||||
restParam = require('lodash.restparam');
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
|
||||
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||
|
||||
/**
|
||||
* The base implementation of `_.property` without support for deep paths.
|
||||
@@ -55,7 +56,7 @@ function isArrayLike(value) {
|
||||
/**
|
||||
* 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
|
||||
* @param {*} value The value to check.
|
||||
@@ -66,8 +67,8 @@ function isLength(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of unique values in all provided arrays using
|
||||
* [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
|
||||
* Creates an array of unique values that are included in all of the provided
|
||||
* arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* for equality comparisons.
|
||||
*
|
||||
* @static
|
||||
@@ -79,27 +80,19 @@ function isLength(value) {
|
||||
* _.intersection([1, 2], [4, 2], [2, 1]);
|
||||
* // => [2]
|
||||
*/
|
||||
function intersection() {
|
||||
var args = [],
|
||||
argsIndex = -1,
|
||||
argsLength = arguments.length,
|
||||
caches = [],
|
||||
var intersection = restParam(function(arrays) {
|
||||
var othLength = arrays.length,
|
||||
othIndex = othLength,
|
||||
caches = Array(length),
|
||||
indexOf = baseIndexOf,
|
||||
isCommon = true,
|
||||
result = [];
|
||||
|
||||
while (++argsIndex < argsLength) {
|
||||
var value = arguments[argsIndex];
|
||||
if (isArrayLike(value)) {
|
||||
args.push(value);
|
||||
caches.push((isCommon && value.length >= 120) ? createCache(argsIndex && value) : null);
|
||||
}
|
||||
while (othIndex--) {
|
||||
var value = arrays[othIndex] = isArrayLike(value = arrays[othIndex]) ? value : [];
|
||||
caches[othIndex] = (isCommon && value.length >= 120) ? createCache(othIndex && value) : null;
|
||||
}
|
||||
argsLength = args.length;
|
||||
if (argsLength < 2) {
|
||||
return result;
|
||||
}
|
||||
var array = args[0],
|
||||
var array = arrays[0],
|
||||
index = -1,
|
||||
length = array ? array.length : 0,
|
||||
seen = caches[0];
|
||||
@@ -108,10 +101,10 @@ function intersection() {
|
||||
while (++index < length) {
|
||||
value = array[index];
|
||||
if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) {
|
||||
argsIndex = argsLength;
|
||||
while (--argsIndex) {
|
||||
var cache = caches[argsIndex];
|
||||
if ((cache ? cacheIndexOf(cache, value) : indexOf(args[argsIndex], value, 0)) < 0) {
|
||||
var othIndex = othLength;
|
||||
while (--othIndex) {
|
||||
var cache = caches[othIndex];
|
||||
if ((cache ? cacheIndexOf(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) {
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
@@ -122,6 +115,6 @@ function intersection() {
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = intersection;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.intersection",
|
||||
"version": "3.1.0",
|
||||
"version": "3.2.0",
|
||||
"description": "The modern build of lodash’s `_.intersection` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -19,6 +19,7 @@
|
||||
"dependencies": {
|
||||
"lodash._baseindexof": "^3.0.0",
|
||||
"lodash._cacheindexof": "^3.0.0",
|
||||
"lodash._createcache": "^3.0.0"
|
||||
"lodash._createcache": "^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