diff --git a/README.md b/README.md
index 177bc7df4e..1714f2ddcf 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# Lo-Dash v0.3.1
+# Lo-Dash v0.3.2
A drop-in replacement for Underscore.js, from the devs behind [jsPerf.com](http://jsperf.com), that delivers [performance improvements](http://lodash.com/benchmarks), [bug fixes](https://github.com/bestiejs/lodash#closed-underscorejs-issues), and [additional features](https://github.com/bestiejs/lodash#features).
@@ -6,8 +6,8 @@ Lo-Dash’s performance is gained by avoiding slower native methods, instead opt
## Download
- * [Development source](https://raw.github.com/bestiejs/lodash/v0.3.1/lodash.js)
- * [Production source](https://raw.github.com/bestiejs/lodash/v0.3.1/lodash.min.js)
+ * [Development source](https://raw.github.com/bestiejs/lodash/v0.3.2/lodash.js)
+ * [Production source](https://raw.github.com/bestiejs/lodash/v0.3.2/lodash.min.js)
* For optimal performance, [create a custom build](https://github.com/bestiejs/lodash#custom-builds) with only the features you need
## Dive in
@@ -39,7 +39,7 @@ For more information check out these screencasts over Lo-Dash:
## Support
-Lo-Dash has been tested in at least Chrome 5-19, Firefox 1.5-13, IE 6-9, Opera 9.25-11.64, Safari 3.0.4-5.1.3, Node.js 0.4.8-0.6.18, Narwhal 0.3.2, RingoJS 0.8, and Rhino 1.7RC3.
+Lo-Dash has been tested in at least Chrome 5-19, Firefox 1.5-13, IE 6-9, Opera 9.25-12, Safari 3.0.4-5.1.3, Node.js 0.4.8-0.6.18, Narwhal 0.3.2, RingoJS 0.8, and Rhino 1.7RC3.
## Custom builds
@@ -150,21 +150,22 @@ git submodule update --init
## Closed Underscore.js issues
- * Allow iteration of objects with a `length` property [[#148](https://github.com/documentcloud/underscore/issues/148), [#154](https://github.com/documentcloud/underscore/issues/154), [#252](https://github.com/documentcloud/underscore/issues/252), [#448](https://github.com/documentcloud/underscore/issues/448), [test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L266-272)]
- * Ensure "Arrays" category methods allow falsey `array` arguments [[test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L714-748)]
- * Ensure array-like objects with invalid `length` properties are treated like regular objects [[test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L237-243), [test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L533-542), [test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L661-664)]
- * Ensure `_(...)` returns passed wrapper instances [[test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L106-109)]
- * Ensure `_.groupBy` adds values to own, not inherited, properties [[test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L317-324)]
- * Ensure `_.sortedIndex` supports arrays with high `length` values [[test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L586-595)]
- * Ensure `_.throttle` works when called in tight loops [[#502](https://github.com/documentcloud/underscore/issues/502), [test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L629-639)]
- * Fix Firefox, IE, Opera, and Safari object iteration bugs [[#376](https://github.com/documentcloud/underscore/issues/376), [test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L175-187), [test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L277-302), [test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L379-390), [test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L398-400), [test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L418-438), [test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L554-556)]
+ * Allow iteration of objects with a `length` property [[#148](https://github.com/documentcloud/underscore/issues/148), [#154](https://github.com/documentcloud/underscore/issues/154), [#252](https://github.com/documentcloud/underscore/issues/252), [#448](https://github.com/documentcloud/underscore/issues/448), [test](https://github.com/bestiejs/lodash/blob/1ba47a7c2a35552796f0c75dc2b46660e230f842/test/test.js#L271-276)]
+ * Ensure "Arrays" category methods allow falsey `array` arguments [[test](https://github.com/bestiejs/lodash/blob/1ba47a7c2a35552796f0c75dc2b46660e230f842/test/test.js#L758-790)]
+ * Ensure array-like objects with invalid `length` properties are treated like regular objects [[test](https://github.com/bestiejs/lodash/blob/1ba47a7c2a35552796f0c75dc2b46660e230f842/test/test.js#L242-248), [test](https://github.com/bestiejs/lodash/blob/1ba47a7c2a35552796f0c75dc2b46660e230f842/test/test.js#L560-569), [test](https://github.com/bestiejs/lodash/blob/1ba47a7c2a35552796f0c75dc2b46660e230f842/test/test.js#L705-708)]
+ * Ensure `_(…)` returns passed wrapper instances [[test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L106-109)]
+ * Ensure `_.escape` returns an empty string when passed `null` or `undefined` [[#407](https://github.com/documentcloud/underscore/issues/427), [test](https://github.com/bestiejs/lodash/blob/1ba47a7c2a35552796f0c75dc2b46660e230f842/test/test.js#L161-164)]
+ * Ensure `_.groupBy` adds values to own, not inherited, properties [[test](https://github.com/bestiejs/lodash/blob/1ba47a7c2a35552796f0c75dc2b46660e230f842/test/test.js#L322-329)]
+ * Ensure `_.sortedIndex` supports arrays with high `length` values [[test](https://github.com/bestiejs/lodash/blob/1ba47a7c2a35552796f0c75dc2b46660e230f842/test/test.js#L613-622)]
+ * Ensure `_.throttle` works when called in tight loops [[#502](https://github.com/documentcloud/underscore/issues/502), [test](https://github.com/bestiejs/lodash/blob/1ba47a7c2a35552796f0c75dc2b46660e230f842/test/test.js#L656-666)]
+ * Fix Firefox, IE, Opera, and Safari object iteration bugs [[#376](https://github.com/documentcloud/underscore/issues/376), [test](https://github.com/bestiejs/lodash/blob/1ba47a7c2a35552796f0c75dc2b46660e230f842/test/test.js#L180-192), [test](https://github.com/bestiejs/lodash/blob/1ba47a7c2a35552796f0c75dc2b46660e230f842/test/test.js#L282-307), [test](https://github.com/bestiejs/lodash/blob/1ba47a7c2a35552796f0c75dc2b46660e230f842/test/test.js#L395-406), [test](https://github.com/bestiejs/lodash/blob/1ba47a7c2a35552796f0c75dc2b46660e230f842/test/test.js#L414-416), [test](https://github.com/bestiejs/lodash/blob/1ba47a7c2a35552796f0c75dc2b46660e230f842/test/test.js#L434-454), [test](https://github.com/bestiejs/lodash/blob/1ba47a7c2a35552796f0c75dc2b46660e230f842/test/test.js#L581-583)]
* Handle arrays with `undefined` values correctly in IE < 9 [[#601](https://github.com/documentcloud/underscore/issues/601)]
- * Methods should work on pages with incorrectly shimmed native methods [[#7](https://github.com/documentcloud/underscore/issues/7), [test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L88-94)]
- * Register as AMD module, but still export to global [[#431](https://github.com/documentcloud/underscore/pull/431), [test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L72-86)]
- * `_.forEach` should be chainable [[#142](https://github.com/documentcloud/underscore/issues/142), [test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L232-235)]
- * `_isNaN(new Number(NaN))` should return `true` [[test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L408-410)]
- * `_.reduceRight` should pass correct callback arguments when iterating objects [[test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L521-531)]
- * `_.size` should return the `length` of string values [[test](https://github.com/bestiejs/lodash/blob/801e8a5b3a963157fceaad15075690f59c22de9c/test/test.js#L550-552)]
+ * Methods should work on pages with incorrectly shimmed native methods [[#7](https://github.com/documentcloud/underscore/issues/7), [test](https://github.com/bestiejs/lodash/blob/1ba47a7c2a35552796f0c75dc2b46660e230f842/test/test.js#L88-94)]
+ * Register as AMD module, but still export to global [[#431](https://github.com/documentcloud/underscore/pull/431), [test](https://github.com/bestiejs/lodash/blob/1ba47a7c2a35552796f0c75dc2b46660e230f842/test/test.js#L72-86)]
+ * `_.forEach` should be chainable [[#142](https://github.com/documentcloud/underscore/issues/142), [test](https://github.com/bestiejs/lodash/blob/1ba47a7c2a35552796f0c75dc2b46660e230f842/test/test.js#L237-240)]
+ * `_isNaN(new Number(NaN))` should return `true` [[test](https://github.com/bestiejs/lodash/blob/1ba47a7c2a35552796f0c75dc2b46660e230f842/test/test.js#L424-426)]
+ * `_.reduceRight` should pass correct callback arguments when iterating objects [[test](https://github.com/bestiejs/lodash/blob/1ba47a7c2a35552796f0c75dc2b46660e230f842/test/test.js#L548-558)]
+ * `_.size` should return the `length` of string values [[test](https://github.com/bestiejs/lodash/blob/1ba47a7c2a35552796f0c75dc2b46660e230f842/test/test.js#L577-579)]
## Optimized methods (50+)
@@ -220,70 +221,20 @@ git submodule update --init
* `_.without`
* `_.wrap`
* `_.zip`
- * plus all `_(...)` method wrappers
-
-## Changelog
-
-### v0.3.1
-
- * Added `backbone` build option
- * Ensured "Arrays" category methods allow falsey `array` arguments
- * Removed `_.isArguments` fallback from the `mobile` build
- * Simplified `_.pluck`, `_.values` and `_(...)` method wrappers
-
-### v0.3.0
-
- * Added `category` build option
- * Added `fromIndex` argument to `_.indexOf` and `_.lastIndexOf`
- * Added `//@ sourceURL` support to `_.template`
- * Added `thisArg` argument to `_.sortedIndex` and `_.uniq`
- * Added `_.forIn` and `_.forOwn` methods
- * Ensured array-like objects with invalid `length` properties are treated like regular objects
- * Ensured `_.sortedIndex` supports arrays with high `length` values
- * Fixed `prototype` property iteration bug in `_.keys` for Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1
- * Optimized `_.times` and `this` bindings in iterator methods
-
-### v0.2.2
-
- * Added `mobile` build option
- * Ensured `_.find` returns `undefined` for unmatched values
- * Ensured `_.templateSettings.variable` is compatible with Underscore.js
- * Optimized `_.escape`
- * Reduced dependencies in `_.find`
-
-### v0.2.1
-
- * Adjusted the Lo-Dash export order for r.js
- * Ensured `_.groupBy` values are added to own, not inherited, properties
- * Made `_.bind` follow ES5 spec to support a popular Backbone.js pattern
- * Removed the alias `intersect`
- * Simplified `_.bind`, `_.flatten`, `_.groupBy`, `_.max`, and `_.min`
-
-### v0.2.0
-
- * Added custom build options
- * Added default `_.templateSettings.variable` value
- * Added *"lazy bind"* support to `_.bind`
- * Added native method overwrite detection to avoid bad native shims
- * Added support for more AMD build optimizers and aliasing as the *"underscore"* module
- * Added `thisArg` argument to `_.groupBy`
- * Added whitespace to compiled strings
- * Added `_.partial` method
- * Commented the `iterationFactory` options object
- * Ensured `_(...)` returns passed wrapper instances
- * Ensured `_.max` and `_.min` support extremely large arrays
- * Ensured `_.throttle` works in tight loops
- * Fixed IE < 9 `[DontEnum]` bug and Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1’s `prototype` property iteration bug
- * Inlined `_.isFunction` calls.
- * Made `_.debounce`’ed functions match `_.throttle`’ed functions’ return value behavior
- * Made `_.escape` no longer translate the *">"* character
- * Fixed `clearTimeout` typo
- * Simplified all methods in the *"Arrays"* category
- * Optimized `_.debounce`, `_.escape`, `_.flatten`, `_.forEach`, `_.groupBy`, `_.intersection`, `_.invoke`, `_.isObject`, `_.max`, `_.min`, `_.pick`, `_.shuffle`, `_.sortedIndex`, `_.template`, `_.throttle`, `_.union`, `_.uniq`
-
-### v0.1.0
-
- * Initial release
+ * plus all `_(…)` method wrappers
+
+## Release Notes
+
+### v0.3.2
+
+ * Deprecated `_(…).chain`, `_.isFinite`, `_.isNaN`, `_.isNull`, `_.isUndefined`, `_.result`, and `_.size`
+ * Ensured `_.escape` returns an empty string when passed `null` or `undefined`
+ * Ensured `sourceURL` support doesn't cause errors in Adobe's JS engine.
+ * Fixed regression in generating custom builds
+ * Moved `_.invoke` and `_.pluck` back to the *"Collections"* category
+ * Moved `_.tap` to the *"Chaining"* category
+
+The full changelog is available [here](https://github.com/bestiejs/lodash/wiki/Changelog).
## BestieJS
diff --git a/build.js b/build.js
index d5f279e62c..52cf7facbd 100755
--- a/build.js
+++ b/build.js
@@ -106,25 +106,24 @@
'clone': ['extend', 'isArray'],
'compact': [],
'compose': [],
- 'contains': ['createIterator'],
- 'createIterator': [],
+ 'contains': [],
'debounce': [],
- 'defaults': ['createIterator'],
+ 'defaults': [],
'defer': [],
'delay': [],
'difference': ['indexOf'],
'escape': [],
- 'every': ['createIterator', 'identity'],
- 'extend': ['createIterator'],
- 'filter': ['createIterator', 'identity'],
- 'find': ['createIterator'],
+ 'every': ['identity'],
+ 'extend': [],
+ 'filter': ['identity'],
+ 'find': [],
'first': [],
'flatten': ['isArray'],
- 'forEach': ['createIterator'],
- 'forIn': ['createIterator'],
- 'forOwn': ['createIterator'],
- 'functions': ['createIterator'],
- 'groupBy': ['createIterator'],
+ 'forEach': [],
+ 'forIn': [],
+ 'forOwn': [],
+ 'functions': [],
+ 'groupBy': [],
'has': [],
'identity': [],
'indexOf': ['sortedIndex'],
@@ -136,7 +135,7 @@
'isBoolean': [],
'isDate': [],
'isElement': [],
- 'isEmpty': ['createIterator'],
+ 'isEmpty': [],
'isEqual': [],
'isFinite': [],
'isFunction': [],
@@ -147,10 +146,10 @@
'isRegExp': [],
'isString': [],
'isUndefined': [],
- 'keys': ['createIterator'],
+ 'keys': [],
'last': [],
'lastIndexOf': [],
- 'map': ['createIterator', 'identity'],
+ 'map': ['identity'],
'max': [],
'memoize': [],
'min': [],
@@ -161,16 +160,16 @@
'pick': [],
'pluck': [],
'range': [],
- 'reduce': ['createIterator'],
+ 'reduce': [],
'reduceRight': ['keys'],
- 'reject': ['createIterator', 'identity'],
+ 'reject': ['identity'],
'rest': [],
'result': [],
'shuffle': [],
'size': ['keys'],
- 'some': ['createIterator', 'identity'],
+ 'some': ['identity'],
'sortBy': [],
- 'sortedIndex': ['identity'],
+ 'sortedIndex': ['bind'],
'tap': [],
'template': ['escape'],
'throttle': [],
@@ -179,7 +178,7 @@
'union': ['indexOf'],
'uniq': ['identity', 'indexOf'],
'uniqueId': [],
- 'values': ['createIterator'],
+ 'values': [],
'without': ['indexOf'],
'wrap': [],
'zip': ['max', 'pluck']
@@ -217,9 +216,6 @@
/** Flag used to specify a mobile build */
var isMobile = process.argv.indexOf('mobile') > -1;
- /** Flag used to specify a custom build */
- var isCustom = filterType || isBackbone || isMobile;
-
/*--------------------------------------------------------------------------*/
/**
@@ -587,10 +583,10 @@
source = removeVar(source, 'iteratorTemplate');
// remove JScript [[DontEnum]] fix from `isEqual`
- source = source.replace(/(?:\s*\/\/.*\n)*( +)if *\(result *&& *hasDontEnumBug[\s\S]+?\n\1}\n/, '\n');
+ source = source.replace(/(?:\s*\/\/.*\n)*( +)if *\(result *&& *hasDontEnumBug[\s\S]+?\n\1}/, '');
// remove IE `shift` and `splice` fix
- source = source.replace(/(?:\s*\/\/.*\n)*( +)if *\(value.length *=== *0[\s\S]+?\n\1}\n/, '\n');
+ source = source.replace(/(?:\s*\/\/.*\n)*( +)if *\(value.length *=== *0[\s\S]+?\n\1}/, '');
}
else {
// inline `iteratorTemplate` template
@@ -618,7 +614,7 @@
source = source.replace(/(?:(?:\s*\/\/.*)*\s*lodash\._[^=]+=.+\n)+/g, '\n');
// begin the minification process
- if (isCustom) {
+ if (filterType || isBackbone || isMobile) {
fs.writeFileSync(path.join(__dirname, 'lodash.custom.js'), source);
minify(source, 'lodash.custom.min', function(result) {
fs.writeFileSync(path.join(__dirname, 'lodash.custom.min.js'), result);
diff --git a/build/pre-compile.js b/build/pre-compile.js
index 17bc43bced..7f0a305020 100644
--- a/build/pre-compile.js
+++ b/build/pre-compile.js
@@ -8,6 +8,7 @@
/** Used to minify variables embedded in compiled strings */
var compiledVars = [
'accumulator',
+ 'args',
'arrayClass',
'callback',
'className',
@@ -18,14 +19,17 @@
'hasOwnProperty',
'identity',
'index',
+ 'isFunc',
'iteratorBind',
'length',
+ 'methodName',
+ 'noaccum',
'object',
'objectTypes',
- 'noaccum',
'property',
'result',
'skipProto',
+ 'slice',
'source',
'sourceIndex',
'stringClass',
@@ -202,8 +206,8 @@
// http://code.google.com/closure/compiler/docs/api-tutorial3.html#export
source = source.replace(RegExp('\\.(' + propWhitelist.join('|') + ')\\b', 'g'), "['$1']");
- // remove brackets from `_.escape(__t)` in `tokenizeEscape`
- source = source.replace("_['escape'](__t)", '_.escape(__t)');
+ // remove brackets from `_.escape()` in `tokenizeEscape`
+ source = source.replace("_['escape'](\"", '_.escape("');
// remove whitespace from string literals
source = source.replace(/'(?:(?=(\\?))\1.)*?'/g, function(string) {
@@ -216,8 +220,11 @@
// remove newline from double-quoted string in `_.template`
source = source.replace('"\';\\n"', '"\';"');
- // remove debug sourceURL in `_.template`
- source = source.replace(/\+(?:\s*\/\/.*)*\s*'\/\/@ sourceURL=[^;]+/, '');
+ // remove `useSourceURL` variable
+ source = source.replace(/(?:\n +\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/)?\n *try *\{(?:\s*\/\/.*\n)* *var useSourceURL[\s\S]+?catch[^}]+}\n/, '');
+
+ // remove debug sourceURL use in `_.template`
+ source = source.replace(/(?:\s*\/\/.*\n)* *if *\(useSourceURL[^}]+}/, '');
// minify `_.sortBy` internal properties
(function() {
diff --git a/doc/README.md b/doc/README.md
index c5c4480894..ceab12c141 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -1,4 +1,4 @@
-# Lo-Dash v0.3.1
+# Lo-Dash v0.3.2
@@ -38,7 +38,7 @@
* [`_.indexOf`](#_indexofarray-value--fromindex0)
* [`_.initial`](#_initialarray--n-guard)
* [`_.intersection`](#_intersectionarray1-array2-)
-* [`_.invoke`](#_invokearray-methodname--arg1-arg2-)
+* [`_.invoke`](#_invokecollection-methodname--arg1-arg2-)
* [`_.isArguments`](#_isargumentsvalue)
* [`_.isArray`](#_isarrayvalue)
* [`_.isBoolean`](#_isbooleanvalue)
@@ -67,7 +67,7 @@
* [`_.once`](#_oncefunc)
* [`_.partial`](#_partialfunc--arg1-arg2-)
* [`_.pick`](#_pickobject--prop1-prop2-)
-* [`_.pluck`](#_pluckarray-property)
+* [`_.pluck`](#_pluckcollection-property)
* [`_.range`](#_rangestart0-end--step1)
* [`_.reduce`](#_reducecollection-callback--accumulator-thisarg)
* [`_.reduceRight`](#_reducerightcollection-callback--accumulator-thisarg)
@@ -129,7 +129,7 @@
### `_(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L134 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L140 "View in source") [Ⓣ][1]
The `lodash` function.
@@ -147,7 +147,7 @@ The `lodash` function.
### `_.VERSION`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L3344 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L3366 "View in source") [Ⓣ][1]
*(String)*: The semantic version number.
@@ -159,7 +159,7 @@ The `lodash` function.
### `_.after(n, func)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1795 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1797 "View in source") [Ⓣ][1]
Creates a new function that is restricted to executing only after it is called `n` times.
@@ -187,7 +187,7 @@ _.forEach(notes, function(note) {
### `_.bind(func [, thisArg, arg1, arg2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1849 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1851 "View in source") [Ⓣ][1]
Creates a new function that, when called, invokes `func` with the `this` binding of `thisArg` and prepends any additional `bind` arguments to those passed to the bound function. Lazy defined methods may be bound by passing the object they are bound to as `func` and the method name as `thisArg`.
@@ -238,7 +238,7 @@ func();
### `_.bindAll(object [, methodName1, methodName2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1920 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1922 "View in source") [Ⓣ][1]
Binds methods on `object` to `object`, overwriting the existing method. If no method names are provided, all the function properties of `object` will be bound.
@@ -270,15 +270,15 @@ jQuery('#lodash_button').on('click', buttonView.onClick);
### `_.chain(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L3296 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L3291 "View in source") [Ⓣ][1]
-Wraps the value in a `lodash` chainable object.
+Wraps the value in a `lodash` wrapper object.
#### Arguments
1. `value` *(Mixed)*: The value to wrap.
#### Returns
-*(Object)*: Returns the `lodash` chainable object.
+*(Object)*: Returns the wrapper object.
#### Example
~~~ js
@@ -304,7 +304,7 @@ var youngest = _.chain(stooges)
### `_.clone(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2246 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2248 "View in source") [Ⓣ][1]
Create a shallow clone of the `value`. Any nested objects or arrays will be assigned by reference and not cloned.
@@ -328,7 +328,7 @@ _.clone({ 'name': 'moe' });
### `_.compact(array)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L892 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L963 "View in source") [Ⓣ][1]
Produces a new array with all falsey values of `array` removed. The values `false`, `null`, `0`, `""`, `undefined` and `NaN` are all falsey.
@@ -352,7 +352,7 @@ _.compact([0, 1, false, 2, '', 3]);
### `_.compose([func1, func2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1952 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1954 "View in source") [Ⓣ][1]
Creates a new function that is the composition of the passed functions, where each function consumes the return value of the function that follows. In math terms, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`.
@@ -379,7 +379,7 @@ welcome('moe');
### `_.contains(collection, target)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L578 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L598 "View in source") [Ⓣ][1]
Checks if a given `target` value is present in a `collection` using strict equality for comparisons, i.e. `===`.
@@ -404,7 +404,7 @@ _.contains([1, 2, 3], 3);
### `_.debounce(func, wait, immediate)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1985 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1987 "View in source") [Ⓣ][1]
Creates a new function that will delay the execution of `func` until after `wait` milliseconds have elapsed since the last time it was invoked. Pass `true` for `immediate` to cause debounce to invoke `func` on the leading, instead of the trailing, edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call.
@@ -430,9 +430,9 @@ jQuery(window).on('resize', lazyLayout);
### `_.defaults(object [, defaults1, defaults2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2269 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2271 "View in source") [Ⓣ][1]
-Assigns missing properties in `object` with default values from the defaults objects. As soon as a property is set, additional defaults of the same property will be ignored.
+Assigns missing properties on `object` with default values from the defaults objects. Once a property is set, additional defaults of the same property will be ignored.
#### Arguments
1. `object` *(Object)*: The object to populate.
@@ -456,7 +456,7 @@ _.defaults(iceCream, { 'flavor': 'vanilla', 'sprinkles': 'rainbow' });
### `_.defer(func [, arg1, arg2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2050 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2052 "View in source") [Ⓣ][1]
Defers executing the `func` function until the current call stack has cleared. Additional arguments are passed to `func` when it is invoked.
@@ -481,7 +481,7 @@ _.defer(function() { alert('deferred'); });
### `_.delay(func, wait [, arg1, arg2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2030 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2032 "View in source") [Ⓣ][1]
Executes the `func` function after `wait` milliseconds. Additional arguments are passed to `func` when it is invoked.
@@ -508,7 +508,7 @@ _.delay(log, 1000, 'logged later');
### `_.difference(array [, array1, array2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L924 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L995 "View in source") [Ⓣ][1]
Produces a new array of `array` values not present in the other arrays using strict equality for comparisons, i.e. `===`.
@@ -533,7 +533,7 @@ _.difference([1, 2, 3, 4, 5], [5, 2, 10]);
### `_.escape(string)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2987 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2976 "View in source") [Ⓣ][1]
Escapes a string for inclusion in HTML, replacing `&`, `<`, `"`, and `'` characters.
@@ -557,7 +557,7 @@ _.escape('Curly, Larry & Moe');
### `_.every(collection [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L603 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L623 "View in source") [Ⓣ][1]
Checks if the `callback` returns a truthy value for **all** elements of a `collection`. The `callback` is bound to `thisArg` and invoked with `3` arguments; for arrays they are *(value, index, array)* and for objects they are *(value, key, object)*.
@@ -583,7 +583,7 @@ _.every([true, 1, null, 'yes'], Boolean);
### `_.extend(object [, source1, source2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2288 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2290 "View in source") [Ⓣ][1]
Copies enumerable properties from the source objects to the `destination` object. Subsequent sources will overwrite propery assignments of previous sources.
@@ -608,7 +608,7 @@ _.extend({ 'name': 'moe' }, { 'age': 40 });
### `_.filter(collection [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L624 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L644 "View in source") [Ⓣ][1]
Examines each value in a `collection`, returning an array of all values the `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with `3` arguments; for arrays they are *(value, index, array)* and for objects they are *(value, key, object)*.
@@ -634,7 +634,7 @@ var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; })
### `_.find(collection, callback [, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L646 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L666 "View in source") [Ⓣ][1]
Examines each value in a `collection`, returning the first one the `callback` returns truthy for. The function returns as soon as it finds an acceptable value, and does not iterate over the entire `collection`. The `callback` is bound to `thisArg` and invoked with `3` arguments; for arrays they are *(value, index, array)* and for objects they are *(value, key, object)*.
@@ -660,7 +660,7 @@ var even = _.find([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; });
### `_.first(array [, n, guard])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L960 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1031 "View in source") [Ⓣ][1]
Gets the first value of the `array`. Pass `n` to return the first `n` values of the `array`.
@@ -686,7 +686,7 @@ _.first([5, 4, 3, 2, 1]);
### `_.flatten(array, shallow)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L984 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1055 "View in source") [Ⓣ][1]
Flattens a nested array *(the nesting can be to any depth)*. If `shallow` is truthy, `array` will only be flattened a single level.
@@ -714,7 +714,7 @@ _.flatten([1, [2], [3, [[4]]]], true);
### `_.forEach(collection, callback [, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L673 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L693 "View in source") [Ⓣ][1]
Iterates over a `collection`, executing the `callback` for each value in the `collection`. The `callback` is bound to `thisArg` and invoked with `3` arguments; for arrays they are *(value, index, array)* and for objects they are *(value, key, object)*.
@@ -743,7 +743,7 @@ _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, alert);
### `_.forIn(object, callback [, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2317 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2319 "View in source") [Ⓣ][1]
Iterates over `object`'s own and inherited enumerable properties, executing the `callback` for each property. The `callback` is bound to `thisArg` and invoked with `3` arguments; *(value, key, object)*.
@@ -779,7 +779,7 @@ _.forIn(new Dog('Dagny'), function(value, key) {
### `_.forOwn(object, callback [, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2340 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2342 "View in source") [Ⓣ][1]
Iterates over `object`'s own enumerable properties, executing the `callback` for each property. The `callback` is bound to `thisArg` and invoked with `3` arguments; *(value, key, object)*.
@@ -807,7 +807,7 @@ _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
### `_.functions(object)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2357 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2359 "View in source") [Ⓣ][1]
Produces a sorted array of the enumerable properties, own and inherited, of `object` that have function values.
@@ -831,7 +831,7 @@ _.functions(_);
### `_.groupBy(array, callback [, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1029 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1100 "View in source") [Ⓣ][1]
Splits `array` into sets, grouped by the result of running each value through `callback`. The `callback` is bound to `thisArg` and invoked with `3` arguments; *(value, index, array)*. The `callback` argument may also be the name of a property to group by.
@@ -863,7 +863,7 @@ _.groupBy(['one', 'two', 'three'], 'length');
### `_.has(object, property)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2380 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2382 "View in source") [Ⓣ][1]
Checks if the specified object `property` exists and is a direct property, instead of an inherited property.
@@ -888,7 +888,7 @@ _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b');
### `_.identity(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L3006 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2995 "View in source") [Ⓣ][1]
This function returns the first argument passed to it. Note: It is used throughout Lo-Dash as a default callback.
@@ -913,7 +913,7 @@ moe === _.identity(moe);
### `_.indexOf(array, value [, fromIndex=0])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1075 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1146 "View in source") [Ⓣ][1]
Gets the index at which the first occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `isSorted` will run a faster binary search.
@@ -945,7 +945,7 @@ _.indexOf([1, 1, 2, 2, 3, 3], 2, true);
### `_.initial(array [, n, guard])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1115 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1186 "View in source") [Ⓣ][1]
Gets all but the last value of `array`. Pass `n` to exclude the last `n` values from the result.
@@ -971,7 +971,7 @@ _.initial([3, 2, 1]);
### `_.intersection([array1, array2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1136 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1207 "View in source") [Ⓣ][1]
Computes the intersection of all the passed-in arrays.
@@ -994,13 +994,13 @@ _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
-### `_.invoke(array, methodName [, arg1, arg2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1178 "View in source") [Ⓣ][1]
+### `_.invoke(collection, methodName [, arg1, arg2, ...])`
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L717 "View in source") [Ⓣ][1]
-Invokes the method named by `methodName` on each element of `array`. Additional arguments will be passed to each invoked method. If `methodName` is a function it will be invoked for, and `this` bound to, each element of `array`.
+Invokes the method named by `methodName` on each element in the `collection`. Additional arguments will be passed to each invoked method. If `methodName` is a function it will be invoked for, and `this` bound to, each element in the `collection`.
#### Arguments
-1. `array` *(Array)*: The array to iterate over.
+1. `collection` *(Array|Object)*: The collection to iterate over.
2. `methodName` *(Function|String)*: The name of the method to invoke or the function invoked per iteration.
3. `[arg1, arg2, ...]` *(Mixed)*: Arguments to invoke the method with.
@@ -1024,9 +1024,9 @@ _.invoke([123, 456], String.prototype.split, '');
### `_.isArguments(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2400 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2402 "View in source") [Ⓣ][1]
-Checks if a `value` is an `arguments` object.
+Checks if `value` is an `arguments` object.
#### Arguments
1. `value` *(Mixed)*: The value to check.
@@ -1051,9 +1051,9 @@ _.isArguments([1, 2, 3]);
### `_.isArray(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2426 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2428 "View in source") [Ⓣ][1]
-Checks if a `value` is an array.
+Checks if `value` is an array.
#### Arguments
1. `value` *(Mixed)*: The value to check.
@@ -1078,9 +1078,9 @@ _.isArray([1, 2, 3]);
### `_.isBoolean(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2443 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2445 "View in source") [Ⓣ][1]
-Checks if a `value` is a boolean *(`true` or `false`)* value.
+Checks if `value` is a boolean *(`true` or `false`)* value.
#### Arguments
1. `value` *(Mixed)*: The value to check.
@@ -1102,9 +1102,9 @@ _.isBoolean(null);
### `_.isDate(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2460 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2462 "View in source") [Ⓣ][1]
-Checks if a `value` is a date.
+Checks if `value` is a date.
#### Arguments
1. `value` *(Mixed)*: The value to check.
@@ -1126,9 +1126,9 @@ _.isDate(new Date);
### `_.isElement(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2477 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2479 "View in source") [Ⓣ][1]
-Checks if a `value` is a DOM element.
+Checks if `value` is a DOM element.
#### Arguments
1. `value` *(Mixed)*: The value to check.
@@ -1150,9 +1150,9 @@ _.isElement(document.body);
### `_.isEmpty(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2498 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2500 "View in source") [Ⓣ][1]
-Checks if a `value` is empty. Arrays or strings with a length of `0` and objects with no own enumerable properties are considered "empty".
+Checks if `value` is empty. Arrays or strings with a length of `0` and objects with no own enumerable properties are considered "empty".
#### Arguments
1. `value` *(Array|Object|String)*: The value to inspect.
@@ -1177,7 +1177,7 @@ _.isEmpty({});
### `_.isEqual(a, b [, stack])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2532 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2534 "View in source") [Ⓣ][1]
Performs a deep comparison between two values to determine if they are equivalent to each other.
@@ -1209,9 +1209,9 @@ _.isEqual(moe, clone);
### `_.isFinite(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2684 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2695 "View in source") [Ⓣ][1]
-Checks if a `value` is a finite number.
+Checks if `value` is a finite number. Note: This is not the same as native `isFinite`, which will return true for booleans and other values. See http://es5.github.com/#x15.1.2.5.
#### Arguments
1. `value` *(Mixed)*: The value to check.
@@ -1239,9 +1239,9 @@ _.isFinite(Infinity);
### `_.isFunction(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2701 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2712 "View in source") [Ⓣ][1]
-Checks if a `value` is a function.
+Checks if `value` is a function.
#### Arguments
1. `value` *(Mixed)*: The value to check.
@@ -1263,9 +1263,9 @@ _.isFunction(''.concat);
### `_.isNaN(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2752 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2764 "View in source") [Ⓣ][1]
-Checks if a `value` is `NaN`. Note: This is not the same as native `isNaN`, which will return true for `undefined` and other values. See http://es5.github.com/#x15.1.2.4.
+Checks if `value` is `NaN`. Note: This is not the same as native `isNaN`, which will return true for `undefined` and other values. See http://es5.github.com/#x15.1.2.4.
#### Arguments
1. `value` *(Mixed)*: The value to check.
@@ -1296,9 +1296,9 @@ _.isNaN(undefined);
### `_.isNull(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2774 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2787 "View in source") [Ⓣ][1]
-Checks if a `value` is `null`.
+Checks if `value` is `null`.
#### Arguments
1. `value` *(Mixed)*: The value to check.
@@ -1323,9 +1323,9 @@ _.isNull(undefined);
### `_.isNumber(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2791 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2804 "View in source") [Ⓣ][1]
-Checks if a `value` is a number.
+Checks if `value` is a number.
#### Arguments
1. `value` *(Mixed)*: The value to check.
@@ -1347,9 +1347,9 @@ _.isNumber(8.4 * 5;
### `_.isObject(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2722 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2733 "View in source") [Ⓣ][1]
-Checks if a `value` is the language type of Object. *(e.g. arrays, functions, objects, regexps, `new Number(0)*`, and `new String('')`)
+Checks if `value` is the language type of Object. *(e.g. arrays, functions, objects, regexps, `new Number(0)*`, and `new String('')`)
#### Arguments
1. `value` *(Mixed)*: The value to check.
@@ -1374,9 +1374,9 @@ _.isObject(1);
### `_.isRegExp(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2808 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2821 "View in source") [Ⓣ][1]
-Checks if a `value` is a regular expression.
+Checks if `value` is a regular expression.
#### Arguments
1. `value` *(Mixed)*: The value to check.
@@ -1398,9 +1398,9 @@ _.isRegExp(/moe/);
### `_.isString(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2825 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2838 "View in source") [Ⓣ][1]
-Checks if a `value` is a string.
+Checks if `value` is a string.
#### Arguments
1. `value` *(Mixed)*: The value to check.
@@ -1422,9 +1422,9 @@ _.isString('moe');
### `_.isUndefined(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2842 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2856 "View in source") [Ⓣ][1]
-Checks if a `value` is `undefined`.
+Checks if `value` is `undefined`.
#### Arguments
1. `value` *(Mixed)*: The value to check.
@@ -1446,7 +1446,7 @@ _.isUndefined(void 0);
### `_.keys(object)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2859 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2873 "View in source") [Ⓣ][1]
Produces an array of object`'s own enumerable property names.
@@ -1470,7 +1470,7 @@ _.keys({ 'one': 1, 'two': 2, 'three': 3 });
### `_.last(array [, n, guard])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1212 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1245 "View in source") [Ⓣ][1]
Gets the last value of the `array`. Pass `n` to return the lasy `n` values of the `array`.
@@ -1496,7 +1496,7 @@ _.last([3, 2, 1]);
### `_.lastIndexOf(array, value [, fromIndex=array.length-1])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1238 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1271 "View in source") [Ⓣ][1]
Gets the index at which the last occurrence of `value` is found using strict equality for comparisons, i.e. `===`.
@@ -1525,9 +1525,9 @@ _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3);
### `_.map(collection [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L697 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L750 "View in source") [Ⓣ][1]
-Produces a new array of values by mapping each value in the `collection` through a transformation `callback`. The `callback` is bound to `thisArg` and invoked with `3` arguments; for arrays they are *(value, index, array)* and for objects they are *(value, key, object)*.
+Produces a new array of values by mapping each element in the `collection` through a transformation `callback`. The `callback` is bound to `thisArg` and invoked with `3` arguments; for arrays they are *(value, index, array)* and for objects they are *(value, key, object)*.
#### Arguments
1. `collection` *(Array|Object)*: The collection to iterate over.
@@ -1554,7 +1554,7 @@ _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; });
### `_.max(array [, callback, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1278 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1311 "View in source") [Ⓣ][1]
Retrieves the maximum value of an `array`. If `callback` is passed, it will be executed for each value in the `array` to generate the criterion by which the value is ranked. The `callback` is bound to `thisArg` and invoked with `3` arguments; *(value, index, array)*.
@@ -1586,7 +1586,7 @@ _.max(stooges, function(stooge) { return stooge.age; });
### `_.memoize(func [, resolver])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2073 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2075 "View in source") [Ⓣ][1]
Creates a new function that memoizes the result of `func`. If `resolver` is passed, it will be used to determine the cache key for storing the result based on the arguments passed to the memoized function. By default, the first argument passed to the memoized function is used as the cache key.
@@ -1612,7 +1612,7 @@ var fibonacci = _.memoize(function(n) {
### `_.min(array [, callback, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1328 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1361 "View in source") [Ⓣ][1]
Retrieves the minimum value of an `array`. If `callback` is passed, it will be executed for each value in the `array` to generate the criterion by which the value is ranked. The `callback` is bound to `thisArg` and invoked with `3` arguments; *(value, index, array)*.
@@ -1638,7 +1638,7 @@ _.min([10, 5, 100, 2, 1000]);
### `_.mixin(object)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L3032 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L3021 "View in source") [Ⓣ][1]
Adds functions properties of `object` to the `lodash` function and chainable wrapper.
@@ -1668,7 +1668,7 @@ _('larry').capitalize();
### `_.noConflict()`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L3063 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L3052 "View in source") [Ⓣ][1]
Reverts the '_' variable to its previous value and returns a reference to the `lodash` function.
@@ -1688,7 +1688,7 @@ var lodash = _.noConflict();
### `_.once(func)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2099 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2101 "View in source") [Ⓣ][1]
Creates a new function that is restricted to one execution. Repeat calls to the function will return the value of the first call.
@@ -1714,7 +1714,7 @@ initialize();
### `_.partial(func [, arg1, arg2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2132 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2134 "View in source") [Ⓣ][1]
Creates a new function that, when called, invokes `func` with any additional `partial` arguments prepended to those passed to the partially applied function. This method is similar `bind`, except it does **not** alter the `this` binding.
@@ -1741,7 +1741,7 @@ hi('moe');
### `_.pick(object [, prop1, prop2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2881 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2895 "View in source") [Ⓣ][1]
Creates an object composed of the specified properties. Property names may be specified as individual arguments or as arrays of property names.
@@ -1765,13 +1765,13 @@ _.pick({ 'name': 'moe', 'age': 40, 'userid': 'moe1' }, 'name', 'age');
-### `_.pluck(array, property)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1380 "View in source") [Ⓣ][1]
+### `_.pluck(collection, property)`
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L773 "View in source") [Ⓣ][1]
-Retrieves the value of a specified property from all elements in `array`.
+Retrieves the value of a specified property from all elements in the `collection`.
#### Arguments
-1. `array` *(Array)*: The array to iterate over.
+1. `collection` *(Array|Object)*: The collection to iterate over.
2. `property` *(String)*: The property to pluck.
#### Returns
@@ -1797,7 +1797,7 @@ _.pluck(stooges, 'name');
### `_.range([start=0], end [, step=1])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1423 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1422 "View in source") [Ⓣ][1]
Creates an array of numbers *(positive and/or negative)* progressing from `start` up to but not including `stop`. This method is a port of Python's `range()` function. See http://docs.python.org/library/functions.html#range.
@@ -1835,7 +1835,7 @@ _.range(0);
### `_.reduce(collection, callback [, accumulator, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L731 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L802 "View in source") [Ⓣ][1]
Boils down a `collection` to a single value. The initial state of the reduction is `accumulator` and each successive step of it should be returned by the `callback`. The `callback` is bound to `thisArg` and invoked with `4` arguments; for arrays they are *(accumulator, value, index, array)* and for objects they are *(accumulator, value, key, object)*.
@@ -1862,7 +1862,7 @@ var sum = _.reduce([1, 2, 3], function(memo, num) { return memo + num; });
### `_.reduceRight(collection, callback [, accumulator, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L768 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L839 "View in source") [Ⓣ][1]
The right-associative version of `_.reduce`.
@@ -1890,7 +1890,7 @@ var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []);
### `_.reject(collection [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L819 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L890 "View in source") [Ⓣ][1]
The opposite of `_.filter`, this method returns the values of a `collection` that `callback` does **not** return truthy for.
@@ -1916,7 +1916,7 @@ var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; });
### `_.rest(array [, n, guard])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1459 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1458 "View in source") [Ⓣ][1]
The opposite of `_.initial`, this method gets all but the first value of `array`. Pass `n` to exclude the first `n` values from the result.
@@ -1942,9 +1942,9 @@ _.rest([3, 2, 1]);
### `_.result(object, property)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L3093 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L3084 "View in source") [Ⓣ][1]
-Resolves the value of `property` on `object`. If `property` is a function it will be invoked and its result returned, else the property value is returned.
+Resolves the value of `property` on `object`. If `property` is a function it will be invoked and its result returned, else the property value is returned. If `object` is falsey, then `null` is returned.
#### Arguments
1. `object` *(Object)*: The object to inspect.
@@ -1977,7 +1977,7 @@ _.result(object, 'stuff');
### `_.shuffle(array)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1480 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1479 "View in source") [Ⓣ][1]
Produces a new array of shuffled `array` values, using a version of the Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle.
@@ -2001,7 +2001,7 @@ _.shuffle([1, 2, 3, 4, 5, 6]);
### `_.size(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2919 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2934 "View in source") [Ⓣ][1]
Gets the size of `value` by returning `value.length` if `value` is a string or array, or the number of own enumerable properties if `value` is an object.
@@ -2031,7 +2031,7 @@ _.size('curly');
### `_.some(collection [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L843 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L914 "View in source") [Ⓣ][1]
Checks if the `callback` returns a truthy value for **any** element of a `collection`. The function returns as soon as it finds passing value, and does not iterate over the entire `collection`. The `callback` is bound to `thisArg` and invoked with `3` arguments; for arrays they are *(value, index, array)* and for objects they are *(value, key, object)*.
@@ -2057,7 +2057,7 @@ _.some([null, 0, 'yes', false]);
### `_.sortBy(array, callback [, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1522 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1521 "View in source") [Ⓣ][1]
Produces a new sorted array, ranked in ascending order by the results of running each element of `array` through `callback`. The `callback` is bound to `thisArg` and invoked with `3` arguments; *(value, index, array)*. The `callback` argument may also be the name of a property to sort by *(e.g. 'length')*.
@@ -2089,7 +2089,7 @@ _.sortBy(['larry', 'brendan', 'moe'], 'length');
### `_.sortedIndex(array, value [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1596 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1595 "View in source") [Ⓣ][1]
Uses a binary search to determine the smallest index at which the `value` should be inserted into `array` in order to maintain the sort order of the sorted `array`. If `callback` is passed, it will be executed for `value` and each element in `array` to compute their sort ranking. The `callback` is bound to `thisArg` and invoked with `1` argument; *(value)*.
@@ -2130,9 +2130,9 @@ _.sortedIndex(['twenty', 'thirty', 'fourty'], 'thirty-five', function(word) {
### `_.tap(value, interceptor)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2947 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L3318 "View in source") [Ⓣ][1]
-Invokes `interceptor` with the `value` as the first argument, and then returns `value`. The primary purpose of this method is to "tap into" a method chain, in order to performoperations on intermediate results within the chain.
+Invokes `interceptor` with the `value` as the first argument, and then returns `value`. The purpose of this method is to "tap into" a method chain, in order to perform operations on intermediate results within the chain.
#### Arguments
1. `value` *(Mixed)*: The value to pass to `callback`.
@@ -2160,7 +2160,7 @@ _.chain([1,2,3,200])
### `_.template(text, data, options)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L3152 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L3145 "View in source") [Ⓣ][1]
A micro-templating method, similar to John Resig's implementation. Lo-Dash templating handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code.
@@ -2219,9 +2219,9 @@ _.template('<%= data.hasWith %>', { 'hasWith': 'no' }, { 'variable': 'data' });
### `_.throttle(func, wait)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2168 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2170 "View in source") [Ⓣ][1]
-Creates a new function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. If the throttled function is invoked more than once, `func` will also be called on the trailing edge of the `wait` timeout. Subsequent calls to the throttled function will return the result of the last `func` call.
+Creates a new function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. If the throttled function is invoked more than once during the `wait` timeout, `func` will also be called on the trailing edge of the timeout. Subsequent calls to the throttled function will return the result of the last `func` call.
#### Arguments
1. `func` *(Function)*: The function to throttle.
@@ -2244,7 +2244,7 @@ jQuery(window).on('scroll', throttled);
### `_.times(n, callback [, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L3239 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L3234 "View in source") [Ⓣ][1]
Executes the `callback` function `n` times. The `callback` is bound to `thisArg` and invoked with `1` argument; *(index)*.
@@ -2270,7 +2270,7 @@ _.times(3, function() { this.grantWish(); }, genie);
### `_.toArray(collection)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L862 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L933 "View in source") [Ⓣ][1]
Converts the `collection`, into an array. Useful for converting the `arguments` object.
@@ -2294,7 +2294,7 @@ Converts the `collection`, into an array. Useful for converting the `arguments`
### `_.union([array1, array2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1633 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1635 "View in source") [Ⓣ][1]
Computes the union of the passed-in arrays.
@@ -2318,7 +2318,7 @@ _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
### `_.uniq(array [, isSorted=false, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1678 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1680 "View in source") [Ⓣ][1]
Produces a duplicate-value-free version of the `array` using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `isSorted` will run a faster algorithm. If `callback` is passed, each value of `array` is passed through a transformation `callback` before uniqueness is computed. The `callback` is bound to `thisArg` and invoked with `3` arguments; *(value, index, array)*.
@@ -2354,7 +2354,7 @@ _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return this.floor(num); }, Math);
### `_.uniqueId([prefix])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L3266 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L3261 "View in source") [Ⓣ][1]
Generates a unique id. If `prefix` is passed, the id will be appended to it.
@@ -2378,7 +2378,7 @@ _.uniqueId('contact_');
### `_.values(object)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2965 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2954 "View in source") [Ⓣ][1]
Produces an array of `object`'s own enumerable property values.
@@ -2402,7 +2402,7 @@ _.values({ 'one': 1, 'two': 2, 'three': 3 });
### `_.without(array [, value1, value2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1727 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1729 "View in source") [Ⓣ][1]
Produces a new array with all occurrences of the passed values removed using strict equality for comparisons, i.e. `===`.
@@ -2427,7 +2427,7 @@ _.without([1, 2, 1, 0, 3, 1, 4], 0, 1);
### `_.wrap(func, wrapper [, arg1, arg2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L2220 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L2222 "View in source") [Ⓣ][1]
Create a new function that passes the `func` function to the `wrapper` function as its first argument. Additional arguments are appended to those passed to the `wrapper` function.
@@ -2457,7 +2457,7 @@ hello();
### `_.zip([array1, array2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L1760 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L1762 "View in source") [Ⓣ][1]
Merges together the values of each of the arrays with the value at the corresponding position. Useful for separate data sources that are coordinated through matching array indexes. For a matrix of nested arrays, `_.zip.apply(...)` can transpose the matrix in a similar fashion.
@@ -2488,12 +2488,12 @@ _.zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]);
### `_.prototype.chain()`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L3314 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L3336 "View in source") [Ⓣ][1]
-Extracts the value from a wrapped chainable object.
+Enables method chaining on the wrapper object.
#### Returns
-*(Mixed)*: Returns the wrapped object.
+*(Mixed)*: Returns the wrapper object.
#### Example
~~~ js
@@ -2509,12 +2509,12 @@ _([1, 2, 3]).value();
### `_.prototype.value()`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L3331 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L3353 "View in source") [Ⓣ][1]
-Extracts the value from a wrapped chainable object.
+Extracts the wrapped value.
#### Returns
-*(Mixed)*: Returns the wrapped object.
+*(Mixed)*: Returns the wrapped value.
#### Example
~~~ js
@@ -2537,7 +2537,7 @@ _([1, 2, 3]).value();
### `_.templateSettings`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L162 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L168 "View in source") [Ⓣ][1]
*(Object)*: By default, Lo-Dash uses ERB-style template delimiters, change the following template settings to use alternative delimiters.
@@ -2549,7 +2549,7 @@ _([1, 2, 3]).value();
### `_.templateSettings.escape`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L171 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L177 "View in source") [Ⓣ][1]
*(RegExp)*: Used to detect `data` property values to be HTML-escaped.
@@ -2561,7 +2561,7 @@ _([1, 2, 3]).value();
### `_.templateSettings.evaluate`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L180 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L186 "View in source") [Ⓣ][1]
*(RegExp)*: Used to detect code to be evaluated.
@@ -2573,7 +2573,7 @@ _([1, 2, 3]).value();
### `_.templateSettings.interpolate`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L189 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L195 "View in source") [Ⓣ][1]
*(RegExp)*: Used to detect `data` property values to inject.
@@ -2585,7 +2585,7 @@ _([1, 2, 3]).value();
### `_.templateSettings.variable`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js#L198 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js#L204 "View in source") [Ⓣ][1]
*(String)*: Used to reference the data object in the template text.
diff --git a/doc/parse.php b/doc/parse.php
index 1cc10f05dd..240404ce79 100644
--- a/doc/parse.php
+++ b/doc/parse.php
@@ -21,8 +21,8 @@
// generate Markdown
$markdown = docdown(array(
'path' => '../' . $file,
- 'title' => 'Lo-Dash v0.3.1',
- 'url' => 'https://github.com/bestiejs/lodash/blob/v0.3.1/lodash.js'
+ 'title' => 'Lo-Dash v0.3.2',
+ 'url' => 'https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js'
));
// save to a .md file
diff --git a/lodash.js b/lodash.js
index 673a59bf67..b5fa4b2f29 100644
--- a/lodash.js
+++ b/lodash.js
@@ -1,5 +1,5 @@
/*!
- * Lo-Dash v0.3.1
+ * Lo-Dash v0.3.2
* Copyright 2012 John-David Dalton
* Based on Underscore.js 1.3.3, copyright 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
*
@@ -54,6 +54,12 @@
/** Used to store tokenized template text snippets */
var tokenized = [];
+ /** Detect if sourceURL syntax is usable without erroring */
+ try {
+ // Adobe's and Narwhal's JS engines will error
+ var useSourceURL = (Function('//@')(), true);
+ } catch(e){ }
+
/**
* Used to escape characters for inclusion in HTML.
* The `>` and `/` characters don't require escaping in HTML and have no
@@ -333,6 +339,20 @@
}
};
+ /** Reusable iterator options for `invoke`, `map`, and `pluck` */
+ var mapIteratorOptions = {
+ 'init': '',
+ 'exit': 'if (!collection) return []',
+ 'beforeLoop': {
+ 'array': 'result = Array(length)',
+ 'object': 'result = []'
+ },
+ 'inLoop': {
+ 'array': 'result[index] = callback(collection[index], index, collection)',
+ 'object': 'result.push(callback(collection[index], index, collection))'
+ }
+ };
+
/*--------------------------------------------------------------------------*/
/**
@@ -431,13 +451,13 @@
// create the function factory
var factory = Function(
'arrayClass, funcClass, hasOwnProperty, identity, iteratorBind, objectTypes, ' +
- 'stringClass, toString, undefined',
+ 'slice, stringClass, toString, undefined',
'"use strict"; return function(' + args + ') {\n' + iteratorTemplate(data) + '\n}'
);
// return the compiled function
return factory(
arrayClass, funcClass, hasOwnProperty, identity, iteratorBind, objectTypes,
- stringClass, toString
+ slice, stringClass, toString
);
}
@@ -525,7 +545,7 @@
*/
function tokenizeEscape(match, value) {
var index = tokenized.length;
- tokenized[index] = "'+\n((__t = (" + value + ")) == null ? '' : _.escape(__t)) +\n'";
+ tokenized[index] = "'+\n_.escape(" + value + ") +\n'";
return token + index;
}
@@ -673,7 +693,40 @@
var forEach = createIterator(baseIteratorOptions, forEachIteratorOptions);
/**
- * Produces a new array of values by mapping each value in the `collection`
+ * Invokes the method named by `methodName` on each element in the `collection`.
+ * Additional arguments will be passed to each invoked method. If `methodName`
+ * is a function it will be invoked for, and `this` bound to, each element
+ * in the `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collections
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function|String} methodName The name of the method to invoke or
+ * the function invoked per iteration.
+ * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the method with.
+ * @returns {Array} Returns a new array of values returned from each invoked method.
+ * @example
+ *
+ * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort');
+ * // => [[1, 5, 7], [1, 2, 3]]
+ *
+ * _.invoke([123, 456], String.prototype.split, '');
+ * // => [['1', '2', '3'], ['4', '5', '6']]
+ */
+ var invoke = createIterator(mapIteratorOptions, {
+ 'args': 'collection, methodName',
+ 'top':
+ 'var args = slice.call(arguments, 2),\n' +
+ ' isFunc = typeof methodName == \'function\'',
+ 'inLoop': {
+ 'array': 'result[index] = (isFunc ? methodName : collection[index][methodName]).apply(collection[index], args)',
+ 'object': 'result.push((isFunc ? methodName : collection[index][methodName]).apply(collection[index], args))'
+ }
+ });
+
+ /**
+ * Produces a new array of values by mapping each element in the `collection`
* through a transformation `callback`. The `callback` is bound to `thisArg`
* and invoked with 3 arguments; for arrays they are (value, index, array)
* and for objects they are (value, key, object).
@@ -694,16 +747,34 @@
* _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; });
* // => [3, 6, 9] (order is not guaranteed)
*/
- var map = createIterator(baseIteratorOptions, {
- 'init': '',
- 'exit': 'if (!collection) return []',
- 'beforeLoop': {
- 'array': 'result = Array(length)',
- 'object': 'result = []'
- },
+ var map = createIterator(baseIteratorOptions, mapIteratorOptions);
+
+ /**
+ * Retrieves the value of a specified property from all elements in
+ * the `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collections
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {String} property The property to pluck.
+ * @returns {Array} Returns a new array of property values.
+ * @example
+ *
+ * var stooges = [
+ * { 'name': 'moe', 'age': 40 },
+ * { 'name': 'larry', 'age': 50 },
+ * { 'name': 'curly', 'age': 60 }
+ * ];
+ *
+ * _.pluck(stooges, 'name');
+ * // => ['moe', 'larry', 'curly']
+ */
+ var pluck = createIterator(mapIteratorOptions, {
+ 'args': 'collection, property',
'inLoop': {
- 'array': 'result[index] = callback(collection[index], index, collection)',
- 'object': 'result.push(callback(collection[index], index, collection))'
+ 'array': 'result[index] = collection[index][property]',
+ 'object': 'result.push(collection[index][property])'
}
});
@@ -1153,44 +1224,6 @@
return result;
}
- /**
- * Invokes the method named by `methodName` on each element of `array`.
- * Additional arguments will be passed to each invoked method. If `methodName`
- * is a function it will be invoked for, and `this` bound to, each element
- * of `array`.
- *
- * @static
- * @memberOf _
- * @category Arrays
- * @param {Array} array The array to iterate over.
- * @param {Function|String} methodName The name of the method to invoke or
- * the function invoked per iteration.
- * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the method with.
- * @returns {Array} Returns a new array of values returned from each invoked method.
- * @example
- *
- * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort');
- * // => [[1, 5, 7], [1, 2, 3]]
- *
- * _.invoke([123, 456], String.prototype.split, '');
- * // => [['1', '2', '3'], ['4', '5', '6']]
- */
- function invoke(array, methodName) {
- var result = [];
- if (!array) {
- return result;
- }
- var args = slice.call(arguments, 2),
- index = -1,
- length = array.length,
- isFunc = typeof methodName == 'function';
-
- while (++index < length) {
- result[index] = (isFunc ? methodName : array[index][methodName]).apply(array[index], args);
- }
- return result;
- }
-
/**
* Gets the last value of the `array`. Pass `n` to return the lasy `n` values
* of the `array`.
@@ -1357,40 +1390,6 @@
return result;
}
- /**
- * Retrieves the value of a specified property from all elements in `array`.
- *
- * @static
- * @memberOf _
- * @category Arrays
- * @param {Array} array The array to iterate over.
- * @param {String} property The property to pluck.
- * @returns {Array} Returns a new array of property values.
- * @example
- *
- * var stooges = [
- * { 'name': 'moe', 'age': 40 },
- * { 'name': 'larry', 'age': 50 },
- * { 'name': 'curly', 'age': 60 }
- * ];
- *
- * _.pluck(stooges, 'name');
- * // => ['moe', 'larry', 'curly']
- */
- function pluck(array, property) {
- if (!array) {
- return [];
- }
- var index = -1,
- length = array.length,
- result = Array(length);
-
- while (++index < length) {
- result[index] = array[index][property];
- }
- return result;
- }
-
/**
* Creates an array of numbers (positive and/or negative) progressing from
* `start` up to but not including `stop`. This method is a port of Python's
@@ -1602,10 +1601,13 @@
high = array.length;
if (callback) {
- value = callback.call(thisArg, value);
+ if (thisArg) {
+ callback = bind(callback, thisArg);
+ }
+ value = callback(value);
while (low < high) {
mid = (low + high) >>> 1;
- callback.call(thisArg, array[mid]) < value ? low = mid + 1 : high = mid;
+ callback(array[mid]) < value ? low = mid + 1 : high = mid;
}
} else {
while (low < high) {
@@ -2149,10 +2151,10 @@
/**
* Creates a new function that, when executed, will only call the `func`
- * function at most once per every `wait` milliseconds. If the throttled function
- * is invoked more than once, `func` will also be called on the trailing edge
- * of the `wait` timeout. Subsequent calls to the throttled function will
- * return the result of the last `func` call.
+ * function at most once per every `wait` milliseconds. If the throttled
+ * function is invoked more than once during the `wait` timeout, `func` will
+ * also be called on the trailing edge of the timeout. Subsequent calls to the
+ * throttled function will return the result of the last `func` call.
*
* @static
* @memberOf _
@@ -2250,9 +2252,9 @@
}
/**
- * Assigns missing properties in `object` with default values from the defaults
- * objects. As soon as a property is set, additional defaults of the same
- * property will be ignored.
+ * Assigns missing properties on `object` with default values from the defaults
+ * objects. Once a property is set, additional defaults of the same property
+ * will be ignored.
*
* @static
* @memberOf _
@@ -2382,7 +2384,7 @@
}
/**
- * Checks if a `value` is an `arguments` object.
+ * Checks if `value` is an `arguments` object.
*
* @static
* @memberOf _
@@ -2408,7 +2410,7 @@
}
/**
- * Checks if a `value` is an array.
+ * Checks if `value` is an array.
*
* @static
* @memberOf _
@@ -2428,7 +2430,7 @@
};
/**
- * Checks if a `value` is a boolean (`true` or `false`) value.
+ * Checks if `value` is a boolean (`true` or `false`) value.
*
* @static
* @memberOf _
@@ -2445,7 +2447,7 @@
}
/**
- * Checks if a `value` is a date.
+ * Checks if `value` is a date.
*
* @static
* @memberOf _
@@ -2462,7 +2464,7 @@
}
/**
- * Checks if a `value` is a DOM element.
+ * Checks if `value` is a DOM element.
*
* @static
* @memberOf _
@@ -2479,7 +2481,7 @@
}
/**
- * Checks if a `value` is empty. Arrays or strings with a length of `0` and
+ * Checks if `value` is empty. Arrays or strings with a length of `0` and
* objects with no own enumerable properties are considered "empty".
*
* @static
@@ -2641,7 +2643,13 @@
// ensure both objects have the same number of properties
if (result) {
for (prop in b) {
- if (hasOwnProperty.call(b, prop) && !(size--)) break;
+ // Adobe's JS engine, embedded in applications like InDesign, has a
+ // bug that causes `!size--` to throw an error so it must be wrapped
+ // in parentheses.
+ // https://github.com/documentcloud/underscore/issues/355
+ if (hasOwnProperty.call(b, prop) && !(size--)) {
+ break;
+ }
}
result = !size;
}
@@ -2663,8 +2671,11 @@
}
/**
- * Checks if a `value` is a finite number.
+ * Checks if `value` is a finite number.
+ * Note: This is not the same as native `isFinite`, which will return true for
+ * booleans and other values. See http://es5.github.com/#x15.1.2.5.
*
+ * @deprecated
* @static
* @memberOf _
* @category Objects
@@ -2686,7 +2697,7 @@
}
/**
- * Checks if a `value` is a function.
+ * Checks if `value` is a function.
*
* @static
* @memberOf _
@@ -2703,7 +2714,7 @@
}
/**
- * Checks if a `value` is the language type of Object.
+ * Checks if `value` is the language type of Object.
* (e.g. arrays, functions, objects, regexps, `new Number(0)`, and `new String('')`)
*
* @static
@@ -2726,10 +2737,11 @@
}
/**
- * Checks if a `value` is `NaN`.
+ * Checks if `value` is `NaN`.
* Note: This is not the same as native `isNaN`, which will return true for
* `undefined` and other values. See http://es5.github.com/#x15.1.2.4.
*
+ * @deprecated
* @static
* @memberOf _
* @category Objects
@@ -2756,8 +2768,9 @@
}
/**
- * Checks if a `value` is `null`.
+ * Checks if `value` is `null`.
*
+ * @deprecated
* @static
* @memberOf _
* @category Objects
@@ -2776,7 +2789,7 @@
}
/**
- * Checks if a `value` is a number.
+ * Checks if `value` is a number.
*
* @static
* @memberOf _
@@ -2793,7 +2806,7 @@
}
/**
- * Checks if a `value` is a regular expression.
+ * Checks if `value` is a regular expression.
*
* @static
* @memberOf _
@@ -2810,7 +2823,7 @@
}
/**
- * Checks if a `value` is a string.
+ * Checks if `value` is a string.
*
* @static
* @memberOf _
@@ -2827,8 +2840,9 @@
}
/**
- * Checks if a `value` is `undefined`.
+ * Checks if `value` is `undefined`.
*
+ * @deprecated
* @static
* @memberOf _
* @category Objects
@@ -2899,6 +2913,7 @@
* Gets the size of `value` by returning `value.length` if `value` is a string
* or array, or the number of own enumerable properties if `value` is an object.
*
+ * @deprecated
* @static
* @memberOf _
* @category Objects
@@ -2923,32 +2938,6 @@
: keys(value).length;
}
- /**
- * Invokes `interceptor` with the `value` as the first argument, and then returns
- * `value`. The primary purpose of this method is to "tap into" a method chain,
- * in order to performoperations on intermediate results within the chain.
- *
- * @static
- * @memberOf _
- * @category Objects
- * @param {Mixed} value The value to pass to `callback`.
- * @param {Function} interceptor The function to invoke.
- * @returns {Mixed} Returns `value`.
- * @example
- *
- * _.chain([1,2,3,200])
- * .filter(function(num) { return num % 2 == 0; })
- * .tap(alert)
- * .map(function(num) { return num * num })
- * .value();
- * // => // [2, 200] (alerted)
- * // => [4, 40000]
- */
- function tap(value, interceptor) {
- interceptor(value);
- return value;
- }
-
/**
* Produces an array of `object`'s own enumerable property values.
*
@@ -2985,7 +2974,7 @@
* // => "Curly, Larry & Moe"
*/
function escape(string) {
- return (string + '').replace(reUnescapedHtml, escapeHtmlChar);
+ return string == null ? '' : (string + '').replace(reUnescapedHtml, escapeHtmlChar);
}
/**
@@ -3067,8 +3056,10 @@
/**
* Resolves the value of `property` on `object`. If `property` is a function
- * it will be invoked and its result returned, else the property value is returned.
+ * it will be invoked and its result returned, else the property value is
+ * returned. If `object` is falsey, then `null` is returned.
*
+ * @deprecated
* @static
* @memberOf _
* @category Utilities
@@ -3091,6 +3082,8 @@
* // => 'nonsense'
*/
function result(object, property) {
+ // based on Backbone's private `getValue` function
+ // https://github.com/documentcloud/backbone/blob/0.9.2/backbone.js#L1419-1424
if (!object) {
return null;
}
@@ -3200,11 +3193,13 @@
'var __p, __t, __j = Array.prototype.join;\n' +
'function print() { __p += __j.call(arguments, \'\') }\n' +
text +
- 'return __p\n}\n' +
- // add sourceURL for easier debugging
- // (Narwhal requires a trailing newline to prevent a syntax error)
- // http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl
- '//@ sourceURL=/lodash/template/source[' + (templateCounter++) + ']\n';
+ 'return __p\n}';
+
+ // add a sourceURL for easier debugging
+ // http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl
+ if (useSourceURL) {
+ text += '\n//@ sourceURL=/lodash/template/source[' + (templateCounter++) + ']';
+ }
result = Function('_', 'return ' + text)(lodash);
@@ -3271,13 +3266,13 @@
/*--------------------------------------------------------------------------*/
/**
- * Wraps the value in a `lodash` chainable object.
+ * Wraps the value in a `lodash` wrapper object.
*
* @static
* @memberOf _
* @category Chaining
* @param {Mixed} value The value to wrap.
- * @returns {Object} Returns the `lodash` chainable object.
+ * @returns {Object} Returns the wrapper object.
* @example
*
* var stooges = [
@@ -3300,12 +3295,39 @@
}
/**
- * Extracts the value from a wrapped chainable object.
+ * Invokes `interceptor` with the `value` as the first argument, and then
+ * returns `value`. The purpose of this method is to "tap into" a method chain,
+ * in order to perform operations on intermediate results within the chain.
+ *
+ * @static
+ * @memberOf _
+ * @category Chaining
+ * @param {Mixed} value The value to pass to `callback`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {Mixed} Returns `value`.
+ * @example
+ *
+ * _.chain([1,2,3,200])
+ * .filter(function(num) { return num % 2 == 0; })
+ * .tap(alert)
+ * .map(function(num) { return num * num })
+ * .value();
+ * // => // [2, 200] (alerted)
+ * // => [4, 40000]
+ */
+ function tap(value, interceptor) {
+ interceptor(value);
+ return value;
+ }
+
+ /**
+ * Enables method chaining on the wrapper object.
*
* @name chain
+ * @deprecated
* @memberOf _
* @category Chaining
- * @returns {Mixed} Returns the wrapped object.
+ * @returns {Mixed} Returns the wrapper object.
* @example
*
* _([1, 2, 3]).value();
@@ -3317,12 +3339,12 @@
}
/**
- * Extracts the value from a wrapped chainable object.
+ * Extracts the wrapped value.
*
* @name value
* @memberOf _
* @category Chaining
- * @returns {Mixed} Returns the wrapped object.
+ * @returns {Mixed} Returns the wrapped value.
* @example
*
* _([1, 2, 3]).value();
@@ -3341,7 +3363,7 @@
* @memberOf _
* @type String
*/
- lodash.VERSION = '0.3.1';
+ lodash.VERSION = '0.3.2';
// assign static methods
lodash.after = after;
diff --git a/lodash.min.js b/lodash.min.js
index 3f7362284a..63cb9e086f 100644
--- a/lodash.min.js
+++ b/lodash.min.js
@@ -1,32 +1,32 @@
/*!
- Lo-Dash 0.3.1 lodash.com/license
+ Lo-Dash 0.3.2 lodash.com/license
Underscore.js 1.3.3 github.com/documentcloud/underscore/blob/master/LICENSE
*/
-;(function(e,t){"use strict";function s(e){return"[object Arguments]"==rt.call(e)}function o(e){return new u(e)}function u(e){if(e&&e._wrapped)return e;this._wrapped=e}function a(){for(var e,t,s,o=-1,u=arguments.length,a={e:"",f:"",k:"",q:"",c:{d:"",m:"++karguments.length;r&&(t=h(t,r));if(i===i>>>0){for(i&&s&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}var o=kt(e);for((i=o.length)&&s&&(n=e[o[--i]]);i--;)s=o[i],n=t(n,e[s],s,e);return n}function y(e,n,r){if(e)return n==t||r?e[0]:nt.call(e,0,n)}function b(e,t){var n=[];if(!e)return n;for(var r,i=-1,s=e.length;++in?Math.max(0,i+n):n)-1}for(;++ri&&(i=e[s]);return i}for(n&&(t=h(t,n));++sr&&(r=n,i=e[s]);return i}function S(e,t){if(!e)return[];for(var n=-1,r=e.length,i=Array(r);++n>>1,n.call(r,e[i])>>1,e[i]w(a,r))a.push(r),s.push(e[o]);return s}function C(e,t){function n(){var u=arguments,a=t;return s||(e=t[i]),
-o.length&&(u=u.length?Z.apply(o,u):o),this instanceof n?(p.prototype=e.prototype,a=new p,u=e.apply(a,u),U[typeof u]&&u!==r?u:a):e.apply(a,u)}var i,s=rt.call(e)==$;if(s){if(it)return it.call.apply(it,arguments)}else i=t,t=e;var o=nt.call(arguments,2);return n}function k(e,r,s){s||(s=[]);if(e===r)return 0!==e||1/e==1/r;if(e==t||r==t)return e===r;e._chain&&(e=e._wrapped),r._chain&&(r=r._wrapped);if(e.isEqual&&rt.call(e.isEqual)==$)return e.isEqual(r);if(r.isEqual&&rt.call(r.isEqual)==$)return r.isEqual
-(e);var o=rt.call(e);if(o!=rt.call(r))return i;switch(o){case Q:return e==""+r;case J:return e!=+e?r!=+r:0==e?1/e==1/r:e==+r;case X:case V:return+e==+r;case K:return e.source==r.source&&e.global==r.global&&e.multiline==r.multiline&&e.ignoreCase==r.ignoreCase}if("object"!=typeof e||"object"!=typeof r)return i;for(var u=s.length;u--;)if(s[u]==e)return n;var u=-1,a=n,f=0;s.push(e);if(o==W){if(f=e.length,a=f==r.length)for(;f--&&(a=k(e[f],r[f],s)););}else{if("constructor"in e!="constructor"in r||e.constructor!=
-r.constructor)return i;for(var l in e)if(et.call(e,l)&&(f++,!(a=et.call(r,l)&&k(e[l],r[l],s))))break;if(a){for(l in r)if(et.call(r,l)&&!(f--))break;a=!f}if(a&&M)for(;7>++u&&(l=F[u],!et.call(e,l)||!!(a=et.call(r,l)&&k(e[l],r[l],s))););}return s.pop(),a}function L(e){return e}function A(e){wt(Nt(e),function(t){var r=o[t]=e[t];u.prototype[t]=function(){var e=[this._wrapped];return arguments.length&&tt.apply(e,arguments),e=r.apply(o,e),this._chain&&(e=new u(e),e._chain=n),e}})}var n=!0,r=null,i=!1,O="object"==typeof
-exports&&exports&&("object"==typeof global&&global&&global==global.global&&(e=global),exports),M=!{valueOf:0}.propertyIsEnumerable("valueOf"),_=0,D=e._,P=RegExp("^"+({}.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),H=/__token__(\d+)/g,B=/[&<"']/g,j=/['\n\r\t\u2028\u2029\\]/g,F="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),I="__token__",q=[],R={"&":"&","<":"<",'"':""","'":"'"
-},U={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i},z={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},W="[object Array]",X="[object Boolean]",V="[object Date]",$="[object Function]",J="[object Number]",K="[object RegExp]",Q="[object String]",G=Array.prototype,Y=Object.prototype,Z=G.concat,et=Y.hasOwnProperty,tt=G.push,nt=G.slice,rt=Y.toString,it=P.test(it=nt.bind)&&/\n|Opera/.test(it+rt.call(e.opera))&&it,st=P.test(st=Array.isArray)&&st,ot=e.isFinite
-,ut=P.test(ut=Object.keys)&&ut,at=e.clearTimeout,ft=e.setTimeout;o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:"obj"};var lt=Function("obj","var __p;with(obj){__p='var k,r';if(k){__p+='='+k};__p+=';'+f+';'+q+';';if(c){__p+='var m='+g+'.length;k=-1;';if(o){__p+='if(m===m>>>0){'};__p+=''+c['d']+';while('+c['m']+'){'+c['j']+'}';if(o){__p+='}'}}if(o){if(c){__p+='else{'}if(!i){__p+='var s=typeof '+l+'==\\'function\\';'};__p+=''+o['d']+';for('+o['m']+'){';if(i){if(r){__p+='if('+h+'){'};__p+=''+o['j']+';';if(r){__p+='}'}}else{__p+='if(!(s&&k==\\'prototype\\')';if(r){__p+='&&'+h};__p+='){'+o['j']+'}'};__p+='}';if(i){__p+='var f='+l+'.constructor;';for(var k=0;k<7;k++){__p+='k=\\''+p[k]+'\\';if(';if(p[k]=='constructor'){__p+='!(f&&f.prototype==='+l+')&&'};__p+=''+h+'){'+o['j']+'}'}}if(c){__p+='}'}};__p+=''+e+';return r'}return __p"
-),ct={a:"e,c,x",k:"e",q:"if(!c){c=j}else if(x){c=l(c,x)}",j:"c(e[k],k,e)"},ht={k:"z",j:"if(!c(e[k],k,e))return!r"},pt={a:"n",k:"n",q:"for(var t,u=1,m=arguments.length;ue?t():function(){if(1>--e)return t.apply(this,arguments)}},o.bind=C,o.bindAll=function(e){var t=arguments,n=1;1==t.length&&(n=0,t=Nt(e));for(
-var r=t.length;nw(i,e[n])&&t.push(e[n]);return t},o.escape=function(e){return(e+"").replace(B,c)},o.every=yt,o.extend=Tt
-,o.filter=Y,o.find=bt,o.first=y,o.flatten=b,o.forEach=wt,o.forIn=pt,o.forOwn=ct,o.functions=Nt,o.groupBy=function(e,t,n){var r={};if(!e)return r;var i,s=-1,o="function"==typeof t,u=e.length;for(o&&n&&(t=h(t,n));++sw(t,n)&&yt(s,function(e){return-1n?Math.max(0,r+n):Math.min(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},o.map=Et,o.max=E,o.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return et.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},o.min=function(e,t,n){var r=Infinity,i=r;if(!e)return i;var s=-1,o=e.length;if(!t){for(;++s
-arguments.length&&(t=e||0,e=0);for(var r=-1,i=Math.max(Math.ceil((t-e)/n),0),s=Array(i);++ri?1:0});s--;)o[s]=o[s].b;return o},o.sortedIndex=T,o.tap=function(e,t){return t(e),e},o.template=function(e,t,n){n||(n={});var i;i=o.templateSettings;var s=n.escape,u=n.evaluate,a=n.interpolate,n=n.variable;return s==r&&(s=i.escape),u==r&&(u=i.evaluate),a==r&&(a=i
-.interpolate),s&&(e=e.replace(s,d)),a&&(e=e.replace(a,v)),u&&(e=e.replace(u,m)),e="__p='"+e.replace(j,l).replace(H,f)+"';",q.length=0,n||(n=i.variable,e="with("+n+"||{}){"+e+"}"),e="function("+n+"){var __p,__t,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+e+"return __p}",i=Function("_","return "+e)(o),t?i(t):(i.source=e,i)},o.throttle=function(e,n){function r(){a=new Date,u=t,e.apply(o,i)}var i,s,o,u,a=0;return function(){var t=new Date,f=n-(t-a);return i=arguments,o=this
-,0>=f?(a=t,s=e.apply(o,i)):u||(u=ft(r,f)),s}},o.times=function(e,t,n){var r=-1;if(n)for(;++r>>0?nt.call(e):Lt(e)},o.union=function(){for(var e=-1,t=[],n=Z.apply(t,arguments),r=n.length;++ew(t,n[e])&&t.push(n[e]);return t},o.uniq=N,o.uniqueId=function(e){var t=_++;return e?e+t:t},o.values=Lt,o.without=function(e){var t=[];if(!e)return t;for(var n=
-nt.call(arguments,1),r=-1,i=e.length;++rw(n,e[r])&&t.push(e[r]);return t},o.wrap=function(e,t){return function(){var n=[e];return arguments.length&&tt.apply(n,arguments),t.apply(this,n)}},o.zip=function(e){if(!e)return[];for(var t=-1,n=E(S(arguments,"length")),r=Array(n);++targuments.length;r&&(t=h(t,r));if(i===i>>>0){for(i&&s&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}var o=Lt(e);for((i=o.length)&&s&&(n=e[o[--i]]);i--;)s=o[i],n=t(n,e[s],s,e);return n}function y(e,n,r){if(e)return n==t||r?e[0]:tt.call(e,0,n)}function b(e,t){var n=[];if(!e)return n;for(var r,i=-1,s=e.length;++in?Math.max(0,i+n):n)-1}for(;++ri&&(i=e[s]);return i}for(n&&(t=h(t,n));++sr&&(r=n,i=e[s]);return i}function S(e,n,r){return e?tt.call(e,n==t||r?1:n):[]}function x(e,t,n,r){if(!e)return 0;var i=0,s=e.length;if(n){r&&(n=N(n,r));for(t=n(
+t);i>>1,n(e[r])>>1,e[r]w(a,r))a.push(r),s.push(e[o]);return s}function N(e,t){function n(){var u=arguments,a=t;return s||(e=t[i]),o.length&&(u=u.length?Y.apply(o,u):o),this instanceof n?(p.prototype=e.prototype,a=new p,u=e.apply(a,u),R[typeof u]&&u!==r?u:a
+):e.apply(a,u)}var i,s=nt.call(e)==V;if(s){if(rt)return rt.call.apply(rt,arguments)}else i=t,t=e;var o=tt.call(arguments,2);return n}function C(e,r,s){s||(s=[]);if(e===r)return 0!==e||1/e==1/r;if(e==t||r==t)return e===r;e._chain&&(e=e._wrapped),r._chain&&(r=r._wrapped);if(e.isEqual&&nt.call(e.isEqual)==V)return e.isEqual(r);if(r.isEqual&&nt.call(r.isEqual)==V)return r.isEqual(e);var o=nt.call(e);if(o!=nt.call(r))return i;switch(o){case K:return e==""+r;case $:return e!=+e?r!=+r:0==e?1/e==1/r:e==+
+r;case W:case X:return+e==+r;case J:return e.source==r.source&&e.global==r.global&&e.multiline==r.multiline&&e.ignoreCase==r.ignoreCase}if("object"!=typeof e||"object"!=typeof r)return i;for(var u=s.length;u--;)if(s[u]==e)return n;var u=-1,a=n,f=0;s.push(e);if(o==z){if(f=e.length,a=f==r.length)for(;f--&&(a=C(e[f],r[f],s)););}else{if("constructor"in e!="constructor"in r||e.constructor!=r.constructor)return i;for(var l in e)if(Z.call(e,l)&&(f++,!(a=Z.call(r,l)&&C(e[l],r[l],s))))break;if(a){for(l in
+r)if(Z.call(r,l)&&!(f--))break;a=!f}if(a&&O)for(;7>++u&&(l=j[u],!Z.call(e,l)||!!(a=Z.call(r,l)&&C(e[l],r[l],s))););}return s.pop(),a}function k(e){return e}function L(e){wt(Ct(e),function(t){var r=o[t]=e[t];u.prototype[t]=function(){var e=[this._wrapped];return arguments.length&&et.apply(e,arguments),e=r.apply(o,e),this._chain&&(e=new u(e),e._chain=n),e}})}var n=!0,r=null,i=!1,A="object"==typeof exports&&exports&&("object"==typeof global&&global&&global==global.global&&(e=global),exports),O=!{valueOf
+:0}.propertyIsEnumerable("valueOf"),M=0,_=e._,D=RegExp("^"+({}.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),P=/__token__(\d+)/g,H=/[&<"']/g,B=/['\n\r\t\u2028\u2029\\]/g,j="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),F="__token__",I=[],q={"&":"&","<":"<",'"':""","'":"'"},R={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i},U={"\\":"\\","'":"'","\n":"n"
+,"\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},z="[object Array]",W="[object Boolean]",X="[object Date]",V="[object Function]",$="[object Number]",J="[object RegExp]",K="[object String]",Q=Array.prototype,G=Object.prototype,Y=Q.concat,Z=G.hasOwnProperty,et=Q.push,tt=Q.slice,nt=G.toString,rt=D.test(rt=tt.bind)&&/\n|Opera/.test(rt+nt.call(e.opera))&&rt,it=D.test(it=Array.isArray)&&it,st=e.isFinite,ot=D.test(ot=Object.keys)&&ot,ut=e.clearTimeout,at=e.setTimeout;o.templateSettings={escape:/<%-([\s\S]+?)%>/g
+,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:"obj"};var ft=Function("obj","var __p;with(obj){__p='var l,u';if(k){__p+='='+k};__p+=';'+f+';'+q+';';if(c){__p+='var o='+g+'.length;l=-1;';if(o){__p+='if(o===o>>>0){'};__p+=''+c['d']+';while('+c['m']+'){'+c['j']+'}';if(o){__p+='}'}}if(o){if(c){__p+='else{'}if(!i){__p+='var v=typeof '+l+'==\\'function\\';'};__p+=''+o['d']+';for('+o['m']+'){';if(i){if(r){__p+='if('+h+'){'};__p+=''+o['j']+';';if(r){__p+='}'}}else{__p+='if(!(v&&l==\\'prototype\\')';if(r){__p+='&&'+h};__p+='){'+o['j']+'}'};__p+='}';if(i){__p+='var g='+l+'.constructor;';for(var k=0;k<7;k++){__p+='l=\\''+p[k]+'\\';if(';if(p[k]=='constructor'){__p+='!(g&&g.prototype==='+l+')&&'};__p+=''+h+'){'+o['j']+'}'}}if(c){__p+='}'}};__p+=''+e+';return u'}return __p"
+),lt={a:"f,d,B",k:"f",q:"if(!d){d=k}else if(B){d=n(d,B)}",j:"d(f[l],l,f)"},ct={k:"D",j:"if(!d(f[l],l,f))return!u"},ht={a:"r",k:"r",q:"for(var x,y=1,o=arguments.length;ye?t():function(){if(1>--e)return t.apply(this,arguments)}},o.bind=N,o.bindAll=function(e){var t=arguments,n=1;1==t.length&&(n=0,t=Ct(e));for(var r=t.length;nw(i,e[n])&&t.push(e[n]);return t},o.escape=function(e){return e==r?"":(e+"").replace(H,c)},o.every=yt,o.extend=Nt,o.filter=G,o.find=bt,o.first=y,o.flatten=b,o.forEach=wt,o.forIn=ht,o.forOwn=lt,o.functions=Ct,o.groupBy=function(e,t,n){var r={};if(!e)return r;var i,s=-1,o="function"==typeof t,u=e.length;for(o&&n&&(t=h(t,n));++sw(t,n)&&yt(s,function(e){return-1n?Math.max(0,r+n):Math.min(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},o.map=St,o.max=E,o.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return Z.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},o.min=function(e,t,n){var r=Infinity,i=r;if(!e)return i;var s=-1,o=e.length;if(!t){for(;++sarguments.length&&(t=e||0,e=0);for(var r=-1,i=Math.max(Math.ceil((t-e)/n),0),s=Array(i);++ri?1:0});s--;)o[s]=o[s].b;return o},o.sortedIndex=x,o.tap=function(e,t){return t(e),e},o.template=function(e,t,n){n||(n={});var i;i=o.templateSettings;var s=n.escape,u=n.evaluate,a=n.interpolate,n=n.variable;return s==
+r&&(s=i.escape),u==r&&(u=i.evaluate),a==r&&(a=i.interpolate),s&&(e=e.replace(s,d)),a&&(e=e.replace(a,v)),u&&(e=e.replace(u,m)),e="__p='"+e.replace(B,l).replace(P,f)+"';",I.length=0,n||(n=i.variable,e="with("+n+"||{}){"+e+"}"),e="function("+n+"){var __p,__t,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+e+"return __p}",i=Function("_","return "+e)(o),t?i(t):(i.source=e,i)},o.throttle=function(e,n){function r(){a=new Date,u=t,e.apply(o,i)}var i,s,o,u,a=0;return function(){var t=new
+Date,f=n-(t-a);return i=arguments,o=this,0>=f?(a=t,s=e.apply(o,i)):u||(u=at(r,f)),s}},o.times=function(e,t,n){var r=-1;if(n)for(;++r>>0?tt.call(e):At(e)},o.union=function(){for(var e=-1,t=[],n=Y.apply(t,arguments),r=n.length;++ew(t,n[e])&&t.push(n[e]);return t},o.uniq=T,o.uniqueId=function(e){var t=M++;return e?e+t:t},o.values=At,o.without=function(
+e){var t=[];if(!e)return t;for(var n=tt.call(arguments,1),r=-1,i=e.length;++rw(n,e[r])&&t.push(e[r]);return t},o.wrap=function(e,t){return function(){var n=[e];return arguments.length&&et.apply(n,arguments),t.apply(this,n)}},o.zip=function(e){if(!e)return[];for(var t=-1,n=E(xt(arguments,"length")),r=Array(n);++tTest
-