mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Compare commits
25 Commits
3.3.2-npm-
...
3.8.2-npm-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f24cdadc22 | ||
|
|
1eca87b569 | ||
|
|
9903fcac4d | ||
|
|
52fcde9b85 | ||
|
|
2947fac514 | ||
|
|
7af5442cff | ||
|
|
b8368d698d | ||
|
|
0aae86c9a2 | ||
|
|
bbc20f983e | ||
|
|
4ed2b24773 | ||
|
|
f1a2ea44f0 | ||
|
|
dbf44fcc0b | ||
|
|
ee29e79294 | ||
|
|
9f7937cb84 | ||
|
|
a9ec8d953c | ||
|
|
5afdc7b263 | ||
|
|
5047ef35e0 | ||
|
|
90dc45d7fc | ||
|
|
2017284ed9 | ||
|
|
8813a1ee09 | ||
|
|
8c168dd1b8 | ||
|
|
2f9ad20a7f | ||
|
|
fbdd63d3ad | ||
|
|
9a9ba47586 | ||
|
|
61a48333a2 |
@@ -1,4 +1,4 @@
|
|||||||
# lodash v3.3.2
|
# lodash v3.8.2
|
||||||
|
|
||||||
The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method.
|
The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method.
|
||||||
|
|
||||||
|
|||||||
20
lodash._baseget/README.md
Normal file
20
lodash._baseget/README.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# lodash._baseget v3.7.2
|
||||||
|
|
||||||
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseGet` 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._baseget
|
||||||
|
```
|
||||||
|
|
||||||
|
In Node.js/io.js:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var baseGet = require('lodash._baseget');
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [package source](https://github.com/lodash/lodash/blob/3.7.2-npm-packages/lodash._baseget) for more details.
|
||||||
74
lodash._baseget/index.js
Normal file
74
lodash._baseget/index.js
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
/**
|
||||||
|
* lodash 3.7.2 (Custom Build) <https://lodash.com/>
|
||||||
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
|
* Available under MIT license <https://lodash.com/license>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `get` without support for string paths
|
||||||
|
* and default values.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The object to query.
|
||||||
|
* @param {Array} path The path of the property to get.
|
||||||
|
* @param {string} [pathKey] The key representation of path.
|
||||||
|
* @returns {*} Returns the resolved value.
|
||||||
|
*/
|
||||||
|
function baseGet(object, path, pathKey) {
|
||||||
|
if (object == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (pathKey !== undefined && pathKey in toObject(object)) {
|
||||||
|
path = [pathKey];
|
||||||
|
}
|
||||||
|
var index = 0,
|
||||||
|
length = path.length;
|
||||||
|
|
||||||
|
while (object != null && index < length) {
|
||||||
|
object = object[path[index++]];
|
||||||
|
}
|
||||||
|
return (index && index == length) ? object : undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts `value` to an object if it's not one.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to process.
|
||||||
|
* @returns {Object} Returns the object.
|
||||||
|
*/
|
||||||
|
function toObject(value) {
|
||||||
|
return isObject(value) ? value : Object(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
||||||
|
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isObject({});
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject([1, 2, 3]);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject(1);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isObject(value) {
|
||||||
|
// Avoid a V8 JIT bug in Chrome 19-20.
|
||||||
|
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
||||||
|
var type = typeof value;
|
||||||
|
return !!value && (type == 'object' || type == 'function');
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = baseGet;
|
||||||
18
lodash._baseget/package.json
Normal file
18
lodash._baseget/package.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"name": "lodash._baseget",
|
||||||
|
"version": "3.7.2",
|
||||||
|
"description": "The modern build of lodash’s internal `baseGet` 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.\"" }
|
||||||
|
}
|
||||||
20
lodash._basepullat/README.md
Normal file
20
lodash._basepullat/README.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# lodash._basepullat v3.8.2
|
||||||
|
|
||||||
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `basePullAt` 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._basepullat
|
||||||
|
```
|
||||||
|
|
||||||
|
In Node.js/io.js:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var basePullAt = require('lodash._basepullat');
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [package source](https://github.com/lodash/lodash/blob/3.8.2-npm-packages/lodash._basepullat) for more details.
|
||||||
53
lodash._basepullat/index.js
Normal file
53
lodash._basepullat/index.js
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/** Used to detect unsigned integer values. */
|
||||||
|
|
||||||
|
/** Used to detect unsigned integer values. */
|
||||||
|
var reIsUint = /^\d+$/;
|
||||||
|
|
||||||
|
/** Used for native method references. */
|
||||||
|
var arrayProto = Array.prototype;
|
||||||
|
|
||||||
|
/** Native method references. */
|
||||||
|
var splice = arrayProto.splice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
|
||||||
|
* of an array-like value.
|
||||||
|
*/
|
||||||
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.pullAt` without support for individual
|
||||||
|
* index arguments and capturing the removed elements.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to modify.
|
||||||
|
* @param {number[]} indexes The indexes of elements to remove.
|
||||||
|
* @returns {Array} Returns `array`.
|
||||||
|
*/
|
||||||
|
function basePullAt(array, indexes) {
|
||||||
|
var length = array ? indexes.length : 0;
|
||||||
|
while (length--) {
|
||||||
|
var index = indexes[length];
|
||||||
|
if (index != previous && isIndex(index)) {
|
||||||
|
var previous = index;
|
||||||
|
splice.call(array, index, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = basePullAt;
|
||||||
18
lodash._basepullat/package.json
Normal file
18
lodash._basepullat/package.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"name": "lodash._basepullat",
|
||||||
|
"version": "3.8.2",
|
||||||
|
"description": "The modern build of lodash’s internal `basePullAt` 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.\"" }
|
||||||
|
}
|
||||||
20
lodash._basesortbyorder/README.md
Normal file
20
lodash._basesortbyorder/README.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# lodash._basesortbyorder v3.5.3
|
||||||
|
|
||||||
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseSortByOrder` 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._basesortbyorder
|
||||||
|
```
|
||||||
|
|
||||||
|
In Node.js/io.js:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var baseSortByOrder = require('lodash._basesortbyorder');
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [package source](https://github.com/lodash/lodash/blob/3.5.3-npm-packages/lodash._basesortbyorder) for more details.
|
||||||
154
lodash._basesortbyorder/index.js
Normal file
154
lodash._basesortbyorder/index.js
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
/**
|
||||||
|
* lodash 3.5.3 (Custom Build) <https://lodash.com/>
|
||||||
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
|
* Available under MIT license <https://lodash.com/license>
|
||||||
|
*/
|
||||||
|
var arrayMap = require('lodash._arraymap'),
|
||||||
|
baseCallback = require('lodash._basecallback'),
|
||||||
|
baseCompareAscending = require('lodash._basecompareascending'),
|
||||||
|
baseEach = require('lodash._baseeach'),
|
||||||
|
baseSortBy = require('lodash._basesortby');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used by `_.sortByOrder` to compare multiple properties of a value to another
|
||||||
|
* and stable sort them.
|
||||||
|
*
|
||||||
|
* If `orders` is unspecified, all valuess are sorted in ascending order. Otherwise,
|
||||||
|
* a value is sorted in ascending order if its corresponding order is "asc", and
|
||||||
|
* descending if "desc".
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The object to compare.
|
||||||
|
* @param {Object} other The other object to compare.
|
||||||
|
* @param {boolean[]} orders The order to sort by for each property.
|
||||||
|
* @returns {number} Returns the sort order indicator for `object`.
|
||||||
|
*/
|
||||||
|
function compareMultiple(object, other, orders) {
|
||||||
|
var index = -1,
|
||||||
|
objCriteria = object.criteria,
|
||||||
|
othCriteria = other.criteria,
|
||||||
|
length = objCriteria.length,
|
||||||
|
ordersLength = orders.length;
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
var result = baseCompareAscending(objCriteria[index], othCriteria[index]);
|
||||||
|
if (result) {
|
||||||
|
if (index >= ordersLength) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
var order = orders[index];
|
||||||
|
return result * ((order === 'asc' || order === true) ? 1 : -1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
|
||||||
|
// that causes it, under certain circumstances, to provide the same value for
|
||||||
|
// `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
|
||||||
|
// for more details.
|
||||||
|
//
|
||||||
|
// This also ensures a stable sort in V8 and other engines.
|
||||||
|
// See https://code.google.com/p/v8/issues/detail?id=90 for more details.
|
||||||
|
return object.index - other.index;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
|
||||||
|
* of an array-like value.
|
||||||
|
*/
|
||||||
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.map` without support for callback shorthands
|
||||||
|
* and `this` binding.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array|Object|string} collection The collection to iterate over.
|
||||||
|
* @param {Function} iteratee The function invoked per iteration.
|
||||||
|
* @returns {Array} Returns the new mapped array.
|
||||||
|
*/
|
||||||
|
function baseMap(collection, iteratee) {
|
||||||
|
var index = -1,
|
||||||
|
result = isArrayLike(collection) ? Array(collection.length) : [];
|
||||||
|
|
||||||
|
baseEach(collection, function(value, key, collection) {
|
||||||
|
result[++index] = iteratee(value, key, collection);
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.property` without support for deep paths.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {string} key The key of the property to get.
|
||||||
|
* @returns {Function} Returns the new function.
|
||||||
|
*/
|
||||||
|
function baseProperty(key) {
|
||||||
|
return function(object) {
|
||||||
|
return object == null ? undefined : object[key];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.sortByOrder` without param guards.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array|Object|string} collection The collection to iterate over.
|
||||||
|
* @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
|
||||||
|
* @param {boolean[]} orders The sort orders of `iteratees`.
|
||||||
|
* @returns {Array} Returns the new sorted array.
|
||||||
|
*/
|
||||||
|
function baseSortByOrder(collection, iteratees, orders) {
|
||||||
|
var index = -1;
|
||||||
|
|
||||||
|
iteratees = arrayMap(iteratees, function(iteratee) { return baseCallback(iteratee); });
|
||||||
|
|
||||||
|
var result = baseMap(collection, function(value) {
|
||||||
|
var criteria = arrayMap(iteratees, function(iteratee) { return iteratee(value); });
|
||||||
|
return { 'criteria': criteria, 'index': ++index, 'value': value };
|
||||||
|
});
|
||||||
|
|
||||||
|
return baseSortBy(result, function(object, other) {
|
||||||
|
return compareMultiple(object, other, orders);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the "length" property value of `object`.
|
||||||
|
*
|
||||||
|
* **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
|
||||||
|
* that affects Safari on at least iOS 8.1-8.3 ARM64.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The object to query.
|
||||||
|
* @returns {*} Returns the "length" value.
|
||||||
|
*/
|
||||||
|
var getLength = baseProperty('length');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is array-like.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
||||||
|
*/
|
||||||
|
function isArrayLike(value) {
|
||||||
|
return value != null && isLength(getLength(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is a valid array-like length.
|
||||||
|
*
|
||||||
|
* **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||||
|
*/
|
||||||
|
function isLength(value) {
|
||||||
|
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = baseSortByOrder;
|
||||||
25
lodash._basesortbyorder/package.json
Normal file
25
lodash._basesortbyorder/package.json
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"name": "lodash._basesortbyorder",
|
||||||
|
"version": "3.5.3",
|
||||||
|
"description": "The modern build of lodash’s internal `baseSortByOrder` 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._arraymap": "^3.0.0",
|
||||||
|
"lodash._basecallback": "^3.0.0",
|
||||||
|
"lodash._basecompareascending": "^3.0.0",
|
||||||
|
"lodash._baseeach": "^3.0.0",
|
||||||
|
"lodash._basesortby": "^3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
22
lodash._createpadding/LICENSE
Normal file
22
lodash._createpadding/LICENSE
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
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
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
20
lodash._createpadding/README.md
Normal file
20
lodash._createpadding/README.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# lodash._createpadding v3.6.1
|
||||||
|
|
||||||
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createPadding` 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._createpadding
|
||||||
|
```
|
||||||
|
|
||||||
|
In Node.js/io.js:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var createPadding = require('lodash._createpadding');
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [package source](https://github.com/lodash/lodash/blob/3.6.1-npm-packages/lodash._createpadding) for more details.
|
||||||
37
lodash._createpadding/index.js
Normal file
37
lodash._createpadding/index.js
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
* lodash 3.6.1 (Custom Build) <https://lodash.com/>
|
||||||
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
|
* Available under MIT license <https://lodash.com/license>
|
||||||
|
*/
|
||||||
|
var repeat = require('lodash.repeat');
|
||||||
|
|
||||||
|
/* Native method references for those with the same name as other `lodash` methods. */
|
||||||
|
var nativeCeil = Math.ceil,
|
||||||
|
nativeIsFinite = global.isFinite;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the padding required for `string` based on the given `length`.
|
||||||
|
* The `chars` string is truncated if the number of characters exceeds `length`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {string} string The string to create padding for.
|
||||||
|
* @param {number} [length=0] The padding length.
|
||||||
|
* @param {string} [chars=' '] The string used as padding.
|
||||||
|
* @returns {string} Returns the pad for `string`.
|
||||||
|
*/
|
||||||
|
function createPadding(string, length, chars) {
|
||||||
|
var strLength = string.length;
|
||||||
|
length = +length;
|
||||||
|
|
||||||
|
if (strLength >= length || !nativeIsFinite(length)) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
var padLength = length - strLength;
|
||||||
|
chars = chars == null ? ' ' : (chars + '');
|
||||||
|
return repeat(chars, nativeCeil(padLength / chars.length)).slice(0, padLength);
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = createPadding;
|
||||||
21
lodash._createpadding/package.json
Normal file
21
lodash._createpadding/package.json
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"name": "lodash._createpadding",
|
||||||
|
"version": "3.6.1",
|
||||||
|
"description": "The modern build of lodash’s internal `createPadding` 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.repeat": "^3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
22
lodash._invokepath/LICENSE.txt
Normal file
22
lodash._invokepath/LICENSE.txt
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
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
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
20
lodash._invokepath/README.md
Normal file
20
lodash._invokepath/README.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# lodash._invokepath v3.7.2
|
||||||
|
|
||||||
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `invokePath` 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._invokepath
|
||||||
|
```
|
||||||
|
|
||||||
|
In Node.js/io.js:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var invokePath = require('lodash._invokepath');
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [package source](https://github.com/lodash/lodash/blob/3.7.2-npm-packages/lodash._invokepath) for more details.
|
||||||
113
lodash._invokepath/index.js
Normal file
113
lodash._invokepath/index.js
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
/**
|
||||||
|
* lodash 3.7.2 (Custom Build) <https://lodash.com/>
|
||||||
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
|
* Available under MIT license <https://lodash.com/license>
|
||||||
|
*/
|
||||||
|
var baseGet = require('lodash._baseget'),
|
||||||
|
baseSlice = require('lodash._baseslice'),
|
||||||
|
toPath = require('lodash._topath'),
|
||||||
|
isArray = require('lodash.isarray');
|
||||||
|
|
||||||
|
/** Used to match property names within property paths. */
|
||||||
|
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,
|
||||||
|
reIsPlainProp = /^\w*$/;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invokes the method at `path` on `object`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The object to query.
|
||||||
|
* @param {Array|string} path The path of the method to invoke.
|
||||||
|
* @param {Array} args The arguments to invoke the method with.
|
||||||
|
* @returns {*} Returns the result of the invoked method.
|
||||||
|
*/
|
||||||
|
function invokePath(object, path, args) {
|
||||||
|
if (object != null && !isKey(path, object)) {
|
||||||
|
path = toPath(path);
|
||||||
|
object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
|
||||||
|
path = last(path);
|
||||||
|
}
|
||||||
|
var func = object == null ? object : object[path];
|
||||||
|
return func == null ? undefined : func.apply(object, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is a property name and not a property path.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @param {Object} [object] The object to query keys on.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
||||||
|
*/
|
||||||
|
function isKey(value, object) {
|
||||||
|
var type = typeof value;
|
||||||
|
if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (isArray(value)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var result = !reIsDeepProp.test(value);
|
||||||
|
return result || (object != null && value in toObject(object));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts `value` to an object if it's not one.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to process.
|
||||||
|
* @returns {Object} Returns the object.
|
||||||
|
*/
|
||||||
|
function toObject(value) {
|
||||||
|
return isObject(value) ? value : Object(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the last element of `array`.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Array
|
||||||
|
* @param {Array} array The array to query.
|
||||||
|
* @returns {*} Returns the last element of `array`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.last([1, 2, 3]);
|
||||||
|
* // => 3
|
||||||
|
*/
|
||||||
|
function last(array) {
|
||||||
|
var length = array ? array.length : 0;
|
||||||
|
return length ? array[length - 1] : undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
||||||
|
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isObject({});
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject([1, 2, 3]);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject(1);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isObject(value) {
|
||||||
|
// Avoid a V8 JIT bug in Chrome 19-20.
|
||||||
|
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
||||||
|
var type = typeof value;
|
||||||
|
return !!value && (type == 'object' || type == 'function');
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = invokePath;
|
||||||
24
lodash._invokepath/package.json
Normal file
24
lodash._invokepath/package.json
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"name": "lodash._invokepath",
|
||||||
|
"version": "3.7.2",
|
||||||
|
"description": "The modern build of lodash’s internal `invokePath` as a module.",
|
||||||
|
"homepage": "https://lodash.com/",
|
||||||
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
"license": "MIT",
|
||||||
|
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"contributors": [
|
||||||
|
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
|
||||||
|
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
|
||||||
|
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
||||||
|
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||||
|
],
|
||||||
|
"repository": "lodash/lodash",
|
||||||
|
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||||
|
"dependencies": {
|
||||||
|
"lodash._baseget": "^3.0.0",
|
||||||
|
"lodash._baseslice": "^3.0.0",
|
||||||
|
"lodash._topath": "^3.0.0",
|
||||||
|
"lodash.isarray": "^3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
22
lodash._topath/LICENSE
Normal file
22
lodash._topath/LICENSE
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
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
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
20
lodash._topath/README.md
Normal file
20
lodash._topath/README.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# lodash._topath v3.8.1
|
||||||
|
|
||||||
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `toPath` 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._topath
|
||||||
|
```
|
||||||
|
|
||||||
|
In Node.js/io.js:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var toPath = require('lodash._topath');
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [package source](https://github.com/lodash/lodash/blob/3.8.1-npm-packages/lodash._topath) for more details.
|
||||||
47
lodash._topath/index.js
Normal file
47
lodash._topath/index.js
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
/**
|
||||||
|
* lodash 3.8.1 (Custom Build) <https://lodash.com/>
|
||||||
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
|
* Available under MIT license <https://lodash.com/license>
|
||||||
|
*/
|
||||||
|
var isArray = require('lodash.isarray');
|
||||||
|
|
||||||
|
/** Used to match property names within property paths. */
|
||||||
|
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
|
||||||
|
|
||||||
|
/** Used to match backslashes in property paths. */
|
||||||
|
var reEscapeChar = /\\(\\)?/g;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts `value` to a string if it's not one. An empty string is returned
|
||||||
|
* for `null` or `undefined` values.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to process.
|
||||||
|
* @returns {string} Returns the string.
|
||||||
|
*/
|
||||||
|
function baseToString(value) {
|
||||||
|
return value == null ? '' : (value + '');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts `value` to property path array if it's not one.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to process.
|
||||||
|
* @returns {Array} Returns the property path array.
|
||||||
|
*/
|
||||||
|
function toPath(value) {
|
||||||
|
if (isArray(value)) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
var result = [];
|
||||||
|
baseToString(value).replace(rePropName, function(match, number, quote, string) {
|
||||||
|
result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = toPath;
|
||||||
21
lodash._topath/package.json
Normal file
21
lodash._topath/package.json
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"name": "lodash._topath",
|
||||||
|
"version": "3.8.1",
|
||||||
|
"description": "The modern build of lodash’s internal `toPath` 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.isarray": "^3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
47
lodash.add/LICENSE
Normal file
47
lodash.add/LICENSE
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||||
|
|
||||||
|
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||||
|
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||||
|
|
||||||
|
This software consists of voluntary contributions made by many
|
||||||
|
individuals. For exact contribution history, see the revision history
|
||||||
|
available at https://github.com/lodash/lodash
|
||||||
|
|
||||||
|
The following license applies to all parts of this software except as
|
||||||
|
documented below:
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
|
Copyright and related rights for sample code are waived via CC0. Sample
|
||||||
|
code is defined as all source code displayed within the prose of the
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
|
Files located in the node_modules and vendor directories are externally
|
||||||
|
maintained libraries used by this software which have their own
|
||||||
|
licenses; we recommend you read them, as their terms may differ from the
|
||||||
|
terms above.
|
||||||
18
lodash.add/README.md
Normal file
18
lodash.add/README.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# lodash.add v3.7.0
|
||||||
|
|
||||||
|
The [lodash](https://lodash.com/) method `_.add` exported as a [Node.js](https://nodejs.org/) module.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Using npm:
|
||||||
|
```bash
|
||||||
|
$ {sudo -H} npm i -g npm
|
||||||
|
$ npm i --save lodash.add
|
||||||
|
```
|
||||||
|
|
||||||
|
In Node.js:
|
||||||
|
```js
|
||||||
|
var add = require('lodash.add');
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [documentation](https://lodash.com/docs#add) or [package source](https://github.com/lodash/lodash/blob/3.7.0-npm-packages/lodash.add) for more details.
|
||||||
184
lodash.add/index.js
Normal file
184
lodash.add/index.js
Normal file
@@ -0,0 +1,184 @@
|
|||||||
|
/**
|
||||||
|
* lodash (Custom Build) <https://lodash.com/>
|
||||||
|
* Build: `lodash modularize exports="npm" -o ./`
|
||||||
|
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||||
|
* Released under MIT license <https://lodash.com/license>
|
||||||
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** Used as references for various `Number` constants. */
|
||||||
|
var INFINITY = 1 / 0,
|
||||||
|
NAN = 0 / 0;
|
||||||
|
|
||||||
|
/** `Object#toString` result references. */
|
||||||
|
var symbolTag = '[object Symbol]';
|
||||||
|
|
||||||
|
/** Detect free variable `global` from Node.js. */
|
||||||
|
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
||||||
|
|
||||||
|
/** Detect free variable `self`. */
|
||||||
|
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
||||||
|
|
||||||
|
/** Used as a reference to the global object. */
|
||||||
|
var root = freeGlobal || freeSelf || Function('return this')();
|
||||||
|
|
||||||
|
/** Used for built-in method references. */
|
||||||
|
var objectProto = Object.prototype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to resolve the
|
||||||
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||||
|
* of values.
|
||||||
|
*/
|
||||||
|
var objectToString = objectProto.toString;
|
||||||
|
|
||||||
|
/** Built-in value references. */
|
||||||
|
var Symbol = root.Symbol;
|
||||||
|
|
||||||
|
/** Used to convert symbols to primitives and strings. */
|
||||||
|
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
||||||
|
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.toNumber` which doesn't ensure correct
|
||||||
|
* conversions of binary, hexadecimal, or octal string values.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to process.
|
||||||
|
* @returns {number} Returns the number.
|
||||||
|
*/
|
||||||
|
function baseToNumber(value) {
|
||||||
|
if (typeof value == 'number') {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
if (isSymbol(value)) {
|
||||||
|
return NAN;
|
||||||
|
}
|
||||||
|
return +value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.toString` which doesn't convert nullish
|
||||||
|
* values to empty strings.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to process.
|
||||||
|
* @returns {string} Returns the string.
|
||||||
|
*/
|
||||||
|
function baseToString(value) {
|
||||||
|
// Exit early for strings to avoid a performance hit in some environments.
|
||||||
|
if (typeof value == 'string') {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
if (isSymbol(value)) {
|
||||||
|
return symbolToString ? symbolToString.call(value) : '';
|
||||||
|
}
|
||||||
|
var result = (value + '');
|
||||||
|
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a function that performs a mathematical operation on two values.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Function} operator The function to perform the operation.
|
||||||
|
* @param {number} [defaultValue] The value used for `undefined` arguments.
|
||||||
|
* @returns {Function} Returns the new mathematical operation function.
|
||||||
|
*/
|
||||||
|
function createMathOperation(operator, defaultValue) {
|
||||||
|
return function(value, other) {
|
||||||
|
var result;
|
||||||
|
if (value === undefined && other === undefined) {
|
||||||
|
return defaultValue;
|
||||||
|
}
|
||||||
|
if (value !== undefined) {
|
||||||
|
result = value;
|
||||||
|
}
|
||||||
|
if (other !== undefined) {
|
||||||
|
if (result === undefined) {
|
||||||
|
return other;
|
||||||
|
}
|
||||||
|
if (typeof value == 'string' || typeof other == 'string') {
|
||||||
|
value = baseToString(value);
|
||||||
|
other = baseToString(other);
|
||||||
|
} else {
|
||||||
|
value = baseToNumber(value);
|
||||||
|
other = baseToNumber(other);
|
||||||
|
}
|
||||||
|
result = operator(value, other);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
||||||
|
* and has a `typeof` result of "object".
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 4.0.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isObjectLike({});
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObjectLike([1, 2, 3]);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObjectLike(_.noop);
|
||||||
|
* // => false
|
||||||
|
*
|
||||||
|
* _.isObjectLike(null);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isObjectLike(value) {
|
||||||
|
return !!value && typeof value == 'object';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is classified as a `Symbol` primitive or object.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 4.0.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isSymbol(Symbol.iterator);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isSymbol('abc');
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isSymbol(value) {
|
||||||
|
return typeof value == 'symbol' ||
|
||||||
|
(isObjectLike(value) && objectToString.call(value) == symbolTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds two numbers.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 3.4.0
|
||||||
|
* @category Math
|
||||||
|
* @param {number} augend The first number in an addition.
|
||||||
|
* @param {number} addend The second number in an addition.
|
||||||
|
* @returns {number} Returns the total.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.add(6, 4);
|
||||||
|
* // => 10
|
||||||
|
*/
|
||||||
|
var add = createMathOperation(function(augend, addend) {
|
||||||
|
return augend + addend;
|
||||||
|
}, 0);
|
||||||
|
|
||||||
|
module.exports = add;
|
||||||
17
lodash.add/package.json
Normal file
17
lodash.add/package.json
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"name": "lodash.add",
|
||||||
|
"version": "3.7.0",
|
||||||
|
"description": "The lodash method `_.add` exported as a module.",
|
||||||
|
"homepage": "https://lodash.com/",
|
||||||
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
"license": "MIT",
|
||||||
|
"keywords": "lodash-modularized, add",
|
||||||
|
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"contributors": [
|
||||||
|
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
|
||||||
|
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||||
|
],
|
||||||
|
"repository": "lodash/lodash",
|
||||||
|
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash.callback v3.3.2
|
# lodash.callback v3.3.3
|
||||||
|
|
||||||
The [lodash](https://lodash.com/) method `_.callback` exported as a [Node.js](https://nodejs.org/) module.
|
The [lodash](https://lodash.com/) method `_.callback` exported as a [Node.js](https://nodejs.org/) module.
|
||||||
|
|
||||||
@@ -21,4 +21,4 @@ In Node.js/io.js:
|
|||||||
var callback = require('lodash.callback');
|
var callback = require('lodash.callback');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [documentation](https://lodash.com/docs#callback) or [package source](https://github.com/lodash/lodash/blob/3.3.2-npm-packages/lodash.callback) for more details.
|
See the [documentation](https://lodash.com/docs#callback) or [package source](https://github.com/lodash/lodash/blob/3.3.3-npm-packages/lodash.callback) for more details.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.3.2 (Custom Build) <https://lodash.com/>
|
* lodash 3.3.3 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash.callback",
|
"name": "lodash.callback",
|
||||||
"version": "3.3.2",
|
"version": "3.3.3",
|
||||||
"description": "The modern build of lodash’s `_.callback` as a module.",
|
"description": "The lodash method `_.callback` exported as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"keywords": "lodash, lodash-modularized, stdlib, util",
|
|
||||||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
|
"Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
|
||||||
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
|
|
||||||
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
|
||||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||||
],
|
],
|
||||||
"repository": "lodash/lodash",
|
"repository": "lodash/lodash",
|
||||||
|
|||||||
@@ -1,23 +1,47 @@
|
|||||||
The MIT License (MIT)
|
Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||||
|
|
||||||
Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||||
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
|
|
||||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
This software consists of voluntary contributions made by many
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
individuals. For exact contribution history, see the revision history
|
||||||
in the Software without restriction, including without limitation the rights
|
available at https://github.com/lodash/lodash
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
The following license applies to all parts of this software except as
|
||||||
copies or substantial portions of the Software.
|
documented below:
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
====
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
a copy of this software and associated documentation files (the
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
"Software"), to deal in the Software without restriction, including
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
SOFTWARE.
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
|
Copyright and related rights for sample code are waived via CC0. Sample
|
||||||
|
code is defined as all source code displayed within the prose of the
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
|
Files located in the node_modules and vendor directories are externally
|
||||||
|
maintained libraries used by this software which have their own
|
||||||
|
licenses; we recommend you read them, as their terms may differ from the
|
||||||
|
terms above.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash.fill v3.3.2
|
# lodash.fill v3.4.0
|
||||||
|
|
||||||
The [lodash](https://lodash.com/) method `_.fill` exported as a [Node.js](https://nodejs.org/) module.
|
The [lodash](https://lodash.com/) method `_.fill` exported as a [Node.js](https://nodejs.org/) module.
|
||||||
|
|
||||||
@@ -15,4 +15,4 @@ In Node.js:
|
|||||||
var fill = require('lodash.fill');
|
var fill = require('lodash.fill');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [documentation](https://lodash.com/docs#fill) or [package source](https://github.com/lodash/lodash/blob/3.3.2-npm-packages/lodash.fill) for more details.
|
See the [documentation](https://lodash.com/docs#fill) or [package source](https://github.com/lodash/lodash/blob/3.4.0-npm-packages/lodash.fill) for more details.
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.3.2 (Custom Build) <https://lodash.com/>
|
* lodash (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modularize exports="npm" -o ./`
|
* Build: `lodash modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||||
|
* Released under MIT license <https://lodash.com/license>
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** Used as references for various `Number` constants. */
|
/** Used as references for various `Number` constants. */
|
||||||
@@ -18,7 +18,8 @@ var MAX_ARRAY_LENGTH = 4294967295;
|
|||||||
|
|
||||||
/** `Object#toString` result references. */
|
/** `Object#toString` result references. */
|
||||||
var funcTag = '[object Function]',
|
var funcTag = '[object Function]',
|
||||||
genTag = '[object GeneratorFunction]';
|
genTag = '[object GeneratorFunction]',
|
||||||
|
symbolTag = '[object Symbol]';
|
||||||
|
|
||||||
/** Used to match leading and trailing whitespace. */
|
/** Used to match leading and trailing whitespace. */
|
||||||
var reTrim = /^\s+|\s+$/g;
|
var reTrim = /^\s+|\s+$/g;
|
||||||
@@ -38,31 +39,18 @@ var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|||||||
/** Built-in method references without a dependency on `root`. */
|
/** Built-in method references without a dependency on `root`. */
|
||||||
var freeParseInt = parseInt;
|
var freeParseInt = parseInt;
|
||||||
|
|
||||||
/**
|
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Used for built-in method references. */
|
/** Used for built-in method references. */
|
||||||
var objectProto = Object.prototype;
|
var objectProto = Object.prototype;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
* Used to resolve the
|
||||||
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||||
* of values.
|
* of values.
|
||||||
*/
|
*/
|
||||||
var objectToString = objectProto.toString;
|
var objectToString = objectProto.toString;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.clamp` which doesn't coerce arguments to numbers.
|
* The base implementation of `_.clamp` which doesn't coerce arguments.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {number} number The number to clamp.
|
* @param {number} number The number to clamp.
|
||||||
@@ -111,30 +99,20 @@ function baseFill(array, value, start, end) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.property` without support for deep paths.
|
* Checks if `value` is a valid array-like index.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {string} key The key of the property to get.
|
* @param {*} value The value to check.
|
||||||
* @returns {Function} Returns the new function.
|
* @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 baseProperty(key) {
|
function isIndex(value, length) {
|
||||||
return function(object) {
|
length = length == null ? MAX_SAFE_INTEGER : length;
|
||||||
return object == null ? undefined : object[key];
|
return !!length &&
|
||||||
};
|
(typeof value == 'number' || reIsUint.test(value)) &&
|
||||||
|
(value > -1 && value % 1 == 0 && value < length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 the given arguments are from an iteratee call.
|
* Checks if the given arguments are from an iteratee call.
|
||||||
*
|
*
|
||||||
@@ -142,7 +120,8 @@ var getLength = baseProperty('length');
|
|||||||
* @param {*} value The potential iteratee value argument.
|
* @param {*} value The potential iteratee value argument.
|
||||||
* @param {*} index The potential iteratee index or key argument.
|
* @param {*} index The potential iteratee index or key argument.
|
||||||
* @param {*} object The potential iteratee object argument.
|
* @param {*} object The potential iteratee object argument.
|
||||||
* @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.
|
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
|
||||||
|
* else `false`.
|
||||||
*/
|
*/
|
||||||
function isIterateeCall(value, index, object) {
|
function isIterateeCall(value, index, object) {
|
||||||
if (!isObject(object)) {
|
if (!isObject(object)) {
|
||||||
@@ -150,8 +129,9 @@ function isIterateeCall(value, index, object) {
|
|||||||
}
|
}
|
||||||
var type = typeof index;
|
var type = typeof index;
|
||||||
if (type == 'number'
|
if (type == 'number'
|
||||||
? (isArrayLike(object) && isIndex(index, object.length))
|
? (isArrayLike(object) && isIndex(index, object.length))
|
||||||
: (type == 'string' && index in object)) {
|
: (type == 'string' && index in object)
|
||||||
|
) {
|
||||||
return eq(object[index], value);
|
return eq(object[index], value);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -165,6 +145,7 @@ function isIterateeCall(value, index, object) {
|
|||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
|
* @since 3.2.0
|
||||||
* @category Array
|
* @category Array
|
||||||
* @param {Array} array The array to fill.
|
* @param {Array} array The array to fill.
|
||||||
* @param {*} value The value to fill `array` with.
|
* @param {*} value The value to fill `array` with.
|
||||||
@@ -198,19 +179,21 @@ function fill(array, value, start, end) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
* Performs a
|
||||||
|
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||||
* comparison between two values to determine if they are equivalent.
|
* comparison between two values to determine if they are equivalent.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
|
* @since 4.0.0
|
||||||
* @category Lang
|
* @category Lang
|
||||||
* @param {*} value The value to compare.
|
* @param {*} value The value to compare.
|
||||||
* @param {*} other The other value to compare.
|
* @param {*} other The other value to compare.
|
||||||
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* var object = { 'user': 'fred' };
|
* var object = { 'a': 1 };
|
||||||
* var other = { 'user': 'fred' };
|
* var other = { 'a': 1 };
|
||||||
*
|
*
|
||||||
* _.eq(object, object);
|
* _.eq(object, object);
|
||||||
* // => true
|
* // => true
|
||||||
@@ -238,6 +221,7 @@ function eq(value, other) {
|
|||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
|
* @since 4.0.0
|
||||||
* @category Lang
|
* @category Lang
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
||||||
@@ -256,8 +240,7 @@ function eq(value, other) {
|
|||||||
* // => false
|
* // => false
|
||||||
*/
|
*/
|
||||||
function isArrayLike(value) {
|
function isArrayLike(value) {
|
||||||
return value != null &&
|
return value != null && isLength(value.length) && !isFunction(value);
|
||||||
!(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -265,9 +248,10 @@ function isArrayLike(value) {
|
|||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
|
* @since 0.1.0
|
||||||
* @category Lang
|
* @category Lang
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.isFunction(_);
|
* _.isFunction(_);
|
||||||
@@ -278,8 +262,7 @@ function isArrayLike(value) {
|
|||||||
*/
|
*/
|
||||||
function isFunction(value) {
|
function isFunction(value) {
|
||||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||||
// in Safari 8 which returns 'object' for typed array constructors, and
|
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||||
// PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
|
||||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||||
return tag == funcTag || tag == genTag;
|
return tag == funcTag || tag == genTag;
|
||||||
}
|
}
|
||||||
@@ -287,10 +270,12 @@ function isFunction(value) {
|
|||||||
/**
|
/**
|
||||||
* Checks if `value` is a valid array-like length.
|
* Checks if `value` is a valid array-like length.
|
||||||
*
|
*
|
||||||
* **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
* **Note:** This method is loosely based on
|
||||||
|
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
|
* @since 4.0.0
|
||||||
* @category Lang
|
* @category Lang
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||||
@@ -314,11 +299,13 @@ function isLength(value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
* Checks if `value` is the
|
||||||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||||
|
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
|
* @since 0.1.0
|
||||||
* @category Lang
|
* @category Lang
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||||
@@ -342,30 +329,79 @@ function isObject(value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts `value` to an integer.
|
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
||||||
*
|
* and has a `typeof` result of "object".
|
||||||
* **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
|
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
|
* @since 4.0.0
|
||||||
* @category Lang
|
* @category Lang
|
||||||
* @param {*} value The value to convert.
|
* @param {*} value The value to check.
|
||||||
* @returns {number} Returns the converted integer.
|
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.toInteger(3);
|
* _.isObjectLike({});
|
||||||
* // => 3
|
* // => true
|
||||||
*
|
*
|
||||||
* _.toInteger(Number.MIN_VALUE);
|
* _.isObjectLike([1, 2, 3]);
|
||||||
* // => 0
|
* // => true
|
||||||
*
|
*
|
||||||
* _.toInteger(Infinity);
|
* _.isObjectLike(_.noop);
|
||||||
|
* // => false
|
||||||
|
*
|
||||||
|
* _.isObjectLike(null);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isObjectLike(value) {
|
||||||
|
return !!value && typeof value == 'object';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is classified as a `Symbol` primitive or object.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 4.0.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isSymbol(Symbol.iterator);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isSymbol('abc');
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isSymbol(value) {
|
||||||
|
return typeof value == 'symbol' ||
|
||||||
|
(isObjectLike(value) && objectToString.call(value) == symbolTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts `value` to a finite number.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 4.12.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to convert.
|
||||||
|
* @returns {number} Returns the converted number.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.toFinite(3.2);
|
||||||
|
* // => 3.2
|
||||||
|
*
|
||||||
|
* _.toFinite(Number.MIN_VALUE);
|
||||||
|
* // => 5e-324
|
||||||
|
*
|
||||||
|
* _.toFinite(Infinity);
|
||||||
* // => 1.7976931348623157e+308
|
* // => 1.7976931348623157e+308
|
||||||
*
|
*
|
||||||
* _.toInteger('3');
|
* _.toFinite('3.2');
|
||||||
* // => 3
|
* // => 3.2
|
||||||
*/
|
*/
|
||||||
function toInteger(value) {
|
function toFinite(value) {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return value === 0 ? value : 0;
|
return value === 0 ? value : 0;
|
||||||
}
|
}
|
||||||
@@ -374,24 +410,58 @@ function toInteger(value) {
|
|||||||
var sign = (value < 0 ? -1 : 1);
|
var sign = (value < 0 ? -1 : 1);
|
||||||
return sign * MAX_INTEGER;
|
return sign * MAX_INTEGER;
|
||||||
}
|
}
|
||||||
var remainder = value % 1;
|
return value === value ? value : 0;
|
||||||
return value === value ? (remainder ? value - remainder : value) : 0;
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts `value` to an integer.
|
||||||
|
*
|
||||||
|
* **Note:** This method is loosely based on
|
||||||
|
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 4.0.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to convert.
|
||||||
|
* @returns {number} Returns the converted integer.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.toInteger(3.2);
|
||||||
|
* // => 3
|
||||||
|
*
|
||||||
|
* _.toInteger(Number.MIN_VALUE);
|
||||||
|
* // => 0
|
||||||
|
*
|
||||||
|
* _.toInteger(Infinity);
|
||||||
|
* // => 1.7976931348623157e+308
|
||||||
|
*
|
||||||
|
* _.toInteger('3.2');
|
||||||
|
* // => 3
|
||||||
|
*/
|
||||||
|
function toInteger(value) {
|
||||||
|
var result = toFinite(value),
|
||||||
|
remainder = result % 1;
|
||||||
|
|
||||||
|
return result === result ? (remainder ? result - remainder : result) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts `value` to an integer suitable for use as the length of an
|
* Converts `value` to an integer suitable for use as the length of an
|
||||||
* array-like object.
|
* array-like object.
|
||||||
*
|
*
|
||||||
* **Note:** This method is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
* **Note:** This method is based on
|
||||||
|
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
|
* @since 4.0.0
|
||||||
* @category Lang
|
* @category Lang
|
||||||
* @param {*} value The value to convert.
|
* @param {*} value The value to convert.
|
||||||
* @returns {number} Returns the converted integer.
|
* @returns {number} Returns the converted integer.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.toLength(3);
|
* _.toLength(3.2);
|
||||||
* // => 3
|
* // => 3
|
||||||
*
|
*
|
||||||
* _.toLength(Number.MIN_VALUE);
|
* _.toLength(Number.MIN_VALUE);
|
||||||
@@ -400,7 +470,7 @@ function toInteger(value) {
|
|||||||
* _.toLength(Infinity);
|
* _.toLength(Infinity);
|
||||||
* // => 4294967295
|
* // => 4294967295
|
||||||
*
|
*
|
||||||
* _.toLength('3');
|
* _.toLength('3.2');
|
||||||
* // => 3
|
* // => 3
|
||||||
*/
|
*/
|
||||||
function toLength(value) {
|
function toLength(value) {
|
||||||
@@ -412,13 +482,14 @@ function toLength(value) {
|
|||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
|
* @since 4.0.0
|
||||||
* @category Lang
|
* @category Lang
|
||||||
* @param {*} value The value to process.
|
* @param {*} value The value to process.
|
||||||
* @returns {number} Returns the number.
|
* @returns {number} Returns the number.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.toNumber(3);
|
* _.toNumber(3.2);
|
||||||
* // => 3
|
* // => 3.2
|
||||||
*
|
*
|
||||||
* _.toNumber(Number.MIN_VALUE);
|
* _.toNumber(Number.MIN_VALUE);
|
||||||
* // => 5e-324
|
* // => 5e-324
|
||||||
@@ -426,12 +497,18 @@ function toLength(value) {
|
|||||||
* _.toNumber(Infinity);
|
* _.toNumber(Infinity);
|
||||||
* // => Infinity
|
* // => Infinity
|
||||||
*
|
*
|
||||||
* _.toNumber('3');
|
* _.toNumber('3.2');
|
||||||
* // => 3
|
* // => 3.2
|
||||||
*/
|
*/
|
||||||
function toNumber(value) {
|
function toNumber(value) {
|
||||||
|
if (typeof value == 'number') {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
if (isSymbol(value)) {
|
||||||
|
return NAN;
|
||||||
|
}
|
||||||
if (isObject(value)) {
|
if (isObject(value)) {
|
||||||
var other = isFunction(value.valueOf) ? value.valueOf() : value;
|
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
||||||
value = isObject(other) ? (other + '') : other;
|
value = isObject(other) ? (other + '') : other;
|
||||||
}
|
}
|
||||||
if (typeof value != 'string') {
|
if (typeof value != 'string') {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash.fill",
|
"name": "lodash.fill",
|
||||||
"version": "3.3.2",
|
"version": "3.4.0",
|
||||||
"description": "The lodash method `_.fill` exported as a module.",
|
"description": "The lodash method `_.fill` exported as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
"Blaine Bublitz <blaine@iceddev.com> (https://github.com/phated)",
|
"Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
|
||||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||||
],
|
],
|
||||||
"repository": "lodash/lodash",
|
"repository": "lodash/lodash",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash.flow v3.3.0
|
# lodash.flow v3.5.0
|
||||||
|
|
||||||
The [lodash](https://lodash.com/) method `_.flow` exported as a [Node.js](https://nodejs.org/) module.
|
The [lodash](https://lodash.com/) method `_.flow` exported as a [Node.js](https://nodejs.org/) module.
|
||||||
|
|
||||||
@@ -15,4 +15,4 @@ In Node.js:
|
|||||||
var flow = require('lodash.flow');
|
var flow = require('lodash.flow');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [documentation](https://lodash.com/docs#flow) or [package source](https://github.com/lodash/lodash/blob/3.3.0-npm-packages/lodash.flow) for more details.
|
See the [documentation](https://lodash.com/docs#flow) or [package source](https://github.com/lodash/lodash/blob/3.5.0-npm-packages/lodash.flow) for more details.
|
||||||
|
|||||||
@@ -6,12 +6,150 @@
|
|||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
*/
|
*/
|
||||||
var baseFlatten = require('lodash._baseflatten'),
|
|
||||||
rest = require('lodash.rest');
|
|
||||||
|
|
||||||
/** Used as the `TypeError` message for "Functions" methods. */
|
/** Used as the `TypeError` message for "Functions" methods. */
|
||||||
var FUNC_ERROR_TEXT = 'Expected a function';
|
var FUNC_ERROR_TEXT = 'Expected a function';
|
||||||
|
|
||||||
|
/** Used as references for various `Number` constants. */
|
||||||
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||||
|
|
||||||
|
/** `Object#toString` result references. */
|
||||||
|
var argsTag = '[object Arguments]',
|
||||||
|
funcTag = '[object Function]',
|
||||||
|
genTag = '[object GeneratorFunction]';
|
||||||
|
|
||||||
|
/** Detect free variable `global` from Node.js. */
|
||||||
|
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
||||||
|
|
||||||
|
/** Detect free variable `self`. */
|
||||||
|
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
||||||
|
|
||||||
|
/** Used as a reference to the global object. */
|
||||||
|
var root = freeGlobal || freeSelf || Function('return this')();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 {Array} args The arguments to invoke `func` with.
|
||||||
|
* @returns {*} Returns the result of `func`.
|
||||||
|
*/
|
||||||
|
function apply(func, thisArg, args) {
|
||||||
|
switch (args.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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Appends the elements of `values` to `array`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to modify.
|
||||||
|
* @param {Array} values The values to append.
|
||||||
|
* @returns {Array} Returns `array`.
|
||||||
|
*/
|
||||||
|
function arrayPush(array, values) {
|
||||||
|
var index = -1,
|
||||||
|
length = values.length,
|
||||||
|
offset = array.length;
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
array[offset + index] = values[index];
|
||||||
|
}
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Used for built-in method references. */
|
||||||
|
var objectProto = Object.prototype;
|
||||||
|
|
||||||
|
/** Used to check objects for own properties. */
|
||||||
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to resolve the
|
||||||
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||||
|
* of values.
|
||||||
|
*/
|
||||||
|
var objectToString = objectProto.toString;
|
||||||
|
|
||||||
|
/** Built-in value references. */
|
||||||
|
var Symbol = root.Symbol,
|
||||||
|
propertyIsEnumerable = objectProto.propertyIsEnumerable,
|
||||||
|
spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
|
||||||
|
|
||||||
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||||
|
var nativeMax = Math.max;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.flatten` with support for restricting flattening.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to flatten.
|
||||||
|
* @param {number} depth The maximum recursion depth.
|
||||||
|
* @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
|
||||||
|
* @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
|
||||||
|
* @param {Array} [result=[]] The initial result value.
|
||||||
|
* @returns {Array} Returns the new flattened array.
|
||||||
|
*/
|
||||||
|
function baseFlatten(array, depth, predicate, isStrict, result) {
|
||||||
|
var index = -1,
|
||||||
|
length = array.length;
|
||||||
|
|
||||||
|
predicate || (predicate = isFlattenable);
|
||||||
|
result || (result = []);
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
var value = array[index];
|
||||||
|
if (depth > 0 && predicate(value)) {
|
||||||
|
if (depth > 1) {
|
||||||
|
// Recursively flatten arrays (susceptible to call stack limits).
|
||||||
|
baseFlatten(value, depth - 1, predicate, isStrict, result);
|
||||||
|
} else {
|
||||||
|
arrayPush(result, value);
|
||||||
|
}
|
||||||
|
} else if (!isStrict) {
|
||||||
|
result[result.length] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Function} func The function to apply a rest parameter to.
|
||||||
|
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
||||||
|
* @returns {Function} Returns the new function.
|
||||||
|
*/
|
||||||
|
function baseRest(func, start) {
|
||||||
|
start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
|
||||||
|
return function() {
|
||||||
|
var args = arguments,
|
||||||
|
index = -1,
|
||||||
|
length = nativeMax(args.length - start, 0),
|
||||||
|
array = Array(length);
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
array[index] = args[start + index];
|
||||||
|
}
|
||||||
|
index = -1;
|
||||||
|
var otherArgs = Array(start + 1);
|
||||||
|
while (++index < start) {
|
||||||
|
otherArgs[index] = args[index];
|
||||||
|
}
|
||||||
|
otherArgs[start] = array;
|
||||||
|
return apply(func, this, otherArgs);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a `_.flow` or `_.flowRight` function.
|
* Creates a `_.flow` or `_.flowRight` function.
|
||||||
*
|
*
|
||||||
@@ -20,7 +158,7 @@ var FUNC_ERROR_TEXT = 'Expected a function';
|
|||||||
* @returns {Function} Returns the new flow function.
|
* @returns {Function} Returns the new flow function.
|
||||||
*/
|
*/
|
||||||
function createFlow(fromRight) {
|
function createFlow(fromRight) {
|
||||||
return rest(function(funcs) {
|
return baseRest(function(funcs) {
|
||||||
funcs = baseFlatten(funcs, 1);
|
funcs = baseFlatten(funcs, 1);
|
||||||
|
|
||||||
var length = funcs.length,
|
var length = funcs.length,
|
||||||
@@ -46,6 +184,238 @@ function createFlow(fromRight) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is a flattenable `arguments` object or array.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
|
||||||
|
*/
|
||||||
|
function isFlattenable(value) {
|
||||||
|
return isArray(value) || isArguments(value) ||
|
||||||
|
!!(spreadableSymbol && value && value[spreadableSymbol]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is likely an `arguments` object.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 0.1.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
||||||
|
* else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isArguments(function() { return arguments; }());
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isArguments([1, 2, 3]);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isArguments(value) {
|
||||||
|
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||||
|
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
||||||
|
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is classified as an `Array` object.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 0.1.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isArray([1, 2, 3]);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isArray(document.body.children);
|
||||||
|
* // => false
|
||||||
|
*
|
||||||
|
* _.isArray('abc');
|
||||||
|
* // => false
|
||||||
|
*
|
||||||
|
* _.isArray(_.noop);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
var isArray = Array.isArray;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is array-like. A value is considered array-like if it's
|
||||||
|
* not a function and has a `value.length` that's an integer greater than or
|
||||||
|
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 4.0.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isArrayLike([1, 2, 3]);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isArrayLike(document.body.children);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isArrayLike('abc');
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isArrayLike(_.noop);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isArrayLike(value) {
|
||||||
|
return value != null && isLength(value.length) && !isFunction(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is like `_.isArrayLike` except that it also checks if `value`
|
||||||
|
* is an object.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 4.0.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
||||||
|
* else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isArrayLikeObject([1, 2, 3]);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isArrayLikeObject(document.body.children);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isArrayLikeObject('abc');
|
||||||
|
* // => false
|
||||||
|
*
|
||||||
|
* _.isArrayLikeObject(_.noop);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isArrayLikeObject(value) {
|
||||||
|
return isObjectLike(value) && isArrayLike(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is classified as a `Function` object.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 0.1.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isFunction(_);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isFunction(/abc/);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isFunction(value) {
|
||||||
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||||
|
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||||
|
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||||
|
return tag == funcTag || tag == genTag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is a valid array-like length.
|
||||||
|
*
|
||||||
|
* **Note:** This method is loosely based on
|
||||||
|
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 4.0.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isLength(3);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isLength(Number.MIN_VALUE);
|
||||||
|
* // => false
|
||||||
|
*
|
||||||
|
* _.isLength(Infinity);
|
||||||
|
* // => false
|
||||||
|
*
|
||||||
|
* _.isLength('3');
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isLength(value) {
|
||||||
|
return typeof value == 'number' &&
|
||||||
|
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is the
|
||||||
|
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||||
|
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 0.1.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isObject({});
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject([1, 2, 3]);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject(_.noop);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject(null);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isObject(value) {
|
||||||
|
var type = typeof value;
|
||||||
|
return !!value && (type == 'object' || type == 'function');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
||||||
|
* and has a `typeof` result of "object".
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 4.0.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isObjectLike({});
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObjectLike([1, 2, 3]);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObjectLike(_.noop);
|
||||||
|
* // => false
|
||||||
|
*
|
||||||
|
* _.isObjectLike(null);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isObjectLike(value) {
|
||||||
|
return !!value && typeof value == 'object';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a function that returns the result of invoking the given functions
|
* Creates a function that returns the result of invoking the given functions
|
||||||
* with the `this` binding of the created function, where each successive
|
* with the `this` binding of the created function, where each successive
|
||||||
@@ -55,7 +425,7 @@ function createFlow(fromRight) {
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
* @category Util
|
* @category Util
|
||||||
* @param {...(Function|Function[])} [funcs] Functions to invoke.
|
* @param {...(Function|Function[])} [funcs] The functions to invoke.
|
||||||
* @returns {Function} Returns the new composite function.
|
* @returns {Function} Returns the new composite function.
|
||||||
* @see _.flowRight
|
* @see _.flowRight
|
||||||
* @example
|
* @example
|
||||||
@@ -64,7 +434,7 @@ function createFlow(fromRight) {
|
|||||||
* return n * n;
|
* return n * n;
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* var addSquare = _.flow(_.add, square);
|
* var addSquare = _.flow([_.add, square]);
|
||||||
* addSquare(1, 2);
|
* addSquare(1, 2);
|
||||||
* // => 9
|
* // => 9
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash.flow",
|
"name": "lodash.flow",
|
||||||
"version": "3.3.0",
|
"version": "3.5.0",
|
||||||
"description": "The lodash method `_.flow` exported as a module.",
|
"description": "The lodash method `_.flow` exported as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
@@ -13,9 +13,5 @@
|
|||||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||||
],
|
],
|
||||||
"repository": "lodash/lodash",
|
"repository": "lodash/lodash",
|
||||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
|
||||||
"dependencies": {
|
|
||||||
"lodash._baseflatten": "~4.2.0",
|
|
||||||
"lodash.rest": "^4.0.0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash.flowright v3.3.0
|
# lodash.flowright v3.5.0
|
||||||
|
|
||||||
The [lodash](https://lodash.com/) method `_.flowRight` exported as a [Node.js](https://nodejs.org/) module.
|
The [lodash](https://lodash.com/) method `_.flowRight` exported as a [Node.js](https://nodejs.org/) module.
|
||||||
|
|
||||||
@@ -15,4 +15,4 @@ In Node.js:
|
|||||||
var flowRight = require('lodash.flowright');
|
var flowRight = require('lodash.flowright');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [documentation](https://lodash.com/docs#flowRight) or [package source](https://github.com/lodash/lodash/blob/3.3.0-npm-packages/lodash.flowright) for more details.
|
See the [documentation](https://lodash.com/docs#flowRight) or [package source](https://github.com/lodash/lodash/blob/3.5.0-npm-packages/lodash.flowright) for more details.
|
||||||
|
|||||||
@@ -6,12 +6,150 @@
|
|||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
*/
|
*/
|
||||||
var baseFlatten = require('lodash._baseflatten'),
|
|
||||||
rest = require('lodash.rest');
|
|
||||||
|
|
||||||
/** Used as the `TypeError` message for "Functions" methods. */
|
/** Used as the `TypeError` message for "Functions" methods. */
|
||||||
var FUNC_ERROR_TEXT = 'Expected a function';
|
var FUNC_ERROR_TEXT = 'Expected a function';
|
||||||
|
|
||||||
|
/** Used as references for various `Number` constants. */
|
||||||
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||||
|
|
||||||
|
/** `Object#toString` result references. */
|
||||||
|
var argsTag = '[object Arguments]',
|
||||||
|
funcTag = '[object Function]',
|
||||||
|
genTag = '[object GeneratorFunction]';
|
||||||
|
|
||||||
|
/** Detect free variable `global` from Node.js. */
|
||||||
|
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
||||||
|
|
||||||
|
/** Detect free variable `self`. */
|
||||||
|
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
||||||
|
|
||||||
|
/** Used as a reference to the global object. */
|
||||||
|
var root = freeGlobal || freeSelf || Function('return this')();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 {Array} args The arguments to invoke `func` with.
|
||||||
|
* @returns {*} Returns the result of `func`.
|
||||||
|
*/
|
||||||
|
function apply(func, thisArg, args) {
|
||||||
|
switch (args.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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Appends the elements of `values` to `array`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to modify.
|
||||||
|
* @param {Array} values The values to append.
|
||||||
|
* @returns {Array} Returns `array`.
|
||||||
|
*/
|
||||||
|
function arrayPush(array, values) {
|
||||||
|
var index = -1,
|
||||||
|
length = values.length,
|
||||||
|
offset = array.length;
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
array[offset + index] = values[index];
|
||||||
|
}
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Used for built-in method references. */
|
||||||
|
var objectProto = Object.prototype;
|
||||||
|
|
||||||
|
/** Used to check objects for own properties. */
|
||||||
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to resolve the
|
||||||
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||||
|
* of values.
|
||||||
|
*/
|
||||||
|
var objectToString = objectProto.toString;
|
||||||
|
|
||||||
|
/** Built-in value references. */
|
||||||
|
var Symbol = root.Symbol,
|
||||||
|
propertyIsEnumerable = objectProto.propertyIsEnumerable,
|
||||||
|
spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
|
||||||
|
|
||||||
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||||
|
var nativeMax = Math.max;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.flatten` with support for restricting flattening.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to flatten.
|
||||||
|
* @param {number} depth The maximum recursion depth.
|
||||||
|
* @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
|
||||||
|
* @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
|
||||||
|
* @param {Array} [result=[]] The initial result value.
|
||||||
|
* @returns {Array} Returns the new flattened array.
|
||||||
|
*/
|
||||||
|
function baseFlatten(array, depth, predicate, isStrict, result) {
|
||||||
|
var index = -1,
|
||||||
|
length = array.length;
|
||||||
|
|
||||||
|
predicate || (predicate = isFlattenable);
|
||||||
|
result || (result = []);
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
var value = array[index];
|
||||||
|
if (depth > 0 && predicate(value)) {
|
||||||
|
if (depth > 1) {
|
||||||
|
// Recursively flatten arrays (susceptible to call stack limits).
|
||||||
|
baseFlatten(value, depth - 1, predicate, isStrict, result);
|
||||||
|
} else {
|
||||||
|
arrayPush(result, value);
|
||||||
|
}
|
||||||
|
} else if (!isStrict) {
|
||||||
|
result[result.length] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Function} func The function to apply a rest parameter to.
|
||||||
|
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
||||||
|
* @returns {Function} Returns the new function.
|
||||||
|
*/
|
||||||
|
function baseRest(func, start) {
|
||||||
|
start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
|
||||||
|
return function() {
|
||||||
|
var args = arguments,
|
||||||
|
index = -1,
|
||||||
|
length = nativeMax(args.length - start, 0),
|
||||||
|
array = Array(length);
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
array[index] = args[start + index];
|
||||||
|
}
|
||||||
|
index = -1;
|
||||||
|
var otherArgs = Array(start + 1);
|
||||||
|
while (++index < start) {
|
||||||
|
otherArgs[index] = args[index];
|
||||||
|
}
|
||||||
|
otherArgs[start] = array;
|
||||||
|
return apply(func, this, otherArgs);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a `_.flow` or `_.flowRight` function.
|
* Creates a `_.flow` or `_.flowRight` function.
|
||||||
*
|
*
|
||||||
@@ -20,7 +158,7 @@ var FUNC_ERROR_TEXT = 'Expected a function';
|
|||||||
* @returns {Function} Returns the new flow function.
|
* @returns {Function} Returns the new flow function.
|
||||||
*/
|
*/
|
||||||
function createFlow(fromRight) {
|
function createFlow(fromRight) {
|
||||||
return rest(function(funcs) {
|
return baseRest(function(funcs) {
|
||||||
funcs = baseFlatten(funcs, 1);
|
funcs = baseFlatten(funcs, 1);
|
||||||
|
|
||||||
var length = funcs.length,
|
var length = funcs.length,
|
||||||
@@ -46,6 +184,238 @@ function createFlow(fromRight) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is a flattenable `arguments` object or array.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
|
||||||
|
*/
|
||||||
|
function isFlattenable(value) {
|
||||||
|
return isArray(value) || isArguments(value) ||
|
||||||
|
!!(spreadableSymbol && value && value[spreadableSymbol]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is likely an `arguments` object.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 0.1.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
||||||
|
* else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isArguments(function() { return arguments; }());
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isArguments([1, 2, 3]);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isArguments(value) {
|
||||||
|
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||||
|
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
||||||
|
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is classified as an `Array` object.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 0.1.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isArray([1, 2, 3]);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isArray(document.body.children);
|
||||||
|
* // => false
|
||||||
|
*
|
||||||
|
* _.isArray('abc');
|
||||||
|
* // => false
|
||||||
|
*
|
||||||
|
* _.isArray(_.noop);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
var isArray = Array.isArray;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is array-like. A value is considered array-like if it's
|
||||||
|
* not a function and has a `value.length` that's an integer greater than or
|
||||||
|
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 4.0.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isArrayLike([1, 2, 3]);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isArrayLike(document.body.children);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isArrayLike('abc');
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isArrayLike(_.noop);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isArrayLike(value) {
|
||||||
|
return value != null && isLength(value.length) && !isFunction(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is like `_.isArrayLike` except that it also checks if `value`
|
||||||
|
* is an object.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 4.0.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
||||||
|
* else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isArrayLikeObject([1, 2, 3]);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isArrayLikeObject(document.body.children);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isArrayLikeObject('abc');
|
||||||
|
* // => false
|
||||||
|
*
|
||||||
|
* _.isArrayLikeObject(_.noop);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isArrayLikeObject(value) {
|
||||||
|
return isObjectLike(value) && isArrayLike(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is classified as a `Function` object.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 0.1.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isFunction(_);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isFunction(/abc/);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isFunction(value) {
|
||||||
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||||
|
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||||
|
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||||
|
return tag == funcTag || tag == genTag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is a valid array-like length.
|
||||||
|
*
|
||||||
|
* **Note:** This method is loosely based on
|
||||||
|
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 4.0.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isLength(3);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isLength(Number.MIN_VALUE);
|
||||||
|
* // => false
|
||||||
|
*
|
||||||
|
* _.isLength(Infinity);
|
||||||
|
* // => false
|
||||||
|
*
|
||||||
|
* _.isLength('3');
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isLength(value) {
|
||||||
|
return typeof value == 'number' &&
|
||||||
|
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is the
|
||||||
|
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||||
|
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 0.1.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isObject({});
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject([1, 2, 3]);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject(_.noop);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject(null);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isObject(value) {
|
||||||
|
var type = typeof value;
|
||||||
|
return !!value && (type == 'object' || type == 'function');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
||||||
|
* and has a `typeof` result of "object".
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 4.0.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isObjectLike({});
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObjectLike([1, 2, 3]);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObjectLike(_.noop);
|
||||||
|
* // => false
|
||||||
|
*
|
||||||
|
* _.isObjectLike(null);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isObjectLike(value) {
|
||||||
|
return !!value && typeof value == 'object';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is like `_.flow` except that it creates a function that
|
* This method is like `_.flow` except that it creates a function that
|
||||||
* invokes the given functions from right to left.
|
* invokes the given functions from right to left.
|
||||||
@@ -54,7 +424,7 @@ function createFlow(fromRight) {
|
|||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Util
|
* @category Util
|
||||||
* @param {...(Function|Function[])} [funcs] Functions to invoke.
|
* @param {...(Function|Function[])} [funcs] The functions to invoke.
|
||||||
* @returns {Function} Returns the new composite function.
|
* @returns {Function} Returns the new composite function.
|
||||||
* @see _.flow
|
* @see _.flow
|
||||||
* @example
|
* @example
|
||||||
@@ -63,7 +433,7 @@ function createFlow(fromRight) {
|
|||||||
* return n * n;
|
* return n * n;
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* var addSquare = _.flowRight(square, _.add);
|
* var addSquare = _.flowRight([square, _.add]);
|
||||||
* addSquare(1, 2);
|
* addSquare(1, 2);
|
||||||
* // => 9
|
* // => 9
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash.flowright",
|
"name": "lodash.flowright",
|
||||||
"version": "3.3.0",
|
"version": "3.5.0",
|
||||||
"description": "The lodash method `_.flowRight` exported as a module.",
|
"description": "The lodash method `_.flowRight` exported as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
@@ -13,9 +13,5 @@
|
|||||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||||
],
|
],
|
||||||
"repository": "lodash/lodash",
|
"repository": "lodash/lodash",
|
||||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
|
||||||
"dependencies": {
|
|
||||||
"lodash._baseflatten": "~4.2.0",
|
|
||||||
"lodash.rest": "^4.0.0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
22
lodash.get/LICENSE.txt
Normal file
22
lodash.get/LICENSE.txt
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
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
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
20
lodash.get/README.md
Normal file
20
lodash.get/README.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# lodash.get v3.7.0
|
||||||
|
|
||||||
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.get` 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.get
|
||||||
|
```
|
||||||
|
|
||||||
|
In Node.js/io.js:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var get = require('lodash.get');
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [documentation](https://lodash.com/docs#get) or [package source](https://github.com/lodash/lodash/blob/3.7.0-npm-packages/lodash.get) for more details.
|
||||||
41
lodash.get/index.js
Normal file
41
lodash.get/index.js
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
/**
|
||||||
|
* lodash 3.7.0 (Custom Build) <https://lodash.com/>
|
||||||
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
|
* Available under MIT license <https://lodash.com/license>
|
||||||
|
*/
|
||||||
|
var baseGet = require('lodash._baseget'),
|
||||||
|
toPath = require('lodash._topath');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the property value at `path` of `object`. If the resolved value is
|
||||||
|
* `undefined` the `defaultValue` is used in its place.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Object
|
||||||
|
* @param {Object} object The object to query.
|
||||||
|
* @param {Array|string} path The path of the property to get.
|
||||||
|
* @param {*} [defaultValue] The value returned if the resolved value is `undefined`.
|
||||||
|
* @returns {*} Returns the resolved value.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
||||||
|
*
|
||||||
|
* _.get(object, 'a[0].b.c');
|
||||||
|
* // => 3
|
||||||
|
*
|
||||||
|
* _.get(object, ['a', '0', 'b', 'c']);
|
||||||
|
* // => 3
|
||||||
|
*
|
||||||
|
* _.get(object, 'a.b.c', 'default');
|
||||||
|
* // => 'default'
|
||||||
|
*/
|
||||||
|
function get(object, path, defaultValue) {
|
||||||
|
var result = object == null ? undefined : baseGet(object, toPath(path), (path + ''));
|
||||||
|
return result === undefined ? defaultValue : result;
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = get;
|
||||||
23
lodash.get/package.json
Normal file
23
lodash.get/package.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"name": "lodash.get",
|
||||||
|
"version": "3.7.0",
|
||||||
|
"description": "The modern build of lodash’s `_.get` as a module.",
|
||||||
|
"homepage": "https://lodash.com/",
|
||||||
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
"license": "MIT",
|
||||||
|
"keywords": "lodash, lodash-modularized, stdlib, util",
|
||||||
|
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"contributors": [
|
||||||
|
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
|
||||||
|
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
|
||||||
|
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
||||||
|
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||||
|
],
|
||||||
|
"repository": "lodash/lodash",
|
||||||
|
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||||
|
"dependencies": {
|
||||||
|
"lodash._baseget": "^3.0.0",
|
||||||
|
"lodash._topath": "^3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,17 @@
|
|||||||
Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||||
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
|
|
||||||
|
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||||
|
|
||||||
|
This software consists of voluntary contributions made by many
|
||||||
|
individuals. For exact contribution history, see the revision history
|
||||||
|
available at https://github.com/lodash/lodash
|
||||||
|
|
||||||
|
The following license applies to all parts of this software except as
|
||||||
|
documented below:
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
"Software"), to deal in the Software without restriction, including
|
"Software"), to deal in the Software without restriction, including
|
||||||
@@ -20,3 +30,18 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|||||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
|
Copyright and related rights for sample code are waived via CC0. Sample
|
||||||
|
code is defined as all source code displayed within the prose of the
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
|
Files located in the node_modules and vendor directories are externally
|
||||||
|
maintained libraries used by this software which have their own
|
||||||
|
licenses; we recommend you read them, as their terms may differ from the
|
||||||
|
terms above.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash.inrange v3.3.2
|
# lodash.inrange v3.3.6
|
||||||
|
|
||||||
The [lodash](https://lodash.com/) method `_.inRange` exported as a [Node.js](https://nodejs.org/) module.
|
The [lodash](https://lodash.com/) method `_.inRange` exported as a [Node.js](https://nodejs.org/) module.
|
||||||
|
|
||||||
@@ -15,4 +15,4 @@ In Node.js:
|
|||||||
var inRange = require('lodash.inrange');
|
var inRange = require('lodash.inrange');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [documentation](https://lodash.com/docs#inRange) or [package source](https://github.com/lodash/lodash/blob/3.3.2-npm-packages/lodash.inrange) for more details.
|
See the [documentation](https://lodash.com/docs#inRange) or [package source](https://github.com/lodash/lodash/blob/3.3.6-npm-packages/lodash.inrange) for more details.
|
||||||
|
|||||||
@@ -1,27 +1,236 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.3.2 (Custom Build) <https://lodash.com/>
|
* lodash (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modularize exports="npm" -o ./`
|
* Build: `lodash modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||||
|
* Released under MIT license <https://lodash.com/license>
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* 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_INTEGER = 1.7976931348623157e+308,
|
||||||
|
NAN = 0 / 0;
|
||||||
|
|
||||||
|
/** `Object#toString` result references. */
|
||||||
|
var symbolTag = '[object Symbol]';
|
||||||
|
|
||||||
|
/** Used to match leading and trailing whitespace. */
|
||||||
|
var reTrim = /^\s+|\s+$/g;
|
||||||
|
|
||||||
|
/** Used to detect bad signed hexadecimal string values. */
|
||||||
|
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
||||||
|
|
||||||
|
/** Used to detect binary string values. */
|
||||||
|
var reIsBinary = /^0b[01]+$/i;
|
||||||
|
|
||||||
|
/** Used to detect octal string values. */
|
||||||
|
var reIsOctal = /^0o[0-7]+$/i;
|
||||||
|
|
||||||
|
/** Built-in method references without a dependency on `root`. */
|
||||||
|
var freeParseInt = parseInt;
|
||||||
|
|
||||||
|
/** Used for built-in method references. */
|
||||||
|
var objectProto = Object.prototype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to resolve the
|
||||||
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||||
|
* of values.
|
||||||
|
*/
|
||||||
|
var objectToString = objectProto.toString;
|
||||||
|
|
||||||
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||||
var nativeMax = Math.max,
|
var nativeMax = Math.max,
|
||||||
nativeMin = Math.min;
|
nativeMin = Math.min;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if `n` is between `start` and up to but not including, `end`. If
|
* The base implementation of `_.inRange` which doesn't coerce arguments.
|
||||||
* `end` is not specified it is set to `start` with `start` then set to `0`.
|
*
|
||||||
|
* @private
|
||||||
|
* @param {number} number The number to check.
|
||||||
|
* @param {number} start The start of the range.
|
||||||
|
* @param {number} end The end of the range.
|
||||||
|
* @returns {boolean} Returns `true` if `number` is in the range, else `false`.
|
||||||
|
*/
|
||||||
|
function baseInRange(number, start, end) {
|
||||||
|
return number >= nativeMin(start, end) && number < nativeMax(start, end);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is the
|
||||||
|
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||||
|
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
|
* @since 0.1.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isObject({});
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject([1, 2, 3]);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject(_.noop);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject(null);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isObject(value) {
|
||||||
|
var type = typeof value;
|
||||||
|
return !!value && (type == 'object' || type == 'function');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
||||||
|
* and has a `typeof` result of "object".
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 4.0.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isObjectLike({});
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObjectLike([1, 2, 3]);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObjectLike(_.noop);
|
||||||
|
* // => false
|
||||||
|
*
|
||||||
|
* _.isObjectLike(null);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isObjectLike(value) {
|
||||||
|
return !!value && typeof value == 'object';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is classified as a `Symbol` primitive or object.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 4.0.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isSymbol(Symbol.iterator);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isSymbol('abc');
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isSymbol(value) {
|
||||||
|
return typeof value == 'symbol' ||
|
||||||
|
(isObjectLike(value) && objectToString.call(value) == symbolTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts `value` to a finite number.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 4.12.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to convert.
|
||||||
|
* @returns {number} Returns the converted number.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.toFinite(3.2);
|
||||||
|
* // => 3.2
|
||||||
|
*
|
||||||
|
* _.toFinite(Number.MIN_VALUE);
|
||||||
|
* // => 5e-324
|
||||||
|
*
|
||||||
|
* _.toFinite(Infinity);
|
||||||
|
* // => 1.7976931348623157e+308
|
||||||
|
*
|
||||||
|
* _.toFinite('3.2');
|
||||||
|
* // => 3.2
|
||||||
|
*/
|
||||||
|
function toFinite(value) {
|
||||||
|
if (!value) {
|
||||||
|
return value === 0 ? value : 0;
|
||||||
|
}
|
||||||
|
value = toNumber(value);
|
||||||
|
if (value === INFINITY || value === -INFINITY) {
|
||||||
|
var sign = (value < 0 ? -1 : 1);
|
||||||
|
return sign * MAX_INTEGER;
|
||||||
|
}
|
||||||
|
return value === value ? value : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts `value` to a number.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 4.0.0
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to process.
|
||||||
|
* @returns {number} Returns the number.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.toNumber(3.2);
|
||||||
|
* // => 3.2
|
||||||
|
*
|
||||||
|
* _.toNumber(Number.MIN_VALUE);
|
||||||
|
* // => 5e-324
|
||||||
|
*
|
||||||
|
* _.toNumber(Infinity);
|
||||||
|
* // => Infinity
|
||||||
|
*
|
||||||
|
* _.toNumber('3.2');
|
||||||
|
* // => 3.2
|
||||||
|
*/
|
||||||
|
function toNumber(value) {
|
||||||
|
if (typeof value == 'number') {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
if (isSymbol(value)) {
|
||||||
|
return NAN;
|
||||||
|
}
|
||||||
|
if (isObject(value)) {
|
||||||
|
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
||||||
|
value = isObject(other) ? (other + '') : other;
|
||||||
|
}
|
||||||
|
if (typeof value != 'string') {
|
||||||
|
return value === 0 ? value : +value;
|
||||||
|
}
|
||||||
|
value = value.replace(reTrim, '');
|
||||||
|
var isBinary = reIsBinary.test(value);
|
||||||
|
return (isBinary || reIsOctal.test(value))
|
||||||
|
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
||||||
|
: (reIsBadHex.test(value) ? NAN : +value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `n` is between `start` and up to, but not including, `end`. If
|
||||||
|
* `end` is not specified, it's set to `start` with `start` then set to `0`.
|
||||||
|
* If `start` is greater than `end` the params are swapped to support
|
||||||
|
* negative ranges.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @since 3.3.0
|
||||||
* @category Number
|
* @category Number
|
||||||
* @param {number} n The number to check.
|
* @param {number} number The number to check.
|
||||||
* @param {number} [start=0] The start of the range.
|
* @param {number} [start=0] The start of the range.
|
||||||
* @param {number} end The end of the range.
|
* @param {number} end The end of the range.
|
||||||
* @returns {boolean} Returns `true` if `n` is in the range, else `false`.
|
* @returns {boolean} Returns `true` if `number` is in the range, else `false`.
|
||||||
|
* @see _.range, _.rangeRight
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.inRange(3, 2, 4);
|
* _.inRange(3, 2, 4);
|
||||||
@@ -41,16 +250,20 @@ var nativeMax = Math.max,
|
|||||||
*
|
*
|
||||||
* _.inRange(5.2, 4);
|
* _.inRange(5.2, 4);
|
||||||
* // => false
|
* // => false
|
||||||
|
*
|
||||||
|
* _.inRange(-3, -2, -6);
|
||||||
|
* // => true
|
||||||
*/
|
*/
|
||||||
function inRange(value, start, end) {
|
function inRange(number, start, end) {
|
||||||
start = +start || 0;
|
start = toFinite(start);
|
||||||
if (end === undefined) {
|
if (end === undefined) {
|
||||||
end = start;
|
end = start;
|
||||||
start = 0;
|
start = 0;
|
||||||
} else {
|
} else {
|
||||||
end = +end || 0;
|
end = toFinite(end);
|
||||||
}
|
}
|
||||||
return value >= nativeMin(start, end) && value < nativeMax(start, end);
|
number = toNumber(number);
|
||||||
|
return baseInRange(number, start, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = inRange;
|
module.exports = inRange;
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash.inrange",
|
"name": "lodash.inrange",
|
||||||
"version": "3.3.2",
|
"version": "3.3.6",
|
||||||
"description": "The lodash method `_.inRange` exported as a module.",
|
"description": "The lodash method `_.inRange` exported as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"keywords": "lodash, lodash-modularized, stdlib, util, inrange",
|
"keywords": "lodash-modularized, inrange",
|
||||||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
"Blaine Bublitz <blaine@iceddev.com> (https://github.com/phated)",
|
"Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
|
||||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||||
],
|
],
|
||||||
"repository": "lodash/lodash",
|
"repository": "lodash/lodash",
|
||||||
|
|||||||
22
lodash.mapkeys/LICENSE.txt
Normal file
22
lodash.mapkeys/LICENSE.txt
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
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
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
20
lodash.mapkeys/README.md
Normal file
20
lodash.mapkeys/README.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# lodash.mapkeys v3.8.0
|
||||||
|
|
||||||
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.mapKeys` 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.mapkeys
|
||||||
|
```
|
||||||
|
|
||||||
|
In Node.js/io.js:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var mapKeys = require('lodash.mapkeys');
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [documentation](https://lodash.com/docs#mapKeys) or [package source](https://github.com/lodash/lodash/blob/3.8.0-npm-packages/lodash.mapkeys) for more details.
|
||||||
70
lodash.mapkeys/index.js
Normal file
70
lodash.mapkeys/index.js
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
/**
|
||||||
|
* lodash 3.8.0 (Custom Build) <https://lodash.com/>
|
||||||
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
|
* Available under MIT license <https://lodash.com/license>
|
||||||
|
*/
|
||||||
|
var baseCallback = require('lodash._basecallback'),
|
||||||
|
baseFor = require('lodash._basefor'),
|
||||||
|
keys = require('lodash.keys');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.forOwn` without support for callback
|
||||||
|
* shorthands and `this` binding.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The object to iterate over.
|
||||||
|
* @param {Function} iteratee The function invoked per iteration.
|
||||||
|
* @returns {Object} Returns `object`.
|
||||||
|
*/
|
||||||
|
function baseForOwn(object, iteratee) {
|
||||||
|
return baseFor(object, iteratee, keys);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a function for `_.mapKeys` or `_.mapValues`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {boolean} [isMapKeys] Specify mapping keys instead of values.
|
||||||
|
* @returns {Function} Returns the new map function.
|
||||||
|
*/
|
||||||
|
function createObjectMapper(isMapKeys) {
|
||||||
|
return function(object, iteratee, thisArg) {
|
||||||
|
var result = {};
|
||||||
|
iteratee = baseCallback(iteratee, thisArg, 3);
|
||||||
|
|
||||||
|
baseForOwn(object, function(value, key, object) {
|
||||||
|
var mapped = iteratee(value, key, object);
|
||||||
|
key = isMapKeys ? mapped : key;
|
||||||
|
value = isMapKeys ? value : mapped;
|
||||||
|
result[key] = value;
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The opposite of `_.mapValues`; this method creates an object with the
|
||||||
|
* same values as `object` and keys generated by running each own enumerable
|
||||||
|
* property of `object` through `iteratee`.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Object
|
||||||
|
* @param {Object} object The object to iterate over.
|
||||||
|
* @param {Function|Object|string} [iteratee=_.identity] The function invoked
|
||||||
|
* per iteration.
|
||||||
|
* @param {*} [thisArg] The `this` binding of `iteratee`.
|
||||||
|
* @returns {Object} Returns the new mapped object.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
|
||||||
|
* return key + value;
|
||||||
|
* });
|
||||||
|
* // => { 'a1': 1, 'b2': 2 }
|
||||||
|
*/
|
||||||
|
var mapKeys = createObjectMapper(true);
|
||||||
|
|
||||||
|
module.exports = mapKeys;
|
||||||
24
lodash.mapkeys/package.json
Normal file
24
lodash.mapkeys/package.json
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"name": "lodash.mapkeys",
|
||||||
|
"version": "3.8.0",
|
||||||
|
"description": "The modern build of lodash’s `_.mapKeys` as a module.",
|
||||||
|
"homepage": "https://lodash.com/",
|
||||||
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
"license": "MIT",
|
||||||
|
"keywords": "lodash, lodash-modularized, stdlib, util",
|
||||||
|
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"contributors": [
|
||||||
|
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
|
||||||
|
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
|
||||||
|
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
||||||
|
"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._basecallback": "^3.0.0",
|
||||||
|
"lodash._basefor": "^3.0.0",
|
||||||
|
"lodash.keys": "^3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
22
lodash.max/LICENSE
Normal file
22
lodash.max/LICENSE
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
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
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash.max v3.3.1
|
# lodash.max v3.4.0
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.max` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.max` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var max = require('lodash.max');
|
var max = require('lodash.max');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [documentation](https://lodash.com/docs#max) or [package source](https://github.com/lodash/lodash/blob/3.3.1-npm-packages/lodash.max) for more details.
|
See the [documentation](https://lodash.com/docs#max) or [package source](https://github.com/lodash/lodash/blob/3.4.0-npm-packages/lodash.max) for more details.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.3.1 (Custom Build) <https://lodash.com/>
|
* lodash 3.4.0 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
@@ -10,7 +10,8 @@ var baseCallback = require('lodash._basecallback'),
|
|||||||
baseEach = require('lodash._baseeach'),
|
baseEach = require('lodash._baseeach'),
|
||||||
isIterateeCall = require('lodash._isiterateecall'),
|
isIterateeCall = require('lodash._isiterateecall'),
|
||||||
toIterable = require('lodash._toiterable'),
|
toIterable = require('lodash._toiterable'),
|
||||||
gt = require('lodash.gt');
|
gt = require('lodash.gt'),
|
||||||
|
isArray = require('lodash.isarray');
|
||||||
|
|
||||||
/** Used as references for `-Infinity` and `Infinity`. */
|
/** Used as references for `-Infinity` and `Infinity`. */
|
||||||
var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY;
|
var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY;
|
||||||
@@ -81,11 +82,11 @@ function baseExtremum(collection, iteratee, comparator, exValue) {
|
|||||||
function createExtremum(comparator, exValue) {
|
function createExtremum(comparator, exValue) {
|
||||||
return function(collection, iteratee, thisArg) {
|
return function(collection, iteratee, thisArg) {
|
||||||
if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
|
if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
|
||||||
iteratee = null;
|
iteratee = undefined;
|
||||||
}
|
}
|
||||||
iteratee = baseCallback(iteratee, thisArg, 3);
|
iteratee = baseCallback(iteratee, thisArg, 3);
|
||||||
if (iteratee.length == 1) {
|
if (iteratee.length == 1) {
|
||||||
collection = toIterable(collection);
|
collection = isArray(collection) ? collection : toIterable(collection);
|
||||||
var result = arrayExtremum(collection, iteratee, comparator, exValue);
|
var result = arrayExtremum(collection, iteratee, comparator, exValue);
|
||||||
if (!(collection.length && result === exValue)) {
|
if (!(collection.length && result === exValue)) {
|
||||||
return result;
|
return result;
|
||||||
@@ -97,7 +98,7 @@ function createExtremum(comparator, exValue) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the maximum value of `collection`. If `collection` is empty or falsey
|
* Gets the maximum value of `collection`. If `collection` is empty or falsey
|
||||||
* `-Infinity` is returned. If an iteratee function is provided it is invoked
|
* `-Infinity` is returned. If an iteratee function is provided it's invoked
|
||||||
* for each value in `collection` to generate the criterion by which the value
|
* for each value in `collection` to generate the criterion by which the value
|
||||||
* is ranked. The `iteratee` is bound to `thisArg` and invoked with three
|
* is ranked. The `iteratee` is bound to `thisArg` and invoked with three
|
||||||
* arguments: (value, index, collection).
|
* arguments: (value, index, collection).
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash.max",
|
"name": "lodash.max",
|
||||||
"version": "3.3.1",
|
"version": "3.4.0",
|
||||||
"description": "The modern build of lodash’s `_.max` as a module.",
|
"description": "The modern build of lodash’s `_.max` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
"lodash._isiterateecall": "^3.0.0",
|
"lodash._isiterateecall": "^3.0.0",
|
||||||
"lodash._toiterable": "^3.0.0",
|
"lodash._toiterable": "^3.0.0",
|
||||||
"lodash.gt": "^3.0.0",
|
"lodash.gt": "^3.0.0",
|
||||||
|
"lodash.isarray": "^3.0.0",
|
||||||
"lodash.keys": "^3.0.0"
|
"lodash.keys": "^3.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
22
lodash.method/LICENSE.txt
Normal file
22
lodash.method/LICENSE.txt
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
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
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
20
lodash.method/README.md
Normal file
20
lodash.method/README.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# lodash.method v3.7.0
|
||||||
|
|
||||||
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.method` 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.method
|
||||||
|
```
|
||||||
|
|
||||||
|
In Node.js/io.js:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var method = require('lodash.method');
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [documentation](https://lodash.com/docs#method) or [package source](https://github.com/lodash/lodash/blob/3.7.0-npm-packages/lodash.method) for more details.
|
||||||
41
lodash.method/index.js
Normal file
41
lodash.method/index.js
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
/**
|
||||||
|
* lodash 3.7.0 (Custom Build) <https://lodash.com/>
|
||||||
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
|
* Available under MIT license <https://lodash.com/license>
|
||||||
|
*/
|
||||||
|
var invokePath = require('lodash._invokepath'),
|
||||||
|
restParam = require('lodash.restparam');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a function that invokes the method at `path` on a given object.
|
||||||
|
* Any additional arguments are provided to the invoked method.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Utility
|
||||||
|
* @param {Array|string} path The path of the method to invoke.
|
||||||
|
* @param {...*} [args] The arguments to invoke the method with.
|
||||||
|
* @returns {Function} Returns the new function.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* var objects = [
|
||||||
|
* { 'a': { 'b': { 'c': _.constant(2) } } },
|
||||||
|
* { 'a': { 'b': { 'c': _.constant(1) } } }
|
||||||
|
* ];
|
||||||
|
*
|
||||||
|
* _.map(objects, _.method('a.b.c'));
|
||||||
|
* // => [2, 1]
|
||||||
|
*
|
||||||
|
* _.invoke(_.sortBy(objects, _.method(['a', 'b', 'c'])), 'a.b.c');
|
||||||
|
* // => [1, 2]
|
||||||
|
*/
|
||||||
|
var method = restParam(function(path, args) {
|
||||||
|
return function(object) {
|
||||||
|
return invokePath(object, path, args);
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exports = method;
|
||||||
23
lodash.method/package.json
Normal file
23
lodash.method/package.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"name": "lodash.method",
|
||||||
|
"version": "3.7.0",
|
||||||
|
"description": "The modern build of lodash’s `_.method` as a module.",
|
||||||
|
"homepage": "https://lodash.com/",
|
||||||
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
"license": "MIT",
|
||||||
|
"keywords": "lodash, lodash-modularized, stdlib, util",
|
||||||
|
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"contributors": [
|
||||||
|
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
|
||||||
|
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
|
||||||
|
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
||||||
|
"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._invokepath": "^3.0.0",
|
||||||
|
"lodash.restparam": "^3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
22
lodash.methodof/LICENSE.txt
Normal file
22
lodash.methodof/LICENSE.txt
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
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
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
20
lodash.methodof/README.md
Normal file
20
lodash.methodof/README.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# lodash.methodof v3.7.0
|
||||||
|
|
||||||
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.methodOf` 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.methodof
|
||||||
|
```
|
||||||
|
|
||||||
|
In Node.js/io.js:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var methodOf = require('lodash.methodof');
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [documentation](https://lodash.com/docs#methodOf) or [package source](https://github.com/lodash/lodash/blob/3.7.0-npm-packages/lodash.methodof) for more details.
|
||||||
40
lodash.methodof/index.js
Normal file
40
lodash.methodof/index.js
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* lodash 3.7.0 (Custom Build) <https://lodash.com/>
|
||||||
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
|
* Available under MIT license <https://lodash.com/license>
|
||||||
|
*/
|
||||||
|
var invokePath = require('lodash._invokepath'),
|
||||||
|
restParam = require('lodash.restparam');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The opposite of `_.method`; this method creates a function that invokes
|
||||||
|
* the method at a given path on `object`. Any additional arguments are
|
||||||
|
* provided to the invoked method.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Utility
|
||||||
|
* @param {Object} object The object to query.
|
||||||
|
* @param {...*} [args] The arguments to invoke the method with.
|
||||||
|
* @returns {Function} Returns the new function.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* var array = _.times(3, _.constant),
|
||||||
|
* object = { 'a': array, 'b': array, 'c': array };
|
||||||
|
*
|
||||||
|
* _.map(['a[2]', 'c[0]'], _.methodOf(object));
|
||||||
|
* // => [2, 0]
|
||||||
|
*
|
||||||
|
* _.map([['a', '2'], ['c', '0']], _.methodOf(object));
|
||||||
|
* // => [2, 0]
|
||||||
|
*/
|
||||||
|
var methodOf = restParam(function(object, args) {
|
||||||
|
return function(path) {
|
||||||
|
return invokePath(object, path, args);
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exports = methodOf;
|
||||||
23
lodash.methodof/package.json
Normal file
23
lodash.methodof/package.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"name": "lodash.methodof",
|
||||||
|
"version": "3.7.0",
|
||||||
|
"description": "The modern build of lodash’s `_.methodOf` as a module.",
|
||||||
|
"homepage": "https://lodash.com/",
|
||||||
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
"license": "MIT",
|
||||||
|
"keywords": "lodash, lodash-modularized, stdlib, util",
|
||||||
|
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"contributors": [
|
||||||
|
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
|
||||||
|
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
|
||||||
|
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
||||||
|
"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._invokepath": "^3.0.0",
|
||||||
|
"lodash.restparam": "^3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
22
lodash.min/LICENSE
Normal file
22
lodash.min/LICENSE
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
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
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash.min v3.3.1
|
# lodash.min v3.4.0
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.min` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.min` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var min = require('lodash.min');
|
var min = require('lodash.min');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [documentation](https://lodash.com/docs#min) or [package source](https://github.com/lodash/lodash/blob/3.3.1-npm-packages/lodash.min) for more details.
|
See the [documentation](https://lodash.com/docs#min) or [package source](https://github.com/lodash/lodash/blob/3.4.0-npm-packages/lodash.min) for more details.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.3.1 (Custom Build) <https://lodash.com/>
|
* lodash 3.4.0 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
@@ -10,6 +10,7 @@ var baseCallback = require('lodash._basecallback'),
|
|||||||
baseEach = require('lodash._baseeach'),
|
baseEach = require('lodash._baseeach'),
|
||||||
isIterateeCall = require('lodash._isiterateecall'),
|
isIterateeCall = require('lodash._isiterateecall'),
|
||||||
toIterable = require('lodash._toiterable'),
|
toIterable = require('lodash._toiterable'),
|
||||||
|
isArray = require('lodash.isarray'),
|
||||||
lt = require('lodash.lt');
|
lt = require('lodash.lt');
|
||||||
|
|
||||||
/** Used as references for `-Infinity` and `Infinity`. */
|
/** Used as references for `-Infinity` and `Infinity`. */
|
||||||
@@ -81,11 +82,11 @@ function baseExtremum(collection, iteratee, comparator, exValue) {
|
|||||||
function createExtremum(comparator, exValue) {
|
function createExtremum(comparator, exValue) {
|
||||||
return function(collection, iteratee, thisArg) {
|
return function(collection, iteratee, thisArg) {
|
||||||
if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
|
if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
|
||||||
iteratee = null;
|
iteratee = undefined;
|
||||||
}
|
}
|
||||||
iteratee = baseCallback(iteratee, thisArg, 3);
|
iteratee = baseCallback(iteratee, thisArg, 3);
|
||||||
if (iteratee.length == 1) {
|
if (iteratee.length == 1) {
|
||||||
collection = toIterable(collection);
|
collection = isArray(collection) ? collection : toIterable(collection);
|
||||||
var result = arrayExtremum(collection, iteratee, comparator, exValue);
|
var result = arrayExtremum(collection, iteratee, comparator, exValue);
|
||||||
if (!(collection.length && result === exValue)) {
|
if (!(collection.length && result === exValue)) {
|
||||||
return result;
|
return result;
|
||||||
@@ -97,7 +98,7 @@ function createExtremum(comparator, exValue) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the minimum value of `collection`. If `collection` is empty or falsey
|
* Gets the minimum value of `collection`. If `collection` is empty or falsey
|
||||||
* `Infinity` is returned. If an iteratee function is provided it is invoked
|
* `Infinity` is returned. If an iteratee function is provided it's invoked
|
||||||
* for each value in `collection` to generate the criterion by which the value
|
* for each value in `collection` to generate the criterion by which the value
|
||||||
* is ranked. The `iteratee` is bound to `thisArg` and invoked with three
|
* is ranked. The `iteratee` is bound to `thisArg` and invoked with three
|
||||||
* arguments: (value, index, collection).
|
* arguments: (value, index, collection).
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash.min",
|
"name": "lodash.min",
|
||||||
"version": "3.3.1",
|
"version": "3.4.0",
|
||||||
"description": "The modern build of lodash’s `_.min` as a module.",
|
"description": "The modern build of lodash’s `_.min` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
@@ -21,6 +21,7 @@
|
|||||||
"lodash._baseeach": "^3.0.0",
|
"lodash._baseeach": "^3.0.0",
|
||||||
"lodash._isiterateecall": "^3.0.0",
|
"lodash._isiterateecall": "^3.0.0",
|
||||||
"lodash._toiterable": "^3.0.0",
|
"lodash._toiterable": "^3.0.0",
|
||||||
|
"lodash.isarray": "^3.0.0",
|
||||||
"lodash.keys": "^3.0.0",
|
"lodash.keys": "^3.0.0",
|
||||||
"lodash.lt": "^3.0.0"
|
"lodash.lt": "^3.0.0"
|
||||||
}
|
}
|
||||||
|
|||||||
22
lodash.restparam/LICENSE.txt
Normal file
22
lodash.restparam/LICENSE.txt
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
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
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
20
lodash.restparam/README.md
Normal file
20
lodash.restparam/README.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# lodash.restparam v3.6.1
|
||||||
|
|
||||||
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.restParam` 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.restparam
|
||||||
|
```
|
||||||
|
|
||||||
|
In Node.js/io.js:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var restParam = require('lodash.restparam');
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [documentation](https://lodash.com/docs#restParam) or [package source](https://github.com/lodash/lodash/blob/3.6.1-npm-packages/lodash.restparam) for more details.
|
||||||
67
lodash.restparam/index.js
Normal file
67
lodash.restparam/index.js
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
/**
|
||||||
|
* lodash 3.6.1 (Custom Build) <https://lodash.com/>
|
||||||
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
|
* Available under MIT license <https://lodash.com/license>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** 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. */
|
||||||
|
var nativeMax = Math.max;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a function that invokes `func` with the `this` binding of the
|
||||||
|
* created function and arguments from `start` and beyond provided as an array.
|
||||||
|
*
|
||||||
|
* **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters).
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Function
|
||||||
|
* @param {Function} func The function to apply a rest parameter to.
|
||||||
|
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
||||||
|
* @returns {Function} Returns the new function.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* var say = _.restParam(function(what, names) {
|
||||||
|
* return what + ' ' + _.initial(names).join(', ') +
|
||||||
|
* (_.size(names) > 1 ? ', & ' : '') + _.last(names);
|
||||||
|
* });
|
||||||
|
*
|
||||||
|
* say('hello', 'fred', 'barney', 'pebbles');
|
||||||
|
* // => 'hello fred, barney, & pebbles'
|
||||||
|
*/
|
||||||
|
function restParam(func, start) {
|
||||||
|
if (typeof func != 'function') {
|
||||||
|
throw new TypeError(FUNC_ERROR_TEXT);
|
||||||
|
}
|
||||||
|
start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);
|
||||||
|
return function() {
|
||||||
|
var args = arguments,
|
||||||
|
index = -1,
|
||||||
|
length = nativeMax(args.length - start, 0),
|
||||||
|
rest = Array(length);
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
rest[index] = args[start + index];
|
||||||
|
}
|
||||||
|
switch (start) {
|
||||||
|
case 0: return func.call(this, rest);
|
||||||
|
case 1: return func.call(this, args[0], rest);
|
||||||
|
case 2: return func.call(this, args[0], args[1], rest);
|
||||||
|
}
|
||||||
|
var otherArgs = Array(start + 1);
|
||||||
|
index = -1;
|
||||||
|
while (++index < start) {
|
||||||
|
otherArgs[index] = args[index];
|
||||||
|
}
|
||||||
|
otherArgs[start] = rest;
|
||||||
|
return func.apply(this, otherArgs);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = restParam;
|
||||||
19
lodash.restparam/package.json
Normal file
19
lodash.restparam/package.json
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"name": "lodash.restparam",
|
||||||
|
"version": "3.6.1",
|
||||||
|
"description": "The modern build of lodash’s `_.restParam` as a module.",
|
||||||
|
"homepage": "https://lodash.com/",
|
||||||
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
"license": "MIT",
|
||||||
|
"keywords": "lodash, lodash-modularized, stdlib, util",
|
||||||
|
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"contributors": [
|
||||||
|
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
|
||||||
|
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
|
||||||
|
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
||||||
|
"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.\"" }
|
||||||
|
}
|
||||||
22
lodash.set/LICENSE.txt
Normal file
22
lodash.set/LICENSE.txt
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
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
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
20
lodash.set/README.md
Normal file
20
lodash.set/README.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# lodash.set v3.7.4
|
||||||
|
|
||||||
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.set` 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.set
|
||||||
|
```
|
||||||
|
|
||||||
|
In Node.js/io.js:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var set = require('lodash.set');
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [documentation](https://lodash.com/docs#set) or [package source](https://github.com/lodash/lodash/blob/3.7.4-npm-packages/lodash.set) for more details.
|
||||||
146
lodash.set/index.js
Normal file
146
lodash.set/index.js
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
/**
|
||||||
|
* lodash 3.7.4 (Custom Build) <https://lodash.com/>
|
||||||
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
|
* Available under MIT license <https://lodash.com/license>
|
||||||
|
*/
|
||||||
|
var toPath = require('lodash._topath'),
|
||||||
|
isArray = require('lodash.isarray');
|
||||||
|
|
||||||
|
/** Used to match property names within property paths. */
|
||||||
|
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,
|
||||||
|
reIsPlainProp = /^\w*$/;
|
||||||
|
|
||||||
|
/** Used to detect unsigned integer values. */
|
||||||
|
var reIsUint = /^\d+$/;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
|
||||||
|
* of an array-like value.
|
||||||
|
*/
|
||||||
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is a valid array-like index.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
||||||
|
*/
|
||||||
|
function isIndex(value, length) {
|
||||||
|
value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
|
||||||
|
length = length == null ? MAX_SAFE_INTEGER : length;
|
||||||
|
return value > -1 && value % 1 == 0 && value < length;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is a property name and not a property path.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @param {Object} [object] The object to query keys on.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
||||||
|
*/
|
||||||
|
function isKey(value, object) {
|
||||||
|
var type = typeof value;
|
||||||
|
if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (isArray(value)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var result = !reIsDeepProp.test(value);
|
||||||
|
return result || (object != null && value in toObject(object));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts `value` to an object if it's not one.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to process.
|
||||||
|
* @returns {Object} Returns the object.
|
||||||
|
*/
|
||||||
|
function toObject(value) {
|
||||||
|
return isObject(value) ? value : Object(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
||||||
|
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Lang
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.isObject({});
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject([1, 2, 3]);
|
||||||
|
* // => true
|
||||||
|
*
|
||||||
|
* _.isObject(1);
|
||||||
|
* // => false
|
||||||
|
*/
|
||||||
|
function isObject(value) {
|
||||||
|
// Avoid a V8 JIT bug in Chrome 19-20.
|
||||||
|
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
||||||
|
var type = typeof value;
|
||||||
|
return !!value && (type == 'object' || type == 'function');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the property value of `path` on `object`. If a portion of `path`
|
||||||
|
* does not exist it's created.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Object
|
||||||
|
* @param {Object} object The object to augment.
|
||||||
|
* @param {Array|string} path The path of the property to set.
|
||||||
|
* @param {*} value The value to set.
|
||||||
|
* @returns {Object} Returns `object`.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
||||||
|
*
|
||||||
|
* _.set(object, 'a[0].b.c', 4);
|
||||||
|
* console.log(object.a[0].b.c);
|
||||||
|
* // => 4
|
||||||
|
*
|
||||||
|
* _.set(object, 'x[0].y.z', 5);
|
||||||
|
* console.log(object.x[0].y.z);
|
||||||
|
* // => 5
|
||||||
|
*/
|
||||||
|
function set(object, path, value) {
|
||||||
|
if (object == null) {
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
var pathKey = (path + '');
|
||||||
|
path = (object[pathKey] != null || isKey(path, object)) ? [pathKey] : toPath(path);
|
||||||
|
|
||||||
|
var index = -1,
|
||||||
|
length = path.length,
|
||||||
|
lastIndex = length - 1,
|
||||||
|
nested = object;
|
||||||
|
|
||||||
|
while (nested != null && ++index < length) {
|
||||||
|
var key = path[index];
|
||||||
|
if (isObject(nested)) {
|
||||||
|
if (index == lastIndex) {
|
||||||
|
nested[key] = value;
|
||||||
|
} else if (nested[key] == null) {
|
||||||
|
nested[key] = isIndex(path[index + 1]) ? [] : {};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
nested = nested[key];
|
||||||
|
}
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = set;
|
||||||
23
lodash.set/package.json
Normal file
23
lodash.set/package.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"name": "lodash.set",
|
||||||
|
"version": "3.7.4",
|
||||||
|
"description": "The modern build of lodash’s `_.set` as a module.",
|
||||||
|
"homepage": "https://lodash.com/",
|
||||||
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
"license": "MIT",
|
||||||
|
"keywords": "lodash, lodash-modularized, stdlib, util",
|
||||||
|
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"contributors": [
|
||||||
|
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
|
||||||
|
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
|
||||||
|
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
||||||
|
"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._topath": "^3.0.0",
|
||||||
|
"lodash.isarray": "^3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
22
lodash.sortbyorder/LICENSE
Normal file
22
lodash.sortbyorder/LICENSE
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
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
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
20
lodash.sortbyorder/README.md
Normal file
20
lodash.sortbyorder/README.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# lodash.sortbyorder v3.4.4
|
||||||
|
|
||||||
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.sortByOrder` 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.sortbyorder
|
||||||
|
```
|
||||||
|
|
||||||
|
In Node.js/io.js:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var sortByOrder = require('lodash.sortbyorder');
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [documentation](https://lodash.com/docs#sortByOrder) or [package source](https://github.com/lodash/lodash/blob/3.4.4-npm-packages/lodash.sortbyorder) for more details.
|
||||||
63
lodash.sortbyorder/index.js
Normal file
63
lodash.sortbyorder/index.js
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
/**
|
||||||
|
* lodash 3.4.4 (Custom Build) <https://lodash.com/>
|
||||||
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
|
* Available under MIT license <https://lodash.com/license>
|
||||||
|
*/
|
||||||
|
var baseSortByOrder = require('lodash._basesortbyorder'),
|
||||||
|
isIterateeCall = require('lodash._isiterateecall'),
|
||||||
|
isArray = require('lodash.isarray');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is like `_.sortByAll` except that it allows specifying the
|
||||||
|
* sort orders of the iteratees to sort by. If `orders` is unspecified, all
|
||||||
|
* values are sorted in ascending order. Otherwise, a value is sorted in
|
||||||
|
* ascending order if its corresponding order is "asc", and descending if "desc".
|
||||||
|
*
|
||||||
|
* If a property name is provided for an iteratee the created `_.property`
|
||||||
|
* style callback returns the property value of the given element.
|
||||||
|
*
|
||||||
|
* If an object is provided for an iteratee the created `_.matches` style
|
||||||
|
* callback returns `true` for elements that have the properties of the given
|
||||||
|
* object, else `false`.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Collection
|
||||||
|
* @param {Array|Object|string} collection The collection to iterate over.
|
||||||
|
* @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
|
||||||
|
* @param {boolean[]} [orders] The sort orders of `iteratees`.
|
||||||
|
* @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`.
|
||||||
|
* @returns {Array} Returns the new sorted array.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* var users = [
|
||||||
|
* { 'user': 'fred', 'age': 48 },
|
||||||
|
* { 'user': 'barney', 'age': 34 },
|
||||||
|
* { 'user': 'fred', 'age': 42 },
|
||||||
|
* { 'user': 'barney', 'age': 36 }
|
||||||
|
* ];
|
||||||
|
*
|
||||||
|
* // sort by `user` in ascending order and by `age` in descending order
|
||||||
|
* _.map(_.sortByOrder(users, ['user', 'age'], ['asc', 'desc']), _.values);
|
||||||
|
* // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
|
||||||
|
*/
|
||||||
|
function sortByOrder(collection, iteratees, orders, guard) {
|
||||||
|
if (collection == null) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
if (guard && isIterateeCall(iteratees, orders, guard)) {
|
||||||
|
orders = undefined;
|
||||||
|
}
|
||||||
|
if (!isArray(iteratees)) {
|
||||||
|
iteratees = iteratees == null ? [] : [iteratees];
|
||||||
|
}
|
||||||
|
if (!isArray(orders)) {
|
||||||
|
orders = orders == null ? [] : [orders];
|
||||||
|
}
|
||||||
|
return baseSortByOrder(collection, iteratees, orders);
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = sortByOrder;
|
||||||
25
lodash.sortbyorder/package.json
Normal file
25
lodash.sortbyorder/package.json
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"name": "lodash.sortbyorder",
|
||||||
|
"version": "3.4.4",
|
||||||
|
"description": "The modern build of lodash’s `_.sortByOrder` as a module.",
|
||||||
|
"homepage": "https://lodash.com/",
|
||||||
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
"license": "MIT",
|
||||||
|
"keywords": "lodash, lodash-modularized, stdlib, util",
|
||||||
|
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"contributors": [
|
||||||
|
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
|
||||||
|
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
|
||||||
|
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
||||||
|
"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._baseeach": "^3.0.0",
|
||||||
|
"lodash._basesortbyorder": "^3.0.0",
|
||||||
|
"lodash._isiterateecall": "^3.0.0",
|
||||||
|
"lodash.isarray": "^3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
22
lodash.sum/LICENSE
Normal file
22
lodash.sum/LICENSE
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
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
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
20
lodash.sum/README.md
Normal file
20
lodash.sum/README.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# lodash.sum v3.6.2
|
||||||
|
|
||||||
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.sum` 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.sum
|
||||||
|
```
|
||||||
|
|
||||||
|
In Node.js/io.js:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var sum = require('lodash.sum');
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [documentation](https://lodash.com/docs#sum) or [package source](https://github.com/lodash/lodash/blob/3.6.2-npm-packages/lodash.sum) for more details.
|
||||||
93
lodash.sum/index.js
Normal file
93
lodash.sum/index.js
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
/**
|
||||||
|
* lodash 3.6.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 baseCallback = require('lodash._basecallback'),
|
||||||
|
baseEach = require('lodash._baseeach'),
|
||||||
|
isIterateeCall = require('lodash._isiterateecall'),
|
||||||
|
toIterable = require('lodash._toiterable'),
|
||||||
|
isArray = require('lodash.isarray');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A specialized version of `_.sum` for arrays without support for callback
|
||||||
|
* shorthands and `this` binding..
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to iterate over.
|
||||||
|
* @param {Function} iteratee The function invoked per iteration.
|
||||||
|
* @returns {number} Returns the sum.
|
||||||
|
*/
|
||||||
|
function arraySum(array, iteratee) {
|
||||||
|
var length = array.length,
|
||||||
|
result = 0;
|
||||||
|
|
||||||
|
while (length--) {
|
||||||
|
result += +iteratee(array[length]) || 0;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.sum` without support for callback shorthands
|
||||||
|
* and `this` binding.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array|Object|string} collection The collection to iterate over.
|
||||||
|
* @param {Function} iteratee The function invoked per iteration.
|
||||||
|
* @returns {number} Returns the sum.
|
||||||
|
*/
|
||||||
|
function baseSum(collection, iteratee) {
|
||||||
|
var result = 0;
|
||||||
|
baseEach(collection, function(value, index, collection) {
|
||||||
|
result += +iteratee(value, index, collection) || 0;
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the sum of the values in `collection`.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Math
|
||||||
|
* @param {Array|Object|string} collection The collection to iterate over.
|
||||||
|
* @param {Function|Object|string} [iteratee] The function invoked per iteration.
|
||||||
|
* @param {*} [thisArg] The `this` binding of `iteratee`.
|
||||||
|
* @returns {number} Returns the sum.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.sum([4, 6]);
|
||||||
|
* // => 10
|
||||||
|
*
|
||||||
|
* _.sum({ 'a': 4, 'b': 6 });
|
||||||
|
* // => 10
|
||||||
|
*
|
||||||
|
* var objects = [
|
||||||
|
* { 'n': 4 },
|
||||||
|
* { 'n': 6 }
|
||||||
|
* ];
|
||||||
|
*
|
||||||
|
* _.sum(objects, function(object) {
|
||||||
|
* return object.n;
|
||||||
|
* });
|
||||||
|
* // => 10
|
||||||
|
*
|
||||||
|
* // using the `_.property` callback shorthand
|
||||||
|
* _.sum(objects, 'n');
|
||||||
|
* // => 10
|
||||||
|
*/
|
||||||
|
function sum(collection, iteratee, thisArg) {
|
||||||
|
if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
|
||||||
|
iteratee = undefined;
|
||||||
|
}
|
||||||
|
iteratee = baseCallback(iteratee, thisArg, 3);
|
||||||
|
return iteratee.length == 1
|
||||||
|
? arraySum(isArray(collection) ? collection : toIterable(collection), iteratee)
|
||||||
|
: baseSum(collection, iteratee);
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = sum;
|
||||||
27
lodash.sum/package.json
Normal file
27
lodash.sum/package.json
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"name": "lodash.sum",
|
||||||
|
"version": "3.6.2",
|
||||||
|
"description": "The modern build of lodash’s `_.sum` as a module.",
|
||||||
|
"homepage": "https://lodash.com/",
|
||||||
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
"license": "MIT",
|
||||||
|
"keywords": "lodash, lodash-modularized, stdlib, util",
|
||||||
|
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"contributors": [
|
||||||
|
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
|
||||||
|
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
|
||||||
|
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
||||||
|
"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._basecallback": "^3.0.0",
|
||||||
|
"lodash._baseeach": "^3.0.0",
|
||||||
|
"lodash._isiterateecall": "^3.0.0",
|
||||||
|
"lodash._toiterable": "^3.0.0",
|
||||||
|
"lodash.isarray": "^3.0.0",
|
||||||
|
"lodash.keys": "^3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
22
lodash.template/LICENSE
Normal file
22
lodash.template/LICENSE
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
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
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash.template v3.3.2
|
# lodash.template v3.6.2
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.template` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.template` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var template = require('lodash.template');
|
var template = require('lodash.template');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [documentation](https://lodash.com/docs#template) or [package source](https://github.com/lodash/lodash/blob/3.3.2-npm-packages/lodash.template) for more details.
|
See the [documentation](https://lodash.com/docs#template) or [package source](https://github.com/lodash/lodash/blob/3.6.2-npm-packages/lodash.template) for more details.
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.3.2 (Custom Build) <https://lodash.com/>
|
* lodash 3.6.2 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <https://lodash.com/license>
|
* Available under MIT license <https://lodash.com/license>
|
||||||
*/
|
*/
|
||||||
@@ -11,8 +11,8 @@ var baseCopy = require('lodash._basecopy'),
|
|||||||
baseValues = require('lodash._basevalues'),
|
baseValues = require('lodash._basevalues'),
|
||||||
isIterateeCall = require('lodash._isiterateecall'),
|
isIterateeCall = require('lodash._isiterateecall'),
|
||||||
reInterpolate = require('lodash._reinterpolate'),
|
reInterpolate = require('lodash._reinterpolate'),
|
||||||
escape = require('lodash.escape'),
|
|
||||||
keys = require('lodash.keys'),
|
keys = require('lodash.keys'),
|
||||||
|
restParam = require('lodash.restparam'),
|
||||||
templateSettings = require('lodash.templatesettings');
|
templateSettings = require('lodash.templatesettings');
|
||||||
|
|
||||||
/** `Object#toString` result references. */
|
/** `Object#toString` result references. */
|
||||||
@@ -23,11 +23,7 @@ var reEmptyStringLeading = /\b__p \+= '';/g,
|
|||||||
reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
|
reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
|
||||||
reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
|
reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
|
||||||
|
|
||||||
/**
|
/** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */
|
||||||
* Used to match ES template delimiters.
|
|
||||||
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components)
|
|
||||||
* for more details.
|
|
||||||
*/
|
|
||||||
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
|
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
|
||||||
|
|
||||||
/** Used to ensure capturing order of template delimiters. */
|
/** Used to ensure capturing order of template delimiters. */
|
||||||
@@ -47,8 +43,7 @@ var stringEscapes = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used by `_.template` to escape characters for inclusion in compiled
|
* Used by `_.template` to escape characters for inclusion in compiled string literals.
|
||||||
* string literals.
|
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {string} chr The matched character to escape.
|
* @param {string} chr The matched character to escape.
|
||||||
@@ -66,7 +61,7 @@ function escapeStringChar(chr) {
|
|||||||
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
||||||
*/
|
*/
|
||||||
function isObjectLike(value) {
|
function isObjectLike(value) {
|
||||||
return (value && typeof value == 'object') || false;
|
return !!value && typeof value == 'object';
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Used for native method references. */
|
/** Used for native method references. */
|
||||||
@@ -76,16 +71,15 @@ var objectProto = Object.prototype;
|
|||||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to resolve the `toStringTag` of values.
|
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||||
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
|
* of values.
|
||||||
* for more details.
|
|
||||||
*/
|
*/
|
||||||
var objToString = objectProto.toString;
|
var objToString = objectProto.toString;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used by `_.template` to customize its `_.assign` use.
|
* Used by `_.template` to customize its `_.assign` use.
|
||||||
*
|
*
|
||||||
* **Note:** This method is like `assignDefaults` except that it ignores
|
* **Note:** This function is like `assignDefaults` except that it ignores
|
||||||
* inherited property values when checking if a property is `undefined`.
|
* inherited property values when checking if a property is `undefined`.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
@@ -96,27 +90,25 @@ var objToString = objectProto.toString;
|
|||||||
* @returns {*} Returns the value to assign to the destination object.
|
* @returns {*} Returns the value to assign to the destination object.
|
||||||
*/
|
*/
|
||||||
function assignOwnDefaults(objectValue, sourceValue, key, object) {
|
function assignOwnDefaults(objectValue, sourceValue, key, object) {
|
||||||
return (typeof objectValue == 'undefined' || !hasOwnProperty.call(object, key))
|
return (objectValue === undefined || !hasOwnProperty.call(object, key))
|
||||||
? sourceValue
|
? sourceValue
|
||||||
: objectValue;
|
: objectValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.assign` without support for argument juggling,
|
* A specialized version of `_.assign` for customizing assigned values without
|
||||||
* multiple sources, and `this` binding `customizer` functions.
|
* support for argument juggling, multiple sources, and `this` binding `customizer`
|
||||||
|
* functions.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Object} object The destination object.
|
* @param {Object} object The destination object.
|
||||||
* @param {Object} source The source object.
|
* @param {Object} source The source object.
|
||||||
* @param {Function} [customizer] The function to customize assigning values.
|
* @param {Function} customizer The function to customize assigned values.
|
||||||
* @returns {Object} Returns the destination object.
|
* @returns {Object} Returns `object`.
|
||||||
*/
|
*/
|
||||||
function baseAssign(object, source, customizer) {
|
function assignWith(object, source, customizer) {
|
||||||
var props = keys(source);
|
|
||||||
if (!customizer) {
|
|
||||||
return baseCopy(source, object, props);
|
|
||||||
}
|
|
||||||
var index = -1,
|
var index = -1,
|
||||||
|
props = keys(source),
|
||||||
length = props.length;
|
length = props.length;
|
||||||
|
|
||||||
while (++index < length) {
|
while (++index < length) {
|
||||||
@@ -125,13 +117,28 @@ function baseAssign(object, source, customizer) {
|
|||||||
result = customizer(value, source[key], key, object, source);
|
result = customizer(value, source[key], key, object, source);
|
||||||
|
|
||||||
if ((result === result ? (result !== value) : (value === value)) ||
|
if ((result === result ? (result !== value) : (value === value)) ||
|
||||||
(typeof value == 'undefined' && !(key in object))) {
|
(value === undefined && !(key in object))) {
|
||||||
object[key] = result;
|
object[key] = result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.assign` without support for argument juggling,
|
||||||
|
* multiple sources, and `customizer` functions.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The destination object.
|
||||||
|
* @param {Object} source The source object.
|
||||||
|
* @returns {Object} Returns `object`.
|
||||||
|
*/
|
||||||
|
function baseAssign(object, source) {
|
||||||
|
return source == null
|
||||||
|
? object
|
||||||
|
: baseCopy(source, keys(source), object);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
|
* Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
|
||||||
* `SyntaxError`, `TypeError`, or `URIError` object.
|
* `SyntaxError`, `TypeError`, or `URIError` object.
|
||||||
@@ -150,7 +157,7 @@ function baseAssign(object, source, customizer) {
|
|||||||
* // => false
|
* // => false
|
||||||
*/
|
*/
|
||||||
function isError(value) {
|
function isError(value) {
|
||||||
return (isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag) || false;
|
return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -160,9 +167,9 @@ function isError(value) {
|
|||||||
* properties may be accessed as free variables in the template. If a setting
|
* properties may be accessed as free variables in the template. If a setting
|
||||||
* object is provided it takes precedence over `_.templateSettings` values.
|
* object is provided it takes precedence over `_.templateSettings` values.
|
||||||
*
|
*
|
||||||
* **Note:** In the development build `_.template` utilizes sourceURLs for easier debugging.
|
* **Note:** In the development build `_.template` utilizes
|
||||||
* See the [HTML5 Rocks article on sourcemaps](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
|
* [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
|
||||||
* for more details.
|
* for easier debugging.
|
||||||
*
|
*
|
||||||
* For more information on precompiling templates see
|
* For more information on precompiling templates see
|
||||||
* [lodash's custom builds documentation](https://lodash.com/custom-builds).
|
* [lodash's custom builds documentation](https://lodash.com/custom-builds).
|
||||||
@@ -255,12 +262,12 @@ function template(string, options, otherOptions) {
|
|||||||
var settings = templateSettings.imports._.templateSettings || templateSettings;
|
var settings = templateSettings.imports._.templateSettings || templateSettings;
|
||||||
|
|
||||||
if (otherOptions && isIterateeCall(string, options, otherOptions)) {
|
if (otherOptions && isIterateeCall(string, options, otherOptions)) {
|
||||||
options = otherOptions = null;
|
options = otherOptions = undefined;
|
||||||
}
|
}
|
||||||
string = baseToString(string);
|
string = baseToString(string);
|
||||||
options = baseAssign(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
|
options = assignWith(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
|
||||||
|
|
||||||
var imports = baseAssign(baseAssign({}, options.imports), settings.imports, assignOwnDefaults),
|
var imports = assignWith(baseAssign({}, options.imports), settings.imports, assignOwnDefaults),
|
||||||
importsKeys = keys(imports),
|
importsKeys = keys(imports),
|
||||||
importsValues = baseValues(imports, importsKeys);
|
importsValues = baseValues(imports, importsKeys);
|
||||||
|
|
||||||
@@ -353,12 +360,12 @@ function template(string, options, otherOptions) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempts to invoke `func`, returning either the result or the caught error
|
* Attempts to invoke `func`, returning either the result or the caught error
|
||||||
* object. Any additional arguments are provided to `func` when it is invoked.
|
* object. Any additional arguments are provided to `func` when it's invoked.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Utility
|
* @category Utility
|
||||||
* @param {*} func The function to attempt.
|
* @param {Function} func The function to attempt.
|
||||||
* @returns {*} Returns the `func` result or error object.
|
* @returns {*} Returns the `func` result or error object.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
@@ -371,19 +378,12 @@ function template(string, options, otherOptions) {
|
|||||||
* elements = [];
|
* elements = [];
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
function attempt() {
|
var attempt = restParam(function(func, args) {
|
||||||
var func = arguments[0],
|
|
||||||
length = arguments.length,
|
|
||||||
args = Array(length ? (length - 1) : 0);
|
|
||||||
|
|
||||||
while (--length > 0) {
|
|
||||||
args[length - 1] = arguments[length];
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
return func.apply(undefined, args);
|
return func.apply(undefined, args);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
return isError(e) ? e : new Error(e);
|
return isError(e) ? e : new Error(e);
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
module.exports = template;
|
module.exports = template;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash.template",
|
"name": "lodash.template",
|
||||||
"version": "3.3.2",
|
"version": "3.6.2",
|
||||||
"description": "The modern build of lodash’s `_.template` as a module.",
|
"description": "The modern build of lodash’s `_.template` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
"lodash._reinterpolate": "^3.0.0",
|
"lodash._reinterpolate": "^3.0.0",
|
||||||
"lodash.escape": "^3.0.0",
|
"lodash.escape": "^3.0.0",
|
||||||
"lodash.keys": "^3.0.0",
|
"lodash.keys": "^3.0.0",
|
||||||
|
"lodash.restparam": "^3.0.0",
|
||||||
"lodash.templatesettings": "^3.0.0"
|
"lodash.templatesettings": "^3.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash.unzip v3.3.2
|
# lodash.unzip v3.4.0
|
||||||
|
|
||||||
The [lodash](https://lodash.com/) method `_.unzip` exported as a [Node.js](https://nodejs.org/) module.
|
The [lodash](https://lodash.com/) method `_.unzip` exported as a [Node.js](https://nodejs.org/) module.
|
||||||
|
|
||||||
@@ -15,4 +15,4 @@ In Node.js:
|
|||||||
var unzip = require('lodash.unzip');
|
var unzip = require('lodash.unzip');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [documentation](https://lodash.com/docs#unzip) or [package source](https://github.com/lodash/lodash/blob/3.3.2-npm-packages/lodash.unzip) for more details.
|
See the [documentation](https://lodash.com/docs#unzip) or [package source](https://github.com/lodash/lodash/blob/3.4.0-npm-packages/lodash.unzip) for more details.
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ var objectProto = Object.prototype;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to resolve the
|
* Used to resolve the
|
||||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||||
* of values.
|
* of values.
|
||||||
*/
|
*/
|
||||||
var objectToString = objectProto.toString;
|
var objectToString = objectProto.toString;
|
||||||
@@ -103,19 +103,6 @@ var objectToString = objectProto.toString;
|
|||||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||||
var nativeMax = Math.max;
|
var nativeMax = Math.max;
|
||||||
|
|
||||||
/**
|
|
||||||
* 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');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is like `_.zip` except that it accepts an array of grouped
|
* This method is like `_.zip` except that it accepts an array of grouped
|
||||||
* elements and creates an array regrouping the elements to their pre-zip
|
* elements and creates an array regrouping the elements to their pre-zip
|
||||||
@@ -177,7 +164,7 @@ function unzip(array) {
|
|||||||
* // => false
|
* // => false
|
||||||
*/
|
*/
|
||||||
function isArrayLike(value) {
|
function isArrayLike(value) {
|
||||||
return value != null && isLength(getLength(value)) && !isFunction(value);
|
return value != null && isLength(value.length) && !isFunction(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -228,8 +215,7 @@ function isArrayLikeObject(value) {
|
|||||||
*/
|
*/
|
||||||
function isFunction(value) {
|
function isFunction(value) {
|
||||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||||
// in Safari 8 which returns 'object' for typed array and weak map constructors,
|
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
|
||||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||||
return tag == funcTag || tag == genTag;
|
return tag == funcTag || tag == genTag;
|
||||||
}
|
}
|
||||||
@@ -237,16 +223,15 @@ function isFunction(value) {
|
|||||||
/**
|
/**
|
||||||
* Checks if `value` is a valid array-like length.
|
* Checks if `value` is a valid array-like length.
|
||||||
*
|
*
|
||||||
* **Note:** This function is loosely based on
|
* **Note:** This method is loosely based on
|
||||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @since 4.0.0
|
* @since 4.0.0
|
||||||
* @category Lang
|
* @category Lang
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if `value` is a valid length,
|
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||||
* else `false`.
|
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.isLength(3);
|
* _.isLength(3);
|
||||||
@@ -268,7 +253,7 @@ function isLength(value) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if `value` is the
|
* Checks if `value` is the
|
||||||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash.unzip",
|
"name": "lodash.unzip",
|
||||||
"version": "3.3.2",
|
"version": "3.4.0",
|
||||||
"description": "The lodash method `_.unzip` exported as a module.",
|
"description": "The lodash method `_.unzip` exported as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
|||||||
22
lodash.unzipwith/LICENSE.txt
Normal file
22
lodash.unzipwith/LICENSE.txt
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
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
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
20
lodash.unzipwith/README.md
Normal file
20
lodash.unzipwith/README.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# lodash.unzipwith v3.8.0
|
||||||
|
|
||||||
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.unzipWith` 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.unzipwith
|
||||||
|
```
|
||||||
|
|
||||||
|
In Node.js/io.js:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var unzipWith = require('lodash.unzipwith');
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [documentation](https://lodash.com/docs#unzipWith) or [package source](https://github.com/lodash/lodash/blob/3.8.0-npm-packages/lodash.unzipwith) for more details.
|
||||||
73
lodash.unzipwith/index.js
Normal file
73
lodash.unzipwith/index.js
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
/**
|
||||||
|
* lodash 3.8.0 (Custom Build) <https://lodash.com/>
|
||||||
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
|
* Available under MIT license <https://lodash.com/license>
|
||||||
|
*/
|
||||||
|
var arrayMap = require('lodash._arraymap'),
|
||||||
|
bindCallback = require('lodash._bindcallback'),
|
||||||
|
unzip = require('lodash.unzip');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A specialized version of `_.reduce` for arrays without support for callback
|
||||||
|
* shorthands and `this` binding.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to iterate over.
|
||||||
|
* @param {Function} iteratee The function invoked per iteration.
|
||||||
|
* @param {*} [accumulator] The initial value.
|
||||||
|
* @param {boolean} [initFromArray] Specify using the first element of `array`
|
||||||
|
* as the initial value.
|
||||||
|
* @returns {*} Returns the accumulated value.
|
||||||
|
*/
|
||||||
|
function arrayReduce(array, iteratee, accumulator, initFromArray) {
|
||||||
|
var index = -1,
|
||||||
|
length = array.length;
|
||||||
|
|
||||||
|
if (initFromArray && length) {
|
||||||
|
accumulator = array[++index];
|
||||||
|
}
|
||||||
|
while (++index < length) {
|
||||||
|
accumulator = iteratee(accumulator, array[index], index, array);
|
||||||
|
}
|
||||||
|
return accumulator;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is like `_.unzip` except that it accepts an iteratee to specify
|
||||||
|
* how regrouped values should be combined. The `iteratee` is bound to `thisArg`
|
||||||
|
* and invoked with four arguments: (accumulator, value, index, group).
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Array
|
||||||
|
* @param {Array} array The array of grouped elements to process.
|
||||||
|
* @param {Function} [iteratee] The function to combine regrouped values.
|
||||||
|
* @param {*} [thisArg] The `this` binding of `iteratee`.
|
||||||
|
* @returns {Array} Returns the new array of regrouped elements.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* var zipped = _.zip([1, 2], [10, 20], [100, 200]);
|
||||||
|
* // => [[1, 10, 100], [2, 20, 200]]
|
||||||
|
*
|
||||||
|
* _.unzipWith(zipped, _.add);
|
||||||
|
* // => [3, 30, 300]
|
||||||
|
*/
|
||||||
|
function unzipWith(array, iteratee, thisArg) {
|
||||||
|
var length = array ? array.length : 0;
|
||||||
|
if (!length) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
var result = unzip(array);
|
||||||
|
if (iteratee == null) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
iteratee = bindCallback(iteratee, thisArg, 4);
|
||||||
|
return arrayMap(result, function(group) {
|
||||||
|
return arrayReduce(group, iteratee, undefined, true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = unzipWith;
|
||||||
24
lodash.unzipwith/package.json
Normal file
24
lodash.unzipwith/package.json
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"name": "lodash.unzipwith",
|
||||||
|
"version": "3.8.0",
|
||||||
|
"description": "The modern build of lodash’s `_.unzipWith` as a module.",
|
||||||
|
"homepage": "https://lodash.com/",
|
||||||
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
"license": "MIT",
|
||||||
|
"keywords": "lodash, lodash-modularized, stdlib, util",
|
||||||
|
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"contributors": [
|
||||||
|
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||||
|
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
|
||||||
|
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
|
||||||
|
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
||||||
|
"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._arraymap": "^3.0.0",
|
||||||
|
"lodash._bindcallback": "^3.0.0",
|
||||||
|
"lodash.unzip": "^3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
22
lodash.zipwith/LICENSE.txt
Normal file
22
lodash.zipwith/LICENSE.txt
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
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
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
20
lodash.zipwith/README.md
Normal file
20
lodash.zipwith/README.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# lodash.zipwith v3.8.1
|
||||||
|
|
||||||
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.zipWith` 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.zipwith
|
||||||
|
```
|
||||||
|
|
||||||
|
In Node.js/io.js:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var zipWith = require('lodash.zipwith');
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [documentation](https://lodash.com/docs#zipWith) or [package source](https://github.com/lodash/lodash/blob/3.8.1-npm-packages/lodash.zipwith) for more details.
|
||||||
44
lodash.zipwith/index.js
Normal file
44
lodash.zipwith/index.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
/**
|
||||||
|
* lodash 3.8.1 (Custom Build) <https://lodash.com/>
|
||||||
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
|
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
|
* Available under MIT license <https://lodash.com/license>
|
||||||
|
*/
|
||||||
|
var restParam = require('lodash.restparam'),
|
||||||
|
unzipWith = require('lodash.unzipwith');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is like `_.zip` except that it accepts an iteratee to specify
|
||||||
|
* how grouped values should be combined. The `iteratee` is bound to `thisArg`
|
||||||
|
* and invoked with four arguments: (accumulator, value, index, group).
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @memberOf _
|
||||||
|
* @category Array
|
||||||
|
* @param {...Array} [arrays] The arrays to process.
|
||||||
|
* @param {Function} [iteratee] The function to combine grouped values.
|
||||||
|
* @param {*} [thisArg] The `this` binding of `iteratee`.
|
||||||
|
* @returns {Array} Returns the new array of grouped elements.
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* _.zipWith([1, 2], [10, 20], [100, 200], _.add);
|
||||||
|
* // => [111, 222]
|
||||||
|
*/
|
||||||
|
var zipWith = restParam(function(arrays) {
|
||||||
|
var length = arrays.length,
|
||||||
|
iteratee = length > 2 ? arrays[length - 2] : undefined,
|
||||||
|
thisArg = length > 1 ? arrays[length - 1] : undefined;
|
||||||
|
|
||||||
|
if (length > 2 && typeof iteratee == 'function') {
|
||||||
|
length -= 2;
|
||||||
|
} else {
|
||||||
|
iteratee = (length > 1 && typeof thisArg == 'function') ? (--length, thisArg) : undefined;
|
||||||
|
thisArg = undefined;
|
||||||
|
}
|
||||||
|
arrays.length = length;
|
||||||
|
return unzipWith(arrays, iteratee, thisArg);
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exports = zipWith;
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user