diff --git a/README.md b/README.md
index 984ad5cab..0156d25c1 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# lodash v3.0.9
+# lodash v3.1.0
The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method.
diff --git a/lodash._baseassign/README.md b/lodash._baseassign/README.md
index c4e1e5cdf..708412488 100644
--- a/lodash._baseassign/README.md
+++ b/lodash._baseassign/README.md
@@ -1,4 +1,4 @@
-# lodash._baseassign v3.0.2
+# lodash._baseassign v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseAssign` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var baseAssign = require('lodash._baseassign');
```
-See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._baseassign) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._baseassign) for more details.
diff --git a/lodash._baseassign/index.js b/lodash._baseassign/index.js
index c4879d506..d0e14f3ea 100644
--- a/lodash._baseassign/index.js
+++ b/lodash._baseassign/index.js
@@ -1,43 +1,119 @@
/**
- * lodash 3.0.2 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.8.2
+ * Based on Underscore.js 1.8.3
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
var baseCopy = require('lodash._basecopy'),
+ isNative = require('lodash.isnative'),
keys = require('lodash.keys');
+/** Native method references. */
+var getOwnPropertySymbols = isNative(getOwnPropertySymbols = Object.getOwnPropertySymbols) && getOwnPropertySymbols,
+ preventExtensions = isNative(Object.preventExtensions = Object.preventExtensions) && preventExtensions;
+
+/** Used as `baseAssign`. */
+var nativeAssign = (function() {
+ // Avoid `Object.assign` in Firefox 34-37 which have an early implementation
+ // with a now defunct try/catch behavior. See https://bugzilla.mozilla.org/show_bug.cgi?id=1103344
+ // for more details.
+ //
+ // Use `Object.preventExtensions` on a plain object instead of simply using
+ // `Object('x')` because Chrome and IE fail to throw an error when attempting
+ // to assign values to readonly indexes of strings in strict mode.
+ var object = { '1': 0 },
+ func = preventExtensions && isNative(func = Object.assign) && func;
+
+ try { func(preventExtensions(object), 'xo'); } catch(e) {}
+ return !object[1] && func;
+}());
+
/**
* The base implementation of `_.assign` without support for argument juggling,
- * multiple sources, and `this` binding `customizer` functions.
+ * multiple sources, and `customizer` functions.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
- * @param {Function} [customizer] The function to customize assigning values.
- * @returns {Object} Returns the destination object.
+ * @returns {Object} Returns `object`.
*/
-function baseAssign(object, source, customizer) {
- var props = keys(source);
- if (!customizer) {
- return baseCopy(source, object, props);
- }
- var index = -1,
- length = props.length;
+var baseAssign = nativeAssign || function(object, source) {
+ return source == null
+ ? object
+ : baseCopy(source, getSymbols(source), baseCopy(source, keys(source), object));
+};
- while (++index < length) {
- var key = props[index],
- value = object[key],
- result = customizer(value, source[key], key, object, source);
+/**
+ * Creates an array of the own symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+var getSymbols = !getOwnPropertySymbols ? constant([]) : function(object) {
+ return getOwnPropertySymbols(toObject(object));
+};
- if ((result === result ? (result !== value) : (value === value)) ||
- (typeof value == 'undefined' && !(key in object))) {
- object[key] = result;
- }
- }
- return object;
+/**
+ * Converts `value` to an object if it is not one.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {Object} Returns the object.
+ */
+function toObject(value) {
+ return isObject(value) ? value : Object(value);
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return type == 'function' || (!!value && type == 'object');
+}
+
+/**
+ * Creates a function that returns `value`.
+ *
+ * @static
+ * @memberOf _
+ * @category Utility
+ * @param {*} value The value to return from the new function.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ * var getter = _.constant(object);
+ *
+ * getter() === object;
+ * // => true
+ */
+function constant(value) {
+ return function() {
+ return value;
+ };
}
module.exports = baseAssign;
diff --git a/lodash._baseassign/package.json b/lodash._baseassign/package.json
index 8da2a58a4..e2e4d9686 100644
--- a/lodash._baseassign/package.json
+++ b/lodash._baseassign/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash._baseassign",
- "version": "3.0.2",
+ "version": "3.1.0",
"description": "The modern build of lodash’s internal `baseAssign` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,6 +17,7 @@
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._basecopy": "^3.0.0",
+ "lodash.isnative": "^3.0.0",
"lodash.keys": "^3.0.0"
}
}
diff --git a/lodash._basecallback/README.md b/lodash._basecallback/README.md
index abcae4a0c..494c757ba 100644
--- a/lodash._basecallback/README.md
+++ b/lodash._basecallback/README.md
@@ -1,4 +1,4 @@
-# lodash._basecallback v3.0.1
+# lodash._basecallback v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseCallback` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var baseCallback = require('lodash._basecallback');
```
-See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._basecallback) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._basecallback) for more details.
diff --git a/lodash._basecallback/index.js b/lodash._basecallback/index.js
index 2a6b2c378..59e124fef 100644
--- a/lodash._basecallback/index.js
+++ b/lodash._basecallback/index.js
@@ -1,22 +1,14 @@
/**
- * lodash 3.0.1 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
* Based on Underscore.js 1.7.0
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var baseClone = require('lodash._baseclone'),
- baseIsEqual = require('lodash._baseisequal'),
+var baseMatches = require('lodash._basematches'),
baseProperty = require('lodash._baseproperty'),
- bindCallback = require('lodash._bindcallback'),
- keys = require('lodash.keys');
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
+ bindCallback = require('lodash._bindcallback');
/**
* The base implementation of `_.callback` which supports specifying the
@@ -40,139 +32,10 @@ function baseCallback(func, thisArg, argCount) {
}
// Handle "_.property" and "_.matches" style callback shorthands.
return type == 'object'
- ? baseMatches(func, !argCount)
+ ? baseMatches(func)
: baseProperty(func + '');
}
-/**
- * The base implementation of `_.isMatch` without support for callback
- * shorthands or `this` binding.
- *
- * @private
- * @param {Object} source The object to inspect.
- * @param {Array} props The source property names to match.
- * @param {Array} values The source values to match.
- * @param {Array} strictCompareFlags Strict comparison flags for source values.
- * @param {Function} [customizer] The function to customize comparing objects.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
- */
-function baseIsMatch(object, props, values, strictCompareFlags, customizer) {
- var length = props.length;
- if (object == null) {
- return !length;
- }
- var index = -1,
- noCustomizer = !customizer;
-
- while (++index < length) {
- if ((noCustomizer && strictCompareFlags[index])
- ? values[index] !== object[props[index]]
- : !hasOwnProperty.call(object, props[index])
- ) {
- return false;
- }
- }
- index = -1;
- while (++index < length) {
- var key = props[index];
- if (noCustomizer && strictCompareFlags[index]) {
- var result = hasOwnProperty.call(object, key);
- } else {
- var objValue = object[key],
- srcValue = values[index];
-
- result = customizer ? customizer(objValue, srcValue, key) : undefined;
- if (typeof result == 'undefined') {
- result = baseIsEqual(srcValue, objValue, customizer, true);
- }
- }
- if (!result) {
- return false;
- }
- }
- return true;
-}
-
-/**
- * The base implementation of `_.matches` which supports specifying whether
- * `source` should be cloned.
- *
- * @private
- * @param {Object} source The object of property values to match.
- * @param {boolean} [isCloned] Specify cloning the source object.
- * @returns {Function} Returns the new function.
- */
-function baseMatches(source, isCloned) {
- var props = keys(source),
- length = props.length;
-
- if (length == 1) {
- var key = props[0],
- value = source[key];
-
- if (isStrictComparable(value)) {
- return function(object) {
- return object != null && value === object[key] && hasOwnProperty.call(object, key);
- };
- }
- }
- if (isCloned) {
- source = baseClone(source, true);
- }
- var values = Array(length),
- strictCompareFlags = Array(length);
-
- while (length--) {
- value = source[props[length]];
- values[length] = value;
- strictCompareFlags[length] = isStrictComparable(value);
- }
- return function(object) {
- return baseIsMatch(object, props, values, strictCompareFlags);
- };
-}
-
-/**
- * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` if suitable for strict
- * equality comparisons, else `false`.
- */
-function isStrictComparable(value) {
- return value === value && (value === 0 ? ((1 / value) > 0) : !isObject(value));
-}
-
-/**
- * Checks if `value` is the language type of `Object`.
- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * **Note:** See the [ES5 spec](https://es5.github.io/#x8) for more details.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(1);
- * // => false
- */
-function isObject(value) {
- // Avoid a V8 JIT bug in Chrome 19-20.
- // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
- var type = typeof value;
- return type == 'function' || (value && type == 'object') || false;
-}
-
/**
* This method returns the first argument provided to it.
*
diff --git a/lodash._basecallback/package.json b/lodash._basecallback/package.json
index 3c106310e..140bf0049 100644
--- a/lodash._basecallback/package.json
+++ b/lodash._basecallback/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash._basecallback",
- "version": "3.0.1",
+ "version": "3.1.0",
"description": "The modern build of lodash’s internal `baseCallback` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -16,10 +16,8 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._baseclone": "^3.0.0",
- "lodash._baseisequal": "^3.0.0",
+ "lodash._basematches": "^3.0.0",
"lodash._baseproperty": "^3.0.0",
- "lodash._bindcallback": "^3.0.0",
- "lodash.keys": "^3.0.0"
+ "lodash._bindcallback": "^3.0.0"
}
}
diff --git a/lodash._baseclone/README.md b/lodash._baseclone/README.md
index 2f89b1473..20acdb866 100644
--- a/lodash._baseclone/README.md
+++ b/lodash._baseclone/README.md
@@ -1,4 +1,4 @@
-# lodash._baseclone v3.0.1
+# lodash._baseclone v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseClone` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var baseClone = require('lodash._baseclone');
```
-See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._baseclone) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._baseclone) for more details.
diff --git a/lodash._baseclone/index.js b/lodash._baseclone/index.js
index 7ffadc4c7..a77e8c2ea 100644
--- a/lodash._baseclone/index.js
+++ b/lodash._baseclone/index.js
@@ -1,14 +1,14 @@
/**
- * lodash 3.0.1 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.8.2
+ * Based on Underscore.js 1.8.3
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
var arrayCopy = require('lodash._arraycopy'),
arrayEach = require('lodash._arrayeach'),
- baseCopy = require('lodash._basecopy'),
+ baseAssign = require('lodash._baseassign'),
baseFor = require('lodash._basefor'),
isArray = require('lodash.isarray'),
isNative = require('lodash.isnative'),
@@ -110,7 +110,7 @@ function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {
if (customizer) {
result = object ? customizer(value, key, object) : customizer(value);
}
- if (typeof result != 'undefined') {
+ if (result !== undefined) {
return result;
}
if (!isObject(value)) {
@@ -129,7 +129,7 @@ function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
result = initCloneObject(isFunc ? {} : value);
if (!isDeep) {
- return baseCopy(value, result, keys(value));
+ return baseAssign(result, value);
}
} else {
return cloneableTags[tag]
@@ -241,7 +241,6 @@ function initCloneObject(object) {
* **Note:** This function only supports cloning values with tags of
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
*
- *
* @private
* @param {Object} object The object to clone.
* @param {string} tag The `toStringTag` of the object to clone.
diff --git a/lodash._baseclone/package.json b/lodash._baseclone/package.json
index ad7d45694..8799ded64 100644
--- a/lodash._baseclone/package.json
+++ b/lodash._baseclone/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash._baseclone",
- "version": "3.0.1",
+ "version": "3.1.0",
"description": "The modern build of lodash’s internal `baseClone` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -18,7 +18,7 @@
"dependencies": {
"lodash._arraycopy": "^3.0.0",
"lodash._arrayeach": "^3.0.0",
- "lodash._basecopy": "^3.0.0",
+ "lodash._baseassign": "^3.0.0",
"lodash._basefor": "^3.0.0",
"lodash.isarray": "^3.0.0",
"lodash.isnative": "^3.0.0",
diff --git a/lodash._basedelay/LICENSE.txt b/lodash._basedelay/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash._basedelay/LICENSE.txt
+++ b/lodash._basedelay/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash._basedelay/README.md b/lodash._basedelay/README.md
index 96a52e1b7..a83cfd95b 100644
--- a/lodash._basedelay/README.md
+++ b/lodash._basedelay/README.md
@@ -1,4 +1,4 @@
-# lodash._basedelay v3.0.1
+# lodash._basedelay v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseDelay` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var baseDelay = require('lodash._basedelay');
```
-See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._basedelay) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._basedelay) for more details.
diff --git a/lodash._basedelay/index.js b/lodash._basedelay/index.js
index 61bc5a8ea..392e32323 100644
--- a/lodash._basedelay/index.js
+++ b/lodash._basedelay/index.js
@@ -1,12 +1,11 @@
/**
- * lodash 3.0.1 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var baseSlice = require('lodash._baseslice');
/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
@@ -18,14 +17,14 @@ var FUNC_ERROR_TEXT = 'Expected a function';
* @private
* @param {Function} func The function to delay.
* @param {number} wait The number of milliseconds to delay invocation.
- * @param {Object} args The `arguments` object to slice and provide to `func`.
+ * @param {Object} args The arguments provide to `func`.
* @returns {number} Returns the timer id.
*/
-function baseDelay(func, wait, args, fromIndex) {
+function baseDelay(func, wait, args) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
- return setTimeout(function() { func.apply(undefined, baseSlice(args, fromIndex)); }, wait);
+ return setTimeout(function() { func.apply(undefined, args); }, wait);
}
module.exports = baseDelay;
diff --git a/lodash._basedelay/package.json b/lodash._basedelay/package.json
index 95dd639f8..7ec6bfd8a 100644
--- a/lodash._basedelay/package.json
+++ b/lodash._basedelay/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash._basedelay",
- "version": "3.0.1",
+ "version": "3.1.0",
"description": "The modern build of lodash’s internal `baseDelay` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -14,8 +14,5 @@
"Mathias Bynens (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
- "dependencies": {
- "lodash._baseslice": "^3.0.0"
- }
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
}
diff --git a/lodash._baseflatten/README.md b/lodash._baseflatten/README.md
index 45451e4a4..1c1a44565 100644
--- a/lodash._baseflatten/README.md
+++ b/lodash._baseflatten/README.md
@@ -1,4 +1,4 @@
-# lodash._baseflatten v3.0.1
+# lodash._baseflatten v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseFlatten` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var baseFlatten = require('lodash._baseflatten');
```
-See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._baseflatten) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._baseflatten) for more details.
diff --git a/lodash._baseflatten/index.js b/lodash._baseflatten/index.js
index d99dc0243..1eeab6c50 100644
--- a/lodash._baseflatten/index.js
+++ b/lodash._baseflatten/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 3.0.1 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
* Based on Underscore.js 1.8.2
@@ -33,13 +33,13 @@ var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
*
* @private
* @param {Array} array The array to flatten.
- * @param {boolean} [isDeep] Specify a deep flatten.
- * @param {boolean} [isStrict] Restrict flattening to arrays and `arguments` objects.
- * @param {number} [fromIndex=0] The index to start from.
+ * @param {boolean} isDeep Specify a deep flatten.
+ * @param {boolean} isStrict Restrict flattening to arrays and `arguments` objects.
+ * @param {number} fromIndex The index to start from.
* @returns {Array} Returns the new flattened array.
*/
function baseFlatten(array, isDeep, isStrict, fromIndex) {
- var index = fromIndex == null ? -1 : (fromIndex - 1),
+ var index = fromIndex - 1,
length = array.length,
resIndex = -1,
result = [];
@@ -50,7 +50,7 @@ function baseFlatten(array, isDeep, isStrict, fromIndex) {
if (isObjectLike(value) && isLength(value.length) && (isArray(value) || isArguments(value))) {
if (isDeep) {
// Recursively flatten arrays (susceptible to call stack limits).
- value = baseFlatten(value, isDeep, isStrict);
+ value = baseFlatten(value, isDeep, isStrict, 0);
}
var valIndex = -1,
valLength = value.length;
diff --git a/lodash._baseflatten/package.json b/lodash._baseflatten/package.json
index d58c006de..0bced3237 100644
--- a/lodash._baseflatten/package.json
+++ b/lodash._baseflatten/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash._baseflatten",
- "version": "3.0.1",
+ "version": "3.1.0",
"description": "The modern build of lodash’s internal `baseFlatten` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash._baseindexof/README.md b/lodash._baseindexof/README.md
index a796bc0e5..ddcc79d5d 100644
--- a/lodash._baseindexof/README.md
+++ b/lodash._baseindexof/README.md
@@ -1,4 +1,4 @@
-# lodash._baseindexof v3.0.0
+# lodash._baseindexof v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseIndexOf` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var baseIndexOf = require('lodash._baseindexof');
```
-See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._baseindexof) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._baseindexof) for more details.
diff --git a/lodash._baseindexof/index.js b/lodash._baseindexof/index.js
index 35383b26d..cfccf07c9 100644
--- a/lodash._baseindexof/index.js
+++ b/lodash._baseindexof/index.js
@@ -1,8 +1,8 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
@@ -13,14 +13,24 @@
* @private
* @param {Array} array The array to search.
* @param {*} value The value to search for.
- * @param {number} [fromIndex=0] The index to search from.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+
+/**
+ * The base implementation of `_.indexOf` without support for binary searches.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseIndexOf(array, value, fromIndex) {
if (value !== value) {
return indexOfNaN(array, fromIndex);
}
- var index = (fromIndex || 0) - 1,
+ var index = fromIndex - 1,
length = array.length;
while (++index < length) {
@@ -33,17 +43,16 @@ function baseIndexOf(array, value, fromIndex) {
/**
* Gets the index at which the first occurrence of `NaN` is found in `array`.
- * If `fromRight` is provided elements of `array` are iterated from right to left.
*
* @private
* @param {Array} array The array to search.
- * @param {number} [fromIndex] The index to search from.
+ * @param {number} fromIndex The index to search from.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {number} Returns the index of the matched `NaN`, else `-1`.
*/
function indexOfNaN(array, fromIndex, fromRight) {
var length = array.length,
- index = fromRight ? (fromIndex || length) : ((fromIndex || 0) - 1);
+ index = fromIndex + (fromRight ? 0 : -1);
while ((fromRight ? index-- : ++index < length)) {
var other = array[index];
diff --git a/lodash._baseindexof/package.json b/lodash._baseindexof/package.json
index e5bb73a19..59bd59574 100644
--- a/lodash._baseindexof/package.json
+++ b/lodash._baseindexof/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash._baseindexof",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s internal `baseIndexOf` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.capitalize/LICENSE.txt b/lodash._baseismatch/LICENSE.txt
similarity index 100%
rename from lodash.capitalize/LICENSE.txt
rename to lodash._baseismatch/LICENSE.txt
diff --git a/lodash._baseismatch/README.md b/lodash._baseismatch/README.md
new file mode 100644
index 000000000..5afefee20
--- /dev/null
+++ b/lodash._baseismatch/README.md
@@ -0,0 +1,20 @@
+# lodash._baseismatch v3.1.0
+
+The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseIsMatch` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+
+## Installation
+
+Using npm:
+
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash._baseismatch
+```
+
+In Node.js/io.js:
+
+```js
+var baseIsMatch = require('lodash._baseismatch');
+```
+
+See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._baseismatch) for more details.
diff --git a/lodash._baseismatch/index.js b/lodash._baseismatch/index.js
new file mode 100644
index 000000000..27ad9db11
--- /dev/null
+++ b/lodash._baseismatch/index.js
@@ -0,0 +1,66 @@
+/**
+ * lodash 3.1.0 (Custom Build)
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation
+ * Based on Underscore.js 1.7.0
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license
+ */
+var baseIsEqual = require('lodash._baseisequal');
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * The base implementation of `_.isMatch` without support for callback
+ * shorthands or `this` binding.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Array} props The source property names to match.
+ * @param {Array} values The source values to match.
+ * @param {Array} strictCompareFlags Strict comparison flags for source values.
+ * @param {Function} [customizer] The function to customize comparing objects.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+function baseIsMatch(object, props, values, strictCompareFlags, customizer) {
+ var length = props.length;
+ if (object == null) {
+ return !length;
+ }
+ var index = -1,
+ noCustomizer = !customizer;
+
+ while (++index < length) {
+ if ((noCustomizer && strictCompareFlags[index])
+ ? values[index] !== object[props[index]]
+ : !hasOwnProperty.call(object, props[index])
+ ) {
+ return false;
+ }
+ }
+ index = -1;
+ while (++index < length) {
+ var key = props[index];
+ if (noCustomizer && strictCompareFlags[index]) {
+ var result = hasOwnProperty.call(object, key);
+ } else {
+ var objValue = object[key],
+ srcValue = values[index];
+
+ result = customizer ? customizer(objValue, srcValue, key) : undefined;
+ if (typeof result == 'undefined') {
+ result = baseIsEqual(srcValue, objValue, customizer, true);
+ }
+ }
+ if (!result) {
+ return false;
+ }
+ }
+ return true;
+}
+
+module.exports = baseIsMatch;
diff --git a/lodash._baseismatch/package.json b/lodash._baseismatch/package.json
new file mode 100644
index 000000000..9eec87c04
--- /dev/null
+++ b/lodash._baseismatch/package.json
@@ -0,0 +1,21 @@
+{
+ "name": "lodash._baseismatch",
+ "version": "3.1.0",
+ "description": "The modern build of lodash’s internal `baseIsMatch` as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "author": "John-David Dalton (http://allyoucanleet.com/)",
+ "contributors": [
+ "John-David Dalton (http://allyoucanleet.com/)",
+ "Benjamin Tan (https://d10.github.io/)",
+ "Blaine Bublitz (http://www.iceddev.com/)",
+ "Kit Cambridge (http://kitcambridge.be/)",
+ "Mathias Bynens (https://mathiasbynens.be/)"
+ ],
+ "repository": "lodash/lodash",
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
+ "dependencies": {
+ "lodash._baseisequal": "^3.0.0"
+ }
+}
diff --git a/lodash.escape/LICENSE.txt b/lodash._basematches/LICENSE.txt
similarity index 100%
rename from lodash.escape/LICENSE.txt
rename to lodash._basematches/LICENSE.txt
diff --git a/lodash._basematches/README.md b/lodash._basematches/README.md
new file mode 100644
index 000000000..6adb17217
--- /dev/null
+++ b/lodash._basematches/README.md
@@ -0,0 +1,20 @@
+# lodash._basematches v3.1.0
+
+The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseMatches` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+
+## Installation
+
+Using npm:
+
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash._basematches
+```
+
+In Node.js/io.js:
+
+```js
+var baseMatches = require('lodash._basematches');
+```
+
+See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._basematches) for more details.
diff --git a/lodash._basematches/index.js b/lodash._basematches/index.js
new file mode 100644
index 000000000..b2a2e8a5a
--- /dev/null
+++ b/lodash._basematches/index.js
@@ -0,0 +1,143 @@
+/**
+ * lodash 3.1.0 (Custom Build)
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation
+ * Based on Underscore.js 1.7.0
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license
+ */
+var baseIsEqual = require('lodash._baseisequal'),
+ keys = require('lodash.keys');
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * The base implementation of `_.isMatch` without support for callback
+ * shorthands or `this` binding.
+ *
+ * @private
+ * @param {Object} source The object to inspect.
+ * @param {Array} props The source property names to match.
+ * @param {Array} values The source values to match.
+ * @param {Array} strictCompareFlags Strict comparison flags for source values.
+ * @param {Function} [customizer] The function to customize comparing objects.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+function baseIsMatch(object, props, values, strictCompareFlags, customizer) {
+ var length = props.length;
+ if (object == null) {
+ return !length;
+ }
+ var index = -1,
+ noCustomizer = !customizer;
+
+ while (++index < length) {
+ if ((noCustomizer && strictCompareFlags[index])
+ ? values[index] !== object[props[index]]
+ : !hasOwnProperty.call(object, props[index])
+ ) {
+ return false;
+ }
+ }
+ index = -1;
+ while (++index < length) {
+ var key = props[index];
+ if (noCustomizer && strictCompareFlags[index]) {
+ var result = hasOwnProperty.call(object, key);
+ } else {
+ var objValue = object[key],
+ srcValue = values[index];
+
+ result = customizer ? customizer(objValue, srcValue, key) : undefined;
+ if (typeof result == 'undefined') {
+ result = baseIsEqual(srcValue, objValue, customizer, true);
+ }
+ }
+ if (!result) {
+ return false;
+ }
+ }
+ return true;
+}
+
+/**
+ * The base implementation of `_.matches` which supports specifying whether
+ * `source` should be cloned.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new function.
+ */
+function baseMatches(source) {
+ var props = keys(source),
+ length = props.length;
+
+ if (length == 1) {
+ var key = props[0],
+ value = source[key];
+
+ if (isStrictComparable(value)) {
+ return function(object) {
+ return object != null && value === object[key] && hasOwnProperty.call(object, key);
+ };
+ }
+ }
+ var values = Array(length),
+ strictCompareFlags = Array(length);
+
+ while (length--) {
+ value = source[props[length]];
+ values[length] = value;
+ strictCompareFlags[length] = isStrictComparable(value);
+ }
+ return function(object) {
+ return baseIsMatch(object, props, values, strictCompareFlags);
+ };
+}
+
+/**
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
+ * equality comparisons, else `false`.
+ */
+function isStrictComparable(value) {
+ return value === value && (value === 0 ? ((1 / value) > 0) : !isObject(value));
+}
+
+/**
+ * Checks if `value` is the language type of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * **Note:** See the [ES5 spec](https://es5.github.io/#x8) for more details.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return type == 'function' || (value && type == 'object') || false;
+}
+
+module.exports = baseMatches;
diff --git a/lodash._basematches/package.json b/lodash._basematches/package.json
new file mode 100644
index 000000000..a02b69fe0
--- /dev/null
+++ b/lodash._basematches/package.json
@@ -0,0 +1,22 @@
+{
+ "name": "lodash._basematches",
+ "version": "3.1.0",
+ "description": "The modern build of lodash’s internal `baseMatches` as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "author": "John-David Dalton (http://allyoucanleet.com/)",
+ "contributors": [
+ "John-David Dalton (http://allyoucanleet.com/)",
+ "Benjamin Tan (https://d10.github.io/)",
+ "Blaine Bublitz (http://www.iceddev.com/)",
+ "Kit Cambridge (http://kitcambridge.be/)",
+ "Mathias Bynens (https://mathiasbynens.be/)"
+ ],
+ "repository": "lodash/lodash",
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
+ "dependencies": {
+ "lodash._baseisequal": "^3.0.0",
+ "lodash.keys": "^3.0.0"
+ }
+}
diff --git a/lodash._createassigner/LICENSE.txt b/lodash._createassigner/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash._createassigner/LICENSE.txt
+++ b/lodash._createassigner/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash._createassigner/README.md b/lodash._createassigner/README.md
index 1f8d4a153..c65eaf1e2 100644
--- a/lodash._createassigner/README.md
+++ b/lodash._createassigner/README.md
@@ -1,4 +1,4 @@
-# lodash._createassigner v3.0.1
+# lodash._createassigner v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createAssigner` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var createAssigner = require('lodash._createassigner');
```
-See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._createassigner) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._createassigner) for more details.
diff --git a/lodash._createassigner/index.js b/lodash._createassigner/index.js
index 37efe38a7..d21e708a0 100644
--- a/lodash._createassigner/index.js
+++ b/lodash._createassigner/index.js
@@ -1,13 +1,14 @@
/**
- * lodash 3.0.1 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.8.2
+ * Based on Underscore.js 1.8.3
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
var bindCallback = require('lodash._bindcallback'),
- isIterateeCall = require('lodash._isiterateecall');
+ isIterateeCall = require('lodash._isiterateecall'),
+ restParam = require('lodash.restparam');
/**
* Creates a function that assigns properties of source object(s) to a given
@@ -20,38 +21,32 @@ var bindCallback = require('lodash._bindcallback'),
* @returns {Function} Returns the new assigner function.
*/
function createAssigner(assigner) {
- return function() {
- var args = arguments,
- length = args.length,
- object = args[0];
+ return restParam(function(object, sources) {
+ var index = -1,
+ length = object == null ? 0 : sources.length,
+ customizer = length > 2 && sources[length - 2],
+ guard = length > 2 && sources[2],
+ thisArg = length > 1 && sources[length - 1];
- if (length < 2 || object == null) {
- return object;
- }
- var customizer = args[length - 2],
- thisArg = args[length - 1],
- guard = args[3];
-
- if (length > 3 && typeof customizer == 'function') {
+ if (typeof customizer == 'function') {
customizer = bindCallback(customizer, thisArg, 5);
length -= 2;
} else {
- customizer = (length > 2 && typeof thisArg == 'function') ? thisArg : null;
+ customizer = typeof thisArg == 'function' ? thisArg : null;
length -= (customizer ? 1 : 0);
}
- if (guard && isIterateeCall(args[1], args[2], guard)) {
- customizer = length == 3 ? null : customizer;
- length = 2;
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ customizer = length < 3 ? null : customizer;
+ length = 1;
}
- var index = 0;
while (++index < length) {
- var source = args[index];
+ var source = sources[index];
if (source) {
assigner(object, source, customizer);
}
}
return object;
- };
+ });
}
module.exports = createAssigner;
diff --git a/lodash._createassigner/package.json b/lodash._createassigner/package.json
index f3ee309a9..cca0ff052 100644
--- a/lodash._createassigner/package.json
+++ b/lodash._createassigner/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash._createassigner",
- "version": "3.0.1",
+ "version": "3.1.0",
"description": "The modern build of lodash’s internal `createAssigner` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,6 +17,7 @@
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._bindcallback": "^3.0.0",
- "lodash._isiterateecall": "^3.0.0"
+ "lodash._isiterateecall": "^3.0.0",
+ "lodash.restparam": "^3.0.0"
}
}
diff --git a/lodash._createcache/README.md b/lodash._createcache/README.md
index b37eb746b..8ce5dae08 100644
--- a/lodash._createcache/README.md
+++ b/lodash._createcache/README.md
@@ -1,4 +1,4 @@
-# lodash._createcache v3.0.1
+# lodash._createcache v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createCache` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var createCache = require('lodash._createcache');
```
-See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._createcache) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._createcache) for more details.
diff --git a/lodash._createcache/index.js b/lodash._createcache/index.js
index cbeb715d6..eba712d35 100644
--- a/lodash._createcache/index.js
+++ b/lodash._createcache/index.js
@@ -1,18 +1,18 @@
/**
- * lodash 3.0.1 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.8.2
+ * Based on Underscore.js 1.8.3
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var isNative = require('lodash.isnative');
+var getNative = require('lodash._getnative');
/** Native method references. */
-var Set = isNative(Set = global.Set) && Set;
+var Set = getNative(root, 'Set');
/* Native method references for those with the same name as other `lodash` methods. */
-var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate;
+var nativeCreate = getNative(Object, 'create');
/**
*
@@ -82,7 +82,7 @@ function isObject(value) {
// Avoid a V8 JIT bug in Chrome 19-20.
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
var type = typeof value;
- return type == 'function' || (!!value && type == 'object');
+ return !!value && (type == 'object' || type == 'function');
}
/**
diff --git a/lodash._createcache/package.json b/lodash._createcache/package.json
index ab6b13e33..4e7abab42 100644
--- a/lodash._createcache/package.json
+++ b/lodash._createcache/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash._createcache",
- "version": "3.0.1",
+ "version": "3.1.0",
"description": "The modern build of lodash’s internal `createCache` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -16,6 +16,6 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash.isnative": "^3.0.0"
+ "lodash._getnative": "^3.0.0"
}
}
diff --git a/lodash._createwrapper/LICENSE b/lodash._createwrapper/LICENSE
index 9cd87e5dc..b054ca5a3 100644
--- a/lodash._createwrapper/LICENSE
+++ b/lodash._createwrapper/LICENSE
@@ -1,5 +1,5 @@
-Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+Copyright 2012-2016 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash._createwrapper/README.md b/lodash._createwrapper/README.md
index 4a6a4dc37..488b6329b 100644
--- a/lodash._createwrapper/README.md
+++ b/lodash._createwrapper/README.md
@@ -1,20 +1,18 @@
-# lodash._createwrapper v3.0.7
+# lodash._createwrapper v3.1.0
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createWrapper` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+The internal [lodash](https://lodash.com/) function `createWrapper` exported as a [Node.js](https://nodejs.org/) module.
## Installation
Using npm:
-
```bash
$ {sudo -H} npm i -g npm
$ npm i --save lodash._createwrapper
```
-In Node.js/io.js:
-
+In Node.js:
```js
var createWrapper = require('lodash._createwrapper');
```
-See the [package source](https://github.com/lodash/lodash/blob/3.0.7-npm-packages/lodash._createwrapper) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._createwrapper) for more details.
diff --git a/lodash._createwrapper/index.js b/lodash._createwrapper/index.js
index 158eb1111..311b5e64d 100644
--- a/lodash._createwrapper/index.js
+++ b/lodash._createwrapper/index.js
@@ -1,14 +1,11 @@
/**
- * lodash 3.0.7 (Custom Build)
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation
+ * lodash 3.1.0 (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var arrayCopy = require('lodash._arraycopy'),
- baseCreate = require('lodash._basecreate'),
- replaceHolders = require('lodash._replaceholders');
/** Used to compose bitmasks for wrapper metadata. */
var BIND_FLAG = 1,
@@ -18,23 +15,134 @@ var BIND_FLAG = 1,
CURRY_RIGHT_FLAG = 16,
PARTIAL_FLAG = 32,
PARTIAL_RIGHT_FLAG = 64,
- ARY_FLAG = 128;
+ ARY_FLAG = 128,
+ FLIP_FLAG = 512;
/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
-/** Used to detect unsigned integer values. */
-var reIsUint = /^\d+$/;
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0,
+ MAX_SAFE_INTEGER = 9007199254740991,
+ MAX_INTEGER = 1.7976931348623157e+308,
+ NAN = 0 / 0;
-/* Native method references for those with the same name as other `lodash` methods. */
+/** Used as the internal argument placeholder. */
+var PLACEHOLDER = '__lodash_placeholder__';
+
+/** `Object#toString` result references. */
+var funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]';
+
+/** Used to match leading and trailing whitespace. */
+var reTrim = /^\s+|\s+$/g;
+
+/** Used to detect bad signed hexadecimal string values. */
+var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+/** Used to detect binary string values. */
+var reIsBinary = /^0b[01]+$/i;
+
+/** Used to detect octal string values. */
+var reIsOctal = /^0o[0-7]+$/i;
+
+/** Used to detect unsigned integer values. */
+var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+/** Built-in method references without a dependency on `global`. */
+var freeParseInt = parseInt;
+
+/**
+ * A faster alternative to `Function#apply`, this function invokes `func`
+ * with the `this` binding of `thisArg` and the arguments of `args`.
+ *
+ * @private
+ * @param {Function} func The function to invoke.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {*} Returns the result of `func`.
+ */
+function apply(func, thisArg, args) {
+ var length = args ? args.length : 0;
+ switch (length) {
+ case 0: return func.call(thisArg);
+ case 1: return func.call(thisArg, args[0]);
+ case 2: return func.call(thisArg, args[0], args[1]);
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
+ }
+ return func.apply(thisArg, args);
+}
+
+/**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+function isIndex(value, length) {
+ value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return value > -1 && value % 1 == 0 && value < length;
+}
+
+/**
+ * Replaces all `placeholder` elements in `array` with an internal placeholder
+ * and returns an array of their indexes.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {*} placeholder The placeholder to replace.
+ * @returns {Array} Returns the new array of placeholder indexes.
+ */
+function replaceHolders(array, placeholder) {
+ var index = -1,
+ length = array.length,
+ resIndex = -1,
+ result = [];
+
+ while (++index < length) {
+ if (array[index] === placeholder) {
+ array[index] = PLACEHOLDER;
+ result[++resIndex] = index;
+ }
+ }
+ return result;
+}
+
+/** Used for built-in method references. */
+var objectProto = global.Object.prototype;
+
+/**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max,
nativeMin = Math.min;
/**
- * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
- * of an array-like value.
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} prototype The object to inherit from.
+ * @returns {Object} Returns the new object.
*/
-var MAX_SAFE_INTEGER = 9007199254740991;
+var baseCreate = (function() {
+ function object() {}
+ return function(prototype) {
+ if (isObject(prototype)) {
+ object.prototype = prototype;
+ var result = new object;
+ object.prototype = undefined;
+ }
+ return result || {};
+ };
+}());
/**
* Creates an array that is the composition of partially applied arguments,
@@ -99,20 +207,41 @@ function composeArgsRight(args, partials, holders) {
}
/**
- * Creates a function that wraps `func` and invokes it with the `this`
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+function copyArray(source, array) {
+ var index = -1,
+ length = source.length;
+
+ array || (array = Array(length));
+ while (++index < length) {
+ array[index] = source[index];
+ }
+ return array;
+}
+
+/**
+ * Creates a function that wraps `func` to invoke it with the optional `this`
* binding of `thisArg`.
*
* @private
- * @param {Function} func The function to bind.
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
* @param {*} [thisArg] The `this` binding of `func`.
- * @returns {Function} Returns the new bound function.
+ * @returns {Function} Returns the new wrapped function.
*/
-function createBindWrapper(func, thisArg) {
- var Ctor = createCtorWrapper(func);
+function createBaseWrapper(func, bitmask, thisArg) {
+ var isBind = bitmask & BIND_FLAG,
+ Ctor = createCtorWrapper(func);
function wrapper() {
var fn = (this && this !== global && this instanceof wrapper) ? Ctor : func;
- return fn.apply(thisArg, arguments);
+ return fn.apply(isBind ? thisArg : this, arguments);
}
return wrapper;
}
@@ -151,12 +280,46 @@ function createCtorWrapper(Ctor) {
}
/**
- * Creates a function that wraps `func` and invokes it with optional `this`
- * binding of, partial application, and currying.
+ * Creates a function that wraps `func` to enable currying.
*
* @private
- * @param {Function|string} func The function or method name to reference.
- * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details.
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
+ * @param {number} arity The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createCurryWrapper(func, bitmask, arity) {
+ var Ctor = createCtorWrapper(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ index = length,
+ args = Array(length),
+ fn = (this && this !== global && this instanceof wrapper) ? Ctor : func,
+ placeholder = wrapper.placeholder;
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
+ ? []
+ : replaceHolders(args, placeholder);
+
+ length -= holders.length;
+ return length < arity
+ ? createRecurryWrapper(func, bitmask, createHybridWrapper, placeholder, undefined, args, holders, undefined, undefined, arity - length)
+ : apply(fn, this, args);
+ }
+ return wrapper;
+}
+
+/**
+ * Creates a function that wraps `func` to invoke it with optional `this`
+ * binding of `thisArg`, partial application, and currying.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
* @param {*} [thisArg] The `this` binding of `func`.
* @param {Array} [partials] The arguments to prepend to those provided to the new function.
* @param {Array} [holders] The `partials` placeholder indexes.
@@ -172,13 +335,11 @@ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partials
isBind = bitmask & BIND_FLAG,
isBindKey = bitmask & BIND_KEY_FLAG,
isCurry = bitmask & CURRY_FLAG,
- isCurryBound = bitmask & CURRY_BOUND_FLAG,
isCurryRight = bitmask & CURRY_RIGHT_FLAG,
+ isFlip = bitmask & FLIP_FLAG,
Ctor = isBindKey ? undefined : createCtorWrapper(func);
function wrapper() {
- // Avoid `arguments` object use disqualifying optimizations by
- // converting it to an array before providing it to other functions.
var length = arguments.length,
index = length,
args = Array(length);
@@ -198,23 +359,7 @@ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partials
length -= argsHolders.length;
if (length < arity) {
- var newArgPos = argPos ? arrayCopy(argPos) : undefined,
- newArity = nativeMax(arity - length, 0),
- newsHolders = isCurry ? argsHolders : undefined,
- newHoldersRight = isCurry ? undefined : argsHolders,
- newPartials = isCurry ? args : undefined,
- newPartialsRight = isCurry ? undefined : args;
-
- bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG);
- bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);
-
- if (!isCurryBound) {
- bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
- }
- var result = createHybridWrapper(func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, newArity);
-
- result.placeholder = placeholder;
- return result;
+ return createRecurryWrapper(func, bitmask, createHybridWrapper, placeholder, thisArg, args, argsHolders, argPos, ary, arity - length);
}
}
var thisBinding = isBind ? thisArg : this,
@@ -222,12 +367,14 @@ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partials
if (argPos) {
args = reorder(args, argPos);
+ } else if (isFlip && args.length > 1) {
+ args.reverse();
}
if (isAry && ary < args.length) {
args.length = ary;
}
if (this && this !== global && this instanceof wrapper) {
- fn = Ctor || createCtorWrapper(func);
+ fn = Ctor || createCtorWrapper(fn);
}
return fn.apply(thisBinding, args);
}
@@ -235,29 +382,28 @@ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partials
}
/**
- * Creates a function that wraps `func` and invokes it with the optional `this`
+ * Creates a function that wraps `func` to invoke it with the optional `this`
* binding of `thisArg` and the `partials` prepended to those provided to
* the wrapper.
*
* @private
- * @param {Function} func The function to partially apply arguments to.
- * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details.
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
* @param {*} thisArg The `this` binding of `func`.
* @param {Array} partials The arguments to prepend to those provided to the new function.
- * @returns {Function} Returns the new bound function.
+ * @returns {Function} Returns the new wrapped function.
*/
function createPartialWrapper(func, bitmask, thisArg, partials) {
var isBind = bitmask & BIND_FLAG,
Ctor = createCtorWrapper(func);
function wrapper() {
- // Avoid `arguments` object use disqualifying optimizations by
- // converting it to an array before providing it `func`.
var argsIndex = -1,
argsLength = arguments.length,
leftIndex = -1,
leftLength = partials.length,
- args = Array(leftLength + argsLength);
+ args = Array(leftLength + argsLength),
+ fn = (this && this !== global && this instanceof wrapper) ? Ctor : func;
while (++leftIndex < leftLength) {
args[leftIndex] = partials[leftIndex];
@@ -265,19 +411,54 @@ function createPartialWrapper(func, bitmask, thisArg, partials) {
while (argsLength--) {
args[leftIndex++] = arguments[++argsIndex];
}
- var fn = (this && this !== global && this instanceof wrapper) ? Ctor : func;
- return fn.apply(isBind ? thisArg : this, args);
+ return apply(fn, isBind ? thisArg : this, args);
}
return wrapper;
}
+/**
+ * Creates a function that wraps `func` to continue currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
+ * @param {Function} wrapFunc The function to create the `func` wrapper.
+ * @param {*} placeholder The placeholder to replace.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createRecurryWrapper(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
+ var isCurry = bitmask & CURRY_FLAG,
+ newArgPos = argPos ? copyArray(argPos) : undefined,
+ newsHolders = isCurry ? holders : undefined,
+ newHoldersRight = isCurry ? undefined : holders,
+ newPartials = isCurry ? partials : undefined,
+ newPartialsRight = isCurry ? undefined : partials;
+
+ bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG);
+ bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);
+
+ if (!(bitmask & CURRY_BOUND_FLAG)) {
+ bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
+ }
+ var result = wrapFunc(func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, arity);
+
+ result.placeholder = placeholder;
+ return result;
+}
+
/**
* Creates a function that either curries or invokes `func` with optional
* `this` binding and partially applied arguments.
*
* @private
- * @param {Function|string} func The function or method name to reference.
- * @param {number} bitmask The bitmask of flags.
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask of wrapper flags.
* The bitmask may be composed of the following flags:
* 1 - `_.bind`
* 2 - `_.bindKey`
@@ -306,7 +487,10 @@ function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, a
bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG);
partials = holders = undefined;
}
- length -= (holders ? holders.length : 0);
+ ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
+ arity = arity === undefined ? arity : toInteger(arity);
+ length -= holders ? holders.length : 0;
+
if (bitmask & PARTIAL_RIGHT_FLAG) {
var partialsRight = partials,
holdersRight = holders;
@@ -315,34 +499,30 @@ function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, a
}
var newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity];
- newData[9] = arity == null
+ func = newData[0];
+ bitmask = newData[1];
+ thisArg = newData[2];
+ partials = newData[3];
+ holders = newData[4];
+ arity = newData[9] = newData[9] == null
? (isBindKey ? 0 : func.length)
- : (nativeMax(arity - length, 0) || 0);
+ : nativeMax(newData[9] - length, 0);
- if (bitmask == BIND_FLAG) {
- var result = createBindWrapper(newData[0], newData[2]);
- } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !newData[4].length) {
- result = createPartialWrapper.apply(undefined, newData);
+ if (!arity && bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG)) {
+ bitmask &= ~(CURRY_FLAG | CURRY_RIGHT_FLAG);
+ }
+ if (!bitmask || bitmask == BIND_FLAG) {
+ var result = createBaseWrapper(func, bitmask, thisArg);
+ } else if (bitmask == CURRY_FLAG || bitmask == CURRY_RIGHT_FLAG) {
+ result = createCurryWrapper(func, bitmask, arity);
+ } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !holders.length) {
+ result = createPartialWrapper(func, bitmask, thisArg, partials);
} else {
result = createHybridWrapper.apply(undefined, newData);
}
return result;
}
-/**
- * Checks if `value` is a valid array-like index.
- *
- * @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
- */
-function isIndex(value, length) {
- value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
- length = length == null ? MAX_SAFE_INTEGER : length;
- return value > -1 && value % 1 == 0 && value < length;
-}
-
/**
* Reorder `array` according to the specified indexes where the element at
* the first index is assigned as the first element, the element at
@@ -356,7 +536,7 @@ function isIndex(value, length) {
function reorder(array, indexes) {
var arrLength = array.length,
length = nativeMin(indexes.length, arrLength),
- oldArray = arrayCopy(array);
+ oldArray = copyArray(array);
while (length--) {
var index = indexes[length];
@@ -365,6 +545,30 @@ function reorder(array, indexes) {
return array;
}
+/**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+function isFunction(value) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 8 which returns 'object' for typed array constructors, and
+ // PhantomJS 1.9 which returns 'function' for `NodeList` instances.
+ var tag = isObject(value) ? objectToString.call(value) : '';
+ return tag == funcTag || tag == genTag;
+}
+
/**
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
@@ -382,14 +586,89 @@ function reorder(array, indexes) {
* _.isObject([1, 2, 3]);
* // => true
*
- * _.isObject(1);
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
* // => false
*/
function isObject(value) {
- // Avoid a V8 JIT bug in Chrome 19-20.
- // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
var type = typeof value;
return !!value && (type == 'object' || type == 'function');
}
+/**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3');
+ * // => 3
+ */
+function toInteger(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ var remainder = value % 1;
+ return value === value ? (remainder ? value - remainder : value) : 0;
+}
+
+/**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3);
+ * // => 3
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3');
+ * // => 3
+ */
+function toNumber(value) {
+ if (isObject(value)) {
+ var other = isFunction(value.valueOf) ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
+ }
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
+ }
+ value = value.replace(reTrim, '');
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
+}
+
module.exports = createWrapper;
diff --git a/lodash._createwrapper/package.json b/lodash._createwrapper/package.json
index 2de31626d..6cdb66343 100644
--- a/lodash._createwrapper/package.json
+++ b/lodash._createwrapper/package.json
@@ -1,23 +1,16 @@
{
"name": "lodash._createwrapper",
- "version": "3.0.7",
- "description": "The modern build of lodash’s internal `createWrapper` as a module.",
+ "version": "3.1.0",
+ "description": "The internal lodash function `createWrapper` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
- "Benjamin Tan (https://d10.github.io/)",
- "Blaine Bublitz (http://www.iceddev.com/)",
- "Kit Cambridge (http://kitcambridge.be/)",
+ "Blaine Bublitz (https://github.com/phated)",
"Mathias Bynens (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
- "dependencies": {
- "lodash._arraycopy": "^3.0.0",
- "lodash._basecreate": "^3.0.0",
- "lodash._replaceholders": "^3.0.0"
- }
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
}
diff --git a/lodash.ary/LICENSE b/lodash.ary/LICENSE
index 9cd87e5dc..b054ca5a3 100644
--- a/lodash.ary/LICENSE
+++ b/lodash.ary/LICENSE
@@ -1,5 +1,5 @@
-Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+Copyright 2012-2016 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.ary/README.md b/lodash.ary/README.md
index e45f1981d..887b6c8ae 100644
--- a/lodash.ary/README.md
+++ b/lodash.ary/README.md
@@ -1,20 +1,18 @@
-# lodash.ary v3.0.2
+# lodash.ary v3.1.0
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.ary` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+The [lodash](https://lodash.com/) method `_.ary` exported as a [Node.js](https://nodejs.org/) module.
## Installation
Using npm:
-
```bash
$ {sudo -H} npm i -g npm
$ npm i --save lodash.ary
```
-In Node.js/io.js:
-
+In Node.js:
```js
var ary = require('lodash.ary');
```
-See the [documentation](https://lodash.com/docs#ary) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.ary) for more details.
+See the [documentation](https://lodash.com/docs#ary) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.ary) for more details.
diff --git a/lodash.ary/index.js b/lodash.ary/index.js
index 5aceda8f3..0194b931d 100644
--- a/lodash.ary/index.js
+++ b/lodash.ary/index.js
@@ -1,22 +1,18 @@
/**
- * lodash 3.0.2 (Custom Build)
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation
+ * lodash 3.1.0 (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var createWrapper = require('lodash._createwrapper'),
- isIterateeCall = require('lodash._isiterateecall');
+var createWrapper = require('lodash._createwrapper');
/** Used to compose bitmasks for wrapper metadata. */
var ARY_FLAG = 128;
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMax = Math.max;
-
/**
- * Creates a function that accepts up to `n` arguments ignoring any
+ * Creates a function that accepts up to `n` arguments, ignoring any
* additional arguments.
*
* @static
@@ -24,7 +20,7 @@ var nativeMax = Math.max;
* @category Function
* @param {Function} func The function to cap arguments for.
* @param {number} [n=func.length] The arity cap.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
* @returns {Function} Returns the new function.
* @example
*
@@ -32,10 +28,8 @@ var nativeMax = Math.max;
* // => [6, 8, 10]
*/
function ary(func, n, guard) {
- if (guard && isIterateeCall(func, n, guard)) {
- n = undefined;
- }
- n = (func && n == null) ? func.length : nativeMax(+n || 0, 0);
+ n = guard ? undefined : n;
+ n = (func && n == null) ? func.length : n;
return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n);
}
diff --git a/lodash.ary/package.json b/lodash.ary/package.json
index cc5a0036e..dd8a61dcd 100644
--- a/lodash.ary/package.json
+++ b/lodash.ary/package.json
@@ -1,23 +1,20 @@
{
"name": "lodash.ary",
- "version": "3.0.2",
- "description": "The modern build of lodash’s `_.ary` as a module.",
+ "version": "3.1.0",
+ "description": "The lodash method `_.ary` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util",
+ "keywords": "lodash, lodash-modularized, stdlib, util, ary",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
- "Benjamin Tan (https://d10.github.io/)",
- "Blaine Bublitz (http://www.iceddev.com/)",
- "Kit Cambridge (http://kitcambridge.be/)",
+ "Blaine Bublitz (https://github.com/phated)",
"Mathias Bynens (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._createwrapper": "^3.0.0",
- "lodash._isiterateecall": "^3.0.0"
+ "lodash._createwrapper": "^3.0.0"
}
}
diff --git a/lodash.assign/LICENSE.txt b/lodash.assign/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.assign/LICENSE.txt
+++ b/lodash.assign/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.assign/README.md b/lodash.assign/README.md
index ae64c6b97..2a89889b1 100644
--- a/lodash.assign/README.md
+++ b/lodash.assign/README.md
@@ -1,4 +1,4 @@
-# lodash.assign v3.0.0
+# lodash.assign v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.assign` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var assign = require('lodash.assign');
```
-See the [documentation](https://lodash.com/docs#assign) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.assign) for more details.
+See the [documentation](https://lodash.com/docs#assign) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.assign) for more details.
diff --git a/lodash.assign/index.js b/lodash.assign/index.js
index 7b9f87327..232996030 100644
--- a/lodash.assign/index.js
+++ b/lodash.assign/index.js
@@ -1,13 +1,102 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.3
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
var baseAssign = require('lodash._baseassign'),
- createAssigner = require('lodash._createassigner');
+ createAssigner = require('lodash._createassigner'),
+ isNative = require('lodash.isnative'),
+ keys = require('lodash.keys');
+
+/** Used for native method references. */
+var arrayProto = Array.prototype;
+
+/** Native method references. */
+var getOwnPropertySymbols = isNative(getOwnPropertySymbols = Object.getOwnPropertySymbols) && getOwnPropertySymbols,
+ push = arrayProto.push;
+
+/**
+ * A specialized version of `_.assign` for customizing assigned values without
+ * support for argument juggling, multiple sources, and `this` binding `customizer`
+ * functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {Function} customizer The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ */
+function assignWith(object, source, customizer) {
+ var props = keys(source);
+ push.apply(props, getSymbols(source));
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index],
+ value = object[key],
+ result = customizer(value, source[key], key, object, source);
+
+ if ((result === result ? (result !== value) : (value === value)) ||
+ (value === undefined && !(key in object))) {
+ object[key] = result;
+ }
+ }
+ return object;
+}
+
+/**
+ * Creates an array of the own symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+var getSymbols = !getOwnPropertySymbols ? constant([]) : function(object) {
+ return getOwnPropertySymbols(toObject(object));
+};
+
+/**
+ * Converts `value` to an object if it is not one.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {Object} Returns the object.
+ */
+function toObject(value) {
+ return isObject(value) ? value : Object(value);
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return type == 'function' || (!!value && type == 'object');
+}
/**
* Assigns own enumerable properties of source object(s) to the destination
@@ -16,13 +105,16 @@ var baseAssign = require('lodash._baseassign'),
* The `customizer` is bound to `thisArg` and invoked with five arguments:
* (objectValue, sourceValue, key, object, source).
*
+ * **Note:** This method mutates `object` and is based on
+ * [`Object.assign`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign).
+ *
* @static
* @memberOf _
* @alias extend
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
- * @param {Function} [customizer] The function to customize assigning values.
+ * @param {Function} [customizer] The function to customize assigned values.
* @param {*} [thisArg] The `this` binding of `customizer`.
* @returns {Object} Returns `object`.
* @example
@@ -32,12 +124,38 @@ var baseAssign = require('lodash._baseassign'),
*
* // using a customizer callback
* var defaults = _.partialRight(_.assign, function(value, other) {
- * return typeof value == 'undefined' ? other : value;
+ * return _.isUndefined(value) ? other : value;
* });
*
* defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
* // => { 'user': 'barney', 'age': 36 }
*/
-var assign = createAssigner(baseAssign);
+var assign = createAssigner(function(object, source, customizer) {
+ return customizer
+ ? assignWith(object, source, customizer)
+ : baseAssign(object, source);
+});
+
+/**
+ * Creates a function that returns `value`.
+ *
+ * @static
+ * @memberOf _
+ * @category Utility
+ * @param {*} value The value to return from the new function.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ * var getter = _.constant(object);
+ *
+ * getter() === object;
+ * // => true
+ */
+function constant(value) {
+ return function() {
+ return value;
+ };
+}
module.exports = assign;
diff --git a/lodash.assign/package.json b/lodash.assign/package.json
index 639740beb..563ff01db 100644
--- a/lodash.assign/package.json
+++ b/lodash.assign/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.assign",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.assign` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -18,6 +18,8 @@
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._baseassign": "^3.0.0",
- "lodash._createassigner": "^3.0.0"
+ "lodash._createassigner": "^3.0.0",
+ "lodash.isnative": "^3.0.0",
+ "lodash.keys": "^3.0.0"
}
}
diff --git a/lodash.at/LICENSE.txt b/lodash.at/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.at/LICENSE.txt
+++ b/lodash.at/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.at/README.md b/lodash.at/README.md
index 77fa904fe..a75af1186 100644
--- a/lodash.at/README.md
+++ b/lodash.at/README.md
@@ -1,4 +1,4 @@
-# lodash.at v3.0.0
+# lodash.at v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.at` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var at = require('lodash.at');
```
-See the [documentation](https://lodash.com/docs#at) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.at) for more details.
+See the [documentation](https://lodash.com/docs#at) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.at) for more details.
diff --git a/lodash.at/index.js b/lodash.at/index.js
index 84d56e505..16af39026 100644
--- a/lodash.at/index.js
+++ b/lodash.at/index.js
@@ -1,28 +1,26 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
var baseAt = require('lodash._baseat'),
baseFlatten = require('lodash._baseflatten'),
- toIterable = require('lodash._toiterable');
+ toIterable = require('lodash._toiterable'),
+ restParam = require('lodash.restparam');
/**
- * Used as the maximum length of an array-like value.
- * See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
- * for more details.
+ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+ * of an array-like value.
*/
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
/**
* Checks if `value` is a valid array-like length.
*
- * **Note:** This function is based on ES `ToLength`. See the
- * [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)
- * for more details.
+ * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
*
* @private
* @param {*} value The value to check.
@@ -49,15 +47,15 @@ function isLength(value) {
* _.at(['a', 'b', 'c'], [0, 2]);
* // => ['a', 'c']
*
- * _.at(['fred', 'barney', 'pebbles'], 0, 2);
- * // => ['fred', 'pebbles']
+ * _.at(['barney', 'fred', 'pebbles'], 0, 2);
+ * // => ['barney', 'pebbles']
*/
-function at(collection) {
+var at = restParam(function(collection, props) {
var length = collection ? collection.length : 0;
if (isLength(length)) {
collection = toIterable(collection);
}
- return baseAt(collection, baseFlatten(arguments, false, false, 1));
-}
+ return baseAt(collection, baseFlatten(props));
+});
module.exports = at;
diff --git a/lodash.at/package.json b/lodash.at/package.json
index bc0187d52..887180f40 100644
--- a/lodash.at/package.json
+++ b/lodash.at/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.at",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.at` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -19,6 +19,7 @@
"dependencies": {
"lodash._baseat": "^3.0.0",
"lodash._baseflatten": "^3.0.0",
- "lodash._toiterable": "^3.0.0"
+ "lodash._toiterable": "^3.0.0",
+ "lodash.restparam": "^3.0.0"
}
}
diff --git a/lodash.attempt/README.md b/lodash.attempt/README.md
index e5073aa8d..cc3ead3c6 100644
--- a/lodash.attempt/README.md
+++ b/lodash.attempt/README.md
@@ -1,4 +1,4 @@
-# lodash.attempt v3.0.0
+# lodash.attempt v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.attempt` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var attempt = require('lodash.attempt');
```
-See the [documentation](https://lodash.com/docs#attempt) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.attempt) for more details.
+See the [documentation](https://lodash.com/docs#attempt) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.attempt) for more details.
diff --git a/lodash.attempt/index.js b/lodash.attempt/index.js
index 870a3c4b0..d96eb2997 100644
--- a/lodash.attempt/index.js
+++ b/lodash.attempt/index.js
@@ -1,16 +1,17 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
* Based on Underscore.js 1.7.0
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var isError = require('lodash.iserror');
+var baseSlice = require('lodash._baseslice'),
+ isError = require('lodash.iserror');
/**
- * Attempts to invoke `func`, returning either the result or the caught
- * error object.
+ * Attempts to invoke `func`, returning either the result or the caught error
+ * object. Any additional arguments are provided to `func` when it is invoked.
*
* @static
* @memberOf _
@@ -20,9 +21,9 @@ var isError = require('lodash.iserror');
* @example
*
* // avoid throwing errors for invalid selectors
- * var elements = _.attempt(function() {
+ * var elements = _.attempt(function(selector) {
* return document.querySelectorAll(selector);
- * });
+ * }, '>_>');
*
* if (_.isError(elements)) {
* elements = [];
@@ -30,9 +31,9 @@ var isError = require('lodash.iserror');
*/
function attempt(func) {
try {
- return func();
+ return func.apply(undefined, baseSlice(arguments, 1));
} catch(e) {
- return isError(e) ? e : Error(e);
+ return isError(e) ? e : new Error(e);
}
}
diff --git a/lodash.attempt/package.json b/lodash.attempt/package.json
index a86df9351..4111abe25 100644
--- a/lodash.attempt/package.json
+++ b/lodash.attempt/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.attempt",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.attempt` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,6 +17,7 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
+ "lodash._baseslice": "^3.0.0",
"lodash.iserror": "^3.0.0"
}
}
diff --git a/lodash.bind/LICENSE.txt b/lodash.bind/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.bind/LICENSE.txt
+++ b/lodash.bind/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.bind/README.md b/lodash.bind/README.md
index 5ac5ca25e..789b9f287 100644
--- a/lodash.bind/README.md
+++ b/lodash.bind/README.md
@@ -1,4 +1,4 @@
-# lodash.bind v3.0.0
+# lodash.bind v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.bind` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var bind = require('lodash.bind');
```
-See the [documentation](https://lodash.com/docs#bind) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.bind) for more details.
+See the [documentation](https://lodash.com/docs#bind) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.bind) for more details.
diff --git a/lodash.bind/index.js b/lodash.bind/index.js
index 210de7543..aee2ac17d 100644
--- a/lodash.bind/index.js
+++ b/lodash.bind/index.js
@@ -1,14 +1,14 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var baseSlice = require('lodash._baseslice'),
- createWrapper = require('lodash._createwrapper'),
- replaceHolders = require('lodash._replaceholders');
+var createWrapper = require('lodash._createwrapper'),
+ replaceHolders = require('lodash._replaceholders'),
+ restParam = require('lodash.restparam');
/** Used to compose bitmasks for wrapper metadata. */
var BIND_FLAG = 1,
@@ -22,7 +22,7 @@ var BIND_FLAG = 1,
* The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
* may be used as a placeholder for partially applied arguments.
*
- * **Note:** Unlike native `Function#bind` this method does not set the `length`
+ * **Note:** Unlike native `Function#bind` this method does not set the "length"
* property of bound functions.
*
* @static
@@ -30,7 +30,7 @@ var BIND_FLAG = 1,
* @category Function
* @param {Function} func The function to bind.
* @param {*} thisArg The `this` binding of `func`.
- * @param {...*} [args] The arguments to be partially applied.
+ * @param {...*} [partials] The arguments to be partially applied.
* @returns {Function} Returns the new bound function.
* @example
*
@@ -49,16 +49,14 @@ var BIND_FLAG = 1,
* bound('hi');
* // => 'hi fred!'
*/
-function bind(func, thisArg) {
+var bind = restParam(function(func, thisArg, partials) {
var bitmask = BIND_FLAG;
- if (arguments.length > 2) {
- var partials = baseSlice(arguments, 2),
- holders = replaceHolders(partials, bind.placeholder);
-
+ if (partials.length) {
+ var holders = replaceHolders(partials, bind.placeholder);
bitmask |= PARTIAL_FLAG;
}
return createWrapper(func, bitmask, thisArg, partials, holders);
-}
+});
// Assign default placeholders.
bind.placeholder = {};
diff --git a/lodash.bind/package.json b/lodash.bind/package.json
index e76f5a18a..8733925a5 100644
--- a/lodash.bind/package.json
+++ b/lodash.bind/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.bind",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.bind` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,8 +17,8 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._baseslice": "^3.0.0",
"lodash._createwrapper": "^3.0.0",
- "lodash._replaceholders": "^3.0.0"
+ "lodash._replaceholders": "^3.0.0",
+ "lodash.restparam": "^3.0.0"
}
}
diff --git a/lodash.bindall/LICENSE.txt b/lodash.bindall/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.bindall/LICENSE.txt
+++ b/lodash.bindall/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.bindall/README.md b/lodash.bindall/README.md
index 7627446fd..99fe8cf70 100644
--- a/lodash.bindall/README.md
+++ b/lodash.bindall/README.md
@@ -1,4 +1,4 @@
-# lodash.bindall v3.0.0
+# lodash.bindall v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.bindAll` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var bindAll = require('lodash.bindall');
```
-See the [documentation](https://lodash.com/docs#bindAll) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.bindall) for more details.
+See the [documentation](https://lodash.com/docs#bindAll) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.bindall) for more details.
diff --git a/lodash.bindall/index.js b/lodash.bindall/index.js
index b1ce67e50..fd4413fab 100644
--- a/lodash.bindall/index.js
+++ b/lodash.bindall/index.js
@@ -1,45 +1,26 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
var baseFlatten = require('lodash._baseflatten'),
createWrapper = require('lodash._createwrapper'),
- functions = require('lodash.functions');
+ functions = require('lodash.functions'),
+ restParam = require('lodash.restparam');
/** Used to compose bitmasks for wrapper metadata. */
var BIND_FLAG = 1;
-/**
- * The base implementation of `_.bindAll` without support for individual
- * method name arguments.
- *
- * @private
- * @param {Object} object The object to bind and assign the bound methods to.
- * @param {string[]} methodNames The object method names to bind.
- * @returns {Object} Returns `object`.
- */
-function baseBindAll(object, methodNames) {
- var index = -1,
- length = methodNames.length;
-
- while (++index < length) {
- var key = methodNames[index];
- object[key] = createWrapper(object[key], BIND_FLAG, object);
- }
- return object;
-}
-
/**
* Binds methods of an object to the object itself, overwriting the existing
* method. Method names may be specified as individual arguments or as arrays
* of method names. If no method names are provided all enumerable function
* properties, own and inherited, of `object` are bound.
*
- * **Note:** This method does not set the `length` property of bound functions.
+ * **Note:** This method does not set the "length" property of bound functions.
*
* @static
* @memberOf _
@@ -61,12 +42,17 @@ function baseBindAll(object, methodNames) {
* jQuery('#docs').on('click', view.onClick);
* // => logs 'clicked docs' when the element is clicked
*/
-function bindAll(object) {
- return baseBindAll(object,
- arguments.length > 1
- ? baseFlatten(arguments, false, false, 1)
- : functions(object)
- );
-}
+var bindAll = restParam(function(object, methodNames) {
+ methodNames = methodNames.length ? baseFlatten(methodNames) : functions(object);
+
+ var index = -1,
+ length = methodNames.length;
+
+ while (++index < length) {
+ var key = methodNames[index];
+ object[key] = createWrapper(object[key], BIND_FLAG, object);
+ }
+ return object;
+});
module.exports = bindAll;
diff --git a/lodash.bindall/package.json b/lodash.bindall/package.json
index e198b6c6a..7686485e9 100644
--- a/lodash.bindall/package.json
+++ b/lodash.bindall/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.bindall",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.bindAll` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -19,6 +19,7 @@
"dependencies": {
"lodash._baseflatten": "^3.0.0",
"lodash._createwrapper": "^3.0.0",
- "lodash.functions": "^3.0.0"
+ "lodash.functions": "^3.0.0",
+ "lodash.restparam": "^3.0.0"
}
}
diff --git a/lodash.bindkey/LICENSE.txt b/lodash.bindkey/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.bindkey/LICENSE.txt
+++ b/lodash.bindkey/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.bindkey/README.md b/lodash.bindkey/README.md
index df2c16d7d..3e16aded3 100644
--- a/lodash.bindkey/README.md
+++ b/lodash.bindkey/README.md
@@ -1,4 +1,4 @@
-# lodash.bindkey v3.0.0
+# lodash.bindkey v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.bindKey` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var bindKey = require('lodash.bindkey');
```
-See the [documentation](https://lodash.com/docs#bindKey) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.bindkey) for more details.
+See the [documentation](https://lodash.com/docs#bindKey) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.bindkey) for more details.
diff --git a/lodash.bindkey/index.js b/lodash.bindkey/index.js
index e6a3303ee..09a335fff 100644
--- a/lodash.bindkey/index.js
+++ b/lodash.bindkey/index.js
@@ -1,14 +1,14 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var baseSlice = require('lodash._baseslice'),
- createWrapper = require('lodash._createwrapper'),
- replaceHolders = require('lodash._replaceholders');
+var createWrapper = require('lodash._createwrapper'),
+ replaceHolders = require('lodash._replaceholders'),
+ restParam = require('lodash.restparam');
/** Used to compose bitmasks for wrapper metadata. */
var BIND_FLAG = 1,
@@ -21,7 +21,7 @@ var BIND_FLAG = 1,
*
* This method differs from `_.bind` by allowing bound functions to reference
* methods that may be redefined or don't yet exist.
- * See [Peter Michaux's article](http://michaux.ca/articles/lazy-function-definition-pattern)
+ * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
* for more details.
*
* The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
@@ -32,7 +32,7 @@ var BIND_FLAG = 1,
* @category Function
* @param {Object} object The object the method belongs to.
* @param {string} key The key of the method.
- * @param {...*} [args] The arguments to be partially applied.
+ * @param {...*} [partials] The arguments to be partially applied.
* @returns {Function} Returns the new bound function.
* @example
*
@@ -59,16 +59,14 @@ var BIND_FLAG = 1,
* bound('hi');
* // => 'hiya fred!'
*/
-function bindKey(object, key) {
+var bindKey = restParam(function(object, key, partials) {
var bitmask = BIND_FLAG | BIND_KEY_FLAG;
- if (arguments.length > 2) {
- var partials = baseSlice(arguments, 2),
- holders = replaceHolders(partials, bindKey.placeholder);
-
+ if (partials.length) {
+ var holders = replaceHolders(partials, bindKey.placeholder);
bitmask |= PARTIAL_FLAG;
}
return createWrapper(key, bitmask, object, partials, holders);
-}
+});
// Assign default placeholders.
bindKey.placeholder = {};
diff --git a/lodash.bindkey/package.json b/lodash.bindkey/package.json
index ee30ae697..4bcf5d72d 100644
--- a/lodash.bindkey/package.json
+++ b/lodash.bindkey/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.bindkey",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.bindKey` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,8 +17,8 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._baseslice": "^3.0.0",
"lodash._createwrapper": "^3.0.0",
- "lodash._replaceholders": "^3.0.0"
+ "lodash._replaceholders": "^3.0.0",
+ "lodash.restparam": "^3.0.0"
}
}
diff --git a/lodash.callback/README.md b/lodash.callback/README.md
index ab83aeb59..9f9da833e 100644
--- a/lodash.callback/README.md
+++ b/lodash.callback/README.md
@@ -1,4 +1,4 @@
-# lodash.callback v3.0.0
+# lodash.callback v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.callback` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var callback = require('lodash.callback');
```
-See the [documentation](https://lodash.com/docs#callback) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.callback) for more details.
+See the [documentation](https://lodash.com/docs#callback) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.callback) for more details.
diff --git a/lodash.callback/index.js b/lodash.callback/index.js
index 1bb7a8daa..90eb49ddd 100644
--- a/lodash.callback/index.js
+++ b/lodash.callback/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
* Based on Underscore.js 1.7.0
@@ -7,13 +7,27 @@
* Available under MIT license
*/
var baseCallback = require('lodash._basecallback'),
+ baseClone = require('lodash._baseclone'),
+ baseMatches = require('lodash._basematches'),
isIterateeCall = require('lodash._isiterateecall');
/**
- * Creates a function bound to an optional `thisArg`. If `func` is a property
- * name the created callback returns the property value for a given element.
- * If `func` is an object the created callback returns `true` for elements
- * that contain the equivalent object properties, otherwise it returns `false`.
+ * Checks if `value` is object-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ */
+function isObjectLike(value) {
+ return (value && typeof value == 'object') || false;
+}
+
+/**
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`
+ * and arguments of the created function. If `func` is a property name the
+ * created callback returns the property value for a given element. If `func`
+ * is an object the created callback returns `true` for elements that contain
+ * the equivalent object properties, otherwise it returns `false`.
*
* @static
* @memberOf _
@@ -37,7 +51,9 @@ var baseCallback = require('lodash._basecallback'),
* return callback(func, thisArg);
* }
* return function(object) {
- * return match[2] == 'gt' ? object[match[1]] > match[3] : object[match[1]] < match[3];
+ * return match[2] == 'gt'
+ * ? object[match[1]] > match[3]
+ * : object[match[1]] < match[3];
* };
* });
*
@@ -48,7 +64,38 @@ function callback(func, thisArg, guard) {
if (guard && isIterateeCall(func, thisArg, guard)) {
thisArg = null;
}
- return baseCallback(func, thisArg);
+ return isObjectLike(func)
+ ? matches(func)
+ : baseCallback(func, thisArg);
+}
+
+/**
+ * Creates a function which performs a deep comparison between a given object
+ * and `source`, returning `true` if the given object has equivalent property
+ * values, else `false`.
+ *
+ * **Note:** This method supports comparing arrays, booleans, `Date` objects,
+ * numbers, `Object` objects, regexes, and strings. Objects are compared by
+ * their own, not inherited, enumerable properties. For comparing a single
+ * own or inherited property value see `_.matchesProperty`.
+ *
+ * @static
+ * @memberOf _
+ * @category Utility
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, _.matches({ 'age': 40, 'active': false }));
+ * // => [{ 'user': 'fred', 'age': 40, 'active': false }]
+ */
+function matches(source) {
+ return baseMatches(baseClone(source, true));
}
module.exports = callback;
diff --git a/lodash.callback/package.json b/lodash.callback/package.json
index b2cdbf626..fe8f45ff8 100644
--- a/lodash.callback/package.json
+++ b/lodash.callback/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.callback",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.callback` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -18,6 +18,8 @@
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._basecallback": "^3.0.0",
+ "lodash._baseclone": "^3.0.0",
+ "lodash._basematches": "^3.0.0",
"lodash._isiterateecall": "^3.0.0"
}
}
diff --git a/lodash.deburr/LICENSE.txt b/lodash.capitalize/LICENSE
similarity index 89%
rename from lodash.deburr/LICENSE.txt
rename to lodash.capitalize/LICENSE
index 9cd87e5dc..b054ca5a3 100644
--- a/lodash.deburr/LICENSE.txt
+++ b/lodash.capitalize/LICENSE
@@ -1,5 +1,5 @@
-Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+Copyright 2012-2016 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.capitalize/README.md b/lodash.capitalize/README.md
index dc6996f81..d641a2151 100644
--- a/lodash.capitalize/README.md
+++ b/lodash.capitalize/README.md
@@ -1,20 +1,18 @@
-# lodash.capitalize v3.0.0
+# lodash.capitalize v3.1.0
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.capitalize` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+The [lodash](https://lodash.com/) method `_.capitalize` exported as a [Node.js](https://nodejs.org/) module.
## Installation
Using npm:
-
```bash
$ {sudo -H} npm i -g npm
$ npm i --save lodash.capitalize
```
-In Node.js/io.js:
-
+In Node.js:
```js
var capitalize = require('lodash.capitalize');
```
-See the [documentation](https://lodash.com/docs#capitalize) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.capitalize) for more details.
+See the [documentation](https://lodash.com/docs#capitalize) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.capitalize) for more details.
diff --git a/lodash.capitalize/index.js b/lodash.capitalize/index.js
index f449c8074..1a81c94e2 100644
--- a/lodash.capitalize/index.js
+++ b/lodash.capitalize/index.js
@@ -1,15 +1,121 @@
/**
- * lodash 3.0.0 (Custom Build)
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * lodash 3.1.0 (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright 2012-2016 The Dojo Foundation
+ * Based on Underscore.js 1.8.3
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var baseToString = require('lodash._basetostring');
+var upperFirst = require('lodash.upperfirst');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/** `Object#toString` result references. */
+var symbolTag = '[object Symbol]';
+
+/** Used for built-in method references. */
+var objectProto = global.Object.prototype;
/**
- * Capitalizes the first character of `string`.
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/** Built-in value references. */
+var _Symbol = global.Symbol;
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = _Symbol ? _Symbol.prototype : undefined,
+ symbolToString = _Symbol ? symbolProto.toString : undefined;
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
+/**
+ * Converts `value` to a string if it's not one. An empty string is returned
+ * for `null` and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+function toString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if (value == null) {
+ return '';
+ }
+ if (isSymbol(value)) {
+ return _Symbol ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
+
+/**
+ * Converts the first character of `string` to upper case and the remaining
+ * to lower case.
*
* @static
* @memberOf _
@@ -18,12 +124,11 @@ var baseToString = require('lodash._basetostring');
* @returns {string} Returns the capitalized string.
* @example
*
- * _.capitalize('fred');
+ * _.capitalize('FRED');
* // => 'Fred'
*/
function capitalize(string) {
- string = baseToString(string);
- return string && (string.charAt(0).toUpperCase() + string.slice(1));
+ return upperFirst(toString(string).toLowerCase());
}
module.exports = capitalize;
diff --git a/lodash.capitalize/package.json b/lodash.capitalize/package.json
index b04a85372..a9ac05fc9 100644
--- a/lodash.capitalize/package.json
+++ b/lodash.capitalize/package.json
@@ -1,22 +1,20 @@
{
"name": "lodash.capitalize",
- "version": "3.0.0",
- "description": "The modern build of lodash’s `_.capitalize` as a module.",
+ "version": "3.1.0",
+ "description": "The lodash method `_.capitalize` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util",
+ "keywords": "lodash, lodash-modularized, stdlib, util, capitalize",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
- "Benjamin Tan (https://d10.github.io/)",
- "Blaine Bublitz (http://www.iceddev.com/)",
- "Kit Cambridge (http://kitcambridge.be/)",
+ "Blaine Bublitz (https://github.com/phated)",
"Mathias Bynens (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._basetostring": "^3.0.0"
+ "lodash.upperfirst": "^3.0.0"
}
}
diff --git a/lodash.countby/LICENSE.txt b/lodash.countby/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.countby/LICENSE.txt
+++ b/lodash.countby/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.countby/README.md b/lodash.countby/README.md
index 6a953991d..66bb651c9 100644
--- a/lodash.countby/README.md
+++ b/lodash.countby/README.md
@@ -1,4 +1,4 @@
-# lodash.countby v3.0.0
+# lodash.countby v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.countBy` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var countBy = require('lodash.countby');
```
-See the [documentation](https://lodash.com/docs#countBy) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.countby) for more details.
+See the [documentation](https://lodash.com/docs#countBy) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.countby) for more details.
diff --git a/lodash.countby/index.js b/lodash.countby/index.js
index 87c50f564..ce260465a 100644
--- a/lodash.countby/index.js
+++ b/lodash.countby/index.js
@@ -1,12 +1,13 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var createAggregator = require('lodash._createaggregator');
+var createAggregator = require('lodash._createaggregator'),
+ keys = require('lodash.keys');
/** Used for native method references. */
var objectProto = Object.prototype;
diff --git a/lodash.countby/package.json b/lodash.countby/package.json
index 5b3a0842e..9268c0934 100644
--- a/lodash.countby/package.json
+++ b/lodash.countby/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.countby",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.countBy` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,6 +17,7 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._createaggregator": "^3.0.0"
+ "lodash._createaggregator": "^3.0.0",
+ "lodash.keys": "^3.0.0"
}
}
diff --git a/lodash.create/LICENSE.txt b/lodash.create/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.create/LICENSE.txt
+++ b/lodash.create/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.create/README.md b/lodash.create/README.md
index 6e2b970cc..581453fab 100644
--- a/lodash.create/README.md
+++ b/lodash.create/README.md
@@ -1,4 +1,4 @@
-# lodash.create v3.0.0
+# lodash.create v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.create` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var create = require('lodash.create');
```
-See the [documentation](https://lodash.com/docs#create) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.create) for more details.
+See the [documentation](https://lodash.com/docs#create) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.create) for more details.
diff --git a/lodash.create/index.js b/lodash.create/index.js
index 7c7755d73..e6d32521f 100644
--- a/lodash.create/index.js
+++ b/lodash.create/index.js
@@ -1,15 +1,14 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.3
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var baseCopy = require('lodash._basecopy'),
+var baseAssign = require('lodash._baseassign'),
baseCreate = require('lodash._basecreate'),
- isIterateeCall = require('lodash._isiterateecall'),
- keys = require('lodash.keys');
+ isIterateeCall = require('lodash._isiterateecall');
/**
* Creates an object that inherits from the given `prototype` object. If a
@@ -50,7 +49,7 @@ function create(prototype, properties, guard) {
if (guard && isIterateeCall(prototype, properties, guard)) {
properties = null;
}
- return properties ? baseCopy(properties, result, keys(properties)) : result;
+ return properties ? baseAssign(result, properties) : result;
}
module.exports = create;
diff --git a/lodash.create/package.json b/lodash.create/package.json
index 685173ee9..6de6eaaf0 100644
--- a/lodash.create/package.json
+++ b/lodash.create/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.create",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.create` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,9 +17,8 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._basecopy": "^3.0.0",
+ "lodash._baseassign": "^3.0.0",
"lodash._basecreate": "^3.0.0",
- "lodash._isiterateecall": "^3.0.0",
- "lodash.keys": "^3.0.0"
+ "lodash._isiterateecall": "^3.0.0"
}
}
diff --git a/lodash.curry/LICENSE b/lodash.curry/LICENSE
index 9cd87e5dc..b054ca5a3 100644
--- a/lodash.curry/LICENSE
+++ b/lodash.curry/LICENSE
@@ -1,5 +1,5 @@
-Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+Copyright 2012-2016 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.curry/README.md b/lodash.curry/README.md
index b71d35b33..060577546 100644
--- a/lodash.curry/README.md
+++ b/lodash.curry/README.md
@@ -1,20 +1,18 @@
-# lodash.curry v3.0.2
+# lodash.curry v3.1.0
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.curry` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+The [lodash](https://lodash.com/) method `_.curry` exported as a [Node.js](https://nodejs.org/) module.
## Installation
Using npm:
-
```bash
$ {sudo -H} npm i -g npm
$ npm i --save lodash.curry
```
-In Node.js/io.js:
-
+In Node.js:
```js
var curry = require('lodash.curry');
```
-See the [documentation](https://lodash.com/docs#curry) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.curry) for more details.
+See the [documentation](https://lodash.com/docs#curry) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.curry) for more details.
diff --git a/lodash.curry/index.js b/lodash.curry/index.js
index 889bdd60b..0ded7a574 100644
--- a/lodash.curry/index.js
+++ b/lodash.curry/index.js
@@ -1,54 +1,34 @@
/**
- * lodash 3.0.2 (Custom Build)
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation
+ * lodash 3.1.0 (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var createWrapper = require('lodash._createwrapper'),
- isIterateeCall = require('lodash._isiterateecall');
+var createWrapper = require('lodash._createwrapper');
/** Used to compose bitmasks for wrapper metadata. */
var CURRY_FLAG = 8;
/**
- * Creates a `_.curry` or `_.curryRight` function.
- *
- * @private
- * @param {boolean} flag The curry bit flag.
- * @returns {Function} Returns the new curry function.
- */
-function createCurry(flag) {
- function curryFunc(func, arity, guard) {
- if (guard && isIterateeCall(func, arity, guard)) {
- arity = undefined;
- }
- var result = createWrapper(func, flag, undefined, undefined, undefined, undefined, undefined, arity);
- result.placeholder = curryFunc.placeholder;
- return result;
- }
- return curryFunc;
-}
-
-/**
- * Creates a function that accepts one or more arguments of `func` that when
- * called either invokes `func` returning its result, if all `func` arguments
- * have been provided, or returns a function that accepts one or more of the
- * remaining `func` arguments, and so on. The arity of `func` may be specified
- * if `func.length` is not sufficient.
+ * Creates a function that accepts arguments of `func` and either invokes
+ * `func` returning its result, if at least `arity` number of arguments have
+ * been provided, or returns a function that accepts the remaining `func`
+ * arguments, and so on. The arity of `func` may be specified if `func.length`
+ * is not sufficient.
*
* The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
* may be used as a placeholder for provided arguments.
*
- * **Note:** This method does not set the "length" property of curried functions.
+ * **Note:** This method doesn't set the "length" property of curried functions.
*
* @static
* @memberOf _
* @category Function
* @param {Function} func The function to curry.
* @param {number} [arity=func.length] The arity of `func`.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
* @returns {Function} Returns the new curried function.
* @example
*
@@ -67,13 +47,15 @@ function createCurry(flag) {
* curried(1, 2, 3);
* // => [1, 2, 3]
*
- * // using placeholders
+ * // Curried with placeholders.
* curried(1)(_, 3)(2);
* // => [1, 2, 3]
*/
-var curry = createCurry(CURRY_FLAG);
-
-// Assign default placeholders.
-curry.placeholder = {};
+function curry(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrapper(func, CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curry.placeholder;
+ return result;
+}
module.exports = curry;
diff --git a/lodash.curry/package.json b/lodash.curry/package.json
index 0526df645..5dbb88978 100644
--- a/lodash.curry/package.json
+++ b/lodash.curry/package.json
@@ -1,23 +1,20 @@
{
"name": "lodash.curry",
- "version": "3.0.2",
- "description": "The modern build of lodash’s `_.curry` as a module.",
+ "version": "3.1.0",
+ "description": "The lodash method `_.curry` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util",
+ "keywords": "lodash, lodash-modularized, stdlib, util, curry",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
- "Benjamin Tan (https://d10.github.io/)",
- "Blaine Bublitz (http://www.iceddev.com/)",
- "Kit Cambridge (http://kitcambridge.be/)",
+ "Blaine Bublitz (https://github.com/phated)",
"Mathias Bynens (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._createwrapper": "^3.0.0",
- "lodash._isiterateecall": "^3.0.0"
+ "lodash._createwrapper": "^3.0.0"
}
}
diff --git a/lodash.curryright/LICENSE b/lodash.curryright/LICENSE
index 9cd87e5dc..b054ca5a3 100644
--- a/lodash.curryright/LICENSE
+++ b/lodash.curryright/LICENSE
@@ -1,5 +1,5 @@
-Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+Copyright 2012-2016 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.curryright/README.md b/lodash.curryright/README.md
index 8fa7191b7..7a39c250f 100644
--- a/lodash.curryright/README.md
+++ b/lodash.curryright/README.md
@@ -1,20 +1,18 @@
-# lodash.curryright v3.0.2
+# lodash.curryright v3.1.0
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.curryRight` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+The [lodash](https://lodash.com/) method `_.curryRight` exported as a [Node.js](https://nodejs.org/) module.
## Installation
Using npm:
-
```bash
$ {sudo -H} npm i -g npm
$ npm i --save lodash.curryright
```
-In Node.js/io.js:
-
+In Node.js:
```js
var curryRight = require('lodash.curryright');
```
-See the [documentation](https://lodash.com/docs#curryRight) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.curryright) for more details.
+See the [documentation](https://lodash.com/docs#curryRight) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.curryright) for more details.
diff --git a/lodash.curryright/index.js b/lodash.curryright/index.js
index 93bd356ed..a217c416b 100644
--- a/lodash.curryright/index.js
+++ b/lodash.curryright/index.js
@@ -1,36 +1,16 @@
/**
- * lodash 3.0.2 (Custom Build)
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation
+ * lodash 3.1.0 (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var createWrapper = require('lodash._createwrapper'),
- isIterateeCall = require('lodash._isiterateecall');
+var createWrapper = require('lodash._createwrapper');
/** Used to compose bitmasks for wrapper metadata. */
var CURRY_RIGHT_FLAG = 16;
-/**
- * Creates a `_.curry` or `_.curryRight` function.
- *
- * @private
- * @param {boolean} flag The curry bit flag.
- * @returns {Function} Returns the new curry function.
- */
-function createCurry(flag) {
- function curryFunc(func, arity, guard) {
- if (guard && isIterateeCall(func, arity, guard)) {
- arity = undefined;
- }
- var result = createWrapper(func, flag, undefined, undefined, undefined, undefined, undefined, arity);
- result.placeholder = curryFunc.placeholder;
- return result;
- }
- return curryFunc;
-}
-
/**
* This method is like `_.curry` except that arguments are applied to `func`
* in the manner of `_.partialRight` instead of `_.partial`.
@@ -38,14 +18,14 @@ function createCurry(flag) {
* The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
* builds, may be used as a placeholder for provided arguments.
*
- * **Note:** This method does not set the "length" property of curried functions.
+ * **Note:** This method doesn't set the "length" property of curried functions.
*
* @static
* @memberOf _
* @category Function
* @param {Function} func The function to curry.
* @param {number} [arity=func.length] The arity of `func`.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
* @returns {Function} Returns the new curried function.
* @example
*
@@ -64,13 +44,15 @@ function createCurry(flag) {
* curried(1, 2, 3);
* // => [1, 2, 3]
*
- * // using placeholders
+ * // Curried with placeholders.
* curried(3)(1, _)(2);
* // => [1, 2, 3]
*/
-var curryRight = createCurry(CURRY_RIGHT_FLAG);
-
-// Assign default placeholders.
-curryRight.placeholder = {};
+function curryRight(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrapper(func, CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curryRight.placeholder;
+ return result;
+}
module.exports = curryRight;
diff --git a/lodash.curryright/package.json b/lodash.curryright/package.json
index d84cb27b6..63fec2954 100644
--- a/lodash.curryright/package.json
+++ b/lodash.curryright/package.json
@@ -1,23 +1,20 @@
{
"name": "lodash.curryright",
- "version": "3.0.2",
- "description": "The modern build of lodash’s `_.curryRight` as a module.",
+ "version": "3.1.0",
+ "description": "The lodash method `_.curryRight` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util",
+ "keywords": "lodash, lodash-modularized, stdlib, util, curryright",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
- "Benjamin Tan (https://d10.github.io/)",
- "Blaine Bublitz (http://www.iceddev.com/)",
- "Kit Cambridge (http://kitcambridge.be/)",
+ "Blaine Bublitz (https://github.com/phated)",
"Mathias Bynens (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._createwrapper": "^3.0.0",
- "lodash._isiterateecall": "^3.0.0"
+ "lodash._createwrapper": "^3.0.0"
}
}
diff --git a/lodash.debounce/README.md b/lodash.debounce/README.md
index 5bffb8e72..6a3c1c18d 100644
--- a/lodash.debounce/README.md
+++ b/lodash.debounce/README.md
@@ -1,4 +1,4 @@
-# lodash.debounce v3.0.3
+# lodash.debounce v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.debounce` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var debounce = require('lodash.debounce');
```
-See the [documentation](https://lodash.com/docs#debounce) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.debounce) for more details.
+See the [documentation](https://lodash.com/docs#debounce) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.debounce) for more details.
diff --git a/lodash.debounce/index.js b/lodash.debounce/index.js
index f6e43bfcd..d6074e0cf 100644
--- a/lodash.debounce/index.js
+++ b/lodash.debounce/index.js
@@ -1,19 +1,19 @@
/**
- * lodash 3.0.3 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.8.2
+ * Based on Underscore.js 1.8.3
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var isNative = require('lodash.isnative');
+var getNative = require('lodash._getnative');
/** 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,
- nativeNow = isNative(nativeNow = Date.now) && nativeNow;
+ nativeNow = getNative(Date, 'now');
/**
* Gets the number of milliseconds that have elapsed since the Unix epoch
@@ -34,12 +34,13 @@ var now = nativeNow || function() {
};
/**
- * Creates a function that delays invoking `func` until after `wait` milliseconds
- * have elapsed since the last time it was invoked. The created function comes
- * with a `cancel` method to cancel delayed invocations. Provide an options
- * object to indicate that `func` should be invoked on the leading and/or
- * trailing edge of the `wait` timeout. Subsequent calls to the debounced
- * function return the result of the last `func` invocation.
+ * Creates a debounced function that delays invoking `func` until after `wait`
+ * milliseconds have elapsed since the last time the debounced function was
+ * invoked. The debounced function comes with a `cancel` method to cancel
+ * delayed invocations. Provide an options object to indicate that `func`
+ * should be invoked on the leading and/or trailing edge of the `wait` timeout.
+ * Subsequent calls to the debounced function return the result of the last
+ * `func` invocation.
*
* **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
* on the trailing edge of the timeout only if the the debounced function is
@@ -233,7 +234,7 @@ function isObject(value) {
// Avoid a V8 JIT bug in Chrome 19-20.
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
var type = typeof value;
- return type == 'function' || (!!value && type == 'object');
+ return !!value && (type == 'object' || type == 'function');
}
module.exports = debounce;
diff --git a/lodash.debounce/package.json b/lodash.debounce/package.json
index 03d4eb12a..00c6cecf8 100644
--- a/lodash.debounce/package.json
+++ b/lodash.debounce/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.debounce",
- "version": "3.0.3",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.debounce` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,6 +17,6 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash.isnative": "^3.0.0"
+ "lodash._getnative": "^3.0.0"
}
}
diff --git a/lodash.endswith/LICENSE.txt b/lodash.deburr/LICENSE
similarity index 89%
rename from lodash.endswith/LICENSE.txt
rename to lodash.deburr/LICENSE
index 9cd87e5dc..b054ca5a3 100644
--- a/lodash.endswith/LICENSE.txt
+++ b/lodash.deburr/LICENSE
@@ -1,5 +1,5 @@
-Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+Copyright 2012-2016 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.deburr/README.md b/lodash.deburr/README.md
index 19d789c6f..1cdf3b55f 100644
--- a/lodash.deburr/README.md
+++ b/lodash.deburr/README.md
@@ -1,20 +1,18 @@
-# lodash.deburr v3.0.2
+# lodash.deburr v3.1.0
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.deburr` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+The [lodash](https://lodash.com/) method `_.deburr` exported as a [Node.js](https://nodejs.org/) module.
## Installation
Using npm:
-
```bash
$ {sudo -H} npm i -g npm
$ npm i --save lodash.deburr
```
-In Node.js/io.js:
-
+In Node.js:
```js
var deburr = require('lodash.deburr');
```
-See the [documentation](https://lodash.com/docs#deburr) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.deburr) for more details.
+See the [documentation](https://lodash.com/docs#deburr) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.deburr) for more details.
diff --git a/lodash.deburr/index.js b/lodash.deburr/index.js
index 3bbda44ba..27a22e843 100644
--- a/lodash.deburr/index.js
+++ b/lodash.deburr/index.js
@@ -1,19 +1,30 @@
/**
- * lodash 3.0.2 (Custom Build)
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation
+ * lodash 3.1.0 (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var baseToString = require('lodash._basetostring');
-/** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */
-var reComboMark = /[\u0300-\u036f\ufe20-\ufe23]/g;
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/** `Object#toString` result references. */
+var symbolTag = '[object Symbol]';
/** Used to match latin-1 supplementary letters (excluding mathematical operators). */
var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;
+/** Used to compose unicode character classes. */
+var rsComboRange = '\\u0300-\\u036f\\ufe20-\\ufe23';
+
+/** Used to compose unicode capture groups. */
+var rsCombo = '[' + rsComboRange + ']';
+
+/** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */
+var reComboMark = RegExp(rsCombo, 'g');
+
/** Used to map latin-1 supplementary letters to basic latin letters. */
var deburredLetters = {
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
@@ -46,6 +57,105 @@ function deburrLetter(letter) {
return deburredLetters[letter];
}
+/** Used for built-in method references. */
+var objectProto = global.Object.prototype;
+
+/**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/** Built-in value references. */
+var _Symbol = global.Symbol;
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = _Symbol ? _Symbol.prototype : undefined,
+ symbolToString = _Symbol ? symbolProto.toString : undefined;
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
+/**
+ * Converts `value` to a string if it's not one. An empty string is returned
+ * for `null` and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+function toString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if (value == null) {
+ return '';
+ }
+ if (isSymbol(value)) {
+ return _Symbol ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
+
/**
* Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
* to basic latin letters and removing [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
@@ -61,7 +171,7 @@ function deburrLetter(letter) {
* // => 'deja vu'
*/
function deburr(string) {
- string = baseToString(string);
+ string = toString(string);
return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, '');
}
diff --git a/lodash.deburr/package.json b/lodash.deburr/package.json
index 2ede9010f..257194208 100644
--- a/lodash.deburr/package.json
+++ b/lodash.deburr/package.json
@@ -1,22 +1,17 @@
{
"name": "lodash.deburr",
- "version": "3.0.2",
- "description": "The modern build of lodash’s `_.deburr` as a module.",
+ "version": "3.1.0",
+ "description": "The lodash method `_.deburr` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util",
+ "keywords": "lodash, lodash-modularized, stdlib, util, deburr",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
- "Benjamin Tan (https://d10.github.io/)",
- "Blaine Bublitz (http://www.iceddev.com/)",
- "Kit Cambridge (http://kitcambridge.be/)",
+ "Blaine Bublitz (https://github.com/phated)",
"Mathias Bynens (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"
- }
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
}
diff --git a/lodash.defaults/LICENSE.txt b/lodash.defaults/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.defaults/LICENSE.txt
+++ b/lodash.defaults/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.defaults/README.md b/lodash.defaults/README.md
index 84b6e2bcd..b91815c58 100644
--- a/lodash.defaults/README.md
+++ b/lodash.defaults/README.md
@@ -1,4 +1,4 @@
-# lodash.defaults v3.0.0
+# lodash.defaults v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.defaults` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var defaults = require('lodash.defaults');
```
-See the [documentation](https://lodash.com/docs#defaults) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.defaults) for more details.
+See the [documentation](https://lodash.com/docs#defaults) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.defaults) for more details.
diff --git a/lodash.defaults/index.js b/lodash.defaults/index.js
index d42962d9d..85e67ac87 100644
--- a/lodash.defaults/index.js
+++ b/lodash.defaults/index.js
@@ -1,13 +1,13 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var arrayCopy = require('lodash._arraycopy'),
- assign = require('lodash.assign');
+var assign = require('lodash.assign'),
+ restParam = require('lodash.restparam');
/**
* Used by `_.defaults` to customize its `_.assign` use.
@@ -37,13 +37,13 @@ function assignDefaults(objectValue, sourceValue) {
* _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
* // => { 'user': 'barney', 'age': 36 }
*/
-function defaults(object) {
+var defaults = restParam(function(args) {
+ var object = args[0];
if (object == null) {
return object;
}
- var args = arrayCopy(arguments);
args.push(assignDefaults);
return assign.apply(undefined, args);
-}
+});
module.exports = defaults;
diff --git a/lodash.defaults/package.json b/lodash.defaults/package.json
index 54e4622ad..331ceb47a 100644
--- a/lodash.defaults/package.json
+++ b/lodash.defaults/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.defaults",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.defaults` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,7 +17,7 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._arraycopy": "^3.0.0",
- "lodash.assign": "^3.0.0"
+ "lodash.assign": "^3.0.0",
+ "lodash.restparam": "^3.0.0"
}
}
diff --git a/lodash.defer/LICENSE.txt b/lodash.defer/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.defer/LICENSE.txt
+++ b/lodash.defer/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.defer/README.md b/lodash.defer/README.md
index d4198547e..f598a96be 100644
--- a/lodash.defer/README.md
+++ b/lodash.defer/README.md
@@ -1,4 +1,4 @@
-# lodash.defer v3.0.0
+# lodash.defer v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.defer` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var defer = require('lodash.defer');
```
-See the [documentation](https://lodash.com/docs#defer) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.defer) for more details.
+See the [documentation](https://lodash.com/docs#defer) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.defer) for more details.
diff --git a/lodash.defer/index.js b/lodash.defer/index.js
index e3764cab2..6f562a93b 100644
--- a/lodash.defer/index.js
+++ b/lodash.defer/index.js
@@ -1,16 +1,17 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var baseDelay = require('lodash._basedelay');
+var baseDelay = require('lodash._basedelay'),
+ restParam = require('lodash.restparam');
/**
* Defers invoking the `func` until the current call stack has cleared. Any
- * additional arguments are provided to `func` when it is invoked.
+ * additional arguments are provided to `func` when it's invoked.
*
* @static
* @memberOf _
@@ -25,8 +26,8 @@ var baseDelay = require('lodash._basedelay');
* }, 'deferred');
* // logs 'deferred' after one or more milliseconds
*/
-function defer(func) {
- return baseDelay(func, 1, arguments, 1);
-}
+var defer = restParam(function(func, args) {
+ return baseDelay(func, 1, args);
+});
module.exports = defer;
diff --git a/lodash.defer/package.json b/lodash.defer/package.json
index 28dad021b..d40d7fd7c 100644
--- a/lodash.defer/package.json
+++ b/lodash.defer/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.defer",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.defer` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,6 +17,7 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._basedelay": "^3.0.0"
+ "lodash._basedelay": "^3.0.0",
+ "lodash.restparam": "^3.0.0"
}
}
diff --git a/lodash.delay/LICENSE.txt b/lodash.delay/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.delay/LICENSE.txt
+++ b/lodash.delay/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.delay/README.md b/lodash.delay/README.md
index 3dd427788..78793891b 100644
--- a/lodash.delay/README.md
+++ b/lodash.delay/README.md
@@ -1,4 +1,4 @@
-# lodash.delay v3.0.0
+# lodash.delay v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.delay` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var delay = require('lodash.delay');
```
-See the [documentation](https://lodash.com/docs#delay) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.delay) for more details.
+See the [documentation](https://lodash.com/docs#delay) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.delay) for more details.
diff --git a/lodash.delay/index.js b/lodash.delay/index.js
index bcec2a5a3..6a1a16c09 100644
--- a/lodash.delay/index.js
+++ b/lodash.delay/index.js
@@ -1,16 +1,17 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var baseDelay = require('lodash._basedelay');
+var baseDelay = require('lodash._basedelay'),
+ restParam = require('lodash.restparam');
/**
* Invokes `func` after `wait` milliseconds. Any additional arguments are
- * provided to `func` when it is invoked.
+ * provided to `func` when it's invoked.
*
* @static
* @memberOf _
@@ -26,8 +27,8 @@ var baseDelay = require('lodash._basedelay');
* }, 1000, 'later');
* // => logs 'later' after one second
*/
-function delay(func, wait) {
- return baseDelay(func, wait, arguments, 2);
-}
+var delay = restParam(function(func, wait, args) {
+ return baseDelay(func, wait, args);
+});
module.exports = delay;
diff --git a/lodash.delay/package.json b/lodash.delay/package.json
index 80d7f039d..91bc70df5 100644
--- a/lodash.delay/package.json
+++ b/lodash.delay/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.delay",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.delay` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,6 +17,7 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._basedelay": "^3.0.0"
+ "lodash._basedelay": "^3.0.0",
+ "lodash.restparam": "^3.0.0"
}
}
diff --git a/lodash.difference/LICENSE.txt b/lodash.difference/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.difference/LICENSE.txt
+++ b/lodash.difference/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.difference/README.md b/lodash.difference/README.md
index 7a8bf1ad0..71af40fc0 100644
--- a/lodash.difference/README.md
+++ b/lodash.difference/README.md
@@ -1,4 +1,4 @@
-# lodash.difference v3.0.1
+# lodash.difference v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.difference` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var difference = require('lodash.difference');
```
-See the [documentation](https://lodash.com/docs#difference) or [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash.difference) for more details.
+See the [documentation](https://lodash.com/docs#difference) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.difference) for more details.
diff --git a/lodash.difference/index.js b/lodash.difference/index.js
index aa2a7c1e3..3ff7fdd70 100644
--- a/lodash.difference/index.js
+++ b/lodash.difference/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 3.0.1 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
* Based on Underscore.js 1.8.2
@@ -9,16 +9,16 @@
var baseDifference = require('lodash._basedifference'),
baseFlatten = require('lodash._baseflatten'),
isArguments = require('lodash.isarguments'),
- isArray = require('lodash.isarray');
+ isArray = require('lodash.isarray'),
+ restParam = require('lodash.restparam');
/**
* Creates an array excluding all values of the provided arrays using
* `SameValueZero` for equality comparisons.
*
- * **Note:** `SameValueZero` comparisons are like strict equality comparisons,
- * e.g. `===`, except that `NaN` matches `NaN`. See the
- * [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
- * for more details.
+ * **Note:** [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
+ * comparisons are like strict equality comparisons, e.g. `===`, except that
+ * `NaN` matches `NaN`.
*
* @static
* @memberOf _
@@ -31,18 +31,10 @@ var baseDifference = require('lodash._basedifference'),
* _.difference([1, 2, 3], [4, 2]);
* // => [1, 3]
*/
-function difference() {
- var args = arguments,
- index = -1,
- length = args.length;
-
- while (++index < length) {
- var value = args[index];
- if (isArray(value) || isArguments(value)) {
- break;
- }
- }
- return baseDifference(value, baseFlatten(args, false, true, ++index));
-}
+var difference = restParam(function(array, values) {
+ return (isArray(array) || isArguments(array))
+ ? baseDifference(array, baseFlatten(values, false, true))
+ : [];
+});
module.exports = difference;
diff --git a/lodash.difference/package.json b/lodash.difference/package.json
index 9e9fcae94..b6995bd47 100644
--- a/lodash.difference/package.json
+++ b/lodash.difference/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.difference",
- "version": "3.0.1",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.difference` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -20,6 +20,7 @@
"lodash._basedifference": "^3.0.0",
"lodash._baseflatten": "^3.0.0",
"lodash.isarguments": "^3.0.0",
- "lodash.isarray": "^3.0.0"
+ "lodash.isarray": "^3.0.0",
+ "lodash.restparam": "^3.0.0"
}
}
diff --git a/lodash.droprightwhile/README.md b/lodash.droprightwhile/README.md
index c8b83c2e0..006a40f0a 100644
--- a/lodash.droprightwhile/README.md
+++ b/lodash.droprightwhile/README.md
@@ -1,4 +1,4 @@
-# lodash.droprightwhile v3.0.1
+# lodash.droprightwhile v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.dropRightWhile` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var dropRightWhile = require('lodash.droprightwhile');
```
-See the [documentation](https://lodash.com/docs#dropRightWhile) or [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash.droprightwhile) for more details.
+See the [documentation](https://lodash.com/docs#dropRightWhile) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.droprightwhile) for more details.
diff --git a/lodash.droprightwhile/index.js b/lodash.droprightwhile/index.js
index b49d6fc71..be9e8c754 100644
--- a/lodash.droprightwhile/index.js
+++ b/lodash.droprightwhile/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 3.0.1 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
* Based on Underscore.js 1.8.2
@@ -7,7 +7,8 @@
* Available under MIT license
*/
var baseCallback = require('lodash._basecallback'),
- baseSlice = require('lodash._baseslice');
+ baseSlice = require('lodash._baseslice'),
+ isArray = require('lodash.isarray');
/**
* The base implementation of `_.dropRightWhile`, `_.dropWhile`, `_.takeRightWhile`,
diff --git a/lodash.droprightwhile/package.json b/lodash.droprightwhile/package.json
index 20c066657..5cbfacd88 100644
--- a/lodash.droprightwhile/package.json
+++ b/lodash.droprightwhile/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.droprightwhile",
- "version": "3.0.1",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.dropRightWhile` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -18,6 +18,7 @@
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._basecallback": "^3.0.0",
- "lodash._baseslice": "^3.0.0"
+ "lodash._baseslice": "^3.0.0",
+ "lodash.isarray": "^3.0.0"
}
}
diff --git a/lodash.dropwhile/README.md b/lodash.dropwhile/README.md
index 4054dbb37..674dae23e 100644
--- a/lodash.dropwhile/README.md
+++ b/lodash.dropwhile/README.md
@@ -1,4 +1,4 @@
-# lodash.dropwhile v3.0.1
+# lodash.dropwhile v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.dropWhile` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var dropWhile = require('lodash.dropwhile');
```
-See the [documentation](https://lodash.com/docs#dropWhile) or [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash.dropwhile) for more details.
+See the [documentation](https://lodash.com/docs#dropWhile) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.dropwhile) for more details.
diff --git a/lodash.dropwhile/index.js b/lodash.dropwhile/index.js
index 458b3d098..8e450f01a 100644
--- a/lodash.dropwhile/index.js
+++ b/lodash.dropwhile/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 3.0.1 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
* Based on Underscore.js 1.8.2
@@ -7,7 +7,8 @@
* Available under MIT license
*/
var baseCallback = require('lodash._basecallback'),
- baseSlice = require('lodash._baseslice');
+ baseSlice = require('lodash._baseslice'),
+ isArray = require('lodash.isarray');
/**
* The base implementation of `_.dropRightWhile`, `_.dropWhile`, `_.takeRightWhile`,
diff --git a/lodash.dropwhile/package.json b/lodash.dropwhile/package.json
index 85a8468cb..024a31789 100644
--- a/lodash.dropwhile/package.json
+++ b/lodash.dropwhile/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.dropwhile",
- "version": "3.0.1",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.dropWhile` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -18,6 +18,7 @@
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._basecallback": "^3.0.0",
- "lodash._baseslice": "^3.0.0"
+ "lodash._baseslice": "^3.0.0",
+ "lodash.isarray": "^3.0.0"
}
}
diff --git a/lodash.memoize/LICENSE.txt b/lodash.endswith/LICENSE
similarity index 89%
rename from lodash.memoize/LICENSE.txt
rename to lodash.endswith/LICENSE
index 9cd87e5dc..b054ca5a3 100644
--- a/lodash.memoize/LICENSE.txt
+++ b/lodash.endswith/LICENSE
@@ -1,5 +1,5 @@
-Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+Copyright 2012-2016 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.endswith/README.md b/lodash.endswith/README.md
index 11e270b74..10b6abcbe 100644
--- a/lodash.endswith/README.md
+++ b/lodash.endswith/README.md
@@ -1,20 +1,18 @@
-# lodash.endswith v3.0.2
+# lodash.endswith v3.1.0
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.endsWith` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+The [lodash](https://lodash.com/) method `_.endsWith` exported as a [Node.js](https://nodejs.org/) module.
## Installation
Using npm:
-
```bash
$ {sudo -H} npm i -g npm
$ npm i --save lodash.endswith
```
-In Node.js/io.js:
-
+In Node.js:
```js
var endsWith = require('lodash.endswith');
```
-See the [documentation](https://lodash.com/docs#endsWith) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.endswith) for more details.
+See the [documentation](https://lodash.com/docs#endsWith) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.endswith) for more details.
diff --git a/lodash.endswith/index.js b/lodash.endswith/index.js
index 794c1d1ed..ca91525f3 100644
--- a/lodash.endswith/index.js
+++ b/lodash.endswith/index.js
@@ -1,15 +1,284 @@
/**
- * lodash 3.0.2 (Custom Build)
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation
+ * lodash 3.1.0 (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var baseToString = require('lodash._basetostring');
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMin = Math.min;
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0,
+ MAX_INTEGER = 1.7976931348623157e+308,
+ NAN = 0 / 0;
+
+/** `Object#toString` result references. */
+var funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ symbolTag = '[object Symbol]';
+
+/** Used to match leading and trailing whitespace. */
+var reTrim = /^\s+|\s+$/g;
+
+/** Used to detect bad signed hexadecimal string values. */
+var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+/** Used to detect binary string values. */
+var reIsBinary = /^0b[01]+$/i;
+
+/** Used to detect octal string values. */
+var reIsOctal = /^0o[0-7]+$/i;
+
+/** Built-in method references without a dependency on `global`. */
+var freeParseInt = parseInt;
+
+/** Used for built-in method references. */
+var objectProto = global.Object.prototype;
+
+/**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/** Built-in value references. */
+var _Symbol = global.Symbol;
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = _Symbol ? _Symbol.prototype : undefined,
+ symbolToString = _Symbol ? symbolProto.toString : undefined;
+
+/**
+ * The base implementation of `_.clamp` which doesn't coerce arguments to numbers.
+ *
+ * @private
+ * @param {number} number The number to clamp.
+ * @param {number} [lower] The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the clamped number.
+ */
+function baseClamp(number, lower, upper) {
+ if (number === number) {
+ if (upper !== undefined) {
+ number = number <= upper ? number : upper;
+ }
+ if (lower !== undefined) {
+ number = number >= lower ? number : lower;
+ }
+ }
+ return number;
+}
+
+/**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+function isFunction(value) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 8 which returns 'object' for typed array constructors, and
+ // PhantomJS 1.9 which returns 'function' for `NodeList` instances.
+ var tag = isObject(value) ? objectToString.call(value) : '';
+ return tag == funcTag || tag == genTag;
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @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(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
+/**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3');
+ * // => 3
+ */
+function toInteger(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ var remainder = value % 1;
+ return value === value ? (remainder ? value - remainder : value) : 0;
+}
+
+/**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3);
+ * // => 3
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3');
+ * // => 3
+ */
+function toNumber(value) {
+ if (isObject(value)) {
+ var other = isFunction(value.valueOf) ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
+ }
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
+ }
+ value = value.replace(reTrim, '');
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
+}
+
+/**
+ * Converts `value` to a string if it's not one. An empty string is returned
+ * for `null` and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+function toString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if (value == null) {
+ return '';
+ }
+ if (isSymbol(value)) {
+ return _Symbol ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
/**
* Checks if `string` ends with the given target string.
@@ -33,13 +302,13 @@ var nativeMin = Math.min;
* // => true
*/
function endsWith(string, target, position) {
- string = baseToString(string);
- target = (target + '');
+ string = toString(string);
+ target = typeof target == 'string' ? target : (target + '');
var length = string.length;
position = position === undefined
? length
- : nativeMin(position < 0 ? 0 : (+position || 0), length);
+ : baseClamp(toInteger(position), 0, length);
position -= target.length;
return position >= 0 && string.indexOf(target, position) == position;
diff --git a/lodash.endswith/package.json b/lodash.endswith/package.json
index 30f74a0a7..59d44fd04 100644
--- a/lodash.endswith/package.json
+++ b/lodash.endswith/package.json
@@ -1,22 +1,17 @@
{
"name": "lodash.endswith",
- "version": "3.0.2",
- "description": "The modern build of lodash’s `_.endsWith` as a module.",
+ "version": "3.1.0",
+ "description": "The lodash method `_.endsWith` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util",
+ "keywords": "lodash, lodash-modularized, stdlib, util, endswith",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
- "Benjamin Tan (https://d10.github.io/)",
- "Blaine Bublitz (http://www.iceddev.com/)",
- "Kit Cambridge (http://kitcambridge.be/)",
+ "Blaine Bublitz (https://github.com/phated)",
"Mathias Bynens (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"
- }
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
}
diff --git a/lodash.startswith/LICENSE.txt b/lodash.escape/LICENSE
similarity index 89%
rename from lodash.startswith/LICENSE.txt
rename to lodash.escape/LICENSE
index 9cd87e5dc..b054ca5a3 100644
--- a/lodash.startswith/LICENSE.txt
+++ b/lodash.escape/LICENSE
@@ -1,5 +1,5 @@
-Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+Copyright 2012-2016 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.escape/README.md b/lodash.escape/README.md
index 558476ffe..b86621fa3 100644
--- a/lodash.escape/README.md
+++ b/lodash.escape/README.md
@@ -1,20 +1,18 @@
-# lodash.escape v3.0.0
+# lodash.escape v3.1.0
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.escape` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+The [lodash](https://lodash.com/) method `_.escape` exported as a [Node.js](https://nodejs.org/) module.
## Installation
Using npm:
-
```bash
$ {sudo -H} npm i -g npm
$ npm i --save lodash.escape
```
-In Node.js/io.js:
-
+In Node.js:
```js
var escape = require('lodash.escape');
```
-See the [documentation](https://lodash.com/docs#escape) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.escape) for more details.
+See the [documentation](https://lodash.com/docs#escape) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.escape) for more details.
diff --git a/lodash.escape/index.js b/lodash.escape/index.js
index 04bc91fff..500cb7c15 100644
--- a/lodash.escape/index.js
+++ b/lodash.escape/index.js
@@ -1,12 +1,17 @@
/**
- * lodash 3.0.0 (Custom Build)
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * lodash 3.1.0 (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright 2012-2016 The Dojo Foundation
+ * Based on Underscore.js 1.8.3
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var baseToString = require('lodash._basetostring');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/** `Object#toString` result references. */
+var symbolTag = '[object Symbol]';
/** Used to match HTML entities and HTML characters. */
var reUnescapedHtml = /[&<>"'`]/g,
@@ -33,12 +38,111 @@ function escapeHtmlChar(chr) {
return htmlEscapes[chr];
}
+/** Used for built-in method references. */
+var objectProto = global.Object.prototype;
+
/**
- * Converts the characters "&", "<", ">", '"', "'", and "\`", in `string` to
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/** Built-in value references. */
+var _Symbol = global.Symbol;
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = _Symbol ? _Symbol.prototype : undefined,
+ symbolToString = _Symbol ? symbolProto.toString : undefined;
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
+/**
+ * Converts `value` to a string if it's not one. An empty string is returned
+ * for `null` and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+function toString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if (value == null) {
+ return '';
+ }
+ if (isSymbol(value)) {
+ return _Symbol ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
+
+/**
+ * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to
* their corresponding HTML entities.
*
- * **Note:** No other characters are escaped. To escape additional characters
- * use a third-party library like [_he_](https://mths.be/he).
+ * **Note:** No other characters are escaped. To escape additional
+ * characters use a third-party library like [_he_](https://mths.be/he).
*
* Though the ">" character is escaped for symmetry, characters like
* ">" and "/" don't need escaping in HTML and have no special meaning
@@ -46,8 +150,8 @@ function escapeHtmlChar(chr) {
* See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
* (under "semi-related fun fact") for more details.
*
- * Backticks are escaped because in Internet Explorer < 9, they can break out
- * of attribute values or HTML comments. See [#59](https://html5sec.org/#59),
+ * Backticks are escaped because in IE < 9, they can break out of
+ * attribute values or HTML comments. See [#59](https://html5sec.org/#59),
* [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
* [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/)
* for more details.
@@ -66,8 +170,7 @@ function escapeHtmlChar(chr) {
* // => 'fred, barney, & pebbles'
*/
function escape(string) {
- // Reset `lastIndex` because in IE < 9 `String#replace` does not.
- string = baseToString(string);
+ string = toString(string);
return (string && reHasUnescapedHtml.test(string))
? string.replace(reUnescapedHtml, escapeHtmlChar)
: string;
diff --git a/lodash.escape/package.json b/lodash.escape/package.json
index 5c248b2df..c939cf4cd 100644
--- a/lodash.escape/package.json
+++ b/lodash.escape/package.json
@@ -1,22 +1,17 @@
{
"name": "lodash.escape",
- "version": "3.0.0",
- "description": "The modern build of lodash’s `_.escape` as a module.",
+ "version": "3.1.0",
+ "description": "The lodash method `_.escape` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util",
+ "keywords": "lodash, lodash-modularized, stdlib, util, escape",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
- "Benjamin Tan (https://d10.github.io/)",
- "Blaine Bublitz (http://www.iceddev.com/)",
- "Kit Cambridge (http://kitcambridge.be/)",
+ "Blaine Bublitz (https://github.com/phated)",
"Mathias Bynens (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"
- }
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
}
diff --git a/lodash.every/LICENSE.txt b/lodash.every/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.every/LICENSE.txt
+++ b/lodash.every/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.every/README.md b/lodash.every/README.md
index 7b133e741..d1bc560b3 100644
--- a/lodash.every/README.md
+++ b/lodash.every/README.md
@@ -1,4 +1,4 @@
-# lodash.every v3.0.0
+# lodash.every v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.every` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var every = require('lodash.every');
```
-See the [documentation](https://lodash.com/docs#every) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.every) for more details.
+See the [documentation](https://lodash.com/docs#every) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.every) for more details.
diff --git a/lodash.every/index.js b/lodash.every/index.js
index 046ac0169..65319bab7 100644
--- a/lodash.every/index.js
+++ b/lodash.every/index.js
@@ -1,19 +1,20 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
var arrayEvery = require('lodash._arrayevery'),
baseCallback = require('lodash._basecallback'),
baseEach = require('lodash._baseeach'),
+ isIterateeCall = require('lodash._isiterateecall'),
isArray = require('lodash.isarray');
/**
* The base implementation of `_.every` without support for callback
- * shorthands or `this` binding.
+ * shorthands and `this` binding.
*
* @private
* @param {Array|Object|string} collection The collection to iterate over.
@@ -32,7 +33,7 @@ function baseEvery(collection, predicate) {
/**
* Checks if `predicate` returns truthy for **all** elements of `collection`.
- * The predicate is bound to `thisArg` and invoked with three arguments;
+ * The predicate is bound to `thisArg` and invoked with three arguments:
* (value, index|key, collection).
*
* If a property name is provided for `predicate` the created `_.property`
@@ -80,6 +81,9 @@ function baseEvery(collection, predicate) {
*/
function every(collection, predicate, thisArg) {
var func = isArray(collection) ? arrayEvery : baseEvery;
+ if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
+ predicate = null;
+ }
if (typeof predicate != 'function' || typeof thisArg != 'undefined') {
predicate = baseCallback(predicate, thisArg, 3);
}
diff --git a/lodash.every/package.json b/lodash.every/package.json
index bbb29d4d2..d11bac83f 100644
--- a/lodash.every/package.json
+++ b/lodash.every/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.every",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.every` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -20,6 +20,7 @@
"lodash._arrayevery": "^3.0.0",
"lodash._basecallback": "^3.0.0",
"lodash._baseeach": "^3.0.0",
+ "lodash._isiterateecall": "^3.0.0",
"lodash.isarray": "^3.0.0"
}
}
diff --git a/lodash.filter/LICENSE.txt b/lodash.filter/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.filter/LICENSE.txt
+++ b/lodash.filter/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.filter/README.md b/lodash.filter/README.md
index 52862d0b0..c9543d687 100644
--- a/lodash.filter/README.md
+++ b/lodash.filter/README.md
@@ -1,4 +1,4 @@
-# lodash.filter v3.0.0
+# lodash.filter v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.filter` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var filter = require('lodash.filter');
```
-See the [documentation](https://lodash.com/docs#filter) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.filter) for more details.
+See the [documentation](https://lodash.com/docs#filter) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.filter) for more details.
diff --git a/lodash.filter/index.js b/lodash.filter/index.js
index 8278f47c4..3853fd58e 100644
--- a/lodash.filter/index.js
+++ b/lodash.filter/index.js
@@ -1,15 +1,16 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
var arrayFilter = require('lodash._arrayfilter'),
baseCallback = require('lodash._basecallback'),
baseFilter = require('lodash._basefilter'),
- isArray = require('lodash.isarray');
+ isArray = require('lodash.isarray'),
+ keys = require('lodash.keys');
/**
* Iterates over elements of `collection`, returning an array of all elements
diff --git a/lodash.filter/package.json b/lodash.filter/package.json
index 7283df1e1..21fae36fb 100644
--- a/lodash.filter/package.json
+++ b/lodash.filter/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.filter",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.filter` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -20,6 +20,7 @@
"lodash._arrayfilter": "^3.0.0",
"lodash._basecallback": "^3.0.0",
"lodash._basefilter": "^3.0.0",
- "lodash.isarray": "^3.0.0"
+ "lodash.isarray": "^3.0.0",
+ "lodash.keys": "^3.0.0"
}
}
diff --git a/lodash.find/LICENSE.txt b/lodash.find/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.find/LICENSE.txt
+++ b/lodash.find/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.find/README.md b/lodash.find/README.md
index e6eb0c168..05f898af4 100644
--- a/lodash.find/README.md
+++ b/lodash.find/README.md
@@ -1,4 +1,4 @@
-# lodash.find v3.0.0
+# lodash.find v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.find` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var find = require('lodash.find');
```
-See the [documentation](https://lodash.com/docs#find) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.find) for more details.
+See the [documentation](https://lodash.com/docs#find) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.find) for more details.
diff --git a/lodash.find/index.js b/lodash.find/index.js
index 133544fa4..6768f93a4 100644
--- a/lodash.find/index.js
+++ b/lodash.find/index.js
@@ -1,21 +1,40 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
var baseCallback = require('lodash._basecallback'),
baseEach = require('lodash._baseeach'),
baseFind = require('lodash._basefind'),
- findIndex = require('lodash.findindex'),
+ baseFindIndex = require('lodash._basefindindex'),
isArray = require('lodash.isarray');
+/**
+ * Creates a `_.find` or `_.findLast` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new find function.
+ */
+function createFind(eachFunc, fromRight) {
+ return function(collection, predicate, thisArg) {
+ predicate = baseCallback(predicate, thisArg, 3);
+ if (isArray(collection)) {
+ var index = baseFindIndex(collection, predicate, fromRight);
+ return index > -1 ? collection[index] : undefined;
+ }
+ return baseFind(collection, predicate, eachFunc);
+ }
+}
+
/**
* Iterates over elements of `collection`, returning the first element
* `predicate` returns truthy for. The predicate is bound to `thisArg` and
- * invoked with three arguments; (value, index|key, collection).
+ * invoked with three arguments: (value, index|key, collection).
*
* If a property name is provided for `predicate` the created `_.property`
* style callback returns the property value of the given element.
@@ -62,13 +81,6 @@ var baseCallback = require('lodash._basecallback'),
* _.result(_.find(users, 'active'), 'user');
* // => 'barney'
*/
-function find(collection, predicate, thisArg) {
- if (isArray(collection)) {
- var index = findIndex(collection, predicate, thisArg);
- return index > -1 ? collection[index] : undefined;
- }
- predicate = baseCallback(predicate, thisArg, 3);
- return baseFind(collection, predicate, baseEach);
-}
+var find = createFind(baseEach);
module.exports = find;
diff --git a/lodash.find/package.json b/lodash.find/package.json
index 92fb38f0a..579ea14e7 100644
--- a/lodash.find/package.json
+++ b/lodash.find/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.find",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.find` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -20,7 +20,7 @@
"lodash._basecallback": "^3.0.0",
"lodash._baseeach": "^3.0.0",
"lodash._basefind": "^3.0.0",
- "lodash.findindex": "^3.0.0",
+ "lodash._basefindindex": "^3.0.0",
"lodash.isarray": "^3.0.0"
}
}
diff --git a/lodash.findindex/LICENSE.txt b/lodash.findindex/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.findindex/LICENSE.txt
+++ b/lodash.findindex/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.findindex/README.md b/lodash.findindex/README.md
index 29cfb6012..3ec1fd250 100644
--- a/lodash.findindex/README.md
+++ b/lodash.findindex/README.md
@@ -1,4 +1,4 @@
-# lodash.findindex v3.0.0
+# lodash.findindex v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.findIndex` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var findIndex = require('lodash.findindex');
```
-See the [documentation](https://lodash.com/docs#findIndex) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.findindex) for more details.
+See the [documentation](https://lodash.com/docs#findIndex) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.findindex) for more details.
diff --git a/lodash.findindex/index.js b/lodash.findindex/index.js
index 47402a0fd..e9669fd52 100644
--- a/lodash.findindex/index.js
+++ b/lodash.findindex/index.js
@@ -1,16 +1,34 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var baseCallback = require('lodash._basecallback');
+var baseCallback = require('lodash._basecallback'),
+ baseFindIndex = require('lodash._basefindindex');
+
+/**
+ * Creates a `_.findIndex` or `_.findLastIndex` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new find function.
+ */
+function createFindIndex(fromRight) {
+ return function(array, predicate, thisArg) {
+ if (!(array && array.length)) {
+ return -1;
+ }
+ predicate = baseCallback(predicate, thisArg, 3);
+ return baseFindIndex(array, predicate, fromRight);
+ };
+}
/**
* This method is like `_.find` except that it returns the index of the first
- * element `predicate` returns truthy for, instead of the element itself.
+ * element `predicate` returns truthy for instead of the element itself.
*
* If a property name is provided for `predicate` the created `_.property`
* style callback returns the property value of the given element.
@@ -56,17 +74,6 @@ var baseCallback = require('lodash._basecallback');
* _.findIndex(users, 'active');
* // => 2
*/
-function findIndex(array, predicate, thisArg) {
- var index = -1,
- length = array ? array.length : 0;
-
- predicate = baseCallback(predicate, thisArg, 3);
- while (++index < length) {
- if (predicate(array[index], index, array)) {
- return index;
- }
- }
- return -1;
-}
+var findIndex = createFindIndex();
module.exports = findIndex;
diff --git a/lodash.findindex/package.json b/lodash.findindex/package.json
index 1a5cce694..c8df1cf89 100644
--- a/lodash.findindex/package.json
+++ b/lodash.findindex/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.findindex",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.findIndex` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,6 +17,7 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._basecallback": "^3.0.0"
+ "lodash._basecallback": "^3.0.0",
+ "lodash._basefindindex": "^3.0.0"
}
}
diff --git a/lodash.findlast/LICENSE.txt b/lodash.findlast/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.findlast/LICENSE.txt
+++ b/lodash.findlast/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.findlast/README.md b/lodash.findlast/README.md
index 77826aa6d..487639f00 100644
--- a/lodash.findlast/README.md
+++ b/lodash.findlast/README.md
@@ -1,4 +1,4 @@
-# lodash.findlast v3.0.0
+# lodash.findlast v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.findLast` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var findLast = require('lodash.findlast');
```
-See the [documentation](https://lodash.com/docs#findLast) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.findlast) for more details.
+See the [documentation](https://lodash.com/docs#findLast) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.findlast) for more details.
diff --git a/lodash.findlast/index.js b/lodash.findlast/index.js
index ec03202ad..2cfdf0f5e 100644
--- a/lodash.findlast/index.js
+++ b/lodash.findlast/index.js
@@ -1,14 +1,35 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
var baseCallback = require('lodash._basecallback'),
baseEachRight = require('lodash._baseeachright'),
- baseFind = require('lodash._basefind');
+ baseFind = require('lodash._basefind'),
+ baseFindIndex = require('lodash._basefindindex'),
+ isArray = require('lodash.isarray');
+
+/**
+ * Creates a `_.find` or `_.findLast` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new find function.
+ */
+function createFind(eachFunc, fromRight) {
+ return function(collection, predicate, thisArg) {
+ predicate = baseCallback(predicate, thisArg, 3);
+ if (isArray(collection)) {
+ var index = baseFindIndex(collection, predicate, fromRight);
+ return index > -1 ? collection[index] : undefined;
+ }
+ return baseFind(collection, predicate, eachFunc);
+ }
+}
/**
* This method is like `_.find` except that it iterates over elements of
@@ -29,9 +50,6 @@ var baseCallback = require('lodash._basecallback'),
* });
* // => 3
*/
-function findLast(collection, predicate, thisArg) {
- predicate = baseCallback(predicate, thisArg, 3);
- return baseFind(collection, predicate, baseEachRight);
-}
+var findLast = createFind(baseEachRight, true);
module.exports = findLast;
diff --git a/lodash.findlast/package.json b/lodash.findlast/package.json
index 67794a130..3bb30b3c8 100644
--- a/lodash.findlast/package.json
+++ b/lodash.findlast/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.findlast",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.findLast` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -19,6 +19,8 @@
"dependencies": {
"lodash._basecallback": "^3.0.0",
"lodash._baseeachright": "^3.0.0",
- "lodash._basefind": "^3.0.0"
+ "lodash._basefind": "^3.0.0",
+ "lodash._basefindindex": "^3.0.0",
+ "lodash.isarray": "^3.0.0"
}
}
diff --git a/lodash.findlastindex/LICENSE.txt b/lodash.findlastindex/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.findlastindex/LICENSE.txt
+++ b/lodash.findlastindex/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.findlastindex/README.md b/lodash.findlastindex/README.md
index 6ea51e281..471c0adec 100644
--- a/lodash.findlastindex/README.md
+++ b/lodash.findlastindex/README.md
@@ -1,4 +1,4 @@
-# lodash.findlastindex v3.0.0
+# lodash.findlastindex v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.findLastIndex` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var findLastIndex = require('lodash.findlastindex');
```
-See the [documentation](https://lodash.com/docs#findLastIndex) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.findlastindex) for more details.
+See the [documentation](https://lodash.com/docs#findLastIndex) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.findlastindex) for more details.
diff --git a/lodash.findlastindex/index.js b/lodash.findlastindex/index.js
index 99c3f7278..b3ac91088 100644
--- a/lodash.findlastindex/index.js
+++ b/lodash.findlastindex/index.js
@@ -1,12 +1,30 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var baseCallback = require('lodash._basecallback');
+var baseCallback = require('lodash._basecallback'),
+ baseFindIndex = require('lodash._basefindindex');
+
+/**
+ * Creates a `_.findIndex` or `_.findLastIndex` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new find function.
+ */
+function createFindIndex(fromRight) {
+ return function(array, predicate, thisArg) {
+ if (!(array && array.length)) {
+ return -1;
+ }
+ predicate = baseCallback(predicate, thisArg, 3);
+ return baseFindIndex(array, predicate, fromRight);
+ };
+}
/**
* This method is like `_.findIndex` except that it iterates over elements
@@ -56,15 +74,6 @@ var baseCallback = require('lodash._basecallback');
* _.findLastIndex(users, 'active');
* // => 0
*/
-function findLastIndex(array, predicate, thisArg) {
- var length = array ? array.length : 0;
- predicate = baseCallback(predicate, thisArg, 3);
- while (length--) {
- if (predicate(array[length], length, array)) {
- return length;
- }
- }
- return -1;
-}
+var findLastIndex = createFindIndex(true);
module.exports = findLastIndex;
diff --git a/lodash.findlastindex/package.json b/lodash.findlastindex/package.json
index fc733d561..0083bcd71 100644
--- a/lodash.findlastindex/package.json
+++ b/lodash.findlastindex/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.findlastindex",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.findLastIndex` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,6 +17,7 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._basecallback": "^3.0.0"
+ "lodash._basecallback": "^3.0.0",
+ "lodash._basefindindex": "^3.0.0"
}
}
diff --git a/lodash.findwhere/README.md b/lodash.findwhere/README.md
index fa387405d..671d6f4c9 100644
--- a/lodash.findwhere/README.md
+++ b/lodash.findwhere/README.md
@@ -1,4 +1,4 @@
-# lodash.findwhere v3.0.0
+# lodash.findwhere v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.findWhere` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var findWhere = require('lodash.findwhere');
```
-See the [documentation](https://lodash.com/docs#findWhere) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.findwhere) for more details.
+See the [documentation](https://lodash.com/docs#findWhere) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.findwhere) for more details.
diff --git a/lodash.findwhere/index.js b/lodash.findwhere/index.js
index a845b0c0a..735cf374a 100644
--- a/lodash.findwhere/index.js
+++ b/lodash.findwhere/index.js
@@ -1,127 +1,24 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
* Based on Underscore.js 1.7.0
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var baseClone = require('lodash._baseclone'),
- baseIsEqual = require('lodash._baseisequal'),
- find = require('lodash.find'),
- keys = require('lodash.keys');
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * The base implementation of `_.isMatch` without support for callback
- * shorthands or `this` binding.
- *
- * @private
- * @param {Object} source The object to inspect.
- * @param {Array} props The source property names to match.
- * @param {Array} values The source values to match.
- * @param {Array} strictCompareFlags Strict comparison flags for source values.
- * @param {Function} [customizer] The function to customize comparing objects.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
- */
-function baseIsMatch(object, props, values, strictCompareFlags, customizer) {
- var length = props.length;
- if (object == null) {
- return !length;
- }
- var index = -1,
- noCustomizer = !customizer;
-
- while (++index < length) {
- if ((noCustomizer && strictCompareFlags[index])
- ? values[index] !== object[props[index]]
- : !hasOwnProperty.call(object, props[index])
- ) {
- return false;
- }
- }
- index = -1;
- while (++index < length) {
- var key = props[index];
- if (noCustomizer && strictCompareFlags[index]) {
- var result = hasOwnProperty.call(object, key);
- } else {
- var objValue = object[key],
- srcValue = values[index];
-
- result = customizer ? customizer(objValue, srcValue, key) : undefined;
- if (typeof result == 'undefined') {
- result = baseIsEqual(srcValue, objValue, customizer, true);
- }
- }
- if (!result) {
- return false;
- }
- }
- return true;
-}
-
-/**
- * The base implementation of `_.matches` which supports specifying whether
- * `source` should be cloned.
- *
- * @private
- * @param {Object} source The object of property values to match.
- * @param {boolean} [isCloned] Specify cloning the source object.
- * @returns {Function} Returns the new function.
- */
-function baseMatches(source, isCloned) {
- var props = keys(source),
- length = props.length;
-
- if (length == 1) {
- var key = props[0],
- value = source[key];
-
- if (isStrictComparable(value)) {
- return function(object) {
- return object != null && value === object[key] && hasOwnProperty.call(object, key);
- };
- }
- }
- if (isCloned) {
- source = baseClone(source, true);
- }
- var values = Array(length),
- strictCompareFlags = Array(length);
-
- while (length--) {
- value = source[props[length]];
- values[length] = value;
- strictCompareFlags[length] = isStrictComparable(value);
- }
- return function(object) {
- return baseIsMatch(object, props, values, strictCompareFlags);
- };
-}
-
-/**
- * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` if suitable for strict
- * equality comparisons, else `false`.
- */
-function isStrictComparable(value) {
- return value === value && (value === 0 ? ((1 / value) > 0) : !isObject(value));
-}
+var baseMatches = require('lodash._basematches'),
+ find = require('lodash.find');
/**
* Performs a deep comparison between each element in `collection` and the
* source object, returning the first element that has equivalent property
* values.
*
+ * **Note:** This method supports comparing arrays, booleans, `Date` objects,
+ * numbers, `Object` objects, regexes, and strings. Objects are compared by
+ * their own, not inherited, enumerable properties. For comparing a single
+ * own or inherited property value see `_.matchesProperty`.
+ *
* @static
* @memberOf _
* @category Collection
@@ -131,76 +28,18 @@ function isStrictComparable(value) {
* @example
*
* var users = [
- * { 'user': 'barney', 'age': 36, 'status': 'busy' },
- * { 'user': 'fred', 'age': 40, 'status': 'busy' }
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
* ];
*
- * _.result(_.findWhere(users, { 'status': 'busy' }), 'user');
+ * _.result(_.findWhere(users, { 'age': 36, 'active': true }), 'user');
* // => 'barney'
*
- * _.result(_.findWhere(users, { 'age': 40 }), 'user');
+ * _.result(_.findWhere(users, { 'age': 40, 'active': false }), 'user');
* // => 'fred'
*/
function findWhere(collection, source) {
- return find(collection, matches(source));
-}
-
-/**
- * Checks if `value` is the language type of `Object`.
- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * **Note:** See the [ES5 spec](https://es5.github.io/#x8) for more details.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(1);
- * // => false
- */
-function isObject(value) {
- // Avoid a V8 JIT bug in Chrome 19-20.
- // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
- var type = typeof value;
- return type == 'function' || (value && type == 'object') || false;
-}
-
-/**
- * Creates a function which performs a deep comparison between a given object
- * and `source`, returning `true` if the given object has equivalent property
- * values, else `false`.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Object} source The object of property values to match.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var users = [
- * { 'user': 'fred', 'age': 40 },
- * { 'user': 'barney', 'age': 36 }
- * ];
- *
- * var matchesAge = _.matches({ 'age': 36 });
- *
- * _.filter(users, matchesAge);
- * // => [{ 'user': 'barney', 'age': 36 }]
- *
- * _.find(users, matchesAge);
- * // => { 'user': 'barney', 'age': 36 }
- */
-function matches(source) {
- return baseMatches(source, true);
+ return find(collection, baseMatches(source));
}
module.exports = findWhere;
diff --git a/lodash.findwhere/package.json b/lodash.findwhere/package.json
index 2071abcaa..302a7fe1f 100644
--- a/lodash.findwhere/package.json
+++ b/lodash.findwhere/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.findwhere",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.findWhere` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,9 +17,7 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._baseclone": "^3.0.0",
- "lodash._baseisequal": "^3.0.0",
- "lodash.find": "^3.0.0",
- "lodash.keys": "^3.0.0"
+ "lodash._basematches": "^3.0.0",
+ "lodash.find": "^3.0.0"
}
}
diff --git a/lodash.flow/README.md b/lodash.flow/README.md
index 0e7bc739f..0643da91b 100644
--- a/lodash.flow/README.md
+++ b/lodash.flow/README.md
@@ -1,4 +1,4 @@
-# lodash.flow v3.0.2
+# lodash.flow v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.flow` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var flow = require('lodash.flow');
```
-See the [documentation](https://lodash.com/docs#flow) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.flow) for more details.
+See the [documentation](https://lodash.com/docs#flow) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.flow) for more details.
diff --git a/lodash.flow/index.js b/lodash.flow/index.js
index 9517f39fd..95348308e 100644
--- a/lodash.flow/index.js
+++ b/lodash.flow/index.js
@@ -1,29 +1,12 @@
/**
- * lodash 3.0.2 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var arrayEvery = require('lodash._arrayevery');
-
-/** Used as the `TypeError` message for "Functions" methods. */
-var FUNC_ERROR_TEXT = 'Expected a function';
-
-/**
- * The base implementation of `_.isFunction` without support for environments
- * with incorrect `typeof` results.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- */
-function baseIsFunction(value) {
- // Avoid a Chakra JIT bug in compatibility modes of IE 11.
- // See https://github.com/jashkenas/underscore/issues/1621 for more details.
- return typeof value == 'function' || false;
-}
+var createComposer = require('lodash._createcomposer');
/**
* Creates a function that returns the result of invoking the provided
@@ -45,25 +28,6 @@ function baseIsFunction(value) {
* addSquare(1, 2);
* // => 9
*/
-function flow() {
- var funcs = arguments,
- length = funcs.length;
-
- if (!length) {
- return function() { return arguments[0]; };
- }
- if (!arrayEvery(funcs, baseIsFunction)) {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- return function() {
- var index = 0,
- result = funcs[index].apply(this, arguments);
-
- while (++index < length) {
- result = funcs[index].call(this, result);
- }
- return result;
- };
-}
+var flow = createComposer();
module.exports = flow;
diff --git a/lodash.flow/package.json b/lodash.flow/package.json
index 4d184dd09..db1bbd8a1 100644
--- a/lodash.flow/package.json
+++ b/lodash.flow/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.flow",
- "version": "3.0.2",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.flow` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,6 +17,6 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._arrayevery": "^3.0.0"
+ "lodash._createcomposer": "^3.0.0"
}
}
diff --git a/lodash.flowright/README.md b/lodash.flowright/README.md
index 4af3fc6c5..b34ae4e24 100644
--- a/lodash.flowright/README.md
+++ b/lodash.flowright/README.md
@@ -1,4 +1,4 @@
-# lodash.flowright v3.0.2
+# lodash.flowright v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.flowRight` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var flowRight = require('lodash.flowright');
```
-See the [documentation](https://lodash.com/docs#flowRight) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.flowright) for more details.
+See the [documentation](https://lodash.com/docs#flowRight) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.flowright) for more details.
diff --git a/lodash.flowright/index.js b/lodash.flowright/index.js
index 4d6162dfb..c6da631a9 100644
--- a/lodash.flowright/index.js
+++ b/lodash.flowright/index.js
@@ -1,29 +1,12 @@
/**
- * lodash 3.0.2 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var arrayEvery = require('lodash._arrayevery');
-
-/** Used as the `TypeError` message for "Functions" methods. */
-var FUNC_ERROR_TEXT = 'Expected a function';
-
-/**
- * The base implementation of `_.isFunction` without support for environments
- * with incorrect `typeof` results.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- */
-function baseIsFunction(value) {
- // Avoid a Chakra JIT bug in compatibility modes of IE 11.
- // See https://github.com/jashkenas/underscore/issues/1621 for more details.
- return typeof value == 'function' || false;
-}
+var createComposer = require('lodash._createcomposer');
/**
* This method is like `_.flow` except that it creates a function that
@@ -45,25 +28,6 @@ function baseIsFunction(value) {
* addSquare(1, 2);
* // => 9
*/
-function flowRight() {
- var funcs = arguments,
- fromIndex = funcs.length - 1;
-
- if (fromIndex < 0) {
- return function() { return arguments[0]; };
- }
- if (!arrayEvery(funcs, baseIsFunction)) {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- return function() {
- var index = fromIndex,
- result = funcs[index].apply(this, arguments);
-
- while (index--) {
- result = funcs[index].call(this, result);
- }
- return result;
- };
-}
+var flowRight = createComposer(true);
module.exports = flowRight;
diff --git a/lodash.flowright/package.json b/lodash.flowright/package.json
index e39141daf..74bf70702 100644
--- a/lodash.flowright/package.json
+++ b/lodash.flowright/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.flowright",
- "version": "3.0.2",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.flowRight` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,6 +17,6 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._arrayevery": "^3.0.0"
+ "lodash._createcomposer": "^3.0.0"
}
}
diff --git a/lodash.groupby/LICENSE.txt b/lodash.groupby/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.groupby/LICENSE.txt
+++ b/lodash.groupby/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.groupby/README.md b/lodash.groupby/README.md
index 4b2212afb..d53fc59b4 100644
--- a/lodash.groupby/README.md
+++ b/lodash.groupby/README.md
@@ -1,4 +1,4 @@
-# lodash.groupby v3.0.0
+# lodash.groupby v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.groupBy` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var groupBy = require('lodash.groupby');
```
-See the [documentation](https://lodash.com/docs#groupBy) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.groupby) for more details.
+See the [documentation](https://lodash.com/docs#groupBy) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.groupby) for more details.
diff --git a/lodash.groupby/index.js b/lodash.groupby/index.js
index f591f466b..6033d3f3c 100644
--- a/lodash.groupby/index.js
+++ b/lodash.groupby/index.js
@@ -1,12 +1,13 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var createAggregator = require('lodash._createaggregator');
+var createAggregator = require('lodash._createaggregator'),
+ keys = require('lodash.keys');
/** Used for native method references. */
var objectProto = Object.prototype;
diff --git a/lodash.groupby/package.json b/lodash.groupby/package.json
index 3b56fcccb..117136bc7 100644
--- a/lodash.groupby/package.json
+++ b/lodash.groupby/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.groupby",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.groupBy` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,6 +17,7 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._createaggregator": "^3.0.0"
+ "lodash._createaggregator": "^3.0.0",
+ "lodash.keys": "^3.0.0"
}
}
diff --git a/lodash.has/LICENSE.txt b/lodash.has/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.has/LICENSE.txt
+++ b/lodash.has/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.has/README.md b/lodash.has/README.md
index 2df38b8db..d88c0a0e0 100644
--- a/lodash.has/README.md
+++ b/lodash.has/README.md
@@ -1,4 +1,4 @@
-# lodash.has v3.0.0
+# lodash.has v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.has` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var has = require('lodash.has');
```
-See the [documentation](https://lodash.com/docs#has) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.has) for more details.
+See the [documentation](https://lodash.com/docs#has) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.has) for more details.
diff --git a/lodash.has/index.js b/lodash.has/index.js
index ef868fc66..283373ab8 100644
--- a/lodash.has/index.js
+++ b/lodash.has/index.js
@@ -1,11 +1,19 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.3
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT 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*$/;
/** Used for native method references. */
var objectProto = Object.prototype;
@@ -14,24 +22,115 @@ var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
/**
- * Checks if `key` exists as a direct property of `object` instead of an
- * inherited property.
+ * 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 is 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 type == 'function' || (!!value && type == 'object');
+}
+
+/**
+ * Checks if `path` is a direct property.
*
* @static
* @memberOf _
* @category Object
- * @param {Object} object The object to inspect.
- * @param {string} key The key to check.
- * @returns {boolean} Returns `true` if `key` is a direct property, else `false`.
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` is a direct property, else `false`.
* @example
*
- * var object = { 'a': 1, 'b': 2, 'c': 3 };
+ * var object = { 'a': { 'b': { 'c': 3 } } };
*
- * _.has(object, 'b');
+ * _.has(object, 'a');
+ * // => true
+ *
+ * _.has(object, 'a.b.c');
+ * // => true
+ *
+ * _.has(object, ['a', 'b', 'c']);
* // => true
*/
-function has(object, key) {
- return object ? hasOwnProperty.call(object, key) : false;
+function has(object, path) {
+ if (object == null) {
+ return false;
+ }
+ var result = hasOwnProperty.call(object, path);
+ if (!result && !isKey(path)) {
+ path = toPath(path);
+ object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
+ path = last(path);
+ result = object != null && hasOwnProperty.call(object, path);
+ }
+ return result;
}
module.exports = has;
diff --git a/lodash.has/package.json b/lodash.has/package.json
index 53955230e..da8960439 100644
--- a/lodash.has/package.json
+++ b/lodash.has/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.has",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.has` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -15,5 +15,11 @@
"Mathias Bynens (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
+ "dependencies": {
+ "lodash._baseget": "^3.0.0",
+ "lodash._baseslice": "^3.0.0",
+ "lodash._topath": "^3.0.0",
+ "lodash.isarray": "^3.0.0"
+ }
}
diff --git a/lodash.includes/LICENSE.txt b/lodash.includes/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.includes/LICENSE.txt
+++ b/lodash.includes/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.includes/README.md b/lodash.includes/README.md
index 123f35906..5323c151f 100644
--- a/lodash.includes/README.md
+++ b/lodash.includes/README.md
@@ -1,4 +1,4 @@
-# lodash.includes v3.0.0
+# lodash.includes v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.includes` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var includes = require('lodash.includes');
```
-See the [documentation](https://lodash.com/docs#includes) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.includes) for more details.
+See the [documentation](https://lodash.com/docs#includes) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.includes) for more details.
diff --git a/lodash.includes/index.js b/lodash.includes/index.js
index ed4c3b499..81822cdf8 100644
--- a/lodash.includes/index.js
+++ b/lodash.includes/index.js
@@ -1,13 +1,14 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
var baseIndexOf = require('lodash._baseindexof'),
baseValues = require('lodash._basevalues'),
+ isIterateeCall = require('lodash._isiterateecall'),
isArray = require('lodash.isarray'),
isString = require('lodash.isstring'),
keys = require('lodash.keys');
@@ -16,18 +17,15 @@ var baseIndexOf = require('lodash._baseindexof'),
var nativeMax = Math.max;
/**
- * Used as the maximum length of an array-like value.
- * See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
- * for more details.
+ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+ * of an array-like value.
*/
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
/**
* Checks if `value` is a valid array-like length.
*
- * **Note:** This function is based on ES `ToLength`. See the
- * [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)
- * for more details.
+ * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
*
* @private
* @param {*} value The value to check.
@@ -42,10 +40,9 @@ function isLength(value) {
* comparisons. If `fromIndex` is negative, it is used as the offset from
* the end of `collection`.
*
- * **Note:** `SameValueZero` comparisons are like strict equality comparisons,
- * e.g. `===`, except that `NaN` matches `NaN`. See the
- * [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
- * for more details.
+ * **Note:** [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
+ * comparisons are like strict equality comparisons, e.g. `===`, except that
+ * `NaN` matches `NaN`.
*
* @static
* @memberOf _
@@ -54,6 +51,7 @@ function isLength(value) {
* @param {Array|Object|string} collection The collection to search.
* @param {*} target The value to search for.
* @param {number} [fromIndex=0] The index to search from.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`.
* @returns {boolean} Returns `true` if a matching element is found, else `false`.
* @example
*
@@ -69,7 +67,7 @@ function isLength(value) {
* _.includes('pebbles', 'eb');
* // => true
*/
-function includes(collection, target, fromIndex) {
+function includes(collection, target, fromIndex, guard) {
var length = collection ? collection.length : 0;
if (!isLength(length)) {
collection = values(collection);
@@ -78,10 +76,10 @@ function includes(collection, target, fromIndex) {
if (!length) {
return false;
}
- if (typeof fromIndex == 'number') {
- fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0);
- } else {
+ if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) {
fromIndex = 0;
+ } else {
+ fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0);
}
return (typeof collection == 'string' || !isArray(collection) && isString(collection))
? (fromIndex < length && collection.indexOf(target, fromIndex) > -1)
diff --git a/lodash.includes/package.json b/lodash.includes/package.json
index 690dec74d..2569b1e18 100644
--- a/lodash.includes/package.json
+++ b/lodash.includes/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.includes",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.includes` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -19,6 +19,7 @@
"dependencies": {
"lodash._baseindexof": "^3.0.0",
"lodash._basevalues": "^3.0.0",
+ "lodash._isiterateecall": "^3.0.0",
"lodash.isarray": "^3.0.0",
"lodash.isstring": "^3.0.0",
"lodash.keys": "^3.0.0"
diff --git a/lodash.indexby/LICENSE.txt b/lodash.indexby/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.indexby/LICENSE.txt
+++ b/lodash.indexby/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.indexby/README.md b/lodash.indexby/README.md
index 9797ca76c..94a37274e 100644
--- a/lodash.indexby/README.md
+++ b/lodash.indexby/README.md
@@ -1,4 +1,4 @@
-# lodash.indexby v3.0.0
+# lodash.indexby v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.indexBy` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var indexBy = require('lodash.indexby');
```
-See the [documentation](https://lodash.com/docs#indexBy) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.indexby) for more details.
+See the [documentation](https://lodash.com/docs#indexBy) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.indexby) for more details.
diff --git a/lodash.indexby/index.js b/lodash.indexby/index.js
index b298cb512..62bdd0696 100644
--- a/lodash.indexby/index.js
+++ b/lodash.indexby/index.js
@@ -1,12 +1,13 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var createAggregator = require('lodash._createaggregator');
+var createAggregator = require('lodash._createaggregator'),
+ keys = require('lodash.keys');
/**
* Creates an object composed of keys generated from the results of running
diff --git a/lodash.indexby/package.json b/lodash.indexby/package.json
index 7f3945ef5..ae9be067d 100644
--- a/lodash.indexby/package.json
+++ b/lodash.indexby/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.indexby",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.indexBy` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,6 +17,7 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._createaggregator": "^3.0.0"
+ "lodash._createaggregator": "^3.0.0",
+ "lodash.keys": "^3.0.0"
}
}
diff --git a/lodash.intersection/README.md b/lodash.intersection/README.md
index 99ac6c357..10c9741ff 100644
--- a/lodash.intersection/README.md
+++ b/lodash.intersection/README.md
@@ -1,4 +1,4 @@
-# lodash.intersection v3.0.3
+# lodash.intersection v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.intersection` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var intersection = require('lodash.intersection');
```
-See the [documentation](https://lodash.com/docs#intersection) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.intersection) for more details.
+See the [documentation](https://lodash.com/docs#intersection) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.intersection) for more details.
diff --git a/lodash.intersection/index.js b/lodash.intersection/index.js
index ee2ae5e33..ae2469672 100644
--- a/lodash.intersection/index.js
+++ b/lodash.intersection/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 3.0.3 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -8,17 +8,67 @@
*/
var baseIndexOf = require('lodash._baseindexof'),
cacheIndexOf = require('lodash._cacheindexof'),
- createCache = require('lodash._createcache'),
- isArguments = require('lodash.isarguments'),
- isArray = require('lodash.isarray');
+ createCache = require('lodash._createcache');
/**
- * Creates an array of unique values in all provided arrays using `SameValueZero`
- * for equality comparisons.
+ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+ * of an array-like value.
+ */
+var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
+
+/**
+ * The base implementation of `_.property` without support for deep paths.
*
- * **Note:** [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
- * comparisons are like strict equality comparisons, e.g. `===`, except that
- * `NaN` matches `NaN`.
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+/**
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
+ * that affects Safari on at least iOS 8.1-8.3 ARM64.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
+ */
+var getLength = baseProperty('length');
+
+/**
+ * Checks if `value` is array-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ */
+function isArrayLike(value) {
+ return value != null && isLength(getLength(value));
+}
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ */
+function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * Creates an array of unique values in all provided arrays using
+ * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
+ * for equality comparisons.
*
* @static
* @memberOf _
@@ -40,7 +90,7 @@ function intersection() {
while (++argsIndex < argsLength) {
var value = arguments[argsIndex];
- if (isArray(value) || isArguments(value)) {
+ if (isArrayLike(value)) {
args.push(value);
caches.push((isCommon && value.length >= 120) ? createCache(argsIndex && value) : null);
}
diff --git a/lodash.intersection/package.json b/lodash.intersection/package.json
index 6065a427e..41b1eca45 100644
--- a/lodash.intersection/package.json
+++ b/lodash.intersection/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.intersection",
- "version": "3.0.3",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.intersection` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -19,8 +19,6 @@
"dependencies": {
"lodash._baseindexof": "^3.0.0",
"lodash._cacheindexof": "^3.0.0",
- "lodash._createcache": "^3.0.0",
- "lodash.isarguments": "^3.0.0",
- "lodash.isarray": "^3.0.0"
+ "lodash._createcache": "^3.0.0"
}
}
diff --git a/lodash.invoke/LICENSE.txt b/lodash.invoke/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.invoke/LICENSE.txt
+++ b/lodash.invoke/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.invoke/README.md b/lodash.invoke/README.md
index bd0a73401..1681d0e12 100644
--- a/lodash.invoke/README.md
+++ b/lodash.invoke/README.md
@@ -1,4 +1,4 @@
-# lodash.invoke v3.0.0
+# lodash.invoke v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.invoke` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var invoke = require('lodash.invoke');
```
-See the [documentation](https://lodash.com/docs#invoke) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.invoke) for more details.
+See the [documentation](https://lodash.com/docs#invoke) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.invoke) for more details.
diff --git a/lodash.invoke/index.js b/lodash.invoke/index.js
index 6547783ce..e9f5f217f 100644
--- a/lodash.invoke/index.js
+++ b/lodash.invoke/index.js
@@ -1,51 +1,24 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
var baseEach = require('lodash._baseeach'),
- baseSlice = require('lodash._baseslice');
+ restParam = require('lodash.restparam');
/**
- * Used as the maximum length of an array-like value.
- * See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
- * for more details.
+ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+ * of an array-like value.
*/
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
-/**
- * The base implementation of `_.invoke` which requires additional arguments
- * to be provided as an array of arguments rather than individually.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|string} methodName The name of the method to invoke or
- * the function invoked per iteration.
- * @param {Array} [args] The arguments to invoke the method with.
- * @returns {Array} Returns the array of results.
- */
-function baseInvoke(collection, methodName, args) {
- var index = -1,
- isFunc = typeof methodName == 'function',
- length = collection ? collection.length : 0,
- result = isLength(length) ? Array(length) : [];
-
- baseEach(collection, function(value) {
- var func = isFunc ? methodName : (value != null && value[methodName]);
- result[++index] = func ? func.apply(value, args) : undefined;
- });
- return result;
-}
-
/**
* Checks if `value` is a valid array-like length.
*
- * **Note:** This function is based on ES `ToLength`. See the
- * [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)
- * for more details.
+ * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
*
* @private
* @param {*} value The value to check.
@@ -77,8 +50,17 @@ function isLength(value) {
* _.invoke([123, 456], String.prototype.split, '');
* // => [['1', '2', '3'], ['4', '5', '6']]
*/
-function invoke(collection, methodName) {
- return baseInvoke(collection, methodName, baseSlice(arguments, 2));
-}
+var invoke = restParam(function(collection, methodName, args) {
+ var index = -1,
+ isFunc = typeof methodName == 'function',
+ length = collection ? collection.length : 0,
+ result = isLength(length) ? Array(length) : [];
+
+ baseEach(collection, function(value) {
+ var func = isFunc ? methodName : (value != null && value[methodName]);
+ result[++index] = func ? func.apply(value, args) : undefined;
+ });
+ return result;
+});
module.exports = invoke;
diff --git a/lodash.invoke/package.json b/lodash.invoke/package.json
index 6afcd3cce..f8c589475 100644
--- a/lodash.invoke/package.json
+++ b/lodash.invoke/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.invoke",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.invoke` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -18,6 +18,6 @@
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._baseeach": "^3.0.0",
- "lodash._baseslice": "^3.0.0"
+ "lodash.restparam": "^3.0.0"
}
}
diff --git a/lodash.isarguments/README.md b/lodash.isarguments/README.md
index 1ab7ec672..eb95fe134 100644
--- a/lodash.isarguments/README.md
+++ b/lodash.isarguments/README.md
@@ -1,4 +1,4 @@
-# lodash.isarguments v3.0.9
+# lodash.isarguments v3.1.0
The [lodash](https://lodash.com/) method `_.isArguments` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var isArguments = require('lodash.isarguments');
```
-See the [documentation](https://lodash.com/docs#isArguments) or [package source](https://github.com/lodash/lodash/blob/3.0.9-npm-packages/lodash.isarguments) for more details.
+See the [documentation](https://lodash.com/docs#isArguments) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.isarguments) for more details.
diff --git a/lodash.isarguments/index.js b/lodash.isarguments/index.js
index ac1d00e8e..042dac501 100644
--- a/lodash.isarguments/index.js
+++ b/lodash.isarguments/index.js
@@ -15,19 +15,6 @@ var argsTag = '[object Arguments]',
funcTag = '[object Function]',
genTag = '[object GeneratorFunction]';
-/**
- * The base implementation of `_.property` without support for deep paths.
- *
- * @private
- * @param {string} key The key of the property to get.
- * @returns {Function} Returns the new accessor function.
- */
-function baseProperty(key) {
- return function(object) {
- return object == null ? undefined : object[key];
- };
-}
-
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -36,7 +23,7 @@ var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
@@ -44,19 +31,6 @@ var objectToString = objectProto.toString;
/** Built-in value references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
-/**
- * Gets the "length" property value of `object`.
- *
- * **Note:** This function is used to avoid a
- * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
- * Safari on at least iOS 8.1-8.3 ARM64.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {*} Returns the "length" value.
- */
-var getLength = baseProperty('length');
-
/**
* Checks if `value` is likely an `arguments` object.
*
@@ -76,7 +50,7 @@ var getLength = baseProperty('length');
* // => false
*/
function isArguments(value) {
- // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
}
@@ -107,7 +81,7 @@ function isArguments(value) {
* // => false
*/
function isArrayLike(value) {
- return value != null && isLength(getLength(value)) && !isFunction(value);
+ return value != null && isLength(value.length) && !isFunction(value);
}
/**
@@ -158,8 +132,7 @@ function isArrayLikeObject(value) {
*/
function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8 which returns 'object' for typed array and weak map constructors,
- // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
+ // in Safari 8-9 which returns 'object' for typed array and other constructors.
var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag;
}
@@ -167,16 +140,15 @@ function isFunction(value) {
/**
* Checks if `value` is a valid array-like length.
*
- * **Note:** This function is loosely based on
- * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
* @example
*
* _.isLength(3);
@@ -198,7 +170,7 @@ function isLength(value) {
/**
* Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
diff --git a/lodash.isarguments/package.json b/lodash.isarguments/package.json
index 46a5060d8..3d3228026 100644
--- a/lodash.isarguments/package.json
+++ b/lodash.isarguments/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.isarguments",
- "version": "3.0.9",
+ "version": "3.1.0",
"description": "The lodash method `_.isArguments` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.iserror/LICENSE b/lodash.iserror/LICENSE
index b054ca5a3..bcbe13d67 100644
--- a/lodash.iserror/LICENSE
+++ b/lodash.iserror/LICENSE
@@ -1,22 +1,23 @@
+The MIT License (MIT)
+
Copyright 2012-2016 The Dojo Foundation
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/lodash.iserror/README.md b/lodash.iserror/README.md
index ee05575d6..100ab0dff 100644
--- a/lodash.iserror/README.md
+++ b/lodash.iserror/README.md
@@ -1,4 +1,4 @@
-# lodash.iserror v3.0.3
+# lodash.iserror v3.1.0
The [lodash](https://lodash.com/) method `_.isError` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var isError = require('lodash.iserror');
```
-See the [documentation](https://lodash.com/docs#isError) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.iserror) for more details.
+See the [documentation](https://lodash.com/docs#isError) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.iserror) for more details.
diff --git a/lodash.iserror/index.js b/lodash.iserror/index.js
index 85f1bbc2f..947e51338 100644
--- a/lodash.iserror/index.js
+++ b/lodash.iserror/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 3.0.3 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -37,8 +37,12 @@ var objectToString = objectProto.toString;
* // => false
*/
function isError(value) {
- return isObjectLike(value) &&
- typeof value.message == 'string' && objectToString.call(value) == errorTag;
+ if (!isObjectLike(value)) {
+ return false;
+ }
+ var Ctor = value.constructor;
+ return (objectToString.call(value) == errorTag) ||
+ (typeof Ctor == 'function' && objectToString.call(Ctor.prototype) == errorTag);
}
/**
diff --git a/lodash.iserror/package.json b/lodash.iserror/package.json
index 1731ac724..af1167071 100644
--- a/lodash.iserror/package.json
+++ b/lodash.iserror/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.iserror",
- "version": "3.0.3",
+ "version": "3.1.0",
"description": "The lodash method `_.isError` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.isfinite/LICENSE.txt b/lodash.isfinite/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.isfinite/LICENSE.txt
+++ b/lodash.isfinite/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.isfinite/README.md b/lodash.isfinite/README.md
index 0020f7479..08afaa87d 100644
--- a/lodash.isfinite/README.md
+++ b/lodash.isfinite/README.md
@@ -1,4 +1,4 @@
-# lodash.isfinite v3.0.0
+# lodash.isfinite v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isFinite` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var isFinite = require('lodash.isfinite');
```
-See the [documentation](https://lodash.com/docs#isFinite) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.isfinite) for more details.
+See the [documentation](https://lodash.com/docs#isFinite) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.isfinite) for more details.
diff --git a/lodash.isfinite/index.js b/lodash.isfinite/index.js
index e4d1b6e37..71f4259b8 100644
--- a/lodash.isfinite/index.js
+++ b/lodash.isfinite/index.js
@@ -1,16 +1,16 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.3
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var isNative = require('lodash.isnative');
+var getNative = require('lodash._getnative');
/* Native method references for those with the same name as other `lodash` methods. */
var nativeIsFinite = global.isFinite,
- nativeNumIsFinite = isNative(nativeNumIsFinite = Number.isFinite) && nativeNumIsFinite;
+ nativeNumIsFinite = getNative(Number, 'isFinite');
/**
* Checks if `value` is a finite primitive number.
diff --git a/lodash.isfinite/package.json b/lodash.isfinite/package.json
index 4dc85d6f4..ea2be8aab 100644
--- a/lodash.isfinite/package.json
+++ b/lodash.isfinite/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.isfinite",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.isFinite` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,6 +17,6 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash.isnative": "^3.0.0"
+ "lodash._getnative": "^3.0.0"
}
}
diff --git a/lodash.ismatch/README.md b/lodash.ismatch/README.md
index 973cb0b08..10a6e3216 100644
--- a/lodash.ismatch/README.md
+++ b/lodash.ismatch/README.md
@@ -1,4 +1,4 @@
-# lodash.ismatch v3.0.0
+# lodash.ismatch v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isMatch` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var isMatch = require('lodash.ismatch');
```
-See the [documentation](https://lodash.com/docs#isMatch) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.ismatch) for more details.
+See the [documentation](https://lodash.com/docs#isMatch) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.ismatch) for more details.
diff --git a/lodash.ismatch/index.js b/lodash.ismatch/index.js
index c82f9a9c8..a2abefb10 100644
--- a/lodash.ismatch/index.js
+++ b/lodash.ismatch/index.js
@@ -1,12 +1,12 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
* Based on Underscore.js 1.7.0
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var baseIsEqual = require('lodash._baseisequal'),
+var baseIsMatch = require('lodash._baseismatch'),
bindCallback = require('lodash._bindcallback'),
keys = require('lodash.keys');
@@ -16,55 +16,6 @@ var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
-/**
- * The base implementation of `_.isMatch` without support for callback
- * shorthands or `this` binding.
- *
- * @private
- * @param {Object} source The object to inspect.
- * @param {Array} props The source property names to match.
- * @param {Array} values The source values to match.
- * @param {Array} strictCompareFlags Strict comparison flags for source values.
- * @param {Function} [customizer] The function to customize comparing objects.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
- */
-function baseIsMatch(object, props, values, strictCompareFlags, customizer) {
- var length = props.length;
- if (object == null) {
- return !length;
- }
- var index = -1,
- noCustomizer = !customizer;
-
- while (++index < length) {
- if ((noCustomizer && strictCompareFlags[index])
- ? values[index] !== object[props[index]]
- : !hasOwnProperty.call(object, props[index])
- ) {
- return false;
- }
- }
- index = -1;
- while (++index < length) {
- var key = props[index];
- if (noCustomizer && strictCompareFlags[index]) {
- var result = hasOwnProperty.call(object, key);
- } else {
- var objValue = object[key],
- srcValue = values[index];
-
- result = customizer ? customizer(objValue, srcValue, key) : undefined;
- if (typeof result == 'undefined') {
- result = baseIsEqual(srcValue, objValue, customizer, true);
- }
- }
- if (!result) {
- return false;
- }
- }
- return true;
-}
-
/**
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
*
@@ -121,7 +72,7 @@ function isObject(value) {
* @static
* @memberOf _
* @category Lang
- * @param {Object} source The object to inspect.
+ * @param {Object} object The object to inspect.
* @param {Object} source The object of property values to match.
* @param {Function} [customizer] The function to customize comparing values.
* @param {*} [thisArg] The `this` binding of `customizer`.
diff --git a/lodash.ismatch/package.json b/lodash.ismatch/package.json
index c9520ab7f..946d2397f 100644
--- a/lodash.ismatch/package.json
+++ b/lodash.ismatch/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.ismatch",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.isMatch` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,7 +17,7 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._baseisequal": "^3.0.0",
+ "lodash._baseismatch": "^3.0.0",
"lodash._bindcallback": "^3.0.0",
"lodash.keys": "^3.0.0"
}
diff --git a/lodash.isplainobject/README.md b/lodash.isplainobject/README.md
index fd2512683..44b9b7db6 100644
--- a/lodash.isplainobject/README.md
+++ b/lodash.isplainobject/README.md
@@ -1,4 +1,4 @@
-# lodash.isplainobject v3.0.2
+# lodash.isplainobject v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isPlainObject` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var isPlainObject = require('lodash.isplainobject');
```
-See the [documentation](https://lodash.com/docs#isPlainObject) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.isplainobject) for more details.
+See the [documentation](https://lodash.com/docs#isPlainObject) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.isplainobject) for more details.
diff --git a/lodash.isplainobject/index.js b/lodash.isplainobject/index.js
index b39aea454..8bab99faf 100644
--- a/lodash.isplainobject/index.js
+++ b/lodash.isplainobject/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 3.0.2 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -7,7 +7,7 @@
* Available under MIT license
*/
var baseFor = require('lodash._basefor'),
- isNative = require('lodash.isnative'),
+ getNative = require('lodash._getnative'),
keysIn = require('lodash.keysin');
/** `Object#toString` result references. */
@@ -37,7 +37,7 @@ var hasOwnProperty = objectProto.hasOwnProperty;
var objToString = objectProto.toString;
/** Native method references. */
-var getPrototypeOf = isNative(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf;
+var getPrototypeOf = getNative(Object, 'getPrototypeOf');
/**
* The base implementation of `_.forIn` without support for callback
@@ -117,8 +117,8 @@ var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) {
if (!(value && objToString.call(value) == objectTag)) {
return false;
}
- var valueOf = value.valueOf,
- objProto = isNative(valueOf) && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto);
+ var valueOf = getNative(value, 'valueOf'),
+ objProto = valueOf && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto);
return objProto
? (value == objProto || getPrototypeOf(value) == objProto)
diff --git a/lodash.isplainobject/package.json b/lodash.isplainobject/package.json
index 260c054de..bab225ba1 100644
--- a/lodash.isplainobject/package.json
+++ b/lodash.isplainobject/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.isplainobject",
- "version": "3.0.2",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.isPlainObject` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -18,7 +18,7 @@
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._basefor": "^3.0.0",
- "lodash.isnative": "^3.0.0",
+ "lodash._getnative": "^3.0.0",
"lodash.keysin": "^3.0.0"
}
}
diff --git a/lodash.kebabcase/LICENSE b/lodash.kebabcase/LICENSE
new file mode 100644
index 000000000..b054ca5a3
--- /dev/null
+++ b/lodash.kebabcase/LICENSE
@@ -0,0 +1,22 @@
+Copyright 2012-2016 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+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.
diff --git a/lodash.kebabcase/README.md b/lodash.kebabcase/README.md
index 6c0b019ee..bfbe55af7 100644
--- a/lodash.kebabcase/README.md
+++ b/lodash.kebabcase/README.md
@@ -1,20 +1,18 @@
-# lodash.kebabcase v3.0.1
+# lodash.kebabcase v3.1.0
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.kebabCase` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+The [lodash](https://lodash.com/) method `_.kebabCase` exported as a [Node.js](https://nodejs.org/) module.
## Installation
Using npm:
-
```bash
$ {sudo -H} npm i -g npm
$ npm i --save lodash.kebabcase
```
-In Node.js/io.js:
-
+In Node.js:
```js
var kebabCase = require('lodash.kebabcase');
```
-See the [documentation](https://lodash.com/docs#kebabCase) or [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash.kebabcase) for more details.
+See the [documentation](https://lodash.com/docs#kebabCase) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.kebabcase) for more details.
diff --git a/lodash.kebabcase/index.js b/lodash.kebabcase/index.js
index b34b4820d..5ecafc2c7 100644
--- a/lodash.kebabcase/index.js
+++ b/lodash.kebabcase/index.js
@@ -1,12 +1,50 @@
/**
- * lodash 3.0.1 (Custom Build)
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * lodash 3.1.0 (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright 2012-2016 The Dojo Foundation
+ * Based on Underscore.js 1.8.3
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var createCompounder = require('lodash._createcompounder');
+var deburr = require('lodash.deburr'),
+ words = require('lodash.words');
+
+/**
+ * A specialized version of `_.reduce` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initFromArray] Specify using the first element of `array` as the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+function arrayReduce(array, iteratee, accumulator, initFromArray) {
+ var index = -1,
+ length = array.length;
+
+ if (initFromArray && length) {
+ accumulator = array[++index];
+ }
+ while (++index < length) {
+ accumulator = iteratee(accumulator, array[index], index, array);
+ }
+ return accumulator;
+}
+
+/**
+ * Creates a function like `_.camelCase`.
+ *
+ * @private
+ * @param {Function} callback The function to combine each word.
+ * @returns {Function} Returns the new compounder function.
+ */
+function createCompounder(callback) {
+ return function(string) {
+ return arrayReduce(words(deburr(string)), callback, '');
+ };
+}
/**
* Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
diff --git a/lodash.kebabcase/package.json b/lodash.kebabcase/package.json
index dba9c4f38..7567e3537 100644
--- a/lodash.kebabcase/package.json
+++ b/lodash.kebabcase/package.json
@@ -1,22 +1,21 @@
{
"name": "lodash.kebabcase",
- "version": "3.0.1",
- "description": "The modern build of lodash’s `_.kebabCase` as a module.",
+ "version": "3.1.0",
+ "description": "The lodash method `_.kebabCase` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util",
+ "keywords": "lodash, lodash-modularized, stdlib, util, kebabcase",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
- "Benjamin Tan (https://d10.github.io/)",
- "Blaine Bublitz (http://www.iceddev.com/)",
- "Kit Cambridge (http://kitcambridge.be/)",
+ "Blaine Bublitz (https://github.com/phated)",
"Mathias Bynens (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._createcompounder": "^3.0.0"
+ "lodash.deburr": "^3.0.0",
+ "lodash.words": "^3.0.0"
}
}
diff --git a/lodash.keys/README.md b/lodash.keys/README.md
index 0f550f6d5..3dec3fb20 100644
--- a/lodash.keys/README.md
+++ b/lodash.keys/README.md
@@ -1,4 +1,4 @@
-# lodash.keys v3.0.7
+# lodash.keys v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.keys` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var keys = require('lodash.keys');
```
-See the [documentation](https://lodash.com/docs#keys) or [package source](https://github.com/lodash/lodash/blob/3.0.7-npm-packages/lodash.keys) for more details.
+See the [documentation](https://lodash.com/docs#keys) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.keys) for more details.
diff --git a/lodash.keys/index.js b/lodash.keys/index.js
index 7ddf41921..736827857 100644
--- a/lodash.keys/index.js
+++ b/lodash.keys/index.js
@@ -1,14 +1,14 @@
/**
- * lodash 3.0.7 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
* Based on Underscore.js 1.8.3
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var isArguments = require('lodash.isarguments'),
- isArray = require('lodash.isarray'),
- isNative = require('lodash.isnative');
+var getNative = require('lodash._getnative'),
+ isArguments = require('lodash.isarguments'),
+ isArray = require('lodash.isarray');
/** Used for native method references. */
var objectProto = Object.prototype;
@@ -16,54 +16,14 @@ var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
-/** Native method references. */
-var propertyIsEnumerable = objectProto.propertyIsEnumerable;
-
/* Native method references for those with the same name as other `lodash` methods. */
-var nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys;
+var nativeKeys = getNative(Object, 'keys');
/**
* Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
* of an array-like value.
*/
-var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
-
-/**
- * An object environment feature flags.
- *
- * @static
- * @memberOf _
- * @type Object
- */
-var support = {};
-
-(function(x) {
- var Ctor = function() { this.x = x; },
- args = arguments,
- object = { '0': x, 'length': x },
- props = [];
-
- Ctor.prototype = { 'valueOf': x, 'y': x };
- for (var key in new Ctor) { props.push(key); }
-
- /**
- * Detect if `arguments` object indexes are non-enumerable.
- *
- * In Firefox < 4, IE < 9, PhantomJS, and Safari < 5.1 `arguments` object
- * indexes are non-enumerable. Chrome < 25 and Node.js < 0.11.0 treat
- * `arguments` object indexes as non-enumerable and fail `hasOwnProperty`
- * checks for indexes that exceed the number of function parameters and
- * whose associated argument values are `0`.
- *
- * @memberOf _.support
- * @type boolean
- */
- try {
- support.nonEnumArgs = !propertyIsEnumerable.call(args, 1);
- } catch(e) {
- support.nonEnumArgs = true;
- }
-}(1, 0));
+var MAX_SAFE_INTEGER = 9007199254740991;
/**
* The base implementation of `_.property` without support for deep paths.
@@ -110,7 +70,7 @@ function isArrayLike(value) {
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
- value = +value;
+ value = typeof value == 'number' ? value : parseFloat(value);
length = length == null ? MAX_SAFE_INTEGER : length;
return value > -1 && value % 1 == 0 && value < length;
}
@@ -141,8 +101,8 @@ function shimKeys(object) {
propsLength = props.length,
length = propsLength && object.length;
- var allowIndexes = length && isLength(length) &&
- (isArray(object) || (support.nonEnumArgs && isArguments(object)));
+ var allowIndexes = !!length && isLength(length) &&
+ (isArray(object) || isArguments(object));
var index = -1,
result = [];
@@ -180,7 +140,7 @@ function isObject(value) {
// Avoid a V8 JIT bug in Chrome 19-20.
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
var type = typeof value;
- return type == 'function' || (!!value && type == 'object');
+ return !!value && (type == 'object' || type == 'function');
}
/**
@@ -211,7 +171,7 @@ function isObject(value) {
* // => ['0', '1']
*/
var keys = !nativeKeys ? shimKeys : function(object) {
- var Ctor = object != null && object.constructor;
+ var Ctor = object == null ? null : object.constructor;
if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
(typeof object != 'function' && isArrayLike(object))) {
return shimKeys(object);
@@ -250,7 +210,7 @@ function keysIn(object) {
}
var length = object.length;
length = (length && isLength(length) &&
- (isArray(object) || (support.nonEnumArgs && isArguments(object))) && length) || 0;
+ (isArray(object) || isArguments(object)) && length) || 0;
var Ctor = object.constructor,
index = -1,
diff --git a/lodash.keys/package.json b/lodash.keys/package.json
index 94843ce60..9a044b6df 100644
--- a/lodash.keys/package.json
+++ b/lodash.keys/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.keys",
- "version": "3.0.7",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.keys` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,8 +17,8 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
+ "lodash._getnative": "^3.0.0",
"lodash.isarguments": "^3.0.0",
- "lodash.isarray": "^3.0.0",
- "lodash.isnative": "^3.0.0"
+ "lodash.isarray": "^3.0.0"
}
}
diff --git a/lodash.map/LICENSE.txt b/lodash.map/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.map/LICENSE.txt
+++ b/lodash.map/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.map/README.md b/lodash.map/README.md
index 70cf0a851..19d3b1dd8 100644
--- a/lodash.map/README.md
+++ b/lodash.map/README.md
@@ -1,4 +1,4 @@
-# lodash.map v3.0.0
+# lodash.map v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.map` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var map = require('lodash.map');
```
-See the [documentation](https://lodash.com/docs#map) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.map) for more details.
+See the [documentation](https://lodash.com/docs#map) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.map) for more details.
diff --git a/lodash.map/index.js b/lodash.map/index.js
index fcc1e8d75..9efcb9b64 100644
--- a/lodash.map/index.js
+++ b/lodash.map/index.js
@@ -1,15 +1,16 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
var arrayMap = require('lodash._arraymap'),
baseCallback = require('lodash._basecallback'),
baseEach = require('lodash._baseeach'),
- isArray = require('lodash.isarray');
+ isArray = require('lodash.isarray'),
+ keys = require('lodash.keys');
/**
* The base implementation of `_.map` without support for callback shorthands
diff --git a/lodash.map/package.json b/lodash.map/package.json
index 048974f41..e257bc9c0 100644
--- a/lodash.map/package.json
+++ b/lodash.map/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.map",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.map` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -20,6 +20,7 @@
"lodash._arraymap": "^3.0.0",
"lodash._basecallback": "^3.0.0",
"lodash._baseeach": "^3.0.0",
- "lodash.isarray": "^3.0.0"
+ "lodash.isarray": "^3.0.0",
+ "lodash.keys": "^3.0.0"
}
}
diff --git a/lodash.matches/README.md b/lodash.matches/README.md
index 677577000..e6bf420b1 100644
--- a/lodash.matches/README.md
+++ b/lodash.matches/README.md
@@ -1,4 +1,4 @@
-# lodash.matches v3.0.0
+# lodash.matches v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.matches` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var matches = require('lodash.matches');
```
-See the [documentation](https://lodash.com/docs#matches) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.matches) for more details.
+See the [documentation](https://lodash.com/docs#matches) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.matches) for more details.
diff --git a/lodash.matches/index.js b/lodash.matches/index.js
index 33e7da23b..48d9f40fd 100644
--- a/lodash.matches/index.js
+++ b/lodash.matches/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
* Based on Underscore.js 1.7.0
@@ -7,149 +7,18 @@
* Available under MIT license
*/
var baseClone = require('lodash._baseclone'),
- baseIsEqual = require('lodash._baseisequal'),
- keys = require('lodash.keys');
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
+ baseMatches = require('lodash._basematches');
/**
- * The base implementation of `_.isMatch` without support for callback
- * shorthands or `this` binding.
- *
- * @private
- * @param {Object} source The object to inspect.
- * @param {Array} props The source property names to match.
- * @param {Array} values The source values to match.
- * @param {Array} strictCompareFlags Strict comparison flags for source values.
- * @param {Function} [customizer] The function to customize comparing objects.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
- */
-function baseIsMatch(object, props, values, strictCompareFlags, customizer) {
- var length = props.length;
- if (object == null) {
- return !length;
- }
- var index = -1,
- noCustomizer = !customizer;
-
- while (++index < length) {
- if ((noCustomizer && strictCompareFlags[index])
- ? values[index] !== object[props[index]]
- : !hasOwnProperty.call(object, props[index])
- ) {
- return false;
- }
- }
- index = -1;
- while (++index < length) {
- var key = props[index];
- if (noCustomizer && strictCompareFlags[index]) {
- var result = hasOwnProperty.call(object, key);
- } else {
- var objValue = object[key],
- srcValue = values[index];
-
- result = customizer ? customizer(objValue, srcValue, key) : undefined;
- if (typeof result == 'undefined') {
- result = baseIsEqual(srcValue, objValue, customizer, true);
- }
- }
- if (!result) {
- return false;
- }
- }
- return true;
-}
-
-/**
- * The base implementation of `_.matches` which supports specifying whether
- * `source` should be cloned.
- *
- * @private
- * @param {Object} source The object of property values to match.
- * @param {boolean} [isCloned] Specify cloning the source object.
- * @returns {Function} Returns the new function.
- */
-function baseMatches(source, isCloned) {
- var props = keys(source),
- length = props.length;
-
- if (length == 1) {
- var key = props[0],
- value = source[key];
-
- if (isStrictComparable(value)) {
- return function(object) {
- return object != null && value === object[key] && hasOwnProperty.call(object, key);
- };
- }
- }
- if (isCloned) {
- source = baseClone(source, true);
- }
- var values = Array(length),
- strictCompareFlags = Array(length);
-
- while (length--) {
- value = source[props[length]];
- values[length] = value;
- strictCompareFlags[length] = isStrictComparable(value);
- }
- return function(object) {
- return baseIsMatch(object, props, values, strictCompareFlags);
- };
-}
-
-/**
- * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` if suitable for strict
- * equality comparisons, else `false`.
- */
-function isStrictComparable(value) {
- return value === value && (value === 0 ? ((1 / value) > 0) : !isObject(value));
-}
-
-/**
- * Checks if `value` is the language type of `Object`.
- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * **Note:** See the [ES5 spec](https://es5.github.io/#x8) for more details.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(1);
- * // => false
- */
-function isObject(value) {
- // Avoid a V8 JIT bug in Chrome 19-20.
- // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
- var type = typeof value;
- return type == 'function' || (value && type == 'object') || false;
-}
-
-/**
- * Creates a function which performs a deep comparison between a given object
+ * Creates a function that performs a deep comparison between a given object
* and `source`, returning `true` if the given object has equivalent property
* values, else `false`.
*
+ * **Note:** This method supports comparing arrays, booleans, `Date` objects,
+ * numbers, `Object` objects, regexes, and strings. Objects are compared by
+ * their own, not inherited, enumerable properties. For comparing a single
+ * own or inherited property value see `_.matchesProperty`.
+ *
* @static
* @memberOf _
* @category Utility
@@ -158,20 +27,15 @@ function isObject(value) {
* @example
*
* var users = [
- * { 'user': 'fred', 'age': 40 },
- * { 'user': 'barney', 'age': 36 }
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
* ];
*
- * var matchesAge = _.matches({ 'age': 36 });
- *
- * _.filter(users, matchesAge);
- * // => [{ 'user': 'barney', 'age': 36 }]
- *
- * _.find(users, matchesAge);
- * // => { 'user': 'barney', 'age': 36 }
+ * _.filter(users, _.matches({ 'age': 40, 'active': false }));
+ * // => [{ 'user': 'fred', 'age': 40, 'active': false }]
*/
function matches(source) {
- return baseMatches(source, true);
+ return baseMatches(baseClone(source, true));
}
module.exports = matches;
diff --git a/lodash.matches/package.json b/lodash.matches/package.json
index 80276590c..afb8487e6 100644
--- a/lodash.matches/package.json
+++ b/lodash.matches/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.matches",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.matches` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -18,7 +18,6 @@
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._baseclone": "^3.0.0",
- "lodash._baseisequal": "^3.0.0",
- "lodash.keys": "^3.0.0"
+ "lodash._basematches": "^3.0.0"
}
}
diff --git a/lodash.max/LICENSE.txt b/lodash.max/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.max/LICENSE.txt
+++ b/lodash.max/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.max/README.md b/lodash.max/README.md
index 79827ad07..a54fcb23a 100644
--- a/lodash.max/README.md
+++ b/lodash.max/README.md
@@ -1,4 +1,4 @@
-# lodash.max v3.0.0
+# lodash.max v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.max` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var max = require('lodash.max');
```
-See the [documentation](https://lodash.com/docs#max) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.max) for more details.
+See the [documentation](https://lodash.com/docs#max) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.max) for more details.
diff --git a/lodash.max/index.js b/lodash.max/index.js
index 164bb4db8..73f87f3c8 100644
--- a/lodash.max/index.js
+++ b/lodash.max/index.js
@@ -1,29 +1,106 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
var arrayMax = require('lodash._arraymax'),
- createExtremum = require('lodash._createextremum');
+ baseCallback = require('lodash._basecallback'),
+ baseEach = require('lodash._baseeach'),
+ isIterateeCall = require('lodash._isiterateecall'),
+ toIterable = require('lodash._toiterable'),
+ isArray = require('lodash.isarray'),
+ isString = require('lodash.isstring');
+
+/**
+ * Used by `_.max` and `_.min` as the default callback for string values.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the code unit of the first character of the string.
+ */
+function charAtCallback(string) {
+ return string.charCodeAt(0);
+}
+
+/** Used as references for `-Infinity` and `Infinity`. */
+var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY,
+ POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
+
+/**
+ * Creates a `_.max` or `_.min` function.
+ *
+ * @private
+ * @param {Function} arrayFunc The function to get the extremum value from an array.
+ * @param {boolean} [isMin] Specify returning the minimum, instead of the maximum,
+ * extremum value.
+ * @returns {Function} Returns the new extremum function.
+ */
+function createExtremum(arrayFunc, isMin) {
+ return function(collection, iteratee, thisArg) {
+ if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
+ iteratee = null;
+ }
+ var noIteratee = iteratee == null;
+
+ iteratee = noIteratee ? iteratee : baseCallback(iteratee, thisArg, 3);
+ if (noIteratee) {
+ var isArr = isArray(collection);
+ if (!isArr && isString(collection)) {
+ iteratee = charAtCallback;
+ } else {
+ return arrayFunc(isArr ? collection : toIterable(collection));
+ }
+ }
+ return extremumBy(collection, iteratee, isMin);
+ };
+}
+
+/**
+ * Gets the extremum value of `collection` invoking `iteratee` for each value
+ * in `collection` to generate the criterion by which the value is ranked.
+ * The `iteratee` is invoked with three arguments: (value, index, collection).
+ *
+ * @private
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {boolean} [isMin] Specify returning the minimum, instead of the
+ * maximum, extremum value.
+ * @returns {*} Returns the extremum value.
+ */
+function extremumBy(collection, iteratee, isMin) {
+ var exValue = isMin ? POSITIVE_INFINITY : NEGATIVE_INFINITY,
+ computed = exValue,
+ result = computed;
+
+ baseEach(collection, function(value, index, collection) {
+ var current = iteratee(value, index, collection);
+ if ((isMin ? (current < computed) : (current > computed)) ||
+ (current === exValue && current === result)) {
+ computed = current;
+ result = value;
+ }
+ });
+ return result;
+}
/**
* Gets the maximum value of `collection`. If `collection` is empty or falsey
* `-Infinity` is returned. If an iteratee function is provided it is invoked
* for each value in `collection` to generate the criterion by which the value
* is ranked. The `iteratee` is bound to `thisArg` and invoked with three
- * arguments; (value, index, collection).
+ * arguments: (value, index, collection).
*
- * If a property name is provided for `predicate` the created `_.property`
+ * If a property name is provided for `iteratee` the created `_.property`
* style callback returns the property value of the given element.
*
* If a value is also provided for `thisArg` the created `_.matchesProperty`
* style callback returns `true` for elements that have a matching property
* value, else `false`.
*
- * If an object is provided for `predicate` the created `_.matches` style
+ * If an object is provided for `iteratee` the created `_.matches` style
* callback returns `true` for elements that have the properties of the given
* object, else `false`.
*
@@ -50,11 +127,11 @@ var arrayMax = require('lodash._arraymax'),
* _.max(users, function(chr) {
* return chr.age;
* });
- * // => { 'user': 'fred', 'age': 40 };
+ * // => { 'user': 'fred', 'age': 40 }
*
* // using the `_.property` callback shorthand
* _.max(users, 'age');
- * // => { 'user': 'fred', 'age': 40 };
+ * // => { 'user': 'fred', 'age': 40 }
*/
var max = createExtremum(arrayMax);
diff --git a/lodash.max/package.json b/lodash.max/package.json
index 9a184ccc7..2731151f6 100644
--- a/lodash.max/package.json
+++ b/lodash.max/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.max",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.max` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -18,6 +18,11 @@
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._arraymax": "^3.0.0",
- "lodash._createextremum": "^3.0.0"
+ "lodash._basecallback": "^3.0.0",
+ "lodash._baseeach": "^3.0.0",
+ "lodash._isiterateecall": "^3.0.0",
+ "lodash._toiterable": "^3.0.0",
+ "lodash.isarray": "^3.0.0",
+ "lodash.isstring": "^3.0.0"
}
}
diff --git a/lodash.memoize/LICENSE b/lodash.memoize/LICENSE
new file mode 100644
index 000000000..b054ca5a3
--- /dev/null
+++ b/lodash.memoize/LICENSE
@@ -0,0 +1,22 @@
+Copyright 2012-2016 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+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.
diff --git a/lodash.memoize/README.md b/lodash.memoize/README.md
index a417e274a..a67b66a29 100644
--- a/lodash.memoize/README.md
+++ b/lodash.memoize/README.md
@@ -1,20 +1,18 @@
-# lodash.memoize v3.0.4
+# lodash.memoize v3.1.0
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.memoize` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+The [lodash](https://lodash.com/) method `_.memoize` exported as a [Node.js](https://nodejs.org/) module.
## Installation
Using npm:
-
```bash
$ {sudo -H} npm i -g npm
$ npm i --save lodash.memoize
```
-In Node.js/io.js:
-
+In Node.js:
```js
var memoize = require('lodash.memoize');
```
-See the [documentation](https://lodash.com/docs#memoize) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.memoize) for more details.
+See the [documentation](https://lodash.com/docs#memoize) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.memoize) for more details.
diff --git a/lodash.memoize/index.js b/lodash.memoize/index.js
index aef5f16e9..c7f9f006a 100644
--- a/lodash.memoize/index.js
+++ b/lodash.memoize/index.js
@@ -1,94 +1,27 @@
-/** Used as the `TypeError` message for "Functions" methods. */
+/**
+ * lodash 3.1.0 (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright 2012-2016 The Dojo Foundation
+ * Based on Underscore.js 1.8.3
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license
+ */
+var MapCache = require('lodash._mapcache');
/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Creates a cache object to store key/value pairs.
- *
- * @private
- * @static
- * @name Cache
- * @memberOf _.memoize
- */
-function MapCache() {
- this.__data__ = {};
-}
-
-/**
- * Removes `key` and its value from the cache.
- *
- * @private
- * @name delete
- * @memberOf _.memoize.Cache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed successfully, else `false`.
- */
-function mapDelete(key) {
- return this.has(key) && delete this.__data__[key];
-}
-
-/**
- * Gets the cached value for `key`.
- *
- * @private
- * @name get
- * @memberOf _.memoize.Cache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the cached value.
- */
-function mapGet(key) {
- return key == '__proto__' ? undefined : this.__data__[key];
-}
-
-/**
- * Checks if a cached value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf _.memoize.Cache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
-function mapHas(key) {
- return key != '__proto__' && hasOwnProperty.call(this.__data__, key);
-}
-
-/**
- * Sets `value` to `key` of the cache.
- *
- * @private
- * @name set
- * @memberOf _.memoize.Cache
- * @param {string} key The key of the value to cache.
- * @param {*} value The value to cache.
- * @returns {Object} Returns the cache object.
- */
-function mapSet(key, value) {
- if (key != '__proto__') {
- this.__data__[key] = value;
- }
- return this;
-}
-
/**
* Creates a function that memoizes the result of `func`. If `resolver` is
* provided it determines the cache key for storing the result based on the
* arguments provided to the memoized function. By default, the first argument
- * provided to the memoized function is coerced to a string and used as the
- * cache key. The `func` is invoked with the `this` binding of the memoized
- * function.
+ * provided to the memoized function is used as the map cache key. The `func`
+ * is invoked with the `this` binding of the memoized function.
*
* **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
- * method interface of `get`, `has`, and `set`.
+ * method interface of `delete`, `get`, `has`, and `set`.
*
* @static
* @memberOf _
@@ -98,35 +31,27 @@ function mapSet(key, value) {
* @returns {Function} Returns the new memoizing function.
* @example
*
- * var upperCase = _.memoize(function(string) {
- * return string.toUpperCase();
- * });
+ * var object = { 'a': 1, 'b': 2 };
+ * var other = { 'c': 3, 'd': 4 };
*
- * upperCase('fred');
- * // => 'FRED'
+ * var values = _.memoize(_.values);
+ * values(object);
+ * // => [1, 2]
+ *
+ * values(other);
+ * // => [3, 4]
+ *
+ * object.a = 2;
+ * values(object);
+ * // => [1, 2]
*
* // modifying the result cache
- * upperCase.cache.set('fred', 'BARNEY');
- * upperCase('fred');
- * // => 'BARNEY'
+ * values.cache.set(object, ['a', 'b']);
+ * values(object);
+ * // => ['a', 'b']
*
* // replacing `_.memoize.Cache`
- * var object = { 'user': 'fred' };
- * var other = { 'user': 'barney' };
- * var identity = _.memoize(_.identity);
- *
- * identity(object);
- * // => { 'user': 'fred' }
- * identity(other);
- * // => { 'user': 'fred' }
- *
* _.memoize.Cache = WeakMap;
- * var identity = _.memoize(_.identity);
- *
- * identity(object);
- * // => { 'user': 'fred' }
- * identity(other);
- * // => { 'user': 'barney' }
*/
function memoize(func, resolver) {
if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
@@ -148,12 +73,6 @@ function memoize(func, resolver) {
return memoized;
}
-// Add functions to the `Map` cache.
-MapCache.prototype['delete'] = mapDelete;
-MapCache.prototype.get = mapGet;
-MapCache.prototype.has = mapHas;
-MapCache.prototype.set = mapSet;
-
// Assign cache to `_.memoize`.
memoize.Cache = MapCache;
diff --git a/lodash.memoize/package.json b/lodash.memoize/package.json
index 591b2bdfb..32d91c3ce 100644
--- a/lodash.memoize/package.json
+++ b/lodash.memoize/package.json
@@ -1,19 +1,20 @@
{
"name": "lodash.memoize",
- "version": "3.0.4",
- "description": "The modern build of lodash’s `_.memoize` as a module.",
+ "version": "3.1.0",
+ "description": "The lodash method `_.memoize` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util",
+ "keywords": "lodash, lodash-modularized, stdlib, util, memoize",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
- "Benjamin Tan (https://d10.github.io/)",
- "Blaine Bublitz (http://www.iceddev.com/)",
- "Kit Cambridge (http://kitcambridge.be/)",
+ "Blaine Bublitz (https://github.com/phated)",
"Mathias Bynens (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
+ "dependencies": {
+ "lodash._mapcache": "^3.0.0"
+ }
}
diff --git a/lodash.merge/README.md b/lodash.merge/README.md
index 80167daba..bccd4d473 100644
--- a/lodash.merge/README.md
+++ b/lodash.merge/README.md
@@ -1,4 +1,4 @@
-# lodash.merge v3.0.3
+# lodash.merge v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.merge` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var merge = require('lodash.merge');
```
-See the [documentation](https://lodash.com/docs#merge) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.merge) for more details.
+See the [documentation](https://lodash.com/docs#merge) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.merge) for more details.
diff --git a/lodash.merge/index.js b/lodash.merge/index.js
index dfa16254a..8e8f36578 100644
--- a/lodash.merge/index.js
+++ b/lodash.merge/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 3.0.3 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
* Based on Underscore.js 1.8.2
@@ -12,9 +12,11 @@ var arrayCopy = require('lodash._arraycopy'),
createAssigner = require('lodash._createassigner'),
isArguments = require('lodash.isarguments'),
isArray = require('lodash.isarray'),
+ isNative = require('lodash.isnative'),
isPlainObject = require('lodash.isplainobject'),
isTypedArray = require('lodash.istypedarray'),
keys = require('lodash.keys'),
+ keysIn = require('lodash.keysin'),
toPlainObject = require('lodash.toplainobject');
/**
@@ -25,13 +27,12 @@ var arrayCopy = require('lodash._arraycopy'),
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
*/
function isObjectLike(value) {
- return (value && typeof value == 'object') || false;
+ return !!value && typeof value == 'object';
}
/**
- * Used as the maximum length of an array-like value.
- * See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
- * for more details.
+ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+ * of an array-like value.
*/
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
@@ -120,7 +121,7 @@ function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stack
if (isLength(srcValue.length) && (isArray(srcValue) || isTypedArray(srcValue))) {
result = isArray(value)
? value
- : (value ? arrayCopy(value) : []);
+ : ((value && value.length) ? arrayCopy(value) : []);
}
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
result = isArguments(value)
@@ -147,9 +148,7 @@ function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stack
/**
* Checks if `value` is a valid array-like length.
*
- * **Note:** This function is based on ES `ToLength`. See the
- * [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)
- * for more details.
+ * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
*
* @private
* @param {*} value The value to check.
@@ -160,11 +159,9 @@ function isLength(value) {
}
/**
- * Checks if `value` is the language type of `Object`.
+ * 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('')`)
*
- * **Note:** See the [ES5 spec](https://es5.github.io/#x8) for more details.
- *
* @static
* @memberOf _
* @category Lang
@@ -185,7 +182,7 @@ function isObject(value) {
// Avoid a V8 JIT bug in Chrome 19-20.
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
var type = typeof value;
- return type == 'function' || (value && type == 'object') || false;
+ return type == 'function' || (!!value && type == 'object');
}
/**
@@ -195,7 +192,7 @@ function isObject(value) {
* provided it is invoked to produce the merged values of the destination and
* source properties. If `customizer` returns `undefined` merging is handled
* by the method instead. The `customizer` is bound to `thisArg` and invoked
- * with five arguments; (objectValue, sourceValue, key, object, source).
+ * with five arguments: (objectValue, sourceValue, key, object, source).
*
* @static
* @memberOf _
diff --git a/lodash.merge/package.json b/lodash.merge/package.json
index f2ebee957..44b1c1dc4 100644
--- a/lodash.merge/package.json
+++ b/lodash.merge/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.merge",
- "version": "3.0.3",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.merge` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -23,9 +23,11 @@
"lodash._createassigner": "^3.0.0",
"lodash.isarguments": "^3.0.0",
"lodash.isarray": "^3.0.0",
+ "lodash.isnative": "^3.0.0",
"lodash.isplainobject": "^3.0.0",
"lodash.istypedarray": "^3.0.0",
"lodash.keys": "^3.0.0",
+ "lodash.keysin": "^3.0.0",
"lodash.toplainobject": "^3.0.0"
}
}
diff --git a/lodash.min/LICENSE.txt b/lodash.min/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.min/LICENSE.txt
+++ b/lodash.min/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.min/README.md b/lodash.min/README.md
index 4c8c36ad8..7a5a78eb6 100644
--- a/lodash.min/README.md
+++ b/lodash.min/README.md
@@ -1,4 +1,4 @@
-# lodash.min v3.0.0
+# lodash.min v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.min` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var min = require('lodash.min');
```
-See the [documentation](https://lodash.com/docs#min) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.min) for more details.
+See the [documentation](https://lodash.com/docs#min) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.min) for more details.
diff --git a/lodash.min/index.js b/lodash.min/index.js
index 05aec461b..444dcb336 100644
--- a/lodash.min/index.js
+++ b/lodash.min/index.js
@@ -1,29 +1,106 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
var arrayMin = require('lodash._arraymin'),
- createExtremum = require('lodash._createextremum');
+ baseCallback = require('lodash._basecallback'),
+ baseEach = require('lodash._baseeach'),
+ isIterateeCall = require('lodash._isiterateecall'),
+ toIterable = require('lodash._toiterable'),
+ isArray = require('lodash.isarray'),
+ isString = require('lodash.isstring');
+
+/**
+ * Used by `_.max` and `_.min` as the default callback for string values.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the code unit of the first character of the string.
+ */
+function charAtCallback(string) {
+ return string.charCodeAt(0);
+}
+
+/** Used as references for `-Infinity` and `Infinity`. */
+var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY,
+ POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
+
+/**
+ * Creates a `_.max` or `_.min` function.
+ *
+ * @private
+ * @param {Function} arrayFunc The function to get the extremum value from an array.
+ * @param {boolean} [isMin] Specify returning the minimum, instead of the maximum,
+ * extremum value.
+ * @returns {Function} Returns the new extremum function.
+ */
+function createExtremum(arrayFunc, isMin) {
+ return function(collection, iteratee, thisArg) {
+ if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
+ iteratee = null;
+ }
+ var noIteratee = iteratee == null;
+
+ iteratee = noIteratee ? iteratee : baseCallback(iteratee, thisArg, 3);
+ if (noIteratee) {
+ var isArr = isArray(collection);
+ if (!isArr && isString(collection)) {
+ iteratee = charAtCallback;
+ } else {
+ return arrayFunc(isArr ? collection : toIterable(collection));
+ }
+ }
+ return extremumBy(collection, iteratee, isMin);
+ };
+}
+
+/**
+ * Gets the extremum value of `collection` invoking `iteratee` for each value
+ * in `collection` to generate the criterion by which the value is ranked.
+ * The `iteratee` is invoked with three arguments: (value, index, collection).
+ *
+ * @private
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {boolean} [isMin] Specify returning the minimum, instead of the
+ * maximum, extremum value.
+ * @returns {*} Returns the extremum value.
+ */
+function extremumBy(collection, iteratee, isMin) {
+ var exValue = isMin ? POSITIVE_INFINITY : NEGATIVE_INFINITY,
+ computed = exValue,
+ result = computed;
+
+ baseEach(collection, function(value, index, collection) {
+ var current = iteratee(value, index, collection);
+ if ((isMin ? (current < computed) : (current > computed)) ||
+ (current === exValue && current === result)) {
+ computed = current;
+ result = value;
+ }
+ });
+ return result;
+}
/**
* Gets the minimum value of `collection`. If `collection` is empty or falsey
* `Infinity` is returned. If an iteratee function is provided it is invoked
* for each value in `collection` to generate the criterion by which the value
* is ranked. The `iteratee` is bound to `thisArg` and invoked with three
- * arguments; (value, index, collection).
+ * arguments: (value, index, collection).
*
- * If a property name is provided for `predicate` the created `_.property`
+ * If a property name is provided for `iteratee` the created `_.property`
* style callback returns the property value of the given element.
*
* If a value is also provided for `thisArg` the created `_.matchesProperty`
* style callback returns `true` for elements that have a matching property
* value, else `false`.
*
- * If an object is provided for `predicate` the created `_.matches` style
+ * If an object is provided for `iteratee` the created `_.matches` style
* callback returns `true` for elements that have the properties of the given
* object, else `false`.
*
@@ -50,11 +127,11 @@ var arrayMin = require('lodash._arraymin'),
* _.min(users, function(chr) {
* return chr.age;
* });
- * // => { 'user': 'barney', 'age': 36 };
+ * // => { 'user': 'barney', 'age': 36 }
*
* // using the `_.property` callback shorthand
* _.min(users, 'age');
- * // => { 'user': 'barney', 'age': 36 };
+ * // => { 'user': 'barney', 'age': 36 }
*/
var min = createExtremum(arrayMin, true);
diff --git a/lodash.min/package.json b/lodash.min/package.json
index 3a9973f34..9fc48ce0f 100644
--- a/lodash.min/package.json
+++ b/lodash.min/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.min",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.min` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -18,6 +18,11 @@
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._arraymin": "^3.0.0",
- "lodash._createextremum": "^3.0.0"
+ "lodash._basecallback": "^3.0.0",
+ "lodash._baseeach": "^3.0.0",
+ "lodash._isiterateecall": "^3.0.0",
+ "lodash._toiterable": "^3.0.0",
+ "lodash.isarray": "^3.0.0",
+ "lodash.isstring": "^3.0.0"
}
}
diff --git a/lodash.now/LICENSE.txt b/lodash.now/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.now/LICENSE.txt
+++ b/lodash.now/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.now/README.md b/lodash.now/README.md
index 4002adaf9..691ccd9b3 100644
--- a/lodash.now/README.md
+++ b/lodash.now/README.md
@@ -1,4 +1,4 @@
-# lodash.now v3.0.0
+# lodash.now v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.now` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var now = require('lodash.now');
```
-See the [documentation](https://lodash.com/docs#now) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.now) for more details.
+See the [documentation](https://lodash.com/docs#now) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.now) for more details.
diff --git a/lodash.now/index.js b/lodash.now/index.js
index 6ef273723..d07b60c5f 100644
--- a/lodash.now/index.js
+++ b/lodash.now/index.js
@@ -1,15 +1,15 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.3
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
-var isNative = require('lodash.isnative');
+var getNative = require('lodash._getnative');
/* Native method references for those with the same name as other `lodash` methods. */
-var nativeNow = isNative(nativeNow = Date.now) && nativeNow;
+var nativeNow = getNative(Date, 'now');
/**
* Gets the number of milliseconds that have elapsed since the Unix epoch
diff --git a/lodash.now/package.json b/lodash.now/package.json
index 2618b4b9b..40b8bfe45 100644
--- a/lodash.now/package.json
+++ b/lodash.now/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.now",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.now` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -17,6 +17,6 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash.isnative": "^3.0.0"
+ "lodash._getnative": "^3.0.0"
}
}
diff --git a/lodash.omit/LICENSE.txt b/lodash.omit/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.omit/LICENSE.txt
+++ b/lodash.omit/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.omit/README.md b/lodash.omit/README.md
index 2a02d06aa..49990faf9 100644
--- a/lodash.omit/README.md
+++ b/lodash.omit/README.md
@@ -1,4 +1,4 @@
-# lodash.omit v3.0.0
+# lodash.omit v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.omit` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var omit = require('lodash.omit');
```
-See the [documentation](https://lodash.com/docs#omit) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.omit) for more details.
+See the [documentation](https://lodash.com/docs#omit) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.omit) for more details.
diff --git a/lodash.omit/index.js b/lodash.omit/index.js
index 66e055f03..4dffbb7ab 100644
--- a/lodash.omit/index.js
+++ b/lodash.omit/index.js
@@ -1,8 +1,8 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
@@ -12,16 +12,12 @@ var arrayMap = require('lodash._arraymap'),
bindCallback = require('lodash._bindcallback'),
pickByArray = require('lodash._pickbyarray'),
pickByCallback = require('lodash._pickbycallback'),
- keysIn = require('lodash.keysin');
+ keysIn = require('lodash.keysin'),
+ restParam = require('lodash.restparam');
/**
* The opposite of `_.pick`; this method creates an object composed of the
* own and inherited enumerable properties of `object` that are not omitted.
- * Property names may be specified as individual arguments or as arrays of
- * property names. If `predicate` is provided it is invoked for each property
- * of `object` omitting the properties `predicate` returns truthy for. The
- * predicate is bound to `thisArg` and invoked with three arguments;
- * (value, key, object).
*
* @static
* @memberOf _
@@ -42,18 +38,18 @@ var arrayMap = require('lodash._arraymap'),
* _.omit(object, _.isNumber);
* // => { 'user': 'fred' }
*/
-function omit(object, predicate, thisArg) {
+var omit = restParam(function(object, props) {
if (object == null) {
return {};
}
- if (typeof predicate != 'function') {
- var props = arrayMap(baseFlatten(arguments, false, false, 1), String);
+ if (typeof props[0] != 'function') {
+ var props = arrayMap(baseFlatten(props), String);
return pickByArray(object, baseDifference(keysIn(object), props));
}
- predicate = bindCallback(predicate, thisArg, 3);
+ var predicate = bindCallback(props[0], props[1], 3);
return pickByCallback(object, function(value, key, object) {
return !predicate(value, key, object);
});
-}
+});
module.exports = omit;
diff --git a/lodash.omit/package.json b/lodash.omit/package.json
index 290244d31..640660844 100644
--- a/lodash.omit/package.json
+++ b/lodash.omit/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.omit",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.omit` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -23,6 +23,7 @@
"lodash._bindcallback": "^3.0.0",
"lodash._pickbyarray": "^3.0.0",
"lodash._pickbycallback": "^3.0.0",
- "lodash.keysin": "^3.0.0"
+ "lodash.keysin": "^3.0.0",
+ "lodash.restparam": "^3.0.0"
}
}
diff --git a/lodash.pad/LICENSE.txt b/lodash.pad/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.pad/LICENSE.txt
+++ b/lodash.pad/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.pad/README.md b/lodash.pad/README.md
index 57c0bff72..9b4891cd8 100644
--- a/lodash.pad/README.md
+++ b/lodash.pad/README.md
@@ -1,4 +1,4 @@
-# lodash.pad v3.0.0
+# lodash.pad v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.pad` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var pad = require('lodash.pad');
```
-See the [documentation](https://lodash.com/docs#pad) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.pad) for more details.
+See the [documentation](https://lodash.com/docs#pad) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.pad) for more details.
diff --git a/lodash.pad/index.js b/lodash.pad/index.js
index f08b0fa63..7a491819f 100644
--- a/lodash.pad/index.js
+++ b/lodash.pad/index.js
@@ -1,13 +1,13 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
var baseToString = require('lodash._basetostring'),
- createPad = require('lodash._createpad');
+ createPadding = require('lodash._createpadding');
/** Native method references. */
var ceil = Math.ceil,
@@ -17,9 +17,8 @@ var ceil = Math.ceil,
var nativeIsFinite = global.isFinite;
/**
- * Pads `string` on the left and right sides if it is shorter then the given
- * padding length. The `chars` string may be truncated if the number of padding
- * characters can't be evenly divided by the padding length.
+ * Pads `string` on the left and right sides if it's shorter than `length`.
+ * Padding characters are truncated if they can't be evenly divided by `length`.
*
* @static
* @memberOf _
@@ -51,7 +50,7 @@ function pad(string, length, chars) {
leftLength = floor(mid),
rightLength = ceil(mid);
- chars = createPad('', rightLength, chars);
+ chars = createPadding('', rightLength, chars);
return chars.slice(0, leftLength) + string + chars;
}
diff --git a/lodash.pad/package.json b/lodash.pad/package.json
index eb02a0829..6af5e7aa0 100644
--- a/lodash.pad/package.json
+++ b/lodash.pad/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.pad",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.pad` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -18,6 +18,6 @@
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._basetostring": "^3.0.0",
- "lodash._createpad": "^3.0.0"
+ "lodash._createpadding": "^3.0.0"
}
}
diff --git a/lodash.padleft/LICENSE.txt b/lodash.padleft/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.padleft/LICENSE.txt
+++ b/lodash.padleft/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.padleft/README.md b/lodash.padleft/README.md
index cd29e458b..bb634f538 100644
--- a/lodash.padleft/README.md
+++ b/lodash.padleft/README.md
@@ -1,4 +1,4 @@
-# lodash.padleft v3.0.0
+# lodash.padleft v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.padLeft` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var padLeft = require('lodash.padleft');
```
-See the [documentation](https://lodash.com/docs#padLeft) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.padleft) for more details.
+See the [documentation](https://lodash.com/docs#padLeft) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.padleft) for more details.
diff --git a/lodash.padleft/index.js b/lodash.padleft/index.js
index 975619611..69638d322 100644
--- a/lodash.padleft/index.js
+++ b/lodash.padleft/index.js
@@ -1,18 +1,31 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
var baseToString = require('lodash._basetostring'),
- createPad = require('lodash._createpad');
+ createPadding = require('lodash._createpadding');
/**
- * Pads `string` on the left side if it is shorter then the given padding
- * length. The `chars` string may be truncated if the number of padding
- * characters exceeds the padding length.
+ * Creates a function for `_.padLeft` or `_.padRight`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify padding from the right.
+ * @returns {Function} Returns the new pad function.
+ */
+function createPadDir(fromRight) {
+ return function(string, length, chars) {
+ string = baseToString(string);
+ return string && ((fromRight ? string : '') + createPadding(string, length, chars) + (fromRight ? '' : string));
+ };
+}
+
+/**
+ * Pads `string` on the left side if it is shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
*
* @static
* @memberOf _
@@ -32,9 +45,6 @@ var baseToString = require('lodash._basetostring'),
* _.padLeft('abc', 3);
* // => 'abc'
*/
-function padLeft(string, length, chars) {
- string = baseToString(string);
- return string && (createPad(string, length, chars) + string);
-}
+var padLeft = createPadDir();
module.exports = padLeft;
diff --git a/lodash.padleft/package.json b/lodash.padleft/package.json
index e9c1d4b2d..f2fbe534b 100644
--- a/lodash.padleft/package.json
+++ b/lodash.padleft/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.padleft",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.padLeft` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -18,6 +18,6 @@
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._basetostring": "^3.0.0",
- "lodash._createpad": "^3.0.0"
+ "lodash._createpadding": "^3.0.0"
}
}
diff --git a/lodash.padright/LICENSE.txt b/lodash.padright/LICENSE.txt
index 17764328c..9cd87e5dc 100644
--- a/lodash.padright/LICENSE.txt
+++ b/lodash.padright/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.padright/README.md b/lodash.padright/README.md
index b22b12d3e..e1a742aeb 100644
--- a/lodash.padright/README.md
+++ b/lodash.padright/README.md
@@ -1,4 +1,4 @@
-# lodash.padright v3.0.0
+# lodash.padright v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.padRight` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var padRight = require('lodash.padright');
```
-See the [documentation](https://lodash.com/docs#padRight) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.padright) for more details.
+See the [documentation](https://lodash.com/docs#padRight) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.padright) for more details.
diff --git a/lodash.padright/index.js b/lodash.padright/index.js
index dea148f53..252e0a131 100644
--- a/lodash.padright/index.js
+++ b/lodash.padright/index.js
@@ -1,18 +1,31 @@
/**
- * lodash 3.0.0 (Custom Build)
+ * lodash 3.1.0 (Custom Build)
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.7.0
+ * Based on Underscore.js 1.8.2
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
var baseToString = require('lodash._basetostring'),
- createPad = require('lodash._createpad');
+ createPadding = require('lodash._createpadding');
/**
- * Pads `string` on the right side if it is shorter then the given padding
- * length. The `chars` string may be truncated if the number of padding
- * characters exceeds the padding length.
+ * Creates a function for `_.padLeft` or `_.padRight`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify padding from the right.
+ * @returns {Function} Returns the new pad function.
+ */
+function createPadDir(fromRight) {
+ return function(string, length, chars) {
+ string = baseToString(string);
+ return string && ((fromRight ? string : '') + createPadding(string, length, chars) + (fromRight ? '' : string));
+ };
+}
+
+/**
+ * Pads `string` on the right side if it is shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
*
* @static
* @memberOf _
@@ -32,9 +45,6 @@ var baseToString = require('lodash._basetostring'),
* _.padRight('abc', 3);
* // => 'abc'
*/
-function padRight(string, length, chars) {
- string = baseToString(string);
- return string && (string + createPad(string, length, chars));
-}
+var padRight = createPadDir(true);
module.exports = padRight;
diff --git a/lodash.padright/package.json b/lodash.padright/package.json
index 2f8b1a893..1ba642f2e 100644
--- a/lodash.padright/package.json
+++ b/lodash.padright/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.padright",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.padRight` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -18,6 +18,6 @@
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._basetostring": "^3.0.0",
- "lodash._createpad": "^3.0.0"
+ "lodash._createpadding": "^3.0.0"
}
}
diff --git a/lodash.parseint/LICENSE b/lodash.parseint/LICENSE
index 9cd87e5dc..b054ca5a3 100644
--- a/lodash.parseint/LICENSE
+++ b/lodash.parseint/LICENSE
@@ -1,5 +1,5 @@
-Copyright 2012-2015 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+Copyright 2012-2016 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lodash.parseint/README.md b/lodash.parseint/README.md
index ce3b94244..bd69bcbb9 100644
--- a/lodash.parseint/README.md
+++ b/lodash.parseint/README.md
@@ -1,20 +1,18 @@
-# lodash.parseint v3.0.2
+# lodash.parseint v3.1.0
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.parseInt` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+The [lodash](https://lodash.com/) method `_.parseInt` exported as a [Node.js](https://nodejs.org/) module.
## Installation
Using npm:
-
```bash
$ {sudo -H} npm i -g npm
$ npm i --save lodash.parseint
```
-In Node.js/io.js:
-
+In Node.js:
```js
var parseInt = require('lodash.parseint');
```
-See the [documentation](https://lodash.com/docs#parseInt) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.parseint) for more details.
+See the [documentation](https://lodash.com/docs#parseInt) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.parseint) for more details.
diff --git a/lodash.parseint/index.js b/lodash.parseint/index.js
index 02f86b0c3..d7b2aaf49 100644
--- a/lodash.parseint/index.js
+++ b/lodash.parseint/index.js
@@ -1,20 +1,126 @@
/**
- * lodash 3.0.2 (Custom Build)
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation
+ * lodash 3.1.0 (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license