Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRebecca Turner <me@re-becca.org>2015-07-24 11:07:00 +0300
committerRebecca Turner <me@re-becca.org>2015-07-24 12:39:50 +0300
commita03bc7636f1919108f542339d11d0ec780a1ce8f (patch)
tree42af7f39d7c80c8fd20b715e24d71b8b14869fa1 /node_modules/lodash._baseflatten
parent8a07d50d9fdcf96be64315ba3c8f78504372dca2 (diff)
lodash._baseflatten@3.1.4
Diffstat (limited to 'node_modules/lodash._baseflatten')
-rw-r--r--node_modules/lodash._baseflatten/LICENSE (renamed from node_modules/lodash._baseflatten/LICENSE.txt)0
-rw-r--r--node_modules/lodash._baseflatten/README.md4
-rw-r--r--node_modules/lodash._baseflatten/index.js46
-rw-r--r--node_modules/lodash._baseflatten/package.json16
4 files changed, 41 insertions, 25 deletions
diff --git a/node_modules/lodash._baseflatten/LICENSE.txt b/node_modules/lodash._baseflatten/LICENSE
index 9cd87e5dc..9cd87e5dc 100644
--- a/node_modules/lodash._baseflatten/LICENSE.txt
+++ b/node_modules/lodash._baseflatten/LICENSE
diff --git a/node_modules/lodash._baseflatten/README.md b/node_modules/lodash._baseflatten/README.md
index 643061a8a..f3e227779 100644
--- a/node_modules/lodash._baseflatten/README.md
+++ b/node_modules/lodash._baseflatten/README.md
@@ -1,4 +1,4 @@
-# lodash._baseflatten v3.1.3
+# lodash._baseflatten v3.1.4
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseFlatten` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var baseFlatten = require('lodash._baseflatten');
```
-See the [package source](https://github.com/lodash/lodash/blob/3.1.3-npm-packages/lodash._baseflatten) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/3.1.4-npm-packages/lodash._baseflatten) for more details.
diff --git a/node_modules/lodash._baseflatten/index.js b/node_modules/lodash._baseflatten/index.js
index 6cac0b3ea..c43acfa72 100644
--- a/node_modules/lodash._baseflatten/index.js
+++ b/node_modules/lodash._baseflatten/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 3.1.3 (Custom Build) <https://lodash.com/>
+ * lodash 3.1.4 (Custom Build) <https://lodash.com/>
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@@ -21,12 +21,31 @@ function isObjectLike(value) {
}
/**
- * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+ * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
* of an array-like value.
*/
var MAX_SAFE_INTEGER = 9007199254740991;
/**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+function arrayPush(array, values) {
+ var index = -1,
+ length = values.length,
+ offset = array.length;
+
+ while (++index < length) {
+ array[offset + index] = values[index];
+ }
+ return array;
+}
+
+/**
* The base implementation of `_.flatten` with added support for restricting
* flattening and specifying the start index.
*
@@ -34,13 +53,14 @@ var MAX_SAFE_INTEGER = 9007199254740991;
* @param {Array} array The array to flatten.
* @param {boolean} [isDeep] Specify a deep flatten.
* @param {boolean} [isStrict] Restrict flattening to arrays-like objects.
+ * @param {Array} [result=[]] The initial result value.
* @returns {Array} Returns the new flattened array.
*/
-function baseFlatten(array, isDeep, isStrict) {
+function baseFlatten(array, isDeep, isStrict, result) {
+ result || (result = []);
+
var index = -1,
- length = array.length,
- resIndex = -1,
- result = [];
+ length = array.length;
while (++index < length) {
var value = array[index];
@@ -48,16 +68,12 @@ function baseFlatten(array, isDeep, isStrict) {
(isStrict || isArray(value) || isArguments(value))) {
if (isDeep) {
// Recursively flatten arrays (susceptible to call stack limits).
- value = baseFlatten(value, isDeep, isStrict);
- }
- var valIndex = -1,
- valLength = value.length;
-
- while (++valIndex < valLength) {
- result[++resIndex] = value[valIndex];
+ baseFlatten(value, isDeep, isStrict, result);
+ } else {
+ arrayPush(result, value);
}
} else if (!isStrict) {
- result[++resIndex] = value;
+ result[result.length] = value;
}
}
return result;
@@ -102,7 +118,7 @@ function isArrayLike(value) {
/**
* Checks if `value` is a valid array-like length.
*
- * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
+ * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
*
* @private
* @param {*} value The value to check.
diff --git a/node_modules/lodash._baseflatten/package.json b/node_modules/lodash._baseflatten/package.json
index f43689d2b..48b2545dc 100644
--- a/node_modules/lodash._baseflatten/package.json
+++ b/node_modules/lodash._baseflatten/package.json
@@ -6,15 +6,15 @@
]
],
"_from": "lodash._baseflatten@>=3.0.0 <4.0.0",
- "_id": "lodash._baseflatten@3.1.3",
+ "_id": "lodash._baseflatten@3.1.4",
"_inCache": true,
"_location": "/lodash._baseflatten",
- "_nodeVersion": "0.12.3",
+ "_nodeVersion": "0.12.5",
"_npmUser": {
"email": "john.david.dalton@gmail.com",
"name": "jdalton"
},
- "_npmVersion": "2.10.0",
+ "_npmVersion": "2.12.0",
"_phantomChildren": {},
"_requested": {
"name": "lodash._baseflatten",
@@ -27,8 +27,8 @@
"_requiredBy": [
"/lodash.union"
],
- "_resolved": "https://registry.npmjs.org/lodash._baseflatten/-/lodash._baseflatten-3.1.3.tgz",
- "_shasum": "57937a639806b9be6b2e0acc541291c310c8eb9e",
+ "_resolved": "https://registry.npmjs.org/lodash._baseflatten/-/lodash._baseflatten-3.1.4.tgz",
+ "_shasum": "0770ff80131af6e34f3b511796a7ba5214e65ff7",
"_shrinkwrap": null,
"_spec": "lodash._baseflatten@^3.0.0",
"_where": "/Users/rebecca/code/npm/node_modules/lodash.union",
@@ -75,8 +75,8 @@
"devDependencies": {},
"directories": {},
"dist": {
- "shasum": "57937a639806b9be6b2e0acc541291c310c8eb9e",
- "tarball": "http://registry.npmjs.org/lodash._baseflatten/-/lodash._baseflatten-3.1.3.tgz"
+ "shasum": "0770ff80131af6e34f3b511796a7ba5214e65ff7",
+ "tarball": "http://registry.npmjs.org/lodash._baseflatten/-/lodash._baseflatten-3.1.4.tgz"
},
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -112,5 +112,5 @@
"scripts": {
"test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
},
- "version": "3.1.3"
+ "version": "3.1.4"
}