mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 14:37:49 +00:00
Compare commits
7 Commits
3.0.5-npm-
...
3.1.2-npm-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ce4a06dfe | ||
|
|
971ec866a8 | ||
|
|
27d65e814a | ||
|
|
f11f2385a6 | ||
|
|
ad40188e5b | ||
|
|
a0c2bf6074 | ||
|
|
cfca777a28 |
@@ -1,4 +1,4 @@
|
||||
# lodash v3.0.5
|
||||
# lodash v3.1.2
|
||||
|
||||
The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash._baseassign v3.0.2
|
||||
# lodash._baseassign v3.1.1
|
||||
|
||||
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.0.2-npm-packages/lodash._baseassign) for more details.
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash._baseassign) for more details.
|
||||
|
||||
@@ -1,43 +1,102 @@
|
||||
/**
|
||||
* lodash 3.0.2 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.1.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>
|
||||
*/
|
||||
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 `this` binding `customizer` functions.
|
||||
* multiple sources, and `customizer` functions.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The destination object.
|
||||
* @param {Object} source The source object.
|
||||
* @param {Function} [customizer] The function to customize assigning values.
|
||||
* @returns {Object} Returns the destination object.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseAssign(object, source, customizer) {
|
||||
var props = keys(source);
|
||||
if (!customizer) {
|
||||
return baseCopy(source, object, props);
|
||||
}
|
||||
var index = -1,
|
||||
length = props.length;
|
||||
var baseAssign = function(object, source) {
|
||||
return source == null
|
||||
? object
|
||||
: baseCopy(source, getSymbols(source), baseCopy(source, keys(source), object));
|
||||
};
|
||||
|
||||
while (++index < length) {
|
||||
var key = props[index],
|
||||
value = object[key],
|
||||
result = customizer(value, source[key], key, object, source);
|
||||
/**
|
||||
* 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));
|
||||
};
|
||||
|
||||
if ((result === result ? (result !== value) : (value === value)) ||
|
||||
(typeof value == 'undefined' && !(key in object))) {
|
||||
object[key] = result;
|
||||
}
|
||||
}
|
||||
return 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;
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = baseAssign;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash._baseassign",
|
||||
"version": "3.0.2",
|
||||
"version": "3.1.1",
|
||||
"description": "The modern build of lodash’s internal `baseAssign` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -17,6 +17,7 @@
|
||||
"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.0.1
|
||||
# lodash._basecallback v3.1.2
|
||||
|
||||
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.0.1-npm-packages/lodash._basecallback) for more details.
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.1.2-npm-packages/lodash._basecallback) for more details.
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
/**
|
||||
* lodash 3.0.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.1.2 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
|
||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
var baseClone = require('lodash._baseclone'),
|
||||
baseIsEqual = require('lodash._baseisequal'),
|
||||
baseProperty = require('lodash._baseproperty'),
|
||||
var baseIsEqual = require('lodash._baseisequal'),
|
||||
bindCallback = require('lodash._bindcallback'),
|
||||
keys = require('lodash.keys');
|
||||
|
||||
@@ -38,10 +36,12 @@ function baseCallback(func, thisArg, argCount) {
|
||||
if (func == null) {
|
||||
return identity;
|
||||
}
|
||||
// Handle "_.property" and "_.matches" style callback shorthands.
|
||||
return type == 'object'
|
||||
? baseMatches(func, !argCount)
|
||||
: baseProperty(func + '');
|
||||
if (type == 'object') {
|
||||
return baseMatches(func);
|
||||
}
|
||||
return typeof thisArg == 'undefined'
|
||||
? baseProperty(func + '')
|
||||
: baseMatchesProperty(func + '', thisArg);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -49,7 +49,7 @@ function baseCallback(func, thisArg, argCount) {
|
||||
* shorthands or `this` binding.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object to inspect.
|
||||
* @param {Object} object The object to inspect.
|
||||
* @param {Array} props The source property names to match.
|
||||
* @param {Array} values The source values to match.
|
||||
* @param {Array} strictCompareFlags Strict comparison flags for source values.
|
||||
@@ -94,15 +94,13 @@ function baseIsMatch(object, props, values, strictCompareFlags, customizer) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.matches` which supports specifying whether
|
||||
* `source` should be cloned.
|
||||
* The base implementation of `_.matches` which does not clone `source`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object of property values to match.
|
||||
* @param {boolean} [isCloned] Specify cloning the source object.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function baseMatches(source, isCloned) {
|
||||
function baseMatches(source) {
|
||||
var props = keys(source),
|
||||
length = props.length;
|
||||
|
||||
@@ -112,13 +110,10 @@ function baseMatches(source, isCloned) {
|
||||
|
||||
if (isStrictComparable(value)) {
|
||||
return function(object) {
|
||||
return object != null && value === object[key] && hasOwnProperty.call(object, key);
|
||||
return object != null && object[key] === value && hasOwnProperty.call(object, key);
|
||||
};
|
||||
}
|
||||
}
|
||||
if (isCloned) {
|
||||
source = baseClone(source, true);
|
||||
}
|
||||
var values = Array(length),
|
||||
strictCompareFlags = Array(length);
|
||||
|
||||
@@ -132,6 +127,39 @@ function baseMatches(source, isCloned) {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
};
|
||||
}
|
||||
return function(object) {
|
||||
return object != null && baseIsEqual(value, object[key], null, true);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.property` which does not coerce `key` to a string.
|
||||
*
|
||||
* @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];
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
|
||||
*
|
||||
@@ -184,6 +212,7 @@ function isObject(value) {
|
||||
* @example
|
||||
*
|
||||
* var object = { 'user': 'fred' };
|
||||
*
|
||||
* _.identity(object) === object;
|
||||
* // => true
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash._basecallback",
|
||||
"version": "3.0.1",
|
||||
"version": "3.1.2",
|
||||
"description": "The modern build of lodash’s internal `baseCallback` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -16,9 +16,7 @@
|
||||
"repository": "lodash/lodash",
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._baseclone": "^3.0.0",
|
||||
"lodash._baseisequal": "^3.0.0",
|
||||
"lodash._baseproperty": "^3.0.0",
|
||||
"lodash._bindcallback": "^3.0.0",
|
||||
"lodash.keys": "^3.0.0"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash._baseclone v3.0.1
|
||||
# lodash._baseclone v3.1.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.0.1-npm-packages/lodash._baseclone) for more details.
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._baseclone) for more details.
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/**
|
||||
* lodash 3.0.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||
* 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 arrayCopy = require('lodash._arraycopy'),
|
||||
arrayEach = require('lodash._arrayeach'),
|
||||
baseCopy = require('lodash._basecopy'),
|
||||
baseAssign = require('lodash._baseassign'),
|
||||
baseFor = require('lodash._basefor'),
|
||||
isArray = require('lodash.isarray'),
|
||||
isNative = require('lodash.isnative'),
|
||||
@@ -110,7 +110,7 @@ function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {
|
||||
if (customizer) {
|
||||
result = object ? customizer(value, key, object) : customizer(value);
|
||||
}
|
||||
if (typeof result != 'undefined') {
|
||||
if (result !== undefined) {
|
||||
return result;
|
||||
}
|
||||
if (!isObject(value)) {
|
||||
@@ -129,7 +129,7 @@ function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {
|
||||
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
||||
result = initCloneObject(isFunc ? {} : value);
|
||||
if (!isDeep) {
|
||||
return baseCopy(value, result, keys(value));
|
||||
return baseAssign(result, value);
|
||||
}
|
||||
} else {
|
||||
return cloneableTags[tag]
|
||||
@@ -241,7 +241,6 @@ function initCloneObject(object) {
|
||||
* **Note:** This function only supports cloning values with tags of
|
||||
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
||||
*
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to clone.
|
||||
* @param {string} tag The `toStringTag` of the object to clone.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash._baseclone",
|
||||
"version": "3.0.1",
|
||||
"version": "3.1.0",
|
||||
"description": "The modern build of lodash’s internal `baseClone` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -18,7 +18,7 @@
|
||||
"dependencies": {
|
||||
"lodash._arraycopy": "^3.0.0",
|
||||
"lodash._arrayeach": "^3.0.0",
|
||||
"lodash._basecopy": "^3.0.0",
|
||||
"lodash._baseassign": "^3.0.0",
|
||||
"lodash._basefor": "^3.0.0",
|
||||
"lodash.isarray": "^3.0.0",
|
||||
"lodash.isnative": "^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._basedelay v3.0.1
|
||||
# lodash._basedelay v3.1.0
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseDelay` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var baseDelay = require('lodash._basedelay');
|
||||
```
|
||||
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._basedelay) for more details.
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._basedelay) for more details.
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
/**
|
||||
* lodash 3.0.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||
* 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');
|
||||
|
||||
/** Used as the `TypeError` message for "Functions" methods. */
|
||||
var FUNC_ERROR_TEXT = 'Expected a function';
|
||||
@@ -18,14 +17,14 @@ var FUNC_ERROR_TEXT = 'Expected a function';
|
||||
* @private
|
||||
* @param {Function} func The function to delay.
|
||||
* @param {number} wait The number of milliseconds to delay invocation.
|
||||
* @param {Object} args The `arguments` object to slice and provide to `func`.
|
||||
* @param {Object} args The arguments provide to `func`.
|
||||
* @returns {number} Returns the timer id.
|
||||
*/
|
||||
function baseDelay(func, wait, args, fromIndex) {
|
||||
function baseDelay(func, wait, args) {
|
||||
if (typeof func != 'function') {
|
||||
throw new TypeError(FUNC_ERROR_TEXT);
|
||||
}
|
||||
return setTimeout(function() { func.apply(undefined, baseSlice(args, fromIndex)); }, wait);
|
||||
return setTimeout(function() { func.apply(undefined, args); }, wait);
|
||||
}
|
||||
|
||||
module.exports = baseDelay;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash._basedelay",
|
||||
"version": "3.0.1",
|
||||
"version": "3.1.0",
|
||||
"description": "The modern build of lodash’s internal `baseDelay` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -14,8 +14,5 @@
|
||||
"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._baseslice": "^3.0.0"
|
||||
}
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
|
||||
}
|
||||
|
||||
@@ -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._baseflatten v3.0.1
|
||||
# lodash._baseflatten v3.1.1
|
||||
|
||||
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.0.1-npm-packages/lodash._baseflatten) for more details.
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash._baseflatten) for more details.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* lodash 3.0.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.1.1 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
|
||||
@@ -17,13 +17,12 @@ var isArguments = require('lodash.isarguments'),
|
||||
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
||||
*/
|
||||
function isObjectLike(value) {
|
||||
return (value && typeof value == 'object') || false;
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Used as the maximum length of an array-like value.
|
||||
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
|
||||
* for more details.
|
||||
* 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;
|
||||
|
||||
@@ -33,13 +32,12 @@ 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 {number} [fromIndex=0] The index to start from.
|
||||
* @param {boolean} isDeep Specify a deep flatten.
|
||||
* @param {boolean} isStrict Restrict flattening to arrays and `arguments` objects.
|
||||
* @returns {Array} Returns the new flattened array.
|
||||
*/
|
||||
function baseFlatten(array, isDeep, isStrict, fromIndex) {
|
||||
var index = fromIndex == null ? -1 : (fromIndex - 1),
|
||||
function baseFlatten(array, isDeep, isStrict) {
|
||||
var index = -1,
|
||||
length = array.length,
|
||||
resIndex = -1,
|
||||
result = [];
|
||||
@@ -69,9 +67,7 @@ function baseFlatten(array, isDeep, isStrict, fromIndex) {
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This function is based on ES `ToLength`. See the
|
||||
* [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)
|
||||
* for more details.
|
||||
* **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash._baseflatten",
|
||||
"version": "3.0.1",
|
||||
"version": "3.1.1",
|
||||
"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._baseindexof v3.0.0
|
||||
# lodash._baseindexof v3.1.0
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseIndexOf` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var baseIndexOf = require('lodash._baseindexof');
|
||||
```
|
||||
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._baseindexof) for more details.
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._baseindexof) for more details.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||
* 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>
|
||||
*/
|
||||
@@ -13,14 +13,24 @@
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {*} value The value to search for.
|
||||
* @param {number} [fromIndex=0] The index to search from.
|
||||
* @param {number} fromIndex The index to search from.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The base implementation of `_.indexOf` without support for binary searches.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {*} value The value to search for.
|
||||
* @param {number} fromIndex The index to search from.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
function baseIndexOf(array, value, fromIndex) {
|
||||
if (value !== value) {
|
||||
return indexOfNaN(array, fromIndex);
|
||||
}
|
||||
var index = (fromIndex || 0) - 1,
|
||||
var index = fromIndex - 1,
|
||||
length = array.length;
|
||||
|
||||
while (++index < length) {
|
||||
@@ -33,17 +43,16 @@ function baseIndexOf(array, value, fromIndex) {
|
||||
|
||||
/**
|
||||
* Gets the index at which the first occurrence of `NaN` is found in `array`.
|
||||
* If `fromRight` is provided elements of `array` are iterated from right to left.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {number} [fromIndex] The index to search from.
|
||||
* @param {number} fromIndex The index to search from.
|
||||
* @param {boolean} [fromRight] Specify iterating from right to left.
|
||||
* @returns {number} Returns the index of the matched `NaN`, else `-1`.
|
||||
*/
|
||||
function indexOfNaN(array, fromIndex, fromRight) {
|
||||
var length = array.length,
|
||||
index = fromRight ? (fromIndex || length) : ((fromIndex || 0) - 1);
|
||||
index = fromIndex + (fromRight ? 0 : -1);
|
||||
|
||||
while ((fromRight ? index-- : ++index < length)) {
|
||||
var other = array[index];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash._baseindexof",
|
||||
"version": "3.0.0",
|
||||
"version": "3.1.0",
|
||||
"description": "The modern build of lodash’s internal `baseIndexOf` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash._baseisequal v3.0.5
|
||||
# lodash._baseisequal v3.0.7
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseIsEqual` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var baseIsEqual = require('lodash._baseisequal');
|
||||
```
|
||||
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.5-npm-packages/lodash._baseisequal) for more details.
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.7-npm-packages/lodash._baseisequal) for more details.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* lodash 3.0.5 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.0.7 (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>
|
||||
@@ -21,6 +21,17 @@ var argsTag = '[object Arguments]',
|
||||
regexpTag = '[object RegExp]',
|
||||
stringTag = '[object String]';
|
||||
|
||||
/**
|
||||
* Checks if `value` is object-like.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
||||
*/
|
||||
function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/** Used for native method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
@@ -28,11 +39,33 @@ 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;
|
||||
|
||||
/**
|
||||
* A specialized version of `_.some` for arrays without support for callback
|
||||
* shorthands and `this` binding.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {Function} predicate The function invoked per iteration.
|
||||
* @returns {boolean} Returns `true` if any element passes the predicate check,
|
||||
* else `false`.
|
||||
*/
|
||||
function arraySome(array, predicate) {
|
||||
var index = -1,
|
||||
length = array.length;
|
||||
|
||||
while (++index < length) {
|
||||
if (predicate(array[index], index, array)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.isEqual` without support for `this` binding
|
||||
* `customizer` functions.
|
||||
@@ -47,17 +80,10 @@ var objToString = objectProto.toString;
|
||||
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
||||
*/
|
||||
function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) {
|
||||
// Exit early for identical values.
|
||||
if (value === other) {
|
||||
return true;
|
||||
}
|
||||
var valType = typeof value,
|
||||
othType = typeof other;
|
||||
|
||||
// Exit early for unlike primitive values.
|
||||
if ((valType != 'function' && valType != 'object' && othType != 'function' && othType != 'object') ||
|
||||
value == null || other == null) {
|
||||
// Return `false` unless both values are `NaN`.
|
||||
if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
|
||||
return value !== value && other !== other;
|
||||
}
|
||||
return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);
|
||||
@@ -108,11 +134,11 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA,
|
||||
return equalByTag(object, other, objTag);
|
||||
}
|
||||
if (!isLoose) {
|
||||
var valWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
|
||||
othWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
|
||||
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
|
||||
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
|
||||
|
||||
if (valWrapped || othWrapped) {
|
||||
return equalFunc(valWrapped ? object.value() : object, othWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);
|
||||
if (objIsWrapped || othIsWrapped) {
|
||||
return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);
|
||||
}
|
||||
}
|
||||
if (!isSameTag) {
|
||||
@@ -158,40 +184,35 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA,
|
||||
function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) {
|
||||
var index = -1,
|
||||
arrLength = array.length,
|
||||
othLength = other.length,
|
||||
result = true;
|
||||
othLength = other.length;
|
||||
|
||||
if (arrLength != othLength && !(isLoose && othLength > arrLength)) {
|
||||
return false;
|
||||
}
|
||||
// Deep compare the contents, ignoring non-numeric properties.
|
||||
while (result && ++index < arrLength) {
|
||||
// Ignore non-index properties.
|
||||
while (++index < arrLength) {
|
||||
var arrValue = array[index],
|
||||
othValue = other[index];
|
||||
othValue = other[index],
|
||||
result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined;
|
||||
|
||||
result = undefined;
|
||||
if (customizer) {
|
||||
result = isLoose
|
||||
? customizer(othValue, arrValue, index)
|
||||
: customizer(arrValue, othValue, index);
|
||||
}
|
||||
if (result === undefined) {
|
||||
// Recursively compare arrays (susceptible to call stack limits).
|
||||
if (isLoose) {
|
||||
var othIndex = othLength;
|
||||
while (othIndex--) {
|
||||
othValue = other[othIndex];
|
||||
result = (arrValue && arrValue === othValue) || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);
|
||||
if (result) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result = (arrValue && arrValue === othValue) || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);
|
||||
if (result !== undefined) {
|
||||
if (result) {
|
||||
continue;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// Recursively compare arrays (susceptible to call stack limits).
|
||||
if (isLoose) {
|
||||
if (!arraySome(other, function(othValue) {
|
||||
return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);
|
||||
})) {
|
||||
return false;
|
||||
}
|
||||
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return !!result;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -202,7 +223,7 @@ function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stack
|
||||
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} value The object to compare.
|
||||
* @param {Object} object The object to compare.
|
||||
* @param {Object} other The other object to compare.
|
||||
* @param {string} tag The `toStringTag` of the objects to compare.
|
||||
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
||||
@@ -256,29 +277,22 @@ function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, sta
|
||||
if (objLength != othLength && !isLoose) {
|
||||
return false;
|
||||
}
|
||||
var skipCtor = isLoose,
|
||||
index = -1;
|
||||
|
||||
while (++index < objLength) {
|
||||
var key = objProps[index],
|
||||
result = isLoose ? key in other : hasOwnProperty.call(other, key);
|
||||
|
||||
if (result) {
|
||||
var objValue = object[key],
|
||||
othValue = other[key];
|
||||
|
||||
result = undefined;
|
||||
if (customizer) {
|
||||
result = isLoose
|
||||
? customizer(othValue, objValue, key)
|
||||
: customizer(objValue, othValue, key);
|
||||
}
|
||||
if (result === undefined) {
|
||||
// Recursively compare objects (susceptible to call stack limits).
|
||||
result = (objValue && objValue === othValue) || equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB);
|
||||
}
|
||||
var index = objLength;
|
||||
while (index--) {
|
||||
var key = objProps[index];
|
||||
if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) {
|
||||
return false;
|
||||
}
|
||||
if (!result) {
|
||||
}
|
||||
var skipCtor = isLoose;
|
||||
while (++index < objLength) {
|
||||
key = objProps[index];
|
||||
var objValue = object[key],
|
||||
othValue = other[key],
|
||||
result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined;
|
||||
|
||||
// Recursively compare objects (susceptible to call stack limits).
|
||||
if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) {
|
||||
return false;
|
||||
}
|
||||
skipCtor || (skipCtor = key == 'constructor');
|
||||
@@ -298,4 +312,31 @@ function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, sta
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
||||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isObject({});
|
||||
* // => true
|
||||
*
|
||||
* _.isObject([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isObject(1);
|
||||
* // => false
|
||||
*/
|
||||
function isObject(value) {
|
||||
// Avoid a V8 JIT bug in Chrome 19-20.
|
||||
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
||||
var type = typeof value;
|
||||
return !!value && (type == 'object' || type == 'function');
|
||||
}
|
||||
|
||||
module.exports = baseIsEqual;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash._baseisequal",
|
||||
"version": "3.0.5",
|
||||
"version": "3.0.7",
|
||||
"description": "The modern build of lodash’s internal `baseIsEqual` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
20
lodash._baseismatch/README.md
Normal file
20
lodash._baseismatch/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# lodash._baseismatch v3.1.2
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseIsMatch` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
|
||||
```bash
|
||||
$ {sudo -H} npm i -g npm
|
||||
$ npm i --save lodash._baseismatch
|
||||
```
|
||||
|
||||
In Node.js/io.js:
|
||||
|
||||
```js
|
||||
var baseIsMatch = require('lodash._baseismatch');
|
||||
```
|
||||
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.1.2-npm-packages/lodash._baseismatch) for more details.
|
||||
57
lodash._baseismatch/index.js
Normal file
57
lodash._baseismatch/index.js
Normal file
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* lodash 3.1.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 baseIsEqual = require('lodash._baseisequal');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.isMatch` without support for callback
|
||||
* shorthands and `this` binding.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to inspect.
|
||||
* @param {Array} 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 {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,
|
||||
noCustomizer = !customizer;
|
||||
|
||||
while (++index < length) {
|
||||
if ((noCustomizer && strictCompareFlags[index])
|
||||
? values[index] !== object[props[index]]
|
||||
: !(props[index] in object)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
index = -1;
|
||||
while (++index < length) {
|
||||
var key = props[index],
|
||||
objValue = object[key],
|
||||
srcValue = values[index];
|
||||
|
||||
if (noCustomizer && strictCompareFlags[index]) {
|
||||
var result = objValue !== undefined || (key in object);
|
||||
} else {
|
||||
result = customizer ? customizer(objValue, srcValue, key) : undefined;
|
||||
if (result === undefined) {
|
||||
result = baseIsEqual(srcValue, objValue, customizer, true);
|
||||
}
|
||||
}
|
||||
if (!result) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
module.exports = baseIsMatch;
|
||||
21
lodash._baseismatch/package.json
Normal file
21
lodash._baseismatch/package.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "lodash._baseismatch",
|
||||
"version": "3.1.2",
|
||||
"description": "The modern build of lodash’s internal `baseIsMatch` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
"license": "MIT",
|
||||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"contributors": [
|
||||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
|
||||
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
|
||||
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||
],
|
||||
"repository": "lodash/lodash",
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._baseisequal": "^3.0.0"
|
||||
}
|
||||
}
|
||||
20
lodash._basematches/README.md
Normal file
20
lodash._basematches/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# lodash._basematches v3.1.2
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseMatches` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
|
||||
```bash
|
||||
$ {sudo -H} npm i -g npm
|
||||
$ npm i --save lodash._basematches
|
||||
```
|
||||
|
||||
In Node.js/io.js:
|
||||
|
||||
```js
|
||||
var baseMatches = require('lodash._basematches');
|
||||
```
|
||||
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.1.2-npm-packages/lodash._basematches) for more details.
|
||||
93
lodash._basematches/index.js
Normal file
93
lodash._basematches/index.js
Normal file
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
* lodash 3.1.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.7.0 <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;
|
||||
|
||||
/**
|
||||
* The base implementation of `_.matches` which does not clone `source`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object of property values to match.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function baseMatches(source) {
|
||||
var props = keys(source),
|
||||
length = props.length;
|
||||
|
||||
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);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` if suitable for strict
|
||||
* equality comparisons, else `false`.
|
||||
*/
|
||||
function isStrictComparable(value) {
|
||||
return value === value && (value === 0 ? ((1 / value) > 0) : !isObject(value));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is the language type of `Object`.
|
||||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* **Note:** See the [ES5 spec](https://es5.github.io/#x8) for more details.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is 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') || false;
|
||||
}
|
||||
|
||||
module.exports = baseMatches;
|
||||
22
lodash._basematches/package.json
Normal file
22
lodash._basematches/package.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "lodash._basematches",
|
||||
"version": "3.1.2",
|
||||
"description": "The modern build of lodash’s internal `baseMatches` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
"license": "MIT",
|
||||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"contributors": [
|
||||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
|
||||
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
|
||||
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||
],
|
||||
"repository": "lodash/lodash",
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._baseismatch": "^3.0.0",
|
||||
"lodash.keys": "^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._createassigner v3.0.1
|
||||
# lodash._createassigner v3.1.1
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createAssigner` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var createAssigner = require('lodash._createassigner');
|
||||
```
|
||||
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._createassigner) for more details.
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash._createassigner) for more details.
|
||||
|
||||
@@ -1,57 +1,49 @@
|
||||
/**
|
||||
* lodash 3.0.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.1.1 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||
* 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 bindCallback = require('lodash._bindcallback'),
|
||||
isIterateeCall = require('lodash._isiterateecall');
|
||||
isIterateeCall = require('lodash._isiterateecall'),
|
||||
restParam = require('lodash.restparam');
|
||||
|
||||
/**
|
||||
* Creates a function that assigns properties of source object(s) to a given
|
||||
* destination object.
|
||||
*
|
||||
* **Note:** This function is used to create `_.assign`, `_.defaults`, and `_.merge`.
|
||||
* Creates a `_.assign`, `_.defaults`, or `_.merge` function.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} assigner The function to assign values.
|
||||
* @returns {Function} Returns the new assigner function.
|
||||
*/
|
||||
function createAssigner(assigner) {
|
||||
return function() {
|
||||
var args = arguments,
|
||||
length = args.length,
|
||||
object = args[0];
|
||||
return restParam(function(object, sources) {
|
||||
var index = -1,
|
||||
length = object == null ? 0 : sources.length,
|
||||
customizer = length > 2 ? sources[length - 2] : undefined,
|
||||
guard = length > 2 ? sources[2] : undefined,
|
||||
thisArg = length > 1 ? sources[length - 1] : undefined;
|
||||
|
||||
if (length < 2 || object == null) {
|
||||
return object;
|
||||
}
|
||||
var customizer = args[length - 2],
|
||||
thisArg = args[length - 1],
|
||||
guard = args[3];
|
||||
|
||||
if (length > 3 && typeof customizer == 'function') {
|
||||
if (typeof customizer == 'function') {
|
||||
customizer = bindCallback(customizer, thisArg, 5);
|
||||
length -= 2;
|
||||
} else {
|
||||
customizer = (length > 2 && typeof thisArg == 'function') ? thisArg : null;
|
||||
customizer = typeof thisArg == 'function' ? thisArg : undefined;
|
||||
length -= (customizer ? 1 : 0);
|
||||
}
|
||||
if (guard && isIterateeCall(args[1], args[2], guard)) {
|
||||
customizer = length == 3 ? null : customizer;
|
||||
length = 2;
|
||||
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
||||
customizer = length < 3 ? undefined : customizer;
|
||||
length = 1;
|
||||
}
|
||||
var index = 0;
|
||||
while (++index < length) {
|
||||
var source = args[index];
|
||||
var source = sources[index];
|
||||
if (source) {
|
||||
assigner(object, source, customizer);
|
||||
}
|
||||
}
|
||||
return object;
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = createAssigner;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash._createassigner",
|
||||
"version": "3.0.1",
|
||||
"version": "3.1.1",
|
||||
"description": "The modern build of lodash’s internal `createAssigner` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -17,6 +17,7 @@
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._bindcallback": "^3.0.0",
|
||||
"lodash._isiterateecall": "^3.0.0"
|
||||
"lodash._isiterateecall": "^3.0.0",
|
||||
"lodash.restparam": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash._createcache v3.0.1
|
||||
# lodash._createcache v3.1.2
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createCache` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var createCache = require('lodash._createcache');
|
||||
```
|
||||
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._createcache) for more details.
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.1.2-npm-packages/lodash._createcache) for more details.
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/**
|
||||
* lodash 3.0.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.1.2 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||
* 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 isNative = require('lodash.isnative');
|
||||
var getNative = require('lodash._getnative');
|
||||
|
||||
/** Native method references. */
|
||||
var Set = isNative(Set = global.Set) && Set;
|
||||
var Set = getNative(global, 'Set');
|
||||
|
||||
/* Native method references for those with the same name as other `lodash` methods. */
|
||||
var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate;
|
||||
var nativeCreate = getNative(Object, 'create');
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -54,9 +54,9 @@ function cachePush(value) {
|
||||
* @param {Array} [values] The values to cache.
|
||||
* @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`.
|
||||
*/
|
||||
var createCache = !(nativeCreate && Set) ? constant(null) : function(values) {
|
||||
return new SetCache(values);
|
||||
};
|
||||
function createCache(values) {
|
||||
return (nativeCreate && Set) ? new SetCache(values) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
||||
@@ -82,29 +82,7 @@ function isObject(value) {
|
||||
// Avoid a V8 JIT bug in Chrome 19-20.
|
||||
// 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');
|
||||
}
|
||||
|
||||
// Add functions to the `Set` cache.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash._createcache",
|
||||
"version": "3.0.1",
|
||||
"version": "3.1.2",
|
||||
"description": "The modern build of lodash’s internal `createCache` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -16,6 +16,6 @@
|
||||
"repository": "lodash/lodash",
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash.isnative": "^3.0.0"
|
||||
"lodash._getnative": "^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,
|
||||
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
|
||||
@@ -1,20 +1,18 @@
|
||||
# lodash._createwrapper v3.0.5
|
||||
# lodash._createwrapper v3.1.1
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createWrapper` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
The internal [lodash](https://lodash.com/) function `createWrapper` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
|
||||
```bash
|
||||
$ {sudo -H} npm i -g npm
|
||||
$ npm i --save lodash._createwrapper
|
||||
```
|
||||
|
||||
In Node.js/io.js:
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
var createWrapper = require('lodash._createwrapper');
|
||||
```
|
||||
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.5-npm-packages/lodash._createwrapper) for more details.
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash._createwrapper) for more details.
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
/**
|
||||
* lodash 3.0.5 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* lodash 3.1.1 (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-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
var arrayCopy = require('lodash._arraycopy'),
|
||||
baseCreate = require('lodash._basecreate'),
|
||||
replaceHolders = require('lodash._replaceholders');
|
||||
|
||||
/** Used to compose bitmasks for wrapper metadata. */
|
||||
var BIND_FLAG = 1,
|
||||
@@ -18,20 +15,177 @@ var BIND_FLAG = 1,
|
||||
CURRY_RIGHT_FLAG = 16,
|
||||
PARTIAL_FLAG = 32,
|
||||
PARTIAL_RIGHT_FLAG = 64,
|
||||
ARY_FLAG = 128;
|
||||
ARY_FLAG = 128,
|
||||
FLIP_FLAG = 512;
|
||||
|
||||
/** Used as the `TypeError` message for "Functions" methods. */
|
||||
var FUNC_ERROR_TEXT = 'Expected a function';
|
||||
|
||||
/* Native method references for those with the same name as other `lodash` methods. */
|
||||
/** Used as references for various `Number` constants. */
|
||||
var INFINITY = 1 / 0,
|
||||
MAX_SAFE_INTEGER = 9007199254740991,
|
||||
MAX_INTEGER = 1.7976931348623157e+308,
|
||||
NAN = 0 / 0;
|
||||
|
||||
/** Used as the internal argument placeholder. */
|
||||
var PLACEHOLDER = '__lodash_placeholder__';
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var funcTag = '[object Function]',
|
||||
genTag = '[object GeneratorFunction]';
|
||||
|
||||
/** Used to match leading and trailing whitespace. */
|
||||
var reTrim = /^\s+|\s+$/g;
|
||||
|
||||
/** Used to detect bad signed hexadecimal string values. */
|
||||
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
||||
|
||||
/** Used to detect binary string values. */
|
||||
var reIsBinary = /^0b[01]+$/i;
|
||||
|
||||
/** Used to detect octal string values. */
|
||||
var reIsOctal = /^0o[0-7]+$/i;
|
||||
|
||||
/** Used to detect unsigned integer values. */
|
||||
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
||||
|
||||
/** 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`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to invoke.
|
||||
* @param {*} thisArg The `this` binding of `func`.
|
||||
* @param {...*} args The arguments to invoke `func` with.
|
||||
* @returns {*} Returns the result of `func`.
|
||||
*/
|
||||
function apply(func, thisArg, args) {
|
||||
var length = args.length;
|
||||
switch (length) {
|
||||
case 0: return func.call(thisArg);
|
||||
case 1: return func.call(thisArg, args[0]);
|
||||
case 2: return func.call(thisArg, args[0], args[1]);
|
||||
case 3: return func.call(thisArg, args[0], args[1], args[2]);
|
||||
}
|
||||
return func.apply(thisArg, args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a 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.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
||||
*/
|
||||
function isIndex(value, length) {
|
||||
value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
|
||||
length = length == null ? MAX_SAFE_INTEGER : length;
|
||||
return value > -1 && value % 1 == 0 && value < length;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces all `placeholder` elements in `array` with an internal placeholder
|
||||
* and returns an array of their indexes.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to modify.
|
||||
* @param {*} placeholder The placeholder to replace.
|
||||
* @returns {Array} Returns the new array of placeholder indexes.
|
||||
*/
|
||||
function replaceHolders(array, placeholder) {
|
||||
var index = -1,
|
||||
length = array.length,
|
||||
resIndex = -1,
|
||||
result = [];
|
||||
|
||||
while (++index < length) {
|
||||
if (array[index] === placeholder) {
|
||||
array[index] = PLACEHOLDER;
|
||||
result[++resIndex] = index;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/**
|
||||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeMax = Math.max,
|
||||
nativeMin = Math.min;
|
||||
|
||||
/**
|
||||
* Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
|
||||
* of an array-like value.
|
||||
* The base implementation of `_.create` without support for assigning
|
||||
* properties to the created object.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} prototype The object to inherit from.
|
||||
* @returns {Object} Returns the new object.
|
||||
*/
|
||||
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||
var baseCreate = (function() {
|
||||
function object() {}
|
||||
return function(prototype) {
|
||||
if (isObject(prototype)) {
|
||||
object.prototype = prototype;
|
||||
var result = new object;
|
||||
object.prototype = undefined;
|
||||
}
|
||||
return result || {};
|
||||
};
|
||||
}());
|
||||
|
||||
/**
|
||||
* Creates an array that is the composition of partially applied arguments,
|
||||
@@ -49,7 +203,7 @@ function composeArgs(args, partials, holders) {
|
||||
argsLength = nativeMax(args.length - holdersLength, 0),
|
||||
leftIndex = -1,
|
||||
leftLength = partials.length,
|
||||
result = Array(argsLength + leftLength);
|
||||
result = Array(leftLength + argsLength);
|
||||
|
||||
while (++leftIndex < leftLength) {
|
||||
result[leftIndex] = partials[leftIndex];
|
||||
@@ -96,20 +250,41 @@ function composeArgsRight(args, partials, holders) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` and invokes it with the `this`
|
||||
* Copies the values of `source` to `array`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} source The array to copy values from.
|
||||
* @param {Array} [array=[]] The array to copy values to.
|
||||
* @returns {Array} Returns `array`.
|
||||
*/
|
||||
function copyArray(source, array) {
|
||||
var index = -1,
|
||||
length = source.length;
|
||||
|
||||
array || (array = Array(length));
|
||||
while (++index < length) {
|
||||
array[index] = source[index];
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` to invoke it with the optional `this`
|
||||
* binding of `thisArg`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to bind.
|
||||
* @param {Function} func The function to wrap.
|
||||
* @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
|
||||
* @param {*} [thisArg] The `this` binding of `func`.
|
||||
* @returns {Function} Returns the new bound function.
|
||||
* @returns {Function} Returns the new wrapped function.
|
||||
*/
|
||||
function createBindWrapper(func, thisArg) {
|
||||
var Ctor = createCtorWrapper(func);
|
||||
function createBaseWrapper(func, bitmask, thisArg) {
|
||||
var isBind = bitmask & BIND_FLAG,
|
||||
Ctor = createCtorWrapper(func);
|
||||
|
||||
function wrapper() {
|
||||
var fn = (this && this !== global && this instanceof wrapper) ? Ctor : func;
|
||||
return fn.apply(thisArg, arguments);
|
||||
var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
|
||||
return fn.apply(isBind ? thisArg : this, arguments);
|
||||
}
|
||||
return wrapper;
|
||||
}
|
||||
@@ -125,7 +300,7 @@ function createBindWrapper(func, thisArg) {
|
||||
function createCtorWrapper(Ctor) {
|
||||
return function() {
|
||||
// Use a `switch` statement to work with class constructors.
|
||||
// See https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ecmascript-function-objects-call-thisargument-argumentslist
|
||||
// See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
|
||||
// for more details.
|
||||
var args = arguments;
|
||||
switch (args.length) {
|
||||
@@ -135,6 +310,8 @@ function createCtorWrapper(Ctor) {
|
||||
case 3: return new Ctor(args[0], args[1], args[2]);
|
||||
case 4: return new Ctor(args[0], args[1], args[2], args[3]);
|
||||
case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
|
||||
case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
|
||||
case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
|
||||
}
|
||||
var thisBinding = baseCreate(Ctor.prototype),
|
||||
result = Ctor.apply(thisBinding, args);
|
||||
@@ -146,12 +323,46 @@ function createCtorWrapper(Ctor) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` and invokes it with optional `this`
|
||||
* binding of, partial application, and currying.
|
||||
* Creates a function that wraps `func` to enable currying.
|
||||
*
|
||||
* @private
|
||||
* @param {Function|string} func The function or method name to reference.
|
||||
* @param {number} bitmask The bitmask of flags. See `createWrapper` for more details.
|
||||
* @param {Function} func The function to wrap.
|
||||
* @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
|
||||
* @param {number} arity The arity of `func`.
|
||||
* @returns {Function} Returns the new wrapped function.
|
||||
*/
|
||||
function createCurryWrapper(func, bitmask, arity) {
|
||||
var Ctor = createCtorWrapper(func);
|
||||
|
||||
function wrapper() {
|
||||
var length = arguments.length,
|
||||
index = length,
|
||||
args = Array(length),
|
||||
fn = (this && this !== root && this instanceof wrapper) ? Ctor : func,
|
||||
placeholder = wrapper.placeholder;
|
||||
|
||||
while (index--) {
|
||||
args[index] = arguments[index];
|
||||
}
|
||||
var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
|
||||
? []
|
||||
: replaceHolders(args, placeholder);
|
||||
|
||||
length -= holders.length;
|
||||
return length < arity
|
||||
? createRecurryWrapper(func, bitmask, createHybridWrapper, placeholder, undefined, args, holders, undefined, undefined, arity - length)
|
||||
: apply(fn, this, args);
|
||||
}
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` to invoke it with optional `this`
|
||||
* binding of `thisArg`, partial application, and currying.
|
||||
*
|
||||
* @private
|
||||
* @param {Function|string} func The function or method name to wrap.
|
||||
* @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
|
||||
* @param {*} [thisArg] The `this` binding of `func`.
|
||||
* @param {Array} [partials] The arguments to prepend to those provided to the new function.
|
||||
* @param {Array} [holders] The `partials` placeholder indexes.
|
||||
@@ -167,13 +378,11 @@ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partials
|
||||
isBind = bitmask & BIND_FLAG,
|
||||
isBindKey = bitmask & BIND_KEY_FLAG,
|
||||
isCurry = bitmask & CURRY_FLAG,
|
||||
isCurryBound = bitmask & CURRY_BOUND_FLAG,
|
||||
isCurryRight = bitmask & CURRY_RIGHT_FLAG,
|
||||
Ctor = isBindKey ? null : createCtorWrapper(func);
|
||||
isFlip = bitmask & FLIP_FLAG,
|
||||
Ctor = isBindKey ? undefined : createCtorWrapper(func);
|
||||
|
||||
function wrapper() {
|
||||
// Avoid `arguments` object use disqualifying optimizations by
|
||||
// converting it to an array before providing it to other functions.
|
||||
var length = arguments.length,
|
||||
index = length,
|
||||
args = Array(length);
|
||||
@@ -193,23 +402,7 @@ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partials
|
||||
|
||||
length -= argsHolders.length;
|
||||
if (length < arity) {
|
||||
var newArgPos = argPos ? arrayCopy(argPos) : null,
|
||||
newArity = nativeMax(arity - length, 0),
|
||||
newsHolders = isCurry ? argsHolders : null,
|
||||
newHoldersRight = isCurry ? null : argsHolders,
|
||||
newPartials = isCurry ? args : null,
|
||||
newPartialsRight = isCurry ? null : args;
|
||||
|
||||
bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG);
|
||||
bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);
|
||||
|
||||
if (!isCurryBound) {
|
||||
bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
|
||||
}
|
||||
var result = createHybridWrapper(func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, newArity);
|
||||
|
||||
result.placeholder = placeholder;
|
||||
return result;
|
||||
return createRecurryWrapper(func, bitmask, createHybridWrapper, placeholder, thisArg, args, argsHolders, argPos, ary, arity - length);
|
||||
}
|
||||
}
|
||||
var thisBinding = isBind ? thisArg : this,
|
||||
@@ -217,12 +410,14 @@ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partials
|
||||
|
||||
if (argPos) {
|
||||
args = reorder(args, argPos);
|
||||
} else if (isFlip && args.length > 1) {
|
||||
args.reverse();
|
||||
}
|
||||
if (isAry && ary < args.length) {
|
||||
args.length = ary;
|
||||
}
|
||||
if (this && this !== global && this instanceof wrapper) {
|
||||
fn = Ctor || createCtorWrapper(func);
|
||||
if (this && this !== root && this instanceof wrapper) {
|
||||
fn = Ctor || createCtorWrapper(fn);
|
||||
}
|
||||
return fn.apply(thisBinding, args);
|
||||
}
|
||||
@@ -230,29 +425,28 @@ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partials
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` and invokes it with the optional `this`
|
||||
* Creates a function that wraps `func` to invoke it with the optional `this`
|
||||
* binding of `thisArg` and the `partials` prepended to those provided to
|
||||
* the wrapper.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to partially apply arguments to.
|
||||
* @param {number} bitmask The bitmask of flags. See `createWrapper` for more details.
|
||||
* @param {Function} func The function to wrap.
|
||||
* @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
|
||||
* @param {*} thisArg The `this` binding of `func`.
|
||||
* @param {Array} partials The arguments to prepend to those provided to the new function.
|
||||
* @returns {Function} Returns the new bound function.
|
||||
* @returns {Function} Returns the new wrapped function.
|
||||
*/
|
||||
function createPartialWrapper(func, bitmask, thisArg, partials) {
|
||||
var isBind = bitmask & BIND_FLAG,
|
||||
Ctor = createCtorWrapper(func);
|
||||
|
||||
function wrapper() {
|
||||
// Avoid `arguments` object use disqualifying optimizations by
|
||||
// converting it to an array before providing it `func`.
|
||||
var argsIndex = -1,
|
||||
argsLength = arguments.length,
|
||||
leftIndex = -1,
|
||||
leftLength = partials.length,
|
||||
args = Array(argsLength + leftLength);
|
||||
args = Array(leftLength + argsLength),
|
||||
fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
|
||||
|
||||
while (++leftIndex < leftLength) {
|
||||
args[leftIndex] = partials[leftIndex];
|
||||
@@ -260,19 +454,54 @@ function createPartialWrapper(func, bitmask, thisArg, partials) {
|
||||
while (argsLength--) {
|
||||
args[leftIndex++] = arguments[++argsIndex];
|
||||
}
|
||||
var fn = (this && this !== global && this instanceof wrapper) ? Ctor : func;
|
||||
return fn.apply(isBind ? thisArg : this, args);
|
||||
return apply(fn, isBind ? thisArg : this, args);
|
||||
}
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` to continue currying.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
* @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
|
||||
* @param {Function} wrapFunc The function to create the `func` wrapper.
|
||||
* @param {*} placeholder The placeholder to replace.
|
||||
* @param {*} [thisArg] The `this` binding of `func`.
|
||||
* @param {Array} [partials] The arguments to prepend to those provided to the new function.
|
||||
* @param {Array} [holders] The `partials` placeholder indexes.
|
||||
* @param {Array} [argPos] The argument positions of the new function.
|
||||
* @param {number} [ary] The arity cap of `func`.
|
||||
* @param {number} [arity] The arity of `func`.
|
||||
* @returns {Function} Returns the new wrapped function.
|
||||
*/
|
||||
function createRecurryWrapper(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
|
||||
var isCurry = bitmask & CURRY_FLAG,
|
||||
newArgPos = argPos ? copyArray(argPos) : undefined,
|
||||
newsHolders = isCurry ? holders : undefined,
|
||||
newHoldersRight = isCurry ? undefined : holders,
|
||||
newPartials = isCurry ? partials : undefined,
|
||||
newPartialsRight = isCurry ? undefined : partials;
|
||||
|
||||
bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG);
|
||||
bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);
|
||||
|
||||
if (!(bitmask & CURRY_BOUND_FLAG)) {
|
||||
bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
|
||||
}
|
||||
var result = wrapFunc(func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, arity);
|
||||
|
||||
result.placeholder = placeholder;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that either curries or invokes `func` with optional
|
||||
* `this` binding and partially applied arguments.
|
||||
*
|
||||
* @private
|
||||
* @param {Function|string} func The function or method name to reference.
|
||||
* @param {number} bitmask The bitmask of flags.
|
||||
* @param {Function|string} func The function or method name to wrap.
|
||||
* @param {number} bitmask The bitmask of wrapper flags.
|
||||
* The bitmask may be composed of the following flags:
|
||||
* 1 - `_.bind`
|
||||
* 2 - `_.bindKey`
|
||||
@@ -299,45 +528,44 @@ function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, a
|
||||
var length = partials ? partials.length : 0;
|
||||
if (!length) {
|
||||
bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG);
|
||||
partials = holders = null;
|
||||
partials = holders = undefined;
|
||||
}
|
||||
length -= (holders ? holders.length : 0);
|
||||
ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
|
||||
arity = arity === undefined ? arity : toInteger(arity);
|
||||
length -= holders ? holders.length : 0;
|
||||
|
||||
if (bitmask & PARTIAL_RIGHT_FLAG) {
|
||||
var partialsRight = partials,
|
||||
holdersRight = holders;
|
||||
|
||||
partials = holders = null;
|
||||
partials = holders = undefined;
|
||||
}
|
||||
var newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity];
|
||||
|
||||
newData[9] = arity == null
|
||||
func = newData[0];
|
||||
bitmask = newData[1];
|
||||
thisArg = newData[2];
|
||||
partials = newData[3];
|
||||
holders = newData[4];
|
||||
arity = newData[9] = newData[9] == null
|
||||
? (isBindKey ? 0 : func.length)
|
||||
: (nativeMax(arity - length, 0) || 0);
|
||||
: nativeMax(newData[9] - length, 0);
|
||||
|
||||
if (bitmask == BIND_FLAG) {
|
||||
var result = createBindWrapper(newData[0], newData[2]);
|
||||
} else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !newData[4].length) {
|
||||
result = createPartialWrapper.apply(undefined, newData);
|
||||
if (!arity && bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG)) {
|
||||
bitmask &= ~(CURRY_FLAG | CURRY_RIGHT_FLAG);
|
||||
}
|
||||
if (!bitmask || bitmask == BIND_FLAG) {
|
||||
var result = createBaseWrapper(func, bitmask, thisArg);
|
||||
} else if (bitmask == CURRY_FLAG || bitmask == CURRY_RIGHT_FLAG) {
|
||||
result = createCurryWrapper(func, bitmask, arity);
|
||||
} else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !holders.length) {
|
||||
result = createPartialWrapper(func, bitmask, thisArg, partials);
|
||||
} else {
|
||||
result = createHybridWrapper.apply(undefined, newData);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a valid array-like index.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
||||
*/
|
||||
function isIndex(value, length) {
|
||||
value = typeof value == 'number' ? value : parseFloat(value);
|
||||
length = length == null ? MAX_SAFE_INTEGER : length;
|
||||
return value > -1 && value % 1 == 0 && value < length;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reorder `array` according to the specified indexes where the element at
|
||||
* the first index is assigned as the first element, the element at
|
||||
@@ -351,7 +579,7 @@ function isIndex(value, length) {
|
||||
function reorder(array, indexes) {
|
||||
var arrLength = array.length,
|
||||
length = nativeMin(indexes.length, arrLength),
|
||||
oldArray = arrayCopy(array);
|
||||
oldArray = copyArray(array);
|
||||
|
||||
while (length--) {
|
||||
var index = indexes[length];
|
||||
@@ -360,6 +588,30 @@ function reorder(array, indexes) {
|
||||
return array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Function` object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isFunction(_);
|
||||
* // => true
|
||||
*
|
||||
* _.isFunction(/abc/);
|
||||
* // => false
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array constructors, and
|
||||
// PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
||||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
@@ -377,14 +629,89 @@ function reorder(array, indexes) {
|
||||
* _.isObject([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isObject(1);
|
||||
* _.isObject(_.noop);
|
||||
* // => true
|
||||
*
|
||||
* _.isObject(null);
|
||||
* // => 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');
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `value` to an integer.
|
||||
*
|
||||
* **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to convert.
|
||||
* @returns {number} Returns the converted integer.
|
||||
* @example
|
||||
*
|
||||
* _.toInteger(3);
|
||||
* // => 3
|
||||
*
|
||||
* _.toInteger(Number.MIN_VALUE);
|
||||
* // => 0
|
||||
*
|
||||
* _.toInteger(Infinity);
|
||||
* // => 1.7976931348623157e+308
|
||||
*
|
||||
* _.toInteger('3');
|
||||
* // => 3
|
||||
*/
|
||||
function toInteger(value) {
|
||||
if (!value) {
|
||||
return value === 0 ? value : 0;
|
||||
}
|
||||
value = toNumber(value);
|
||||
if (value === INFINITY || value === -INFINITY) {
|
||||
var sign = (value < 0 ? -1 : 1);
|
||||
return sign * MAX_INTEGER;
|
||||
}
|
||||
var remainder = value % 1;
|
||||
return value === value ? (remainder ? value - remainder : value) : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `value` to a number.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to process.
|
||||
* @returns {number} Returns the number.
|
||||
* @example
|
||||
*
|
||||
* _.toNumber(3);
|
||||
* // => 3
|
||||
*
|
||||
* _.toNumber(Number.MIN_VALUE);
|
||||
* // => 5e-324
|
||||
*
|
||||
* _.toNumber(Infinity);
|
||||
* // => Infinity
|
||||
*
|
||||
* _.toNumber('3');
|
||||
* // => 3
|
||||
*/
|
||||
function toNumber(value) {
|
||||
if (isObject(value)) {
|
||||
var other = isFunction(value.valueOf) ? value.valueOf() : value;
|
||||
value = isObject(other) ? (other + '') : other;
|
||||
}
|
||||
if (typeof value != 'string') {
|
||||
return value === 0 ? value : +value;
|
||||
}
|
||||
value = value.replace(reTrim, '');
|
||||
var isBinary = reIsBinary.test(value);
|
||||
return (isBinary || reIsOctal.test(value))
|
||||
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
||||
: (reIsBadHex.test(value) ? NAN : +value);
|
||||
}
|
||||
|
||||
module.exports = createWrapper;
|
||||
|
||||
@@ -1,23 +1,16 @@
|
||||
{
|
||||
"name": "lodash._createwrapper",
|
||||
"version": "3.0.5",
|
||||
"description": "The modern build of lodash’s internal `createWrapper` as a module.",
|
||||
"version": "3.1.1",
|
||||
"description": "The internal lodash function `createWrapper` exported 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/)",
|
||||
"Blaine Bublitz <blaine@iceddev.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._arraycopy": "^3.0.0",
|
||||
"lodash._basecreate": "^3.0.0",
|
||||
"lodash._replaceholders": "^3.0.0"
|
||||
}
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash._isiterateecall v3.0.5
|
||||
# lodash._isiterateecall v3.0.9
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `isIterateeCall` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var isIterateeCall = require('lodash._isiterateecall');
|
||||
```
|
||||
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.5-npm-packages/lodash._isiterateecall) for more details.
|
||||
See the [package source](https://github.com/lodash/lodash/blob/3.0.9-npm-packages/lodash._isiterateecall) for more details.
|
||||
|
||||
@@ -1,17 +1,49 @@
|
||||
/**
|
||||
* lodash 3.0.5 (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>
|
||||
*/
|
||||
/** Used to detect unsigned integer values. */
|
||||
|
||||
/** Used to detect unsigned integer values. */
|
||||
var reIsUint = /^\d+$/;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @private
|
||||
* @param {string} key The key of the property to get.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function baseProperty(key) {
|
||||
return function(object) {
|
||||
return object == null ? undefined : object[key];
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the "length" property value of `object`.
|
||||
*
|
||||
* **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
|
||||
* that affects Safari on at least iOS 8.1-8.3 ARM64.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {*} Returns the "length" value.
|
||||
*/
|
||||
var getLength = baseProperty('length');
|
||||
|
||||
/**
|
||||
* Checks if `value` is array-like.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
||||
*/
|
||||
function isArrayLike(value) {
|
||||
return value != null && isLength(getLength(value));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a valid array-like index.
|
||||
@@ -22,7 +54,7 @@ var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
|
||||
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
||||
*/
|
||||
function isIndex(value, length) {
|
||||
value = +value;
|
||||
value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
|
||||
length = length == null ? MAX_SAFE_INTEGER : length;
|
||||
return value > -1 && value % 1 == 0 && value < length;
|
||||
}
|
||||
@@ -41,13 +73,9 @@ function isIterateeCall(value, index, object) {
|
||||
return false;
|
||||
}
|
||||
var type = typeof index;
|
||||
if (type == 'number') {
|
||||
var length = object.length,
|
||||
prereq = isLength(length) && isIndex(index, length);
|
||||
} else {
|
||||
prereq = type == 'string' && index in object;
|
||||
}
|
||||
if (prereq) {
|
||||
if (type == 'number'
|
||||
? (isArrayLike(object) && isIndex(index, object.length))
|
||||
: (type == 'string' && index in object)) {
|
||||
var other = object[index];
|
||||
return value === value ? (value === other) : (other !== other);
|
||||
}
|
||||
@@ -57,7 +85,7 @@ function isIterateeCall(value, index, object) {
|
||||
/**
|
||||
* 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.
|
||||
@@ -91,7 +119,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');
|
||||
}
|
||||
|
||||
module.exports = isIterateeCall;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash._isiterateecall",
|
||||
"version": "3.0.5",
|
||||
"version": "3.0.9",
|
||||
"description": "The modern build of lodash’s internal `isIterateeCall` 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, copyright 2009-2015 Jeremy Ashkenas,
|
||||
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
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
# lodash.ary v3.0.2
|
||||
# lodash.ary v3.1.0
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.ary` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
The [lodash](https://lodash.com/) method `_.ary` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
|
||||
```bash
|
||||
$ {sudo -H} npm i -g npm
|
||||
$ npm i --save lodash.ary
|
||||
```
|
||||
|
||||
In Node.js/io.js:
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
var ary = require('lodash.ary');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#ary) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.ary) for more details.
|
||||
See the [documentation](https://lodash.com/docs#ary) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.ary) for more details.
|
||||
|
||||
@@ -1,22 +1,18 @@
|
||||
/**
|
||||
* lodash 3.0.2 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* lodash 3.1.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-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
var createWrapper = require('lodash._createwrapper'),
|
||||
isIterateeCall = require('lodash._isiterateecall');
|
||||
var createWrapper = require('lodash._createwrapper');
|
||||
|
||||
/** Used to compose bitmasks for wrapper metadata. */
|
||||
var ARY_FLAG = 128;
|
||||
|
||||
/* Native method references for those with the same name as other `lodash` methods. */
|
||||
var nativeMax = Math.max;
|
||||
|
||||
/**
|
||||
* Creates a function that accepts up to `n` arguments ignoring any
|
||||
* Creates a function that accepts up to `n` arguments, ignoring any
|
||||
* additional arguments.
|
||||
*
|
||||
* @static
|
||||
@@ -24,7 +20,7 @@ var nativeMax = Math.max;
|
||||
* @category Function
|
||||
* @param {Function} func The function to cap arguments for.
|
||||
* @param {number} [n=func.length] The arity cap.
|
||||
* @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
|
||||
* @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @example
|
||||
*
|
||||
@@ -32,10 +28,8 @@ var nativeMax = Math.max;
|
||||
* // => [6, 8, 10]
|
||||
*/
|
||||
function ary(func, n, guard) {
|
||||
if (guard && isIterateeCall(func, n, guard)) {
|
||||
n = undefined;
|
||||
}
|
||||
n = (func && n == null) ? func.length : nativeMax(+n || 0, 0);
|
||||
n = guard ? undefined : n;
|
||||
n = (func && n == null) ? func.length : n;
|
||||
return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,23 +1,20 @@
|
||||
{
|
||||
"name": "lodash.ary",
|
||||
"version": "3.0.2",
|
||||
"description": "The modern build of lodash’s `_.ary` as a module.",
|
||||
"version": "3.1.0",
|
||||
"description": "The lodash method `_.ary` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
"license": "MIT",
|
||||
"keywords": "lodash, lodash-modularized, stdlib, util",
|
||||
"keywords": "lodash, lodash-modularized, stdlib, util, ary",
|
||||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"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@iceddev.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._createwrapper": "^3.0.0",
|
||||
"lodash._isiterateecall": "^3.0.0"
|
||||
"lodash._createwrapper": "^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.assign v3.0.0
|
||||
# lodash.assign v3.1.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.0.0-npm-packages/lodash.assign) for more details.
|
||||
See the [documentation](https://lodash.com/docs#assign) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.assign) for more details.
|
||||
|
||||
@@ -1,13 +1,102 @@
|
||||
/**
|
||||
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||
* 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 baseAssign = require('lodash._baseassign'),
|
||||
createAssigner = require('lodash._createassigner');
|
||||
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`
|
||||
* functions.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The destination object.
|
||||
* @param {Object} source The source object.
|
||||
* @param {Function} customizer The function to customize assigned values.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function assignWith(object, source, customizer) {
|
||||
var props = keys(source);
|
||||
push.apply(props, getSymbols(source));
|
||||
|
||||
var index = -1,
|
||||
length = props.length;
|
||||
|
||||
while (++index < length) {
|
||||
var key = props[index],
|
||||
value = object[key],
|
||||
result = customizer(value, source[key], key, object, source);
|
||||
|
||||
if ((result === result ? (result !== value) : (value === value)) ||
|
||||
(value === undefined && !(key in object))) {
|
||||
object[key] = result;
|
||||
}
|
||||
}
|
||||
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
|
||||
@@ -16,13 +105,16 @@ var baseAssign = require('lodash._baseassign'),
|
||||
* 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).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @alias extend
|
||||
* @category Object
|
||||
* @param {Object} object The destination object.
|
||||
* @param {...Object} [sources] The source objects.
|
||||
* @param {Function} [customizer] The function to customize assigning values.
|
||||
* @param {Function} [customizer] The function to customize assigned values.
|
||||
* @param {*} [thisArg] The `this` binding of `customizer`.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @example
|
||||
@@ -32,12 +124,38 @@ var baseAssign = require('lodash._baseassign'),
|
||||
*
|
||||
* // using a customizer callback
|
||||
* var defaults = _.partialRight(_.assign, function(value, other) {
|
||||
* return typeof value == 'undefined' ? other : value;
|
||||
* return _.isUndefined(value) ? other : value;
|
||||
* });
|
||||
*
|
||||
* defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
|
||||
* // => { 'user': 'barney', 'age': 36 }
|
||||
*/
|
||||
var assign = createAssigner(baseAssign);
|
||||
var assign = createAssigner(function(object, source, customizer) {
|
||||
return customizer
|
||||
? assignWith(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.0.0",
|
||||
"version": "3.1.0",
|
||||
"description": "The modern build of lodash’s `_.assign` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -18,6 +18,8 @@
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._baseassign": "^3.0.0",
|
||||
"lodash._createassigner": "^3.0.0"
|
||||
"lodash._createassigner": "^3.0.0",
|
||||
"lodash.isnative": "^3.0.0",
|
||||
"lodash.keys": "^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.at v3.0.0
|
||||
# lodash.at v3.1.1
|
||||
|
||||
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.0.0-npm-packages/lodash.at) for more details.
|
||||
See the [documentation](https://lodash.com/docs#at) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.at) for more details.
|
||||
|
||||
@@ -1,28 +1,51 @@
|
||||
/**
|
||||
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.1.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 baseAt = require('lodash._baseat'),
|
||||
baseFlatten = require('lodash._baseflatten'),
|
||||
toIterable = require('lodash._toiterable');
|
||||
toIterable = require('lodash._toiterable'),
|
||||
restParam = require('lodash.restparam');
|
||||
|
||||
/**
|
||||
* Used as the maximum length of an array-like value.
|
||||
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
|
||||
* for more details.
|
||||
* 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 ES `ToLength`. See the
|
||||
* [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)
|
||||
* for more details.
|
||||
* **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
@@ -49,15 +72,15 @@ function isLength(value) {
|
||||
* _.at(['a', 'b', 'c'], [0, 2]);
|
||||
* // => ['a', 'c']
|
||||
*
|
||||
* _.at(['fred', 'barney', 'pebbles'], 0, 2);
|
||||
* // => ['fred', 'pebbles']
|
||||
* _.at(['barney', 'fred', 'pebbles'], 0, 2);
|
||||
* // => ['barney', 'pebbles']
|
||||
*/
|
||||
function at(collection) {
|
||||
var length = collection ? collection.length : 0;
|
||||
var at = restParam(function(collection, props) {
|
||||
var length = collection ? getLength(collection) : 0;
|
||||
if (isLength(length)) {
|
||||
collection = toIterable(collection);
|
||||
}
|
||||
return baseAt(collection, baseFlatten(arguments, false, false, 1));
|
||||
}
|
||||
return baseAt(collection, baseFlatten(props));
|
||||
});
|
||||
|
||||
module.exports = at;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.at",
|
||||
"version": "3.0.0",
|
||||
"version": "3.1.1",
|
||||
"description": "The modern build of lodash’s `_.at` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -19,6 +19,7 @@
|
||||
"dependencies": {
|
||||
"lodash._baseat": "^3.0.0",
|
||||
"lodash._baseflatten": "^3.0.0",
|
||||
"lodash._toiterable": "^3.0.0"
|
||||
"lodash._toiterable": "^3.0.0",
|
||||
"lodash.restparam": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.attempt v3.0.0
|
||||
# lodash.attempt v3.1.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.0.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.1.0-npm-packages/lodash.attempt) for more details.
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
/**
|
||||
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
|
||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
var isError = require('lodash.iserror');
|
||||
var baseSlice = require('lodash._baseslice'),
|
||||
isError = require('lodash.iserror');
|
||||
|
||||
/**
|
||||
* Attempts to invoke `func`, returning either the result or the caught
|
||||
* error object.
|
||||
* Attempts to invoke `func`, returning either the result or the caught error
|
||||
* object. Any additional arguments are provided to `func` when it is invoked.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -20,9 +21,9 @@ var isError = require('lodash.iserror');
|
||||
* @example
|
||||
*
|
||||
* // avoid throwing errors for invalid selectors
|
||||
* var elements = _.attempt(function() {
|
||||
* var elements = _.attempt(function(selector) {
|
||||
* return document.querySelectorAll(selector);
|
||||
* });
|
||||
* }, '>_>');
|
||||
*
|
||||
* if (_.isError(elements)) {
|
||||
* elements = [];
|
||||
@@ -30,9 +31,9 @@ var isError = require('lodash.iserror');
|
||||
*/
|
||||
function attempt(func) {
|
||||
try {
|
||||
return func();
|
||||
return func.apply(undefined, baseSlice(arguments, 1));
|
||||
} catch(e) {
|
||||
return isError(e) ? e : Error(e);
|
||||
return isError(e) ? e : new Error(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.attempt",
|
||||
"version": "3.0.0",
|
||||
"version": "3.1.0",
|
||||
"description": "The modern build of lodash’s `_.attempt` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -17,6 +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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.bind v3.0.0
|
||||
# lodash.bind v3.1.0
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.bind` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var bind = require('lodash.bind');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#bind) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.bind) for more details.
|
||||
See the [documentation](https://lodash.com/docs#bind) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.bind) for more details.
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/**
|
||||
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||
* 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'),
|
||||
createWrapper = require('lodash._createwrapper'),
|
||||
replaceHolders = require('lodash._replaceholders');
|
||||
var createWrapper = require('lodash._createwrapper'),
|
||||
replaceHolders = require('lodash._replaceholders'),
|
||||
restParam = require('lodash.restparam');
|
||||
|
||||
/** Used to compose bitmasks for wrapper metadata. */
|
||||
var BIND_FLAG = 1,
|
||||
@@ -22,7 +22,7 @@ var BIND_FLAG = 1,
|
||||
* The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
|
||||
* may be used as a placeholder for partially applied arguments.
|
||||
*
|
||||
* **Note:** Unlike native `Function#bind` this method does not set the `length`
|
||||
* **Note:** Unlike native `Function#bind` this method does not set the "length"
|
||||
* property of bound functions.
|
||||
*
|
||||
* @static
|
||||
@@ -30,7 +30,7 @@ var BIND_FLAG = 1,
|
||||
* @category Function
|
||||
* @param {Function} func The function to bind.
|
||||
* @param {*} thisArg The `this` binding of `func`.
|
||||
* @param {...*} [args] The arguments to be partially applied.
|
||||
* @param {...*} [partials] The arguments to be partially applied.
|
||||
* @returns {Function} Returns the new bound function.
|
||||
* @example
|
||||
*
|
||||
@@ -49,16 +49,14 @@ var BIND_FLAG = 1,
|
||||
* bound('hi');
|
||||
* // => 'hi fred!'
|
||||
*/
|
||||
function bind(func, thisArg) {
|
||||
var bind = restParam(function(func, thisArg, partials) {
|
||||
var bitmask = BIND_FLAG;
|
||||
if (arguments.length > 2) {
|
||||
var partials = baseSlice(arguments, 2),
|
||||
holders = replaceHolders(partials, bind.placeholder);
|
||||
|
||||
if (partials.length) {
|
||||
var holders = replaceHolders(partials, bind.placeholder);
|
||||
bitmask |= PARTIAL_FLAG;
|
||||
}
|
||||
return createWrapper(func, bitmask, thisArg, partials, holders);
|
||||
}
|
||||
});
|
||||
|
||||
// Assign default placeholders.
|
||||
bind.placeholder = {};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.bind",
|
||||
"version": "3.0.0",
|
||||
"version": "3.1.0",
|
||||
"description": "The modern build of lodash’s `_.bind` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -17,8 +17,8 @@
|
||||
"repository": "lodash/lodash",
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._baseslice": "^3.0.0",
|
||||
"lodash._createwrapper": "^3.0.0",
|
||||
"lodash._replaceholders": "^3.0.0"
|
||||
"lodash._replaceholders": "^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.bindall v3.0.0
|
||||
# lodash.bindall v3.1.0
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.bindAll` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var bindAll = require('lodash.bindall');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#bindAll) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.bindall) for more details.
|
||||
See the [documentation](https://lodash.com/docs#bindAll) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.bindall) for more details.
|
||||
|
||||
@@ -1,45 +1,26 @@
|
||||
/**
|
||||
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||
* 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 baseFlatten = require('lodash._baseflatten'),
|
||||
createWrapper = require('lodash._createwrapper'),
|
||||
functions = require('lodash.functions');
|
||||
functions = require('lodash.functions'),
|
||||
restParam = require('lodash.restparam');
|
||||
|
||||
/** Used to compose bitmasks for wrapper metadata. */
|
||||
var BIND_FLAG = 1;
|
||||
|
||||
/**
|
||||
* The base implementation of `_.bindAll` without support for individual
|
||||
* method name arguments.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to bind and assign the bound methods to.
|
||||
* @param {string[]} methodNames The object method names to bind.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseBindAll(object, methodNames) {
|
||||
var index = -1,
|
||||
length = methodNames.length;
|
||||
|
||||
while (++index < length) {
|
||||
var key = methodNames[index];
|
||||
object[key] = createWrapper(object[key], BIND_FLAG, object);
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Binds methods of an object to the object itself, overwriting the existing
|
||||
* method. Method names may be specified as individual arguments or as arrays
|
||||
* of method names. If no method names are provided all enumerable function
|
||||
* properties, own and inherited, of `object` are bound.
|
||||
*
|
||||
* **Note:** This method does not set the `length` property of bound functions.
|
||||
* **Note:** This method does not set the "length" property of bound functions.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -61,12 +42,17 @@ function baseBindAll(object, methodNames) {
|
||||
* jQuery('#docs').on('click', view.onClick);
|
||||
* // => logs 'clicked docs' when the element is clicked
|
||||
*/
|
||||
function bindAll(object) {
|
||||
return baseBindAll(object,
|
||||
arguments.length > 1
|
||||
? baseFlatten(arguments, false, false, 1)
|
||||
: functions(object)
|
||||
);
|
||||
}
|
||||
var bindAll = restParam(function(object, methodNames) {
|
||||
methodNames = methodNames.length ? baseFlatten(methodNames) : functions(object);
|
||||
|
||||
var index = -1,
|
||||
length = methodNames.length;
|
||||
|
||||
while (++index < length) {
|
||||
var key = methodNames[index];
|
||||
object[key] = createWrapper(object[key], BIND_FLAG, object);
|
||||
}
|
||||
return object;
|
||||
});
|
||||
|
||||
module.exports = bindAll;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.bindall",
|
||||
"version": "3.0.0",
|
||||
"version": "3.1.0",
|
||||
"description": "The modern build of lodash’s `_.bindAll` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -19,6 +19,7 @@
|
||||
"dependencies": {
|
||||
"lodash._baseflatten": "^3.0.0",
|
||||
"lodash._createwrapper": "^3.0.0",
|
||||
"lodash.functions": "^3.0.0"
|
||||
"lodash.functions": "^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.bindkey v3.0.0
|
||||
# lodash.bindkey v3.1.0
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.bindKey` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var bindKey = require('lodash.bindkey');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#bindKey) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.bindkey) for more details.
|
||||
See the [documentation](https://lodash.com/docs#bindKey) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.bindkey) for more details.
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/**
|
||||
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||
* 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'),
|
||||
createWrapper = require('lodash._createwrapper'),
|
||||
replaceHolders = require('lodash._replaceholders');
|
||||
var createWrapper = require('lodash._createwrapper'),
|
||||
replaceHolders = require('lodash._replaceholders'),
|
||||
restParam = require('lodash.restparam');
|
||||
|
||||
/** Used to compose bitmasks for wrapper metadata. */
|
||||
var BIND_FLAG = 1,
|
||||
@@ -21,7 +21,7 @@ var BIND_FLAG = 1,
|
||||
*
|
||||
* This method differs from `_.bind` by allowing bound functions to reference
|
||||
* methods that may be redefined or don't yet exist.
|
||||
* See [Peter Michaux's article](http://michaux.ca/articles/lazy-function-definition-pattern)
|
||||
* See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
|
||||
* for more details.
|
||||
*
|
||||
* The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
|
||||
@@ -32,7 +32,7 @@ var BIND_FLAG = 1,
|
||||
* @category Function
|
||||
* @param {Object} object The object the method belongs to.
|
||||
* @param {string} key The key of the method.
|
||||
* @param {...*} [args] The arguments to be partially applied.
|
||||
* @param {...*} [partials] The arguments to be partially applied.
|
||||
* @returns {Function} Returns the new bound function.
|
||||
* @example
|
||||
*
|
||||
@@ -59,16 +59,14 @@ var BIND_FLAG = 1,
|
||||
* bound('hi');
|
||||
* // => 'hiya fred!'
|
||||
*/
|
||||
function bindKey(object, key) {
|
||||
var bindKey = restParam(function(object, key, partials) {
|
||||
var bitmask = BIND_FLAG | BIND_KEY_FLAG;
|
||||
if (arguments.length > 2) {
|
||||
var partials = baseSlice(arguments, 2),
|
||||
holders = replaceHolders(partials, bindKey.placeholder);
|
||||
|
||||
if (partials.length) {
|
||||
var holders = replaceHolders(partials, bindKey.placeholder);
|
||||
bitmask |= PARTIAL_FLAG;
|
||||
}
|
||||
return createWrapper(key, bitmask, object, partials, holders);
|
||||
}
|
||||
});
|
||||
|
||||
// Assign default placeholders.
|
||||
bindKey.placeholder = {};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.bindkey",
|
||||
"version": "3.0.0",
|
||||
"version": "3.1.0",
|
||||
"description": "The modern build of lodash’s `_.bindKey` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -17,8 +17,8 @@
|
||||
"repository": "lodash/lodash",
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._baseslice": "^3.0.0",
|
||||
"lodash._createwrapper": "^3.0.0",
|
||||
"lodash._replaceholders": "^3.0.0"
|
||||
"lodash._replaceholders": "^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.callback v3.0.0
|
||||
# lodash.callback v3.1.1
|
||||
|
||||
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.
|
||||
|
||||
@@ -17,4 +17,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.0.0-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.1.1-npm-packages/lodash.callback) for more details.
|
||||
|
||||
@@ -1,19 +1,33 @@
|
||||
/**
|
||||
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.1.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.2 <http://underscorejs.org/LICENSE>
|
||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
var baseCallback = require('lodash._basecallback'),
|
||||
baseClone = require('lodash._baseclone'),
|
||||
baseMatches = require('lodash._basematches'),
|
||||
isIterateeCall = require('lodash._isiterateecall');
|
||||
|
||||
/**
|
||||
* Creates a function bound to an optional `thisArg`. If `func` is a property
|
||||
* name the created callback returns the property value for a given element.
|
||||
* If `func` is an object the created callback returns `true` for elements
|
||||
* that contain the equivalent object properties, otherwise it returns `false`.
|
||||
* Checks if `value` is object-like.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
||||
*/
|
||||
function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with the `this` binding of `thisArg`
|
||||
* and arguments of the created function. If `func` is a property name the
|
||||
* created callback returns the property value for a given element. If `func`
|
||||
* is an object the created callback returns `true` for elements that contain
|
||||
* the equivalent object properties, otherwise it returns `false`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -37,7 +51,9 @@ var baseCallback = require('lodash._basecallback'),
|
||||
* return callback(func, thisArg);
|
||||
* }
|
||||
* return function(object) {
|
||||
* return match[2] == 'gt' ? object[match[1]] > match[3] : object[match[1]] < match[3];
|
||||
* return match[2] == 'gt'
|
||||
* ? object[match[1]] > match[3]
|
||||
* : object[match[1]] < match[3];
|
||||
* };
|
||||
* });
|
||||
*
|
||||
@@ -48,7 +64,38 @@ function callback(func, thisArg, guard) {
|
||||
if (guard && isIterateeCall(func, thisArg, guard)) {
|
||||
thisArg = null;
|
||||
}
|
||||
return baseCallback(func, thisArg);
|
||||
return isObjectLike(func)
|
||||
? matches(func)
|
||||
: baseCallback(func, thisArg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function which performs a deep comparison between a given object
|
||||
* and `source`, returning `true` if the given object has equivalent property
|
||||
* values, else `false`.
|
||||
*
|
||||
* **Note:** This method supports comparing arrays, booleans, `Date` objects,
|
||||
* numbers, `Object` objects, regexes, and strings. Objects are compared by
|
||||
* their own, not inherited, enumerable properties. For comparing a single
|
||||
* own or inherited property value see `_.matchesProperty`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Utility
|
||||
* @param {Object} source The object of property values to match.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @example
|
||||
*
|
||||
* var users = [
|
||||
* { 'user': 'barney', 'age': 36, 'active': true },
|
||||
* { 'user': 'fred', 'age': 40, 'active': false }
|
||||
* ];
|
||||
*
|
||||
* _.filter(users, _.matches({ 'age': 40, 'active': false }));
|
||||
* // => [{ 'user': 'fred', 'age': 40, 'active': false }]
|
||||
*/
|
||||
function matches(source) {
|
||||
return baseMatches(baseClone(source, true));
|
||||
}
|
||||
|
||||
module.exports = callback;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.callback",
|
||||
"version": "3.0.0",
|
||||
"version": "3.1.1",
|
||||
"description": "The modern build of lodash’s `_.callback` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -18,6 +18,8 @@
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._basecallback": "^3.0.0",
|
||||
"lodash._baseclone": "^3.0.0",
|
||||
"lodash._basematches": "^3.0.0",
|
||||
"lodash._isiterateecall": "^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,
|
||||
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
|
||||
@@ -1,20 +1,18 @@
|
||||
# lodash.capitalize v3.0.0
|
||||
# lodash.capitalize v3.1.0
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.capitalize` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
The [lodash](https://lodash.com/) method `_.capitalize` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
|
||||
```bash
|
||||
$ {sudo -H} npm i -g npm
|
||||
$ npm i --save lodash.capitalize
|
||||
```
|
||||
|
||||
In Node.js/io.js:
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
var capitalize = require('lodash.capitalize');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#capitalize) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.capitalize) for more details.
|
||||
See the [documentation](https://lodash.com/docs#capitalize) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.capitalize) for more details.
|
||||
|
||||
@@ -1,15 +1,121 @@
|
||||
/**
|
||||
* lodash 3.0.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>
|
||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* lodash 3.1.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 baseToString = require('lodash._basetostring');
|
||||
var upperFirst = require('lodash.upperfirst');
|
||||
|
||||
/** Used as references for various `Number` constants. */
|
||||
var INFINITY = 1 / 0;
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var symbolTag = '[object Symbol]';
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = global.Object.prototype;
|
||||
|
||||
/**
|
||||
* Capitalizes the first character of `string`.
|
||||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
|
||||
/** Built-in value references. */
|
||||
var _Symbol = global.Symbol;
|
||||
|
||||
/** Used to convert symbols to primitives and strings. */
|
||||
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
||||
symbolToString = _Symbol ? symbolProto.toString : undefined;
|
||||
|
||||
/**
|
||||
* 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 _
|
||||
* @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 _
|
||||
* @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 string if it's not one. An empty string is returned
|
||||
* for `null` and `undefined` values. The sign of `-0` is preserved.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to process.
|
||||
* @returns {string} Returns the string.
|
||||
* @example
|
||||
*
|
||||
* _.toString(null);
|
||||
* // => ''
|
||||
*
|
||||
* _.toString(-0);
|
||||
* // => '-0'
|
||||
*
|
||||
* _.toString([1, 2, 3]);
|
||||
* // => '1,2,3'
|
||||
*/
|
||||
function toString(value) {
|
||||
// Exit early for strings to avoid a performance hit in some environments.
|
||||
if (typeof value == 'string') {
|
||||
return value;
|
||||
}
|
||||
if (value == null) {
|
||||
return '';
|
||||
}
|
||||
if (isSymbol(value)) {
|
||||
return _Symbol ? symbolToString.call(value) : '';
|
||||
}
|
||||
var result = (value + '');
|
||||
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the first character of `string` to upper case and the remaining
|
||||
* to lower case.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -18,12 +124,11 @@ var baseToString = require('lodash._basetostring');
|
||||
* @returns {string} Returns the capitalized string.
|
||||
* @example
|
||||
*
|
||||
* _.capitalize('fred');
|
||||
* _.capitalize('FRED');
|
||||
* // => 'Fred'
|
||||
*/
|
||||
function capitalize(string) {
|
||||
string = baseToString(string);
|
||||
return string && (string.charAt(0).toUpperCase() + string.slice(1));
|
||||
return upperFirst(toString(string).toLowerCase());
|
||||
}
|
||||
|
||||
module.exports = capitalize;
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
{
|
||||
"name": "lodash.capitalize",
|
||||
"version": "3.0.0",
|
||||
"description": "The modern build of lodash’s `_.capitalize` as a module.",
|
||||
"version": "3.1.0",
|
||||
"description": "The lodash method `_.capitalize` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
"license": "MIT",
|
||||
"keywords": "lodash, lodash-modularized, stdlib, util",
|
||||
"keywords": "lodash, lodash-modularized, stdlib, util, capitalize",
|
||||
"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@iceddev.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._basetostring": "^3.0.0"
|
||||
"lodash.upperfirst": "^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.countby v3.0.0
|
||||
# lodash.countby v3.1.1
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.countBy` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var countBy = require('lodash.countby');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#countBy) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.countby) for more details.
|
||||
See the [documentation](https://lodash.com/docs#countBy) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.countby) for more details.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.1.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>
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.countby",
|
||||
"version": "3.0.0",
|
||||
"version": "3.1.1",
|
||||
"description": "The modern build of lodash’s `_.countBy` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -17,6 +17,7 @@
|
||||
"repository": "lodash/lodash",
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._createaggregator": "^3.0.0"
|
||||
"lodash._createaggregator": "^3.0.0",
|
||||
"lodash.keys": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.create v3.0.0
|
||||
# lodash.create v3.1.1
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.create` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var create = require('lodash.create');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#create) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.create) for more details.
|
||||
See the [documentation](https://lodash.com/docs#create) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.create) for more details.
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
/**
|
||||
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.1.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 baseCopy = require('lodash._basecopy'),
|
||||
var baseAssign = require('lodash._baseassign'),
|
||||
baseCreate = require('lodash._basecreate'),
|
||||
isIterateeCall = require('lodash._isiterateecall'),
|
||||
keys = require('lodash.keys');
|
||||
isIterateeCall = require('lodash._isiterateecall');
|
||||
|
||||
/**
|
||||
* Creates an object that inherits from the given `prototype` object. If a
|
||||
@@ -48,9 +47,9 @@ var baseCopy = require('lodash._basecopy'),
|
||||
function create(prototype, properties, guard) {
|
||||
var result = baseCreate(prototype);
|
||||
if (guard && isIterateeCall(prototype, properties, guard)) {
|
||||
properties = null;
|
||||
properties = undefined;
|
||||
}
|
||||
return properties ? baseCopy(properties, result, keys(properties)) : result;
|
||||
return properties ? baseAssign(result, properties) : result;
|
||||
}
|
||||
|
||||
module.exports = create;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.create",
|
||||
"version": "3.0.0",
|
||||
"version": "3.1.1",
|
||||
"description": "The modern build of lodash’s `_.create` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -17,9 +17,8 @@
|
||||
"repository": "lodash/lodash",
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._basecopy": "^3.0.0",
|
||||
"lodash._baseassign": "^3.0.0",
|
||||
"lodash._basecreate": "^3.0.0",
|
||||
"lodash._isiterateecall": "^3.0.0",
|
||||
"lodash.keys": "^3.0.0"
|
||||
"lodash._isiterateecall": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
|
||||
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:
|
||||
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 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.
|
||||
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,20 +1,18 @@
|
||||
# lodash.curry v3.0.2
|
||||
# lodash.curry v3.1.1
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.curry` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
The [lodash](https://lodash.com/) method `_.curry` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
|
||||
```bash
|
||||
$ {sudo -H} npm i -g npm
|
||||
$ npm i --save lodash.curry
|
||||
```
|
||||
|
||||
In Node.js/io.js:
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
var curry = require('lodash.curry');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#curry) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.curry) for more details.
|
||||
See the [documentation](https://lodash.com/docs#curry) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.curry) for more details.
|
||||
|
||||
@@ -1,54 +1,34 @@
|
||||
/**
|
||||
* lodash 3.0.2 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* lodash 3.1.1 (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-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
var createWrapper = require('lodash._createwrapper'),
|
||||
isIterateeCall = require('lodash._isiterateecall');
|
||||
var createWrapper = require('lodash._createwrapper');
|
||||
|
||||
/** Used to compose bitmasks for wrapper metadata. */
|
||||
var CURRY_FLAG = 8;
|
||||
|
||||
/**
|
||||
* Creates a `_.curry` or `_.curryRight` function.
|
||||
*
|
||||
* @private
|
||||
* @param {boolean} flag The curry bit flag.
|
||||
* @returns {Function} Returns the new curry function.
|
||||
*/
|
||||
function createCurry(flag) {
|
||||
function curryFunc(func, arity, guard) {
|
||||
if (guard && isIterateeCall(func, arity, guard)) {
|
||||
arity = undefined;
|
||||
}
|
||||
var result = createWrapper(func, flag, undefined, undefined, undefined, undefined, undefined, arity);
|
||||
result.placeholder = curryFunc.placeholder;
|
||||
return result;
|
||||
}
|
||||
return curryFunc;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that accepts one or more arguments of `func` that when
|
||||
* called either invokes `func` returning its result, if all `func` arguments
|
||||
* have been provided, or returns a function that accepts one or more of the
|
||||
* remaining `func` arguments, and so on. The arity of `func` may be specified
|
||||
* if `func.length` is not sufficient.
|
||||
* Creates a function that accepts arguments of `func` and either invokes
|
||||
* `func` returning its result, if at least `arity` number of arguments have
|
||||
* been provided, or returns a function that accepts the remaining `func`
|
||||
* arguments, and so on. The arity of `func` may be specified if `func.length`
|
||||
* is not sufficient.
|
||||
*
|
||||
* The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
|
||||
* may be used as a placeholder for provided arguments.
|
||||
*
|
||||
* **Note:** This method does not set the "length" property of curried functions.
|
||||
* **Note:** This method doesn't set the "length" property of curried functions.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Function
|
||||
* @param {Function} func The function to curry.
|
||||
* @param {number} [arity=func.length] The arity of `func`.
|
||||
* @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
|
||||
* @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
|
||||
* @returns {Function} Returns the new curried function.
|
||||
* @example
|
||||
*
|
||||
@@ -67,11 +47,16 @@ function createCurry(flag) {
|
||||
* curried(1, 2, 3);
|
||||
* // => [1, 2, 3]
|
||||
*
|
||||
* // using placeholders
|
||||
* // Curried with placeholders.
|
||||
* curried(1)(_, 3)(2);
|
||||
* // => [1, 2, 3]
|
||||
*/
|
||||
var curry = createCurry(CURRY_FLAG);
|
||||
function curry(func, arity, guard) {
|
||||
arity = guard ? undefined : arity;
|
||||
var result = createWrapper(func, CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
|
||||
result.placeholder = curry.placeholder;
|
||||
return result;
|
||||
}
|
||||
|
||||
// Assign default placeholders.
|
||||
curry.placeholder = {};
|
||||
|
||||
@@ -1,23 +1,20 @@
|
||||
{
|
||||
"name": "lodash.curry",
|
||||
"version": "3.0.2",
|
||||
"description": "The modern build of lodash’s `_.curry` as a module.",
|
||||
"version": "3.1.1",
|
||||
"description": "The lodash method `_.curry` 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, curry",
|
||||
"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@iceddev.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._createwrapper": "^3.0.0",
|
||||
"lodash._isiterateecall": "^3.0.0"
|
||||
"lodash._createwrapper": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
|
||||
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:
|
||||
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 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.
|
||||
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,20 +1,18 @@
|
||||
# lodash.curryright v3.0.2
|
||||
# lodash.curryright v3.1.1
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.curryRight` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
The [lodash](https://lodash.com/) method `_.curryRight` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
|
||||
```bash
|
||||
$ {sudo -H} npm i -g npm
|
||||
$ npm i --save lodash.curryright
|
||||
```
|
||||
|
||||
In Node.js/io.js:
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
var curryRight = require('lodash.curryright');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#curryRight) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.curryright) for more details.
|
||||
See the [documentation](https://lodash.com/docs#curryRight) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.curryright) for more details.
|
||||
|
||||
@@ -1,36 +1,16 @@
|
||||
/**
|
||||
* lodash 3.0.2 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* lodash 3.1.1 (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-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
var createWrapper = require('lodash._createwrapper'),
|
||||
isIterateeCall = require('lodash._isiterateecall');
|
||||
var createWrapper = require('lodash._createwrapper');
|
||||
|
||||
/** Used to compose bitmasks for wrapper metadata. */
|
||||
var CURRY_RIGHT_FLAG = 16;
|
||||
|
||||
/**
|
||||
* Creates a `_.curry` or `_.curryRight` function.
|
||||
*
|
||||
* @private
|
||||
* @param {boolean} flag The curry bit flag.
|
||||
* @returns {Function} Returns the new curry function.
|
||||
*/
|
||||
function createCurry(flag) {
|
||||
function curryFunc(func, arity, guard) {
|
||||
if (guard && isIterateeCall(func, arity, guard)) {
|
||||
arity = undefined;
|
||||
}
|
||||
var result = createWrapper(func, flag, undefined, undefined, undefined, undefined, undefined, arity);
|
||||
result.placeholder = curryFunc.placeholder;
|
||||
return result;
|
||||
}
|
||||
return curryFunc;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is like `_.curry` except that arguments are applied to `func`
|
||||
* in the manner of `_.partialRight` instead of `_.partial`.
|
||||
@@ -38,14 +18,14 @@ function createCurry(flag) {
|
||||
* The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
|
||||
* builds, may be used as a placeholder for provided arguments.
|
||||
*
|
||||
* **Note:** This method does not set the "length" property of curried functions.
|
||||
* **Note:** This method doesn't set the "length" property of curried functions.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Function
|
||||
* @param {Function} func The function to curry.
|
||||
* @param {number} [arity=func.length] The arity of `func`.
|
||||
* @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
|
||||
* @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
|
||||
* @returns {Function} Returns the new curried function.
|
||||
* @example
|
||||
*
|
||||
@@ -64,11 +44,16 @@ function createCurry(flag) {
|
||||
* curried(1, 2, 3);
|
||||
* // => [1, 2, 3]
|
||||
*
|
||||
* // using placeholders
|
||||
* // Curried with placeholders.
|
||||
* curried(3)(1, _)(2);
|
||||
* // => [1, 2, 3]
|
||||
*/
|
||||
var curryRight = createCurry(CURRY_RIGHT_FLAG);
|
||||
function curryRight(func, arity, guard) {
|
||||
arity = guard ? undefined : arity;
|
||||
var result = createWrapper(func, CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
|
||||
result.placeholder = curryRight.placeholder;
|
||||
return result;
|
||||
}
|
||||
|
||||
// Assign default placeholders.
|
||||
curryRight.placeholder = {};
|
||||
|
||||
@@ -1,23 +1,20 @@
|
||||
{
|
||||
"name": "lodash.curryright",
|
||||
"version": "3.0.2",
|
||||
"description": "The modern build of lodash’s `_.curryRight` as a module.",
|
||||
"version": "3.1.1",
|
||||
"description": "The lodash method `_.curryRight` 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, curryright",
|
||||
"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@iceddev.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._createwrapper": "^3.0.0",
|
||||
"lodash._isiterateecall": "^3.0.0"
|
||||
"lodash._createwrapper": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.debounce v3.0.3
|
||||
# lodash.debounce v3.1.1
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.debounce` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var debounce = require('lodash.debounce');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#debounce) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.debounce) for more details.
|
||||
See the [documentation](https://lodash.com/docs#debounce) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.debounce) for more details.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user