diff --git a/doc/README.md b/doc/README.md
index 5e30bb5b9..a933465cc 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -196,7 +196,7 @@
### `_.compact(array)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2783 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2784 "View in source") [Ⓣ][1]
Creates an array with all falsey values of `array` removed. The values `false`, `null`, `0`, `""`, `undefined` and `NaN` are all falsey.
@@ -220,7 +220,7 @@ _.compact([0, 1, false, 2, '', 3]);
### `_.difference(array [, array1, array2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2813 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2814 "View in source") [Ⓣ][1]
Creates an array of `array` elements not present in the other arrays using strict equality for comparisons, i.e. `===`.
@@ -245,7 +245,7 @@ _.difference([1, 2, 3, 4, 5], [5, 2, 10]);
### `_.first(array [, n])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2848 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2849 "View in source") [Ⓣ][1]
Gets the first element of the `array`. Pass `n` to return the first `n` elements of the `array`.
@@ -273,7 +273,7 @@ _.first([5, 4, 3, 2, 1]);
### `_.flatten(array, shallow)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2875 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2876 "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.
@@ -301,7 +301,7 @@ _.flatten([1, [2], [3, [[4]]]], true);
### `_.indexOf(array, value [, fromIndex=0])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2917 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2918 "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 `fromIndex` will run a faster binary search.
@@ -333,7 +333,7 @@ _.indexOf([1, 1, 2, 2, 3, 3], 2, true);
### `_.initial(array [, n=1])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2952 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2953 "View in source") [Ⓣ][1]
Gets all but the last element of `array`. Pass `n` to exclude the last `n` elements from the result.
@@ -358,7 +358,7 @@ _.initial([3, 2, 1]);
### `_.intersection([array1, array2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2976 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2977 "View in source") [Ⓣ][1]
Computes the intersection of all the passed-in arrays using strict equality for comparisons, i.e. `===`.
@@ -382,7 +382,7 @@ _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
### `_.last(array [, n])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3029 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3030 "View in source") [Ⓣ][1]
Gets the last element of the `array`. Pass `n` to return the last `n` elements of the `array`.
@@ -407,7 +407,7 @@ _.last([3, 2, 1]);
### `_.lastIndexOf(array, value [, fromIndex=array.length-1])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3056 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3057 "View in source") [Ⓣ][1]
Gets the index at which the last occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the offset from the end of the collection.
@@ -436,7 +436,7 @@ _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3);
### `_.object(keys [, values=[]])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3086 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3087 "View in source") [Ⓣ][1]
Creates an object composed from arrays of `keys` and `values`. Pass either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]`, or two arrays, one of `keys` and one of corresponding `values`.
@@ -461,7 +461,7 @@ _.object(['moe', 'larry', 'curly'], [30, 40, 50]);
### `_.range([start=0], end [, step=1])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3131 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3132 "View in source") [Ⓣ][1]
Creates an array of numbers *(positive and/or negative)* progressing from `start` up to but not including `end`. This method is a port of Python's `range()` function. See http://docs.python.org/library/functions.html#range.
@@ -499,7 +499,7 @@ _.range(0);
### `_.rest(array [, n=1])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3170 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3171 "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.
@@ -527,7 +527,7 @@ _.rest([3, 2, 1]);
### `_.sortedIndex(array, value [, callback=identity|property, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3214 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3215 "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 one argument; *(value)*. The `callback` argument may also be the name of a property to order by.
@@ -571,7 +571,7 @@ _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) {
### `_.union([array1, array2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3246 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3247 "View in source") [Ⓣ][1]
Computes the union of the passed-in arrays using strict equality for comparisons, i.e. `===`.
@@ -595,7 +595,7 @@ _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
### `_.uniq(array [, isSorted=false, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3280 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3281 "View in source") [Ⓣ][1]
Creates 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 element of `array` is passed through a callback` before uniqueness is computed. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
@@ -634,7 +634,7 @@ _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return this.floor(num); }, Math);
### `_.without(array [, value1, value2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3339 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3340 "View in source") [Ⓣ][1]
Creates an array with all occurrences of the passed values removed using strict equality for comparisons, i.e. `===`.
@@ -659,7 +659,7 @@ _.without([1, 2, 1, 0, 3, 1, 4], 0, 1);
### `_.zip([array1, array2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3370 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3371 "View in source") [Ⓣ][1]
Groups the elements of each array at their corresponding indexes. 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.
@@ -716,7 +716,7 @@ The wrapper functions `first` and `last` return wrapped values when `n` is passe
### `_.tap(value, interceptor)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4241 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4242 "View in source") [Ⓣ][1]
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.
@@ -746,7 +746,7 @@ _([1, 2, 3, 4])
### `_.prototype.toString()`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4258 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4259 "View in source") [Ⓣ][1]
Produces the `toString` result of the wrapped value.
@@ -767,7 +767,7 @@ _([1, 2, 3]).toString();
### `_.prototype.valueOf()`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4275 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4276 "View in source") [Ⓣ][1]
Extracts the wrapped value.
@@ -798,7 +798,7 @@ _([1, 2, 3]).valueOf();
### `_.at(collection [, index1, index2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1972 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1983 "View in source") [Ⓣ][1]
Creates an array of elements from the specified index(es), or keys, of the `collection`. Indexes may be specified as individual arguments or as arrays of indexes.
@@ -826,7 +826,7 @@ _.at(['moe', 'larry', 'curly'], 0, 2);
### `_.contains(collection, target [, fromIndex=0])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2014 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2025 "View in source") [Ⓣ][1]
Checks if a given `target` element is present in a `collection` using strict equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the offset from the end of the collection.
@@ -864,7 +864,7 @@ _.contains('curly', 'ur');
### `_.countBy(collection, callback|property [, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2061 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2072 "View in source") [Ⓣ][1]
Creates an object composed of keys returned from running each element of `collection` through a `callback`. The corresponding value of each key is the number of times the key was returned by `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. The `callback` argument may also be the name of a property to count by *(e.g. 'length')*.
@@ -896,7 +896,7 @@ _.countBy(['one', 'two', 'three'], 'length');
### `_.every(collection [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2091 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2102 "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 three arguments; *(value, index|key, collection)*.
@@ -925,7 +925,7 @@ _.every([true, 1, null, 'yes'], Boolean);
### `_.filter(collection [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2130 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2141 "View in source") [Ⓣ][1]
Examines each element in a `collection`, returning an array of all elements the `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
@@ -954,7 +954,7 @@ var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; })
### `_.find(collection [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2174 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2185 "View in source") [Ⓣ][1]
Examines each element in a `collection`, returning the first one the `callback` returns truthy for. The function returns as soon as it finds an acceptable element, and does not iterate over the entire `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
@@ -983,7 +983,7 @@ var even = _.find([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; });
### `_.forEach(collection [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2209 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2220 "View in source") [Ⓣ][1]
Iterates over a `collection`, executing the `callback` for each element in the `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. Callbacks may exit iteration early by explicitly returning `false`.
@@ -1015,7 +1015,7 @@ _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, alert);
### `_.groupBy(collection, callback|property [, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2251 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2262 "View in source") [Ⓣ][1]
Creates an object composed of keys returned from running each element of `collection` through a `callback`. The corresponding value of each key is an array of elements passed to `callback` that returned the key. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. The `callback` argument may also be the name of a property to group by *(e.g. 'length')*.
@@ -1047,7 +1047,7 @@ _.groupBy(['one', 'two', 'three'], 'length');
### `_.invoke(collection, methodName [, arg1, arg2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2284 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2295 "View in source") [Ⓣ][1]
Invokes the method named by `methodName` on each element in the `collection`, returning an array of the results of each invoked method. 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`.
@@ -1076,7 +1076,7 @@ _.invoke([123, 456], String.prototype.split, '');
### `_.map(collection [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2318 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2329 "View in source") [Ⓣ][1]
Creates an array of values by running each element in the `collection` through a `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
@@ -1108,7 +1108,7 @@ _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; });
### `_.max(collection [, callback, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2360 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2371 "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 three arguments; *(value, index, collection)*.
@@ -1140,7 +1140,7 @@ _.max(stooges, function(stooge) { return stooge.age; });
### `_.min(collection [, callback, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2408 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2419 "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 three arguments; *(value, index, collection)*.
@@ -1166,7 +1166,7 @@ _.min([10, 5, 100, 2, 1000]);
### `_.pluck(collection, property)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2459 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2470 "View in source") [Ⓣ][1]
Retrieves the value of a specified property from all elements in the `collection`.
@@ -1197,7 +1197,7 @@ _.pluck(stooges, 'name');
### `_.reduce(collection [, callback=identity, accumulator, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2483 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2494 "View in source") [Ⓣ][1]
Reduces 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 four arguments; for arrays they are *(accumulator, value, index|key, collection)*.
@@ -1227,7 +1227,7 @@ var sum = _.reduce([1, 2, 3], function(memo, num) { return memo + num; });
### `_.reduceRight(collection [, callback=identity, accumulator, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2525 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2536 "View in source") [Ⓣ][1]
The right-associative version of `_.reduce`.
@@ -1258,7 +1258,7 @@ var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []);
### `_.reject(collection [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2563 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2574 "View in source") [Ⓣ][1]
The opposite of `_.filter`, this method returns the elements of a `collection` that `callback` does **not** return truthy for.
@@ -1284,7 +1284,7 @@ var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; });
### `_.shuffle(collection)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2584 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2595 "View in source") [Ⓣ][1]
Creates an array of shuffled `array` values, using a version of the Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle.
@@ -1308,7 +1308,7 @@ _.shuffle([1, 2, 3, 4, 5, 6]);
### `_.size(collection)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2617 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2628 "View in source") [Ⓣ][1]
Gets the size of the `collection` by returning `collection.length` for arrays and array-like objects or the number of own enumerable properties for objects.
@@ -1338,7 +1338,7 @@ _.size('curly');
### `_.some(collection [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2642 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2653 "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 three arguments; *(value, index|key, collection)*.
@@ -1367,7 +1367,7 @@ _.some([null, 0, 'yes', false], Boolean);
### `_.sortBy(collection, callback|property [, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2688 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2699 "View in source") [Ⓣ][1]
Creates an array, stable sorted in ascending order by the results of running each element of `collection` through a `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. The `callback` argument may also be the name of a property to sort by *(e.g. 'length')*.
@@ -1399,7 +1399,7 @@ _.sortBy(['larry', 'brendan', 'moe'], 'length');
### `_.toArray(collection)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2723 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2734 "View in source") [Ⓣ][1]
Converts the `collection` to an array.
@@ -1423,7 +1423,7 @@ Converts the `collection` to an array.
### `_.where(collection, properties)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2753 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2764 "View in source") [Ⓣ][1]
Examines each element in a `collection`, returning an array of all elements that contain the given `properties`.
@@ -1461,7 +1461,7 @@ _.where(stooges, { 'age': 40 });
### `_.after(n, func)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3403 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3404 "View in source") [Ⓣ][1]
Creates a function that is restricted to executing `func` only after it is called `n` times. The `func` is executed with the `this` binding of the created function.
@@ -1489,7 +1489,7 @@ _.forEach(notes, function(note) {
### `_.bind(func [, thisArg, arg1, arg2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3436 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3437 "View in source") [Ⓣ][1]
Creates a 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.
@@ -1520,7 +1520,7 @@ func();
### `_.bindAll(object [, methodName1, methodName2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3466 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3467 "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.
@@ -1551,7 +1551,7 @@ jQuery('#lodash_button').on('click', buttonView.onClick);
### `_.bindKey(object, key [, arg1, arg2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3512 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3513 "View in source") [Ⓣ][1]
Creates a function that, when called, invokes the method at `object[key]` and prepends any additional `bindKey` arguments to those passed to the bound function. This method differs from `_.bind` by allowing bound functions to reference methods that will be redefined or don't yet exist. See http://michaux.ca/articles/lazy-function-definition-pattern.
@@ -1592,7 +1592,7 @@ func();
### `_.compose([func1, func2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3535 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3536 "View in source") [Ⓣ][1]
Creates a 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()))`. Each function is executed with the `this` binding of the composed function.
@@ -1619,7 +1619,7 @@ welcome('moe');
### `_.debounce(func, wait, immediate)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3568 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3569 "View in source") [Ⓣ][1]
Creates a 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.
@@ -1645,7 +1645,7 @@ jQuery(window).on('resize', lazyLayout);
### `_.defer(func [, arg1, arg2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3632 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3633 "View in source") [Ⓣ][1]
Defers executing the `func` function until the current call stack has cleared. Additional arguments will be passed to `func` when it is invoked.
@@ -1670,7 +1670,7 @@ _.defer(function() { alert('deferred'); });
### `_.delay(func, wait [, arg1, arg2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3612 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3613 "View in source") [Ⓣ][1]
Executes the `func` function after `wait` milliseconds. Additional arguments will be passed to `func` when it is invoked.
@@ -1697,7 +1697,7 @@ _.delay(log, 1000, 'logged later');
### `_.memoize(func [, resolver])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3656 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3657 "View in source") [Ⓣ][1]
Creates a 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. The `func` is executed with the `this` binding of the memoized function.
@@ -1723,7 +1723,7 @@ var fibonacci = _.memoize(function(n) {
### `_.once(func)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3683 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3684 "View in source") [Ⓣ][1]
Creates a function that is restricted to execute `func` once. Repeat calls to the function will return the value of the first call. The `func` is executed with the `this` binding of the created function.
@@ -1749,7 +1749,7 @@ initialize();
### `_.partial(func [, arg1, arg2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3718 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3719 "View in source") [Ⓣ][1]
Creates a function that, when called, invokes `func` with any additional `partial` arguments prepended to those passed to the new function. This method is similar to `bind`, except it does **not** alter the `this` binding.
@@ -1776,7 +1776,7 @@ hi('moe');
### `_.throttle(func, wait)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3740 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3741 "View in source") [Ⓣ][1]
Creates a 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.
@@ -1801,7 +1801,7 @@ jQuery(window).on('scroll', throttled);
### `_.wrap(value, wrapper)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3793 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3794 "View in source") [Ⓣ][1]
Creates a function that passes `value` to the `wrapper` function as its first argument. Additional arguments passed to the function are appended to those passed to the `wrapper` function. The `wrapper` is executed with the `this` binding of the created function.
@@ -1837,7 +1837,7 @@ hello();
### `_.assign(object [, source1, source2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L825 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L839 "View in source") [Ⓣ][1]
Assigns own enumerable properties of source object(s) to the `destination` object. Subsequent sources will overwrite propery assignments of previous sources.
@@ -1865,7 +1865,7 @@ _.assign({ 'name': 'moe' }, { 'age': 40 });
### `_.clone(value, deep)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1035 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1049 "View in source") [Ⓣ][1]
Creates a clone of `value`. If `deep` is `true`, nested objects will also be cloned, otherwise they will be assigned by reference.
@@ -1901,7 +1901,7 @@ deep[0] === stooges[0];
### `_.cloneDeep(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1130 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1144 "View in source") [Ⓣ][1]
Creates a deep clone of `value`. Functions and DOM nodes are **not** cloned. The enumerable properties of `arguments` objects and objects created by constructors other than `Object` are cloned to plain `Object` objects.
@@ -1934,7 +1934,7 @@ deep[0] === stooges[0];
### `_.defaults(object [, default1, default2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1152 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1166 "View in source") [Ⓣ][1]
Assigns own enumerable properties of source object(s) to the `destination` object for all `destination` properties that resolve to `null`/`undefined`. Once a property is set, additional defaults of the same property will be ignored.
@@ -1960,7 +1960,7 @@ _.defaults(iceCream, { 'flavor': 'vanilla', 'sprinkles': 'rainbow' });
### `_.forIn(object [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L881 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L895 "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 three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
@@ -1996,7 +1996,7 @@ _.forIn(new Dog('Dagny'), function(value, key) {
### `_.forOwn(object [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L905 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L919 "View in source") [Ⓣ][1]
Iterates over an object's own enumerable properties, executing the `callback` for each property. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
@@ -2024,7 +2024,7 @@ _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
### `_.functions(object)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1171 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1185 "View in source") [Ⓣ][1]
Creates a sorted array of all enumerable properties, own and inherited, of `object` that have function values.
@@ -2051,7 +2051,7 @@ _.functions(_);
### `_.has(object, property)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1196 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1210 "View in source") [Ⓣ][1]
Checks if the specified object `property` exists and is a direct property, instead of an inherited property.
@@ -2076,7 +2076,7 @@ _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b');
### `_.invert(object)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1213 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1227 "View in source") [Ⓣ][1]
Creates an object composed of the inverted keys and values of the given `object`.
@@ -2100,7 +2100,7 @@ _.invert({ 'first': 'Moe', 'second': 'Larry', 'third': 'Curly' });
### `_.isArguments(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L843 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L857 "View in source") [Ⓣ][1]
Checks if `value` is an `arguments` object.
@@ -2127,7 +2127,7 @@ _.isArguments([1, 2, 3]);
### `_.isArray(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1242 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1256 "View in source") [Ⓣ][1]
Checks if `value` is an array.
@@ -2154,7 +2154,7 @@ _.isArray([1, 2, 3]);
### `_.isBoolean(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1261 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1275 "View in source") [Ⓣ][1]
Checks if `value` is a boolean *(`true` or `false`)* value.
@@ -2178,7 +2178,7 @@ _.isBoolean(null);
### `_.isDate(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1278 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1292 "View in source") [Ⓣ][1]
Checks if `value` is a date.
@@ -2202,7 +2202,7 @@ _.isDate(new Date);
### `_.isElement(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1295 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1309 "View in source") [Ⓣ][1]
Checks if `value` is a DOM element.
@@ -2226,7 +2226,7 @@ _.isElement(document.body);
### `_.isEmpty(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1320 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1334 "View in source") [Ⓣ][1]
Checks if `value` is empty. Arrays, strings, or `arguments` objects with a length of `0` and objects with no own enumerable properties are considered "empty".
@@ -2256,7 +2256,7 @@ _.isEmpty('');
### `_.isEqual(a, b)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1362 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1376 "View in source") [Ⓣ][1]
Performs a deep comparison between two values to determine if they are equivalent to each other.
@@ -2287,7 +2287,7 @@ _.isEqual(moe, clone);
### `_.isFinite(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1513 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1527 "View in source") [Ⓣ][1]
Checks if `value` is, or can be coerced to, a finite number.
@@ -2325,7 +2325,7 @@ _.isFinite(Infinity);
### `_.isFunction(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1530 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1544 "View in source") [Ⓣ][1]
Checks if `value` is a function.
@@ -2349,7 +2349,7 @@ _.isFunction(_);
### `_.isNaN(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1593 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1607 "View in source") [Ⓣ][1]
Checks if `value` is `NaN`.
@@ -2384,7 +2384,7 @@ _.isNaN(undefined);
### `_.isNull(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1615 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1629 "View in source") [Ⓣ][1]
Checks if `value` is `null`.
@@ -2411,7 +2411,7 @@ _.isNull(undefined);
### `_.isNumber(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1632 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1646 "View in source") [Ⓣ][1]
Checks if `value` is a number.
@@ -2435,7 +2435,7 @@ _.isNumber(8.4 * 5);
### `_.isObject(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1560 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1574 "View in source") [Ⓣ][1]
Checks if `value` is the language type of Object. *(e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)*
@@ -2465,7 +2465,7 @@ _.isObject(1);
### `_.isPlainObject(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1660 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1674 "View in source") [Ⓣ][1]
Checks if a given `value` is an object created by the `Object` constructor.
@@ -2500,7 +2500,7 @@ _.isPlainObject({ 'name': 'moe', 'age': 40 });
### `_.isRegExp(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1685 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1699 "View in source") [Ⓣ][1]
Checks if `value` is a regular expression.
@@ -2524,7 +2524,7 @@ _.isRegExp(/moe/);
### `_.isString(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1702 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1716 "View in source") [Ⓣ][1]
Checks if `value` is a string.
@@ -2548,7 +2548,7 @@ _.isString('moe');
### `_.isUndefined(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1719 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1733 "View in source") [Ⓣ][1]
Checks if `value` is `undefined`.
@@ -2572,7 +2572,7 @@ _.isUndefined(void 0);
### `_.keys(object)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L920 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L934 "View in source") [Ⓣ][1]
Creates an array composed of the own enumerable property names of `object`.
@@ -2596,7 +2596,7 @@ _.keys({ 'one': 1, 'two': 2, 'three': 3 });
### `_.merge(object [, source1, source2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1754 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1768 "View in source") [Ⓣ][1]
Recursively merges own enumerable properties of the source object(s), that don't resolve to `undefined`, into the `destination` object. Subsequent sources will overwrite propery assignments of previous sources.
@@ -2631,7 +2631,7 @@ _.merge(stooges, ages);
### `_.omit(object, callback|[prop1, prop2, ..., thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1828 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1839 "View in source") [Ⓣ][1]
Creates a shallow clone of `object` excluding the specified properties. Property names may be specified as individual arguments or as arrays of property names. If `callback` is passed, it will be executed for each property in the `object`, omitting the properties `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
@@ -2662,7 +2662,7 @@ _.omit({ 'name': 'moe', '_hint': 'knucklehead', '_seed': '96c4eb' }, function(va
### `_.pairs(object)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1862 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1873 "View in source") [Ⓣ][1]
Creates a two dimensional array of the given object's key-value pairs, i.e. `[[key1, value1], [key2, value2]]`.
@@ -2686,7 +2686,7 @@ _.pairs({ 'moe': 30, 'larry': 40, 'curly': 50 });
### `_.pick(object, callback|[prop1, prop2, ..., thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1900 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1911 "View in source") [Ⓣ][1]
Creates a shallow clone of `object` composed of the specified properties. Property names may be specified as individual arguments or as arrays of property names. If `callback` is passed, it will be executed for each property in the `object`, picking the properties `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
@@ -2717,7 +2717,7 @@ _.pick({ 'name': 'moe', '_userid': 'moe1' }, function(value, key) {
### `_.values(object)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1937 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1948 "View in source") [Ⓣ][1]
Creates an array composed of the own enumerable property values of `object`.
@@ -2748,7 +2748,7 @@ _.values({ 'one': 1, 'two': 2, 'three': 3 });
### `_.escape(string)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3817 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3818 "View in source") [Ⓣ][1]
Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding HTML entities.
@@ -2772,7 +2772,7 @@ _.escape('Moe, Larry & Curly');
### `_.identity(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3835 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3836 "View in source") [Ⓣ][1]
This function returns the first argument passed to it.
@@ -2797,7 +2797,7 @@ moe === _.identity(moe);
### `_.mixin(object)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3861 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3862 "View in source") [Ⓣ][1]
Adds functions properties of `object` to the `lodash` function and chainable wrapper.
@@ -2827,7 +2827,7 @@ _('curly').capitalize();
### `_.noConflict()`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3885 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3886 "View in source") [Ⓣ][1]
Reverts the '_' variable to its previous value and returns a reference to the `lodash` function.
@@ -2847,7 +2847,7 @@ var lodash = _.noConflict();
### `_.random([min=0, max=1])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3908 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3909 "View in source") [Ⓣ][1]
Produces a random number between `min` and `max` *(inclusive)*. If only one argument is passed, a number between `0` and the given number will be returned.
@@ -2875,7 +2875,7 @@ _.random(5);
### `_.result(object, property)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3946 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3947 "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. If `object` is falsey, then `null` is returned.
@@ -2910,7 +2910,7 @@ _.result(object, 'stuff');
### `_.template(text, data, options)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4031 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4032 "View in source") [Ⓣ][1]
A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code.
@@ -2988,7 +2988,7 @@ fs.writeFileSync(path.join(cwd, 'jst.js'), '\
### `_.times(n, callback [, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4167 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4168 "View in source") [Ⓣ][1]
Executes the `callback` function `n` times, returning an array of the results of each `callback` execution. The `callback` is bound to `thisArg` and invoked with one argument; *(index)*.
@@ -3020,7 +3020,7 @@ _.times(3, function(n) { this.cast(n); }, mage);
### `_.unescape(string)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4193 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4194 "View in source") [Ⓣ][1]
The opposite of `_.escape`, this method converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding characters.
@@ -3044,7 +3044,7 @@ _.unescape('Moe, Larry & Curly');
### `_.uniqueId([prefix])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4213 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4214 "View in source") [Ⓣ][1]
Generates a unique ID. If `prefix` is passed, the ID will be appended to it.
@@ -3097,7 +3097,7 @@ A reference to the `lodash` function.
### `_.VERSION`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4440 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4441 "View in source") [Ⓣ][1]
*(String)*: The semantic version number.
diff --git a/lodash.js b/lodash.js
index 5c8780ba7..f41b3c541 100644
--- a/lodash.js
+++ b/lodash.js
@@ -642,14 +642,14 @@
}
var props = keys(func);
return function(object) {
- var length = props.length;
+ var length = props.length,
+ result = false;
while (length--) {
- var result = object[props[length]] === func[props[length]];
- if (!result) {
+ if (!(result = object[props[length]] === func[props[length]])) {
break;
}
}
- return !!result;
+ return result;
};
}
if (typeof thisArg != 'undefined') {
diff --git a/lodash.min.js b/lodash.min.js
index 93c7a0864..5a7a47ee8 100644
--- a/lodash.min.js
+++ b/lodash.min.js
@@ -4,8 +4,8 @@
* Underscore.js 1.4.3 underscorejs.org/LICENSE
*/
;(function(n,t){function r(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof r?(this.__wrapped__=n,void 0):new r(n)}function e(n,t,r){t||(t=0);var e=n.length,u=e-t>=(r||it);if(u)for(var o={},r=t-1;++rt||typeof n=="undefined")return 1;if(ne;e++)r+="i='"+t.j[e]+"';if(","constructor"==t.j[e]&&(r+="!(f&&f.prototype===l)&&"),r+="h.call(l,i)){"+t.g+"}";
+}return re;e++)r+="i='"+t.j[e]+"';if(","constructor"==t.j[e]&&(r+="!(f&&f.prototype===l)&&"),r+="h.call(l,i)){"+t.g+"}";
return(t.b||t.h)&&(r+="}"),r+=t.c+";return t",Function("e,h,j,k,p,n,s","return function("+n+"){"+r+"}")(a,St,h,A,er,Dt,kt)}function c(n){return"\\"+ur[n]}function l(n){return vr[n]}function p(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function s(){}function v(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);for(var e=-1,r=r-t||0,u=Array(0>r?0:r);++eC(o,r,1))&&(u[r]=n)
}),u},r.once=function(n){var t,r;return function(){return t?r:(t=Q,r=n.apply(this,arguments),n=W,r)}},r.pairs=function(n){for(var t=-1,r=sr(n),e=r.length,u=Array(e);++tr?It(0,e+r):Tt(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},r.mixin=H,r.noConflict=function(){return n._=at,this
-},r.random=function(n,t){return n==W&&t==W&&(t=1),n=+n||0,t==W&&(t=n,n=0),n+Ot(Bt()*((+t||0)-n+1))},r.reduce=T,r.reduceRight=B,r.result=function(n,t){var r=n?n[t]:W;return j(r)?n[t]():r},r.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:sr(n).length},r.some=M,r.sortedIndex=L,r.template=function(n,e,u){var o=r.templateSettings;n||(n="");var u=hr({},u,o),i=hr({},u.imports,o.imports),o=sr(i),i=E(i),a=0,f=u.interpolate||_t,l=!(1==o.length&&"_"==o[0]&&i[0]===r),p="__p+='";if(n.replace(RegExp((u.escape||_t).source+"|"+f.source+"|"+(f===mt?yt:_t).source+"|"+(u.evaluate||_t).source+"|$","g"),function(t,r,e,u,o,i){return e||(e=u),p+=n.slice(a,i).replace(bt,c),r&&(p+="'+__e("+r+")+'"),o&&(p+="';"+o+";__p+='"),e&&(p+="'+((__t=("+e+"))==null?'':__t)+'"),l||(l=o||ft.test(r||e)),a=i+t.length,t
+},r.throttle=function(n,t){function r(){a=new Date,i=W,u=n.apply(o,e)}var e,u,o,i,a=0;return function(){var f=new Date,c=t-(f-a);return e=arguments,o=this,0r?It(0,e+r):Tt(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},r.mixin=H,r.noConflict=function(){return n._=at,this},r.random=function(n,t){return n==W&&t==W&&(t=1),n=+n||0,t==W&&(t=n,n=0),n+Ot(Bt()*((+t||0)-n+1))
+},r.reduce=T,r.reduceRight=B,r.result=function(n,t){var r=n?n[t]:W;return j(r)?n[t]():r},r.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:sr(n).length},r.some=M,r.sortedIndex=L,r.template=function(n,e,u){var o=r.templateSettings;n||(n="");var u=hr({},u,o),i=hr({},u.imports,o.imports),o=sr(i),i=E(i),a=0,f=u.interpolate||_t,l=!(1==o.length&&"_"==o[0]&&i[0]===r),p="__p+='";if(n.replace(RegExp((u.escape||_t).source+"|"+f.source+"|"+(f===mt?yt:_t).source+"|"+(u.evaluate||_t).source+"|$","g"),function(t,r,e,u,o,i){return e||(e=u),p+=n.slice(a,i).replace(bt,c),r&&(p+="'+__e("+r+")+'"),o&&(p+="';"+o+";__p+='"),e&&(p+="'+((__t=("+e+"))==null?'':__t)+'"),l||(l=o||ft.test(r||e)),a=i+t.length,t
}),p+="';\n",f=u=u.variable,!f)if(u="obj",l)p="with("+u+"){"+p+"}";else var s=RegExp("(\\(\\s*)"+u+"\\."+u+"\\b","g"),p=p.replace(gt,"$&"+u+".").replace(s,"$1__d");p=(l?p.replace(lt,""):p).replace(pt,"$1").replace(st,"$1;"),p="function("+u+"){"+(f?"":u+"||("+u+"={});")+"var __t,__p='',__e=_.escape"+(l?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":(f?"":",__d="+u+"."+u+"||"+u)+";")+p+"return __p}";try{var v=Function(o,"return "+p).apply(t,i)}catch(g){throw g.source=p,g}return e?v(e):(v.source=p,v)
},r.unescape=function(n){return n==W?"":(n+"").replace(ct,g)},r.uniqueId=function(n){var t=++ut;return(n==W?"":n+"")+t},r.all=$,r.any=M,r.detect=N,r.foldl=T,r.foldr=B,r.include=k,r.inject=T,pr(r,function(n,t){r.prototype[t]||(r.prototype[t]=function(){var t=[this.__wrapped__];return Et.apply(t,arguments),n.apply(r,t)})}),r.first=P,r.last=function(n,t,r){if(n){var e=n.length;return t==W||r?n[e-1]:v(n,It(0,e-t))}},r.take=P,r.head=P,pr(r,function(n,t){r.prototype[t]||(r.prototype[t]=function(t,e){var u=n(this.__wrapped__,t,e);
return t==W||e?u:new r(u)})}),r.VERSION="1.0.0-rc.3",r.prototype.toString=function(){return this.__wrapped__+""},r.prototype.value=J,r.prototype.valueOf=J,fr(["join","pop","shift"],function(n){var t=rt[n];r.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),fr(["push","reverse","sort","unshift"],function(n){var t=rt[n];r.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),fr(["concat","slice","splice"],function(n){var t=rt[n];r.prototype[n]=function(){return new r(t.apply(this.__wrapped__,arguments))
diff --git a/lodash.underscore.js b/lodash.underscore.js
index 4eb97d25d..7ca6b1f41 100644
--- a/lodash.underscore.js
+++ b/lodash.underscore.js
@@ -395,9 +395,23 @@
if (!func) {
return identity;
}
- if (typeof func != 'function') {
+ var type = typeof func;
+ if (type != 'function') {
+ if (type != 'object') {
+ return function(object) {
+ return object[func];
+ };
+ }
+ var props = keys(func);
return function(object) {
- return object[func];
+ var length = props.length,
+ result = false;
+ while (length--) {
+ if (!(result = object[props[length]] === func[props[length]])) {
+ break;
+ }
+ }
+ return result;
};
}
if (typeof thisArg != 'undefined') {
@@ -2271,17 +2285,7 @@
* // => [{ 'name': 'moe', 'age': 40 }]
*/
function where(collection, properties) {
- var props = keys(properties);
- return filter(collection, function(object) {
- var length = props.length;
- while (length--) {
- var result = object[props[length]] === properties[props[length]];
- if (!result) {
- break;
- }
- }
- return !!result;
- });
+ return filter(collection, properties);
}
/*--------------------------------------------------------------------------*/
diff --git a/lodash.underscore.min.js b/lodash.underscore.min.js
index 5790fb0da..037f6445b 100644
--- a/lodash.underscore.min.js
+++ b/lodash.underscore.min.js
@@ -5,28 +5,28 @@
* Underscore.js 1.4.3 underscorejs.org/LICENSE
*/
;(function(n,t){function r(n,t){var r;if(n)for(r in t||(t=V),n)if(ft.call(n,r)&&t(n[r],r,n)===Y)break}function e(n,t){var r;if(n)for(r in t||(t=V),n)if(t(n[r],r,n)===Y)break}function u(n,t,r){if(n){var t=t&&typeof r=="undefined"?t:f(t,r),e=n.length,r=-1;if(typeof e=="number")for(;++rt||typeof n=="undefined")return 1;if(nr?0:r);++eo&&(o=a)}else t=f(t,r),u(n,function(n,r,u){r=t(n,r,u),r>e&&(e=r,o=n)});return o}function T(n,t){return F(n,t+"")}function q(n,t,r,e){var o=3>arguments.length,t=f(t,e,Y);if(Bt(n)){var i=-1,a=n.length;for(o&&(r=n[++i]);++iarguments.length;if(typeof u!="number")var i=Rt(n),u=i.length;
-return t=f(t,e,Y),N(n,function(e,a,f){a=i?i[--u]:--u,r=o?(o=K,n[a]):t(r,n[a],a,f)}),r}function D(n,t,r){var e,t=f(t,r);if(Bt(n))for(var r=-1,o=n.length;++rr?yt(0,u+r):r||0)-1;
-else if(r)return e=C(n,t),n[e]===t?e:-1;for(;++e>>1,r(n[e])I(a,c))&&(r&&a.push(c),i.push(e))}return i}function U(n,t){return Ot||st&&2"']/g,ut=/['\n\r\t\u2028\u2029\\]/g,ot=Math.ceil,it=W.concat,at=Math.floor,ft=Q.hasOwnProperty,ct=W.push,lt=Q.toString,st=tt.test(st=p.bind)&&st,pt=tt.test(pt=Array.isArray)&&pt,vt=n.isFinite,gt=n.isNaN,ht=tt.test(ht=Object.keys)&&ht,yt=Math.max,_t=Math.min,mt=Math.random,dt="[object Array]",bt="[object Boolean]",jt="[object Date]",wt="[object Number]",At="[object Object]",xt="[object RegExp]",Et="[object String]",Q=!!n.attachEvent,Ot=st&&/\n|true/.test(st+Q),St=(St={0:1,length:1},W.splice.call(St,0,1),St[0]),kt=arguments.constructor==Object,Nt={"boolean":K,"function":H,object:H,number:K,string:K,undefined:K},Ft={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};
-o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},o.isArguments=function(n){return"[object Arguments]"==lt.call(n)},o.isArguments(arguments)||(o.isArguments=function(n){return n?ft.call(n,"callee"):K});var Rt=ht?function(n){return j(n)?ht(n):[]}:h,Tt={"&":"&","<":"<",">":">",'"':""","'":"'"},qt=m(Tt),Bt=pt||function(n){return kt&&n instanceof Array||lt.call(n)==dt};b(/x/)&&(b=function(n){return n instanceof Function||"[object Function]"==lt.call(n)
-}),o.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},o.bind=U,o.bindAll=function(n){for(var t=arguments,r=1t||typeof n=="undefined")return 1;if(nr?0:r);++eo&&(o=a)}else t=f(t,r),u(n,function(n,r,u){r=t(n,r,u),r>e&&(e=r,o=n)});return o}function T(n,t){return F(n,t+"")}function q(n,t,r,e){var o=3>arguments.length,t=f(t,e,Y);if(Bt(n)){var i=-1,a=n.length;for(o&&(r=n[++i]);++iarguments.length;
+if(typeof u!="number")var i=Rt(n),u=i.length;return t=f(t,e,Y),k(n,function(e,a,f){a=i?i[--u]:--u,r=o?(o=K,n[a]):t(r,n[a],a,f)}),r}function D(n,t,r){var e,t=f(t,r);if(Bt(n))for(var r=-1,o=n.length;++rr?yt(0,u+r):r||0)-1;else if(r)return e=C(n,t),n[e]===t?e:-1;for(;++e>>1,r(n[e])I(a,c))&&(r&&a.push(c),i.push(e))}return i
+}function U(n,t){return Ot||st&&2"']/g,ut=/['\n\r\t\u2028\u2029\\]/g,ot=Math.ceil,it=W.concat,at=Math.floor,ft=Q.hasOwnProperty,ct=W.push,lt=Q.toString,st=tt.test(st=p.bind)&&st,pt=tt.test(pt=Array.isArray)&&pt,vt=n.isFinite,gt=n.isNaN,ht=tt.test(ht=Object.keys)&&ht,yt=Math.max,_t=Math.min,mt=Math.random,dt="[object Array]",bt="[object Boolean]",jt="[object Date]",wt="[object Number]",At="[object Object]",xt="[object RegExp]",Et="[object String]",Q=!!n.attachEvent,Ot=st&&/\n|true/.test(st+Q),St=(St={0:1,length:1},W.splice.call(St,0,1),St[0]),Nt=arguments.constructor==Object,kt={"boolean":K,"function":H,object:H,number:K,string:K,undefined:K},Ft={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};
+o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},o.isArguments=function(n){return"[object Arguments]"==lt.call(n)},o.isArguments(arguments)||(o.isArguments=function(n){return n?ft.call(n,"callee"):K});var Rt=ht?function(n){return j(n)?ht(n):[]}:h,Tt={"&":"&","<":"<",">":">",'"':""","'":"'"},qt=m(Tt),Bt=pt||function(n){return Nt&&n instanceof Array||lt.call(n)==dt};b(/x/)&&(b=function(n){return n instanceof Function||"[object Function]"==lt.call(n)
+}),o.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},o.bind=U,o.bindAll=function(n){for(var t=arguments,r=1I(e,o,r)&&u.push(o)
-}return u},o.filter=S,o.flatten=$,o.forEach=N,o.functions=_,o.groupBy=function(n,t,r){var e={},t=f(t,r);return N(n,function(n,r,u){r=t(n,r,u)+"",(ft.call(e,r)?e[r]:e[r]=[]).push(n)}),e},o.initial=function(n,t,r){if(!n)return[];var e=n.length;return p(n,0,_t(yt(0,e-(t==J||r?1:t||0)),e))},o.intersection=function(n){var t=arguments,r=t.length,e=-1,u=n?n.length:0,o=[];n:for(;++eI(o,i)){for(var a=r;--a;)if(0>I(t[a],i))continue n;o.push(i)}}return o},o.invert=m,o.invoke=function(n,t){var r=p(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=Array(typeof o=="number"?o:0);
-return N(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},o.keys=Rt,o.map=F,o.max=R,o.memoize=function(n,t){var r={};return function(){var e=(t?t.apply(this,arguments):arguments[0])+"";return ft.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},o.min=function(n,t,r){var e=1/0,o=e;if(!t&&Bt(n))for(var r=-1,i=n.length;++rI(o,i)){for(var a=r;--a;)if(0>I(t[a],i))continue n;o.push(i)}}return o},o.invert=m,o.invoke=function(n,t){var r=p(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=Array(typeof o=="number"?o:0);
+return k(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},o.keys=Rt,o.map=F,o.max=R,o.memoize=function(n,t){var r={};return function(){var e=(t?t.apply(this,arguments):arguments[0])+"";return ft.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},o.min=function(n,t,r){var e=1/0,o=e;if(!t&&Bt(n))for(var r=-1,i=n.length;++rI(t,e,1)&&(r[e]=n)}),r},o.once=function(n){var t,r;return function(){return t?r:(t=H,r=n.apply(this,arguments),n=J,r)}},o.pairs=function(n){for(var t=-1,r=Rt(n),e=r.length,u=Array(e);++tI(arguments,u,1)&&e.push(u)}return e},o.wrap=function(n,t){return function(){var r=[n];return ct.apply(r,arguments),t.apply(this,r)}},o.zip=function(n){for(var t=-1,r=n?R(T(arguments,"length")):0,e=Array(r);++tr?yt(0,e+r):_t(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},o.mixin=G,o.noConflict=function(){return n._=Z,this},o.random=function(n,t){return n==J&&t==J&&(t=1),n=+n||0,t==J&&(t=n,n=0),n+at(mt()*((+t||0)-n+1))},o.reduce=q,o.reduceRight=B,o.result=function(n,t){var r=n?n[t]:J;
-return b(r)?n[t]():r},o.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Rt(n).length},o.some=D,o.sortedIndex=C,o.template=function(n,t,r){n||(n="");var r=y({},r,o.templateSettings),e=0,u="__p+='",i=r.variable;n.replace(RegExp((r.escape||rt).source+"|"+(r.interpolate||rt).source+"|"+(r.evaluate||rt).source+"|$","g"),function(t,r,o,i,a){u+=n.slice(e,a).replace(ut,c),u+=r?"'+_['escape']("+r+")+'":i?"';"+i+";__p+='":o?"'+((__t=("+o+"))==null?'':__t)+'":"",e=a+t.length}),u+="';\n",i||(i="obj",u="with("+i+"||{}){"+u+"}"),u="function("+i+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+u+"return __p}";
-try{var a=Function("_","return "+u)(o)}catch(f){throw f.source=u,f}return t?a(t):(a.source=u,a)},o.unescape=function(n){return n==J?"":(n+"").replace(nt,v)},o.uniqueId=function(n){var t=++X+"";return n?n+t:t},o.all=O,o.any=D,o.detect=k,o.foldl=q,o.foldr=B,o.include=E,o.inject=q,o.first=M,o.last=function(n,t,r){if(n){var e=n.length;return t==J||r?n[e-1]:p(n,yt(0,e-t))}},o.take=M,o.head=M,o.chain=function(n){return n=new o(n),n.__chain__=H,n},o.VERSION="1.0.0-rc.3",G(o),o.prototype.chain=function(){return this.__chain__=H,this
+for(var e=-1,t=yt(0,ot((t-n)/r)),u=Array(t);++eI(arguments,u,1)&&e.push(u)}return e},o.wrap=function(n,t){return function(){var r=[n];return ct.apply(r,arguments),t.apply(this,r)}},o.zip=function(n){for(var t=-1,r=n?R(T(arguments,"length")):0,e=Array(r);++tr?yt(0,e+r):_t(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},o.mixin=G,o.noConflict=function(){return n._=Z,this},o.random=function(n,t){return n==J&&t==J&&(t=1),n=+n||0,t==J&&(t=n,n=0),n+at(mt()*((+t||0)-n+1))},o.reduce=q,o.reduceRight=B,o.result=function(n,t){var r=n?n[t]:J;return b(r)?n[t]():r},o.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Rt(n).length
+},o.some=D,o.sortedIndex=C,o.template=function(n,t,r){n||(n="");var r=y({},r,o.templateSettings),e=0,u="__p+='",i=r.variable;n.replace(RegExp((r.escape||rt).source+"|"+(r.interpolate||rt).source+"|"+(r.evaluate||rt).source+"|$","g"),function(t,r,o,i,a){u+=n.slice(e,a).replace(ut,c),u+=r?"'+_['escape']("+r+")+'":i?"';"+i+";__p+='":o?"'+((__t=("+o+"))==null?'':__t)+'":"",e=a+t.length}),u+="';\n",i||(i="obj",u="with("+i+"||{}){"+u+"}"),u="function("+i+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+u+"return __p}";
+try{var a=Function("_","return "+u)(o)}catch(f){throw f.source=u,f}return t?a(t):(a.source=u,a)},o.unescape=function(n){return n==J?"":(n+"").replace(nt,v)},o.uniqueId=function(n){var t=++X+"";return n?n+t:t},o.all=O,o.any=D,o.detect=N,o.foldl=q,o.foldr=B,o.include=E,o.inject=q,o.first=M,o.last=function(n,t,r){if(n){var e=n.length;return t==J||r?n[e-1]:p(n,yt(0,e-t))}},o.take=M,o.head=M,o.chain=function(n){return n=new o(n),n.__chain__=H,n},o.VERSION="1.0.0-rc.3",G(o),o.prototype.chain=function(){return this.__chain__=H,this
},o.prototype.value=function(){return this.__wrapped__},u("pop push reverse shift sort splice unshift".split(" "),function(n){var t=W[n];o.prototype[n]=function(){var n=this.__wrapped__;return t.apply(n,arguments),St&&0===n.length&&delete n[0],this}}),u(["concat","join","slice"],function(n){var t=W[n];o.prototype[n]=function(){var n=t.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new o(n),n.__chain__=H),n}}),L?typeof module=="object"&&module&&module.exports==L?(module.exports=o)._=o:L._=o:n._=o
})(this);
\ No newline at end of file
diff --git a/vendor/backbone/backbone.js b/vendor/backbone/backbone.js
index dd262c835..07ed747b6 100644
--- a/vendor/backbone/backbone.js
+++ b/vendor/backbone/backbone.js
@@ -142,7 +142,7 @@
// Remove one or many callbacks. If `context` is null, removes all
// callbacks with that function. If `callback` is null, removes all
- // callbacks for the event. If `events` is null, removes all bound
+ // callbacks for the event. If `name` is null, removes all bound
// callbacks for all events.
off: function(name, callback, context) {
var list, ev, events, names, i, l, j, k;
@@ -425,7 +425,7 @@
// If the server returns an attributes hash that differs, the model's
// state will be `set` again.
save: function(key, val, options) {
- var attrs, model, success, method, xhr, attributes = this.attributes;
+ var attrs, success, method, xhr, attributes = this.attributes;
// Handle both `"key", value` and `{key: value}` -style arguments.
if (key == null || typeof key === 'object') {
@@ -450,6 +450,7 @@
// After a successful server-side save, the client is (optionally)
// updated with the server-side state.
+ if (options.parse === void 0) options.parse = true;
success = options.success;
options.success = function(model, resp, options) {
// Ensure attributes are restored during synchronous saves.
@@ -554,6 +555,7 @@
options || (options = {});
if (options.model) this.model = options.model;
if (options.comparator !== void 0) this.comparator = options.comparator;
+ this.models = [];
this._reset();
this.initialize.apply(this, arguments);
if (models) this.reset(models, _.extend({silent: true}, options));
@@ -585,21 +587,19 @@
add: function(models, options) {
models = _.isArray(models) ? models.slice() : [models];
options || (options = {});
- var i, l, model, attrs, existing, sort, doSort, sortAttr, at, add;
+ var i, l, model, attrs, existing, doSort, add, at, sort, sortAttr;
add = [];
at = options.at;
- sort = this.comparator && (at == null) && (options.sort == null || options.sort);
+ sort = this.comparator && (at == null) && options.sort != false;
sortAttr = _.isString(this.comparator) ? this.comparator : null;
// Turn bare objects into model references, and prevent invalid models
// from being added.
for (i = 0, l = models.length; i < l; i++) {
- attrs = models[i];
- if(!(model = this._prepareModel(attrs, options))) {
+ if (!(model = this._prepareModel(attrs = models[i], options))) {
this.trigger('invalid', this, attrs, options);
continue;
}
- models[i] = model;
// If a duplicate is found, prevent it from being added and
// optionally merge it into the existing model.
@@ -796,7 +796,7 @@
for (var i = 0, l = this.models.length; i < l; i++) {
this._removeReference(this.models[i]);
}
- options.previousModels = this.models;
+ options.previousModels = this.models.slice();
this._reset();
if (models) this.add(models, _.extend({silent: true}, options));
if (!options.silent) this.trigger('reset', this, options);
@@ -804,8 +804,8 @@
},
// Fetch the default set of models for this collection, resetting the
- // collection when they arrive. If `add: true` is passed, appends the
- // models to the collection instead of resetting.
+ // collection when they arrive. If `update: true` is passed, the response
+ // data will be passed through the `update` method instead of `reset`.
fetch: function(options) {
options = options ? _.clone(options) : {};
if (options.parse === void 0) options.parse = true;
@@ -823,10 +823,9 @@
// wait for the server to agree.
create: function(model, options) {
options = options ? _.clone(options) : {};
- model = this._prepareModel(model, options);
+ if (!(model = this._prepareModel(model, options))) return false;
+ if (!options.wait) this.add(model, options);
var collection = this;
- if (!model) return false;
- if (!options.wait) collection.add(model, options);
var success = options.success;
options.success = function(model, resp, options) {
if (options.wait) collection.add(model, options);
@@ -847,17 +846,10 @@
return new this.constructor(this.models);
},
- // Proxy to _'s chain. Can't be proxied the same way the rest of the
- // underscore methods are proxied because it relies on the underscore
- // constructor.
- chain: function() {
- return _(this.models).chain();
- },
-
// Reset all internal state. Called when the collection is reset.
_reset: function() {
this.length = 0;
- this.models = [];
+ this.models.length = 0;
this._byId = {};
},
@@ -892,6 +884,14 @@
if (model.id != null) this._byId[model.id] = model;
}
this.trigger.apply(this, arguments);
+ },
+
+ sortedIndex: function (model, value, context) {
+ value || (value = this.comparator);
+ var iterator = _.isFunction(value) ? value : function(model) {
+ return model.get(value);
+ };
+ return _.sortedIndex(this.models, model, iterator, context);
}
});
@@ -900,9 +900,9 @@
var methods = ['forEach', 'each', 'map', 'collect', 'reduce', 'foldl',
'inject', 'reduceRight', 'foldr', 'find', 'detect', 'filter', 'select',
'reject', 'every', 'all', 'some', 'any', 'include', 'contains', 'invoke',
- 'max', 'min', 'sortedIndex', 'toArray', 'size', 'first', 'head', 'take',
- 'initial', 'rest', 'tail', 'drop', 'last', 'without', 'indexOf', 'shuffle',
- 'lastIndexOf', 'isEmpty'];
+ 'max', 'min', 'toArray', 'size', 'first', 'head', 'take', 'initial', 'rest',
+ 'tail', 'drop', 'last', 'without', 'indexOf', 'shuffle', 'lastIndexOf',
+ 'isEmpty', 'chain'];
// Mix in each Underscore method as a proxy to `Collection#models`.
_.each(methods, function(method) {
@@ -965,6 +965,7 @@
var args = this._extractParameters(route, fragment);
callback && callback.apply(this, args);
this.trigger.apply(this, ['route:' + name].concat(args));
+ this.trigger('route', name, args);
Backbone.history.trigger('route', this, name, args);
}, this));
return this;
diff --git a/vendor/backbone/test/collection.js b/vendor/backbone/test/collection.js
index 0bca07d94..167dad9fd 100644
--- a/vendor/backbone/test/collection.js
+++ b/vendor/backbone/test/collection.js
@@ -497,9 +497,21 @@ $(document).ready(function() {
[4, 0]);
});
+ test("sortedIndex", function () {
+ var model = new Backbone.Model({key: 2});
+ var collection = new (Backbone.Collection.extend({
+ comparator: 'key'
+ }))([model, {key: 1}]);
+ equal(collection.sortedIndex(model), 1);
+ equal(collection.sortedIndex(model, 'key'), 1);
+ equal(collection.sortedIndex(model, function (model) {
+ return model.get('key');
+ }), 1);
+ });
+
test("reset", 10, function() {
var resetCount = 0;
- var models = col.models;
+ var models = col.models.slice();
col.on('reset', function() { resetCount += 1; });
col.reset([]);
equal(resetCount, 1);
diff --git a/vendor/backbone/test/events.js b/vendor/backbone/test/events.js
index cf6c8f53a..0d77328e5 100644
--- a/vendor/backbone/test/events.js
+++ b/vendor/backbone/test/events.js
@@ -86,6 +86,20 @@ $(document).ready(function() {
b.trigger('change');
});
+ test("listenTo yourself", 1, function(){
+ var e = _.extend({}, Backbone.Events);
+ e.listenTo(e, "foo", function(){ ok(true); });
+ e.trigger("foo");
+ });
+
+ test("listenTo yourself cleans yourself up with stopListening", 1, function(){
+ var e = _.extend({}, Backbone.Events);
+ e.listenTo(e, "foo", function(){ ok(true); });
+ e.trigger("foo");
+ e.stopListening();
+ e.trigger("foo");
+ });
+
test("trigger all for each event", 3, function() {
var a, b, obj = { counter: 0 };
_.extend(obj, Backbone.Events);
diff --git a/vendor/backbone/test/model.js b/vendor/backbone/test/model.js
index 8b8fe7109..7bbb8337c 100644
--- a/vendor/backbone/test/model.js
+++ b/vendor/backbone/test/model.js
@@ -734,6 +734,13 @@ $(document).ready(function() {
model.save({x: 1}, {wait: true});
});
+ test("save turns on parse flag", function () {
+ var Model = Backbone.Model.extend({
+ sync: function(method, model, options) { ok(options.parse); }
+ });
+ new Model().save();
+ });
+
test("nested `set` during `'change:attr'`", 2, function() {
var events = [];
var model = new Backbone.Model();
diff --git a/vendor/backbone/test/router.js b/vendor/backbone/test/router.js
index b1c6a71a8..26d380097 100644
--- a/vendor/backbone/test/router.js
+++ b/vendor/backbone/test/router.js
@@ -69,6 +69,7 @@ $(document).ready(function() {
"contacts": "contacts",
"contacts/new": "newContact",
"contacts/:id": "loadContact",
+ "route-event/:arg": "routeEvent",
"optional(/:item)": "optionalItem",
"named/optional/(y:z)": "namedOptional",
"splat/*args/end": "splat",
@@ -132,6 +133,9 @@ $(document).ready(function() {
namedOptional: function(z) {
this.z = z;
+ },
+
+ routeEvent: function(arg) {
}
});
@@ -516,4 +520,13 @@ $(document).ready(function() {
strictEqual(router.z, '123');
});
+ test("#2062 - Trigger 'route' event on router instance.", 2, function() {
+ router.on('route', function(name, args) {
+ strictEqual(name, 'routeEvent');
+ deepEqual(args, ['x']);
+ });
+ location.replace('http://example.com#route-event/x');
+ Backbone.history.checkUrl();
+ });
+
});
diff --git a/vendor/underscore/underscore-min.js b/vendor/underscore/underscore-min.js
index 307393e73..d2d3068c4 100644
--- a/vendor/underscore/underscore-min.js
+++ b/vendor/underscore/underscore-min.js
@@ -2,4 +2,4 @@
// http://underscorejs.org
// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore may be freely distributed under the MIT license.
-(function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,h=e.reduce,v=e.reduceRight,g=e.filter,d=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,_=Object.keys,j=i.bind,w=function(n){return n instanceof w?n:this instanceof w?(this._wrapped=n,void 0):new w(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=w),exports._=w):n._=w,w.VERSION="1.4.3";var A=w.each=w.forEach=function(n,t,e){if(null!=n)if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var u=0,i=n.length;i>u;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a in n)if(w.has(n,a)&&t.call(e,n[a],a,n)===r)return};w.map=w.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e[e.length]=t.call(r,n,u,i)}),e)};var O="Reduce of empty array with no initial value";w.reduce=w.foldl=w.inject=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return e&&(t=w.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(O);return r},w.reduceRight=w.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduceRight===v)return e&&(t=w.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=w.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(O);return r},w.find=w.detect=function(n,t,r){var e;return E(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},w.filter=w.select=function(n,t,r){var e=[];return null==n?e:g&&n.filter===g?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&(e[e.length]=n)}),e)},w.reject=function(n,t,r){return w.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},w.every=w.all=function(n,t,e){t||(t=w.identity);var u=!0;return null==n?u:d&&n.every===d?n.every(t,e):(A(n,function(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var E=w.some=w.any=function(n,t,e){t||(t=w.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};w.contains=w.include=function(n,t){return null==n?!1:y&&n.indexOf===y?n.indexOf(t)!=-1:E(n,function(n){return n===t})},w.invoke=function(n,t){var r=o.call(arguments,2);return w.map(n,function(n){return(w.isFunction(t)?t:n[t]).apply(n,r)})},w.pluck=function(n,t){return w.map(n,function(n){return n[t]})},w.where=function(n,t){return w.isEmpty(t)?[]:w.filter(n,function(n){for(var r in t)if(t[r]!==n[r])return!1;return!0})},w.max=function(n,t,r){if(!t&&w.isArray(n)&&n[0]===+n[0]&&65535>n.length)return Math.max.apply(Math,n);if(!t&&w.isEmpty(n))return-1/0;var e={computed:-1/0,value:-1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a>=e.computed&&(e={value:n,computed:a})}),e.value},w.min=function(n,t,r){if(!t&&w.isArray(n)&&n[0]===+n[0]&&65535>n.length)return Math.min.apply(Math,n);if(!t&&w.isEmpty(n))return 1/0;var e={computed:1/0,value:1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;e.computed>a&&(e={value:n,computed:a})}),e.value},w.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=w.random(r++),e[r-1]=e[t],e[t]=n}),e};var F=function(n){return w.isFunction(n)?n:function(t){return t[n]}};w.sortBy=function(n,t,r){var e=F(t);return w.pluck(w.map(n,function(n,t,u){return{value:n,index:t,criteria:e.call(r,n,t,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.indexi;){var o=i+a>>>1;u>r.call(e,n[o])?i=o+1:a=o}return i},w.toArray=function(n){return n?w.isArray(n)?o.call(n):n.length===+n.length?w.map(n,w.identity):w.values(n):[]},w.size=function(n){return null==n?0:n.length===+n.length?n.length:w.keys(n).length},w.first=w.head=w.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:o.call(n,0,t)},w.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},w.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},w.rest=w.tail=w.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},w.compact=function(n){return w.filter(n,w.identity)};var R=function(n,t,r){return A(n,function(n){w.isArray(n)?t?a.apply(r,n):R(n,t,r):r.push(n)}),r};w.flatten=function(n,t){return R(n,t,[])},w.without=function(n){return w.difference(n,o.call(arguments,1))},w.uniq=w.unique=function(n,t,r,e){w.isFunction(t)&&(e=r,r=t,t=!1);var u=r?w.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:w.contains(a,r))||(a.push(r),i.push(n[e]))}),i},w.union=function(){return w.uniq(c.apply(e,arguments))},w.intersection=function(n){var t=o.call(arguments,1);return w.filter(w.uniq(n),function(n){return w.every(t,function(t){return w.indexOf(t,n)>=0})})},w.difference=function(n){var t=c.apply(e,o.call(arguments,1));return w.filter(n,function(n){return!w.contains(t,n)})},w.zip=function(){for(var n=o.call(arguments),t=w.max(w.pluck(n,"length")),r=Array(t),e=0;t>e;e++)r[e]=w.pluck(n,""+e);return r},w.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},w.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=w.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},w.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},w.range=function(n,t,r){1>=arguments.length&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=Array(e);e>u;)i[u++]=n,n+=r;return i};var I=function(){};w.bind=function(n,t){var r,e;if(n.bind===j&&j)return j.apply(n,o.call(arguments,1));if(!w.isFunction(n))throw new TypeError;return r=o.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(o.call(arguments)));I.prototype=n.prototype;var u=new I;I.prototype=null;var i=n.apply(u,r.concat(o.call(arguments)));return Object(i)===i?i:u}},w.bindAll=function(n){var t=o.call(arguments,1);return 0===t.length&&(t=w.functions(n)),A(t,function(t){n[t]=w.bind(n[t],n)}),n},w.memoize=function(n,t){var r={};return t||(t=w.identity),function(){var e=t.apply(this,arguments);return w.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},w.delay=function(n,t){var r=o.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},w.defer=function(n){return w.delay.apply(w,[n,1].concat(o.call(arguments,1)))},w.throttle=function(n,t){var r,e,u,i,a=0,o=function(){a=new Date,u=null,i=n.apply(r,e)};return function(){var c=new Date,l=t-(c-a);return r=this,e=arguments,0>=l?(clearTimeout(u),u=null,a=c,i=n.apply(r,e)):u||(u=setTimeout(o,l)),i}},w.debounce=function(n,t,r){var e,u;return function(){var i=this,a=arguments,o=function(){e=null,r||(u=n.apply(i,a))},c=r&&!e;return clearTimeout(e),e=setTimeout(o,t),c&&(u=n.apply(i,a)),u}},w.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},w.wrap=function(n,t){return function(){var r=[n];return a.apply(r,arguments),t.apply(this,r)}},w.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},w.after=function(n,t){return 0>=n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},w.keys=_||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)w.has(n,r)&&(t[t.length]=r);return t},w.values=function(n){var t=[];for(var r in n)w.has(n,r)&&t.push(n[r]);return t},w.pairs=function(n){var t=[];for(var r in n)w.has(n,r)&&t.push([r,n[r]]);return t},w.invert=function(n){var t={};for(var r in n)w.has(n,r)&&(t[n[r]]=r);return t},w.functions=w.methods=function(n){var t=[];for(var r in n)w.isFunction(n[r])&&t.push(r);return t.sort()},w.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},w.pick=function(n){var t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},w.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)w.contains(r,u)||(t[u]=n[u]);return t},w.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)null==n[r]&&(n[r]=t[r])}),n},w.clone=function(n){return w.isObject(n)?w.isArray(n)?n.slice():w.extend({},n):n},w.tap=function(n,t){return t(n),n};var M=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof w&&(n=n._wrapped),t instanceof w&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return n==t+"";case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==t;r.push(n),e.push(t);var a=0,o=!0;if("[object Array]"==u){if(a=n.length,o=a==t.length)for(;a--&&(o=M(n[a],t[a],r,e)););}else{var c=n.constructor,f=t.constructor;if(c!==f&&!(w.isFunction(c)&&c instanceof c&&w.isFunction(f)&&f instanceof f))return!1;for(var s in n)if(w.has(n,s)&&(a++,!(o=w.has(t,s)&&M(n[s],t[s],r,e))))break;if(o){for(s in t)if(w.has(t,s)&&!a--)break;o=!a}}return r.pop(),e.pop(),o};w.isEqual=function(n,t){return M(n,t,[],[])},w.isEmpty=function(n){if(null==n)return!0;if(w.isArray(n)||w.isString(n))return 0===n.length;for(var t in n)if(w.has(n,t))return!1;return!0},w.isElement=function(n){return!(!n||1!==n.nodeType)},w.isArray=x||function(n){return"[object Array]"==l.call(n)},w.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){w["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),w.isArguments(arguments)||(w.isArguments=function(n){return!(!n||!w.has(n,"callee"))}),"function"!=typeof/./&&(w.isFunction=function(n){return"function"==typeof n}),w.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},w.isNaN=function(n){return w.isNumber(n)&&n!=+n},w.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},w.isNull=function(n){return null===n},w.isUndefined=function(n){return n===void 0},w.has=function(n,t){return f.call(n,t)},w.noConflict=function(){return n._=t,this},w.identity=function(n){return n},w.times=function(n,t,r){for(var e=Array(n),u=0;n>u;u++)e[u]=t.call(r,u);return e},w.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};var S={escape:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}};S.unescape=w.invert(S.escape);var T={escape:RegExp("["+w.keys(S.escape).join("")+"]","g"),unescape:RegExp("("+w.keys(S.unescape).join("|")+")","g")};w.each(["escape","unescape"],function(n){w[n]=function(t){return null==t?"":(""+t).replace(T[n],function(t){return S[n][t]})}}),w.result=function(n,t){if(null==n)return null;var r=n[t];return w.isFunction(r)?r.call(n):r},w.mixin=function(n){A(w.functions(n),function(t){var r=w[t]=n[t];w.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),z.call(this,r.apply(w,n))}})};var N=0;w.uniqueId=function(n){var t=++N+"";return n?n+t:t},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\t|\u2028|\u2029/g;w.template=function(n,t,r){var e;r=w.defaults({},r,w.templateSettings);var u=RegExp([(r.escape||q).source,(r.interpolate||q).source,(r.evaluate||q).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(D,function(n){return"\\"+B[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,w);var c=function(n){return e.call(this,n,w)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},w.chain=function(n){return w(n).chain()};var z=function(n){return this._chain?w(n).chain():n};w.mixin(w),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];w.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],z.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];w.prototype[n]=function(){return z.call(this,t.apply(this._wrapped,arguments))}}),w.extend(w.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this);
\ No newline at end of file
+(function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,h=e.reduce,v=e.reduceRight,g=e.filter,d=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,_=Object.keys,j=i.bind,w=function(n){return n instanceof w?n:this instanceof w?(this._wrapped=n,void 0):new w(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=w),exports._=w):n._=w,w.VERSION="1.4.3";var A=w.each=w.forEach=function(n,t,e){if(null!=n)if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var u=0,i=n.length;i>u;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a in n)if(w.has(n,a)&&t.call(e,n[a],a,n)===r)return};w.map=w.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e[e.length]=t.call(r,n,u,i)}),e)};var O="Reduce of empty array with no initial value";w.reduce=w.foldl=w.inject=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return e&&(t=w.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(O);return r},w.reduceRight=w.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduceRight===v)return e&&(t=w.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=w.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(O);return r},w.find=w.detect=function(n,t,r){var e;return E(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},w.filter=w.select=function(n,t,r){var e=[];return null==n?e:g&&n.filter===g?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&(e[e.length]=n)}),e)},w.reject=function(n,t,r){return w.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},w.every=w.all=function(n,t,e){t||(t=w.identity);var u=!0;return null==n?u:d&&n.every===d?n.every(t,e):(A(n,function(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var E=w.some=w.any=function(n,t,e){t||(t=w.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};w.contains=w.include=function(n,t){return null==n?!1:y&&n.indexOf===y?n.indexOf(t)!=-1:E(n,function(n){return n===t})},w.invoke=function(n,t){var r=o.call(arguments,2),e=w.isFunction(t);return w.map(n,function(n){return(e?t:n[t]).apply(n,r)})},w.pluck=function(n,t){return w.map(n,function(n){return n[t]})},w.where=function(n,t){return w.isEmpty(t)?[]:w.filter(n,function(n){for(var r in t)if(t[r]!==n[r])return!1;return!0})},w.max=function(n,t,r){if(!t&&w.isArray(n)&&n[0]===+n[0]&&65535>n.length)return Math.max.apply(Math,n);if(!t&&w.isEmpty(n))return-1/0;var e={computed:-1/0,value:-1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a>=e.computed&&(e={value:n,computed:a})}),e.value},w.min=function(n,t,r){if(!t&&w.isArray(n)&&n[0]===+n[0]&&65535>n.length)return Math.min.apply(Math,n);if(!t&&w.isEmpty(n))return 1/0;var e={computed:1/0,value:1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;e.computed>a&&(e={value:n,computed:a})}),e.value},w.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=w.random(r++),e[r-1]=e[t],e[t]=n}),e};var F=function(n){return w.isFunction(n)?n:function(t){return t[n]}};w.sortBy=function(n,t,r){var e=F(t);return w.pluck(w.map(n,function(n,t,u){return{value:n,index:t,criteria:e.call(r,n,t,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.indexi;){var o=i+a>>>1;u>r.call(e,n[o])?i=o+1:a=o}return i},w.toArray=function(n){return n?w.isArray(n)?o.call(n):n.length===+n.length?w.map(n,w.identity):w.values(n):[]},w.size=function(n){return null==n?0:n.length===+n.length?n.length:w.keys(n).length},w.first=w.head=w.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:o.call(n,0,t)},w.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},w.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},w.rest=w.tail=w.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},w.compact=function(n){return w.filter(n,w.identity)};var R=function(n,t,r){return A(n,function(n){w.isArray(n)?t?a.apply(r,n):R(n,t,r):r.push(n)}),r};w.flatten=function(n,t){return R(n,t,[])},w.without=function(n){return w.difference(n,o.call(arguments,1))},w.uniq=w.unique=function(n,t,r,e){w.isFunction(t)&&(e=r,r=t,t=!1);var u=r?w.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:w.contains(a,r))||(a.push(r),i.push(n[e]))}),i},w.union=function(){return w.uniq(c.apply(e,arguments))},w.intersection=function(n){var t=o.call(arguments,1);return w.filter(w.uniq(n),function(n){return w.every(t,function(t){return w.indexOf(t,n)>=0})})},w.difference=function(n){var t=c.apply(e,o.call(arguments,1));return w.filter(n,function(n){return!w.contains(t,n)})},w.zip=function(){for(var n=o.call(arguments),t=w.max(w.pluck(n,"length")),r=Array(t),e=0;t>e;e++)r[e]=w.pluck(n,""+e);return r},w.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},w.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=w.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},w.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},w.range=function(n,t,r){1>=arguments.length&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=Array(e);e>u;)i[u++]=n,n+=r;return i};var I=function(){};w.bind=function(n,t){var r,e;if(n.bind===j&&j)return j.apply(n,o.call(arguments,1));if(!w.isFunction(n))throw new TypeError;return r=o.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(o.call(arguments)));I.prototype=n.prototype;var u=new I;I.prototype=null;var i=n.apply(u,r.concat(o.call(arguments)));return Object(i)===i?i:u}},w.bindAll=function(n){var t=o.call(arguments,1);return 0===t.length&&(t=w.functions(n)),A(t,function(t){n[t]=w.bind(n[t],n)}),n},w.memoize=function(n,t){var r={};return t||(t=w.identity),function(){var e=t.apply(this,arguments);return w.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},w.delay=function(n,t){var r=o.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},w.defer=function(n){return w.delay.apply(w,[n,1].concat(o.call(arguments,1)))},w.throttle=function(n,t){var r,e,u,i,a=0,o=function(){a=new Date,u=null,i=n.apply(r,e)};return function(){var c=new Date,l=t-(c-a);return r=this,e=arguments,0>=l?(clearTimeout(u),u=null,a=c,i=n.apply(r,e)):u||(u=setTimeout(o,l)),i}},w.debounce=function(n,t,r){var e,u;return function(){var i=this,a=arguments,o=function(){e=null,r||(u=n.apply(i,a))},c=r&&!e;return clearTimeout(e),e=setTimeout(o,t),c&&(u=n.apply(i,a)),u}},w.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},w.wrap=function(n,t){return function(){var r=[n];return a.apply(r,arguments),t.apply(this,r)}},w.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},w.after=function(n,t){return 0>=n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},w.keys=_||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)w.has(n,r)&&(t[t.length]=r);return t},w.values=function(n){var t=[];for(var r in n)w.has(n,r)&&t.push(n[r]);return t},w.pairs=function(n){var t=[];for(var r in n)w.has(n,r)&&t.push([r,n[r]]);return t},w.invert=function(n){var t={};for(var r in n)w.has(n,r)&&(t[n[r]]=r);return t},w.functions=w.methods=function(n){var t=[];for(var r in n)w.isFunction(n[r])&&t.push(r);return t.sort()},w.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},w.pick=function(n){var t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},w.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)w.contains(r,u)||(t[u]=n[u]);return t},w.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)null==n[r]&&(n[r]=t[r])}),n},w.clone=function(n){return w.isObject(n)?w.isArray(n)?n.slice():w.extend({},n):n},w.tap=function(n,t){return t(n),n};var M=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof w&&(n=n._wrapped),t instanceof w&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return n==t+"";case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==t;r.push(n),e.push(t);var a=0,o=!0;if("[object Array]"==u){if(a=n.length,o=a==t.length)for(;a--&&(o=M(n[a],t[a],r,e)););}else{var c=n.constructor,f=t.constructor;if(c!==f&&!(w.isFunction(c)&&c instanceof c&&w.isFunction(f)&&f instanceof f))return!1;for(var s in n)if(w.has(n,s)&&(a++,!(o=w.has(t,s)&&M(n[s],t[s],r,e))))break;if(o){for(s in t)if(w.has(t,s)&&!a--)break;o=!a}}return r.pop(),e.pop(),o};w.isEqual=function(n,t){return M(n,t,[],[])},w.isEmpty=function(n){if(null==n)return!0;if(w.isArray(n)||w.isString(n))return 0===n.length;for(var t in n)if(w.has(n,t))return!1;return!0},w.isElement=function(n){return!(!n||1!==n.nodeType)},w.isArray=x||function(n){return"[object Array]"==l.call(n)},w.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){w["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),w.isArguments(arguments)||(w.isArguments=function(n){return!(!n||!w.has(n,"callee"))}),"function"!=typeof/./&&(w.isFunction=function(n){return"function"==typeof n}),w.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},w.isNaN=function(n){return w.isNumber(n)&&n!=+n},w.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},w.isNull=function(n){return null===n},w.isUndefined=function(n){return n===void 0},w.has=function(n,t){return f.call(n,t)},w.noConflict=function(){return n._=t,this},w.identity=function(n){return n},w.times=function(n,t,r){for(var e=Array(n),u=0;n>u;u++)e[u]=t.call(r,u);return e},w.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};var S={escape:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}};S.unescape=w.invert(S.escape);var T={escape:RegExp("["+w.keys(S.escape).join("")+"]","g"),unescape:RegExp("("+w.keys(S.unescape).join("|")+")","g")};w.each(["escape","unescape"],function(n){w[n]=function(t){return null==t?"":(""+t).replace(T[n],function(t){return S[n][t]})}}),w.result=function(n,t){if(null==n)return null;var r=n[t];return w.isFunction(r)?r.call(n):r},w.mixin=function(n){A(w.functions(n),function(t){var r=w[t]=n[t];w.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),z.call(this,r.apply(w,n))}})};var N=0;w.uniqueId=function(n){var t=++N+"";return n?n+t:t},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\t|\u2028|\u2029/g;w.template=function(n,t,r){var e;r=w.defaults({},r,w.templateSettings);var u=RegExp([(r.escape||q).source,(r.interpolate||q).source,(r.evaluate||q).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(D,function(n){return"\\"+B[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,w);var c=function(n){return e.call(this,n,w)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},w.chain=function(n){return w(n).chain()};var z=function(n){return this._chain?w(n).chain():n};w.mixin(w),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];w.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],z.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];w.prototype[n]=function(){return z.call(this,t.apply(this._wrapped,arguments))}}),w.extend(w.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this);
\ No newline at end of file
diff --git a/vendor/underscore/underscore.js b/vendor/underscore/underscore.js
index e228c95c4..1105f6012 100644
--- a/vendor/underscore/underscore.js
+++ b/vendor/underscore/underscore.js
@@ -224,8 +224,9 @@
// Invoke a method (with arguments) on every item in a collection.
_.invoke = function(obj, method) {
var args = slice.call(arguments, 2);
+ var isFunc = _.isFunction(method);
return _.map(obj, function(value) {
- return (_.isFunction(method) ? method : value[method]).apply(value, args);
+ return (isFunc ? method : value[method]).apply(value, args);
});
};