mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 17:47:49 +00:00
Compare commits
7 Commits
3.5.2-npm-
...
3.7.2-npm-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7af5442cff | ||
|
|
b8368d698d | ||
|
|
0aae86c9a2 | ||
|
|
bbc20f983e | ||
|
|
4ed2b24773 | ||
|
|
f1a2ea44f0 | ||
|
|
dbf44fcc0b |
@@ -1,4 +1,4 @@
|
|||||||
# lodash v3.5.2
|
# lodash v3.7.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.\"" }
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash._basesortbyorder v3.5.2
|
# 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.
|
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.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var baseSortByOrder = require('lodash._basesortbyorder');
|
var baseSortByOrder = require('lodash._basesortbyorder');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/3.5.2-npm-packages/lodash._basesortbyorder) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/3.5.3-npm-packages/lodash._basesortbyorder) for more details.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.5.2 (Custom Build) <https://lodash.com/>
|
* lodash 3.5.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>
|
||||||
@@ -13,16 +13,16 @@ var arrayMap = require('lodash._arraymap'),
|
|||||||
baseSortBy = require('lodash._basesortby');
|
baseSortBy = require('lodash._basesortby');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used by `_.sortByOrder` to compare multiple properties of each element
|
* Used by `_.sortByOrder` to compare multiple properties of a value to another
|
||||||
* in a collection and stable sort them in the following order:
|
* and stable sort them.
|
||||||
*
|
*
|
||||||
* If `orders` is unspecified, sort in ascending order for all properties.
|
* If `orders` is unspecified, all valuess are sorted in ascending order. Otherwise,
|
||||||
* Otherwise, for each property, sort in ascending order if its corresponding value in
|
* a value is sorted in ascending order if its corresponding order is "asc", and
|
||||||
* orders is true, and descending order if false.
|
* descending if "desc".
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Object} object The object to compare to `other`.
|
* @param {Object} object The object to compare.
|
||||||
* @param {Object} other The object to compare to `object`.
|
* @param {Object} other The other object to compare.
|
||||||
* @param {boolean[]} orders The order to sort by for each property.
|
* @param {boolean[]} orders The order to sort by for each property.
|
||||||
* @returns {number} Returns the sort order indicator for `object`.
|
* @returns {number} Returns the sort order indicator for `object`.
|
||||||
*/
|
*/
|
||||||
@@ -39,7 +39,8 @@ function compareMultiple(object, other, orders) {
|
|||||||
if (index >= ordersLength) {
|
if (index >= ordersLength) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return result * (orders[index] ? 1 : -1);
|
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
|
// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
|
||||||
@@ -53,7 +54,7 @@ function compareMultiple(object, other, orders) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
|
* Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
|
||||||
* of an array-like value.
|
* of an array-like value.
|
||||||
*/
|
*/
|
||||||
var MAX_SAFE_INTEGER = 9007199254740991;
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||||
@@ -140,7 +141,7 @@ function isArrayLike(value) {
|
|||||||
/**
|
/**
|
||||||
* Checks if `value` is a valid array-like length.
|
* Checks if `value` is a valid array-like length.
|
||||||
*
|
*
|
||||||
* **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
|
* **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._basesortbyorder",
|
"name": "lodash._basesortbyorder",
|
||||||
"version": "3.5.2",
|
"version": "3.5.3",
|
||||||
"description": "The modern build of lodash’s internal `baseSortByOrder` as a module.",
|
"description": "The modern build of lodash’s internal `baseSortByOrder` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
|||||||
20
lodash._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.txt
Normal file
22
lodash._topath/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._topath/README.md
Normal file
20
lodash._topath/README.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# lodash._topath v3.7.0
|
||||||
|
|
||||||
|
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.7.0-npm-packages/lodash._topath) for more details.
|
||||||
36
lodash._topath/index.js
Normal file
36
lodash._topath/index.js
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
/**
|
||||||
|
* 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 baseToString = require('lodash._basetostring'),
|
||||||
|
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 property path array if it is not one.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to process.
|
||||||
|
* @returns {Array} Returns the property path array.
|
||||||
|
*/
|
||||||
|
function toPath(value) {
|
||||||
|
if (isArray(value)) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
var result = [];
|
||||||
|
baseToString(value).replace(rePropName, function(match, number, quote, string) {
|
||||||
|
result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = toPath;
|
||||||
22
lodash._topath/package.json
Normal file
22
lodash._topath/package.json
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"name": "lodash._topath",
|
||||||
|
"version": "3.7.0",
|
||||||
|
"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._basetostring": "^3.0.0",
|
||||||
|
"lodash.isarray": "^3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash.add v3.5.0
|
# lodash.add v3.7.0
|
||||||
|
|
||||||
The [lodash](https://lodash.com/) method `_.add` exported as a [Node.js](https://nodejs.org/) module.
|
The [lodash](https://lodash.com/) method `_.add` exported as a [Node.js](https://nodejs.org/) module.
|
||||||
|
|
||||||
@@ -15,4 +15,4 @@ In Node.js:
|
|||||||
var add = require('lodash.add');
|
var add = require('lodash.add');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [documentation](https://lodash.com/docs#add) or [package source](https://github.com/lodash/lodash/blob/3.5.0-npm-packages/lodash.add) for more details.
|
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.
|
||||||
|
|||||||
@@ -1,26 +1,96 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.5.0 (Custom Build) <https://lodash.com/>
|
* lodash (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modularize exports="npm" -o ./`
|
* Build: `lodash modularize exports="npm" -o ./`
|
||||||
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||||
* Released under MIT license <https://lodash.com/license>
|
* 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 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
*/
|
*/
|
||||||
var baseToNumber = require('lodash._basetonumber'),
|
|
||||||
baseToString = require('lodash._basetostring');
|
/** 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.
|
* Creates a function that performs a mathematical operation on two values.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Function} operator The function to perform the operation.
|
* @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.
|
* @returns {Function} Returns the new mathematical operation function.
|
||||||
*/
|
*/
|
||||||
function createMathOperation(operator) {
|
function createMathOperation(operator, defaultValue) {
|
||||||
return function(value, other) {
|
return function(value, other) {
|
||||||
var result;
|
var result;
|
||||||
if (value === undefined && other === undefined) {
|
if (value === undefined && other === undefined) {
|
||||||
return 0;
|
return defaultValue;
|
||||||
}
|
}
|
||||||
if (value !== undefined) {
|
if (value !== undefined) {
|
||||||
result = value;
|
result = value;
|
||||||
@@ -42,6 +112,56 @@ function createMathOperation(operator) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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.
|
* Adds two numbers.
|
||||||
*
|
*
|
||||||
@@ -59,6 +179,6 @@ function createMathOperation(operator) {
|
|||||||
*/
|
*/
|
||||||
var add = createMathOperation(function(augend, addend) {
|
var add = createMathOperation(function(augend, addend) {
|
||||||
return augend + addend;
|
return augend + addend;
|
||||||
});
|
}, 0);
|
||||||
|
|
||||||
module.exports = add;
|
module.exports = add;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash.add",
|
"name": "lodash.add",
|
||||||
"version": "3.5.0",
|
"version": "3.7.0",
|
||||||
"description": "The lodash method `_.add` exported as a module.",
|
"description": "The lodash method `_.add` 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._basetonumber": "~4.11.0",
|
|
||||||
"lodash._basetostring": "~4.11.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"
|
||||||
|
}
|
||||||
|
}
|
||||||
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.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.2
|
||||||
|
|
||||||
|
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.2-npm-packages/lodash.set) for more details.
|
||||||
143
lodash.set/index.js
Normal file
143
lodash.set/index.js
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
/**
|
||||||
|
* 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 toPath = require('lodash._topath'),
|
||||||
|
isArray = require('lodash.isarray');
|
||||||
|
|
||||||
|
/** Used to match property names within property paths. */
|
||||||
|
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,
|
||||||
|
reIsPlainProp = /^\w*$/;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
|
||||||
|
* of an array-like value.
|
||||||
|
*/
|
||||||
|
var MAX_SAFE_INTEGER = 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' ? value : parseFloat(value);
|
||||||
|
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 is 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,
|
||||||
|
endIndex = length - 1,
|
||||||
|
nested = object;
|
||||||
|
|
||||||
|
while (nested != null && ++index < length) {
|
||||||
|
var key = path[index];
|
||||||
|
if (isObject(nested)) {
|
||||||
|
if (index == endIndex) {
|
||||||
|
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.2",
|
||||||
|
"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.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.
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash.sum v3.5.0
|
# 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.
|
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.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var sum = require('lodash.sum');
|
var sum = require('lodash.sum');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [documentation](https://lodash.com/docs#sum) or [package source](https://github.com/lodash/lodash/blob/3.5.0-npm-packages/lodash.sum) for more details.
|
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.
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.5.0 (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>
|
||||||
*/
|
*/
|
||||||
@@ -13,18 +13,20 @@ var baseCallback = require('lodash._basecallback'),
|
|||||||
isArray = require('lodash.isarray');
|
isArray = require('lodash.isarray');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A specialized version of `_.sum` for arrays without support for iteratees.
|
* A specialized version of `_.sum` for arrays without support for callback
|
||||||
|
* shorthands and `this` binding..
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Array} array The array to iterate over.
|
* @param {Array} array The array to iterate over.
|
||||||
|
* @param {Function} iteratee The function invoked per iteration.
|
||||||
* @returns {number} Returns the sum.
|
* @returns {number} Returns the sum.
|
||||||
*/
|
*/
|
||||||
function arraySum(array) {
|
function arraySum(array, iteratee) {
|
||||||
var length = array.length,
|
var length = array.length,
|
||||||
result = 0;
|
result = 0;
|
||||||
|
|
||||||
while (length--) {
|
while (length--) {
|
||||||
result += +array[length] || 0;
|
result += +iteratee(array[length]) || 0;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -80,13 +82,11 @@ function baseSum(collection, iteratee) {
|
|||||||
*/
|
*/
|
||||||
function sum(collection, iteratee, thisArg) {
|
function sum(collection, iteratee, thisArg) {
|
||||||
if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
|
if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
|
||||||
iteratee = null;
|
iteratee = undefined;
|
||||||
}
|
}
|
||||||
var noIteratee = iteratee == null;
|
iteratee = baseCallback(iteratee, thisArg, 3);
|
||||||
|
return iteratee.length == 1
|
||||||
iteratee = noIteratee ? iteratee : baseCallback(iteratee, thisArg, 3);
|
? arraySum(isArray(collection) ? collection : toIterable(collection), iteratee)
|
||||||
return noIteratee
|
|
||||||
? arraySum(isArray(collection) ? collection : toIterable(collection))
|
|
||||||
: baseSum(collection, iteratee);
|
: baseSum(collection, iteratee);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash.sum",
|
"name": "lodash.sum",
|
||||||
"version": "3.5.0",
|
"version": "3.6.2",
|
||||||
"description": "The modern build of lodash’s `_.sum` as a module.",
|
"description": "The modern build of lodash’s `_.sum` 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.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.5.1
|
# 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.5.1-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,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.5.1 (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.3 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
@@ -11,8 +11,6 @@ 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'),
|
|
||||||
isNative = require('lodash.isnative'),
|
|
||||||
keys = require('lodash.keys'),
|
keys = require('lodash.keys'),
|
||||||
restParam = require('lodash.restparam'),
|
restParam = require('lodash.restparam'),
|
||||||
templateSettings = require('lodash.templatesettings');
|
templateSettings = require('lodash.templatesettings');
|
||||||
@@ -25,7 +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](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components). */
|
/** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */
|
||||||
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
|
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
|
||||||
|
|
||||||
/** Used to ensure capturing order of template delimiters. */
|
/** Used to ensure capturing order of template delimiters. */
|
||||||
@@ -45,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.
|
||||||
@@ -68,22 +65,17 @@ function isObjectLike(value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Used for native method references. */
|
/** Used for native method references. */
|
||||||
var arrayProto = Array.prototype,
|
var objectProto = Object.prototype;
|
||||||
objectProto = Object.prototype;
|
|
||||||
|
|
||||||
/** Used to check objects for own properties. */
|
/** Used to check objects for own properties. */
|
||||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
|
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||||
* of values.
|
* of values.
|
||||||
*/
|
*/
|
||||||
var objToString = objectProto.toString;
|
var objToString = objectProto.toString;
|
||||||
|
|
||||||
/** Native method references. */
|
|
||||||
var getOwnPropertySymbols = isNative(getOwnPropertySymbols = Object.getOwnPropertySymbols) && getOwnPropertySymbols,
|
|
||||||
push = arrayProto.push;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used by `_.template` to customize its `_.assign` use.
|
* Used by `_.template` to customize its `_.assign` use.
|
||||||
*
|
*
|
||||||
@@ -115,10 +107,8 @@ function assignOwnDefaults(objectValue, sourceValue, key, object) {
|
|||||||
* @returns {Object} Returns `object`.
|
* @returns {Object} Returns `object`.
|
||||||
*/
|
*/
|
||||||
function assignWith(object, source, customizer) {
|
function assignWith(object, source, customizer) {
|
||||||
var props = keys(source);
|
|
||||||
push.apply(props, getSymbols(source));
|
|
||||||
|
|
||||||
var index = -1,
|
var index = -1,
|
||||||
|
props = keys(source),
|
||||||
length = props.length;
|
length = props.length;
|
||||||
|
|
||||||
while (++index < length) {
|
while (++index < length) {
|
||||||
@@ -143,32 +133,10 @@ function assignWith(object, source, customizer) {
|
|||||||
* @param {Object} source The source object.
|
* @param {Object} source The source object.
|
||||||
* @returns {Object} Returns `object`.
|
* @returns {Object} Returns `object`.
|
||||||
*/
|
*/
|
||||||
var baseAssign = function(object, source) {
|
function baseAssign(object, source) {
|
||||||
return source == null
|
return source == null
|
||||||
? object
|
? object
|
||||||
: baseCopy(source, getSymbols(source), baseCopy(source, keys(source), object));
|
: baseCopy(source, keys(source), object);
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array of the own symbols of `object`.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {Object} object The object to query.
|
|
||||||
* @returns {Array} Returns the array of symbols.
|
|
||||||
*/
|
|
||||||
var getSymbols = !getOwnPropertySymbols ? constant([]) : function(object) {
|
|
||||||
return getOwnPropertySymbols(toObject(object));
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts `value` to an object if it is not one.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {*} value The value to process.
|
|
||||||
* @returns {Object} Returns the object.
|
|
||||||
*/
|
|
||||||
function toObject(value) {
|
|
||||||
return isObject(value) ? value : Object(value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -192,33 +160,6 @@ function isError(value) {
|
|||||||
return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag;
|
return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
|
||||||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
||||||
*
|
|
||||||
* @static
|
|
||||||
* @memberOf _
|
|
||||||
* @category Lang
|
|
||||||
* @param {*} value The value to check.
|
|
||||||
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
||||||
* @example
|
|
||||||
*
|
|
||||||
* _.isObject({});
|
|
||||||
* // => true
|
|
||||||
*
|
|
||||||
* _.isObject([1, 2, 3]);
|
|
||||||
* // => true
|
|
||||||
*
|
|
||||||
* _.isObject(1);
|
|
||||||
* // => false
|
|
||||||
*/
|
|
||||||
function isObject(value) {
|
|
||||||
// Avoid a V8 JIT bug in Chrome 19-20.
|
|
||||||
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
|
||||||
var type = typeof value;
|
|
||||||
return type == 'function' || (!!value && type == 'object');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a compiled template function that can interpolate data properties
|
* Creates a compiled template function that can interpolate data properties
|
||||||
* in "interpolate" delimiters, HTML-escape interpolated data properties in
|
* in "interpolate" delimiters, HTML-escape interpolated data properties in
|
||||||
@@ -321,7 +262,7 @@ 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 = assignWith(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
|
options = assignWith(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
|
||||||
@@ -419,7 +360,7 @@ 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 _
|
||||||
@@ -445,26 +386,4 @@ var attempt = restParam(function(func, args) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a function that returns `value`.
|
|
||||||
*
|
|
||||||
* @static
|
|
||||||
* @memberOf _
|
|
||||||
* @category Utility
|
|
||||||
* @param {*} value The value to return from the new function.
|
|
||||||
* @returns {Function} Returns the new function.
|
|
||||||
* @example
|
|
||||||
*
|
|
||||||
* var object = { 'user': 'fred' };
|
|
||||||
* var getter = _.constant(object);
|
|
||||||
*
|
|
||||||
* getter() === object;
|
|
||||||
* // => true
|
|
||||||
*/
|
|
||||||
function constant(value) {
|
|
||||||
return function() {
|
|
||||||
return value;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = template;
|
module.exports = template;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash.template",
|
"name": "lodash.template",
|
||||||
"version": "3.5.1",
|
"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",
|
||||||
@@ -23,7 +23,6 @@
|
|||||||
"lodash._isiterateecall": "^3.0.0",
|
"lodash._isiterateecall": "^3.0.0",
|
||||||
"lodash._reinterpolate": "^3.0.0",
|
"lodash._reinterpolate": "^3.0.0",
|
||||||
"lodash.escape": "^3.0.0",
|
"lodash.escape": "^3.0.0",
|
||||||
"lodash.isnative": "^3.0.0",
|
|
||||||
"lodash.keys": "^3.0.0",
|
"lodash.keys": "^3.0.0",
|
||||||
"lodash.restparam": "^3.0.0",
|
"lodash.restparam": "^3.0.0",
|
||||||
"lodash.templatesettings": "^3.0.0"
|
"lodash.templatesettings": "^3.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user