lodash: Add partial. [closes #5] [gf3, jddalton]

Former-commit-id: 7f95e60e93d463aeac936bcf0868fe2cb5494d6e
This commit is contained in:
John-David Dalton
2012-05-06 19:17:13 -04:00
parent 14c8863657
commit d26fc7154c
4 changed files with 233 additions and 121 deletions

View File

@@ -63,6 +63,7 @@
* [`_.mixin`](#_mixinobject)
* [`_.noConflict`](#_noconflict)
* [`_.once`](#_oncefunc)
* [`_.partial`](#_partialfunc--arg1-arg2-)
* [`_.pick`](#_pickobject--prop1-prop2-)
* [`_.pluck`](#_pluckcollection-property)
* [`_.range`](#_rangestart0-end--step1)
@@ -128,7 +129,7 @@
<!-- div -->
### `_(value)`
<a id="_value" href="#_value">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L158 "View in source") [&#x24C9;][1]
<a id="_value" href="#_value">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L165 "View in source") [&#x24C9;][1]
The `lodash` function.
@@ -149,7 +150,7 @@ The `lodash` function.
<!-- div -->
### `_.VERSION`
<a id="_version" href="#_version">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2762 "View in source") [&#x24C9;][1]
<a id="_version" href="#_version">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2856 "View in source") [&#x24C9;][1]
*(String)*: The semantic version number.
@@ -164,7 +165,7 @@ The `lodash` function.
<!-- div -->
### `_.after(times, func)`
<a id="_aftertimes-func" href="#_aftertimes-func">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1471 "View in source") [&#x24C9;][1]
<a id="_aftertimes-func" href="#_aftertimes-func">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1506 "View in source") [&#x24C9;][1]
Creates a new function that is restricted to executing only after it is called a given number of `times`.
@@ -195,13 +196,13 @@ _.forEach(notes, function(note) {
<!-- div -->
### `_.bind(func [, arg1, arg2, ...])`
<a id="_bindfunc--arg1-arg2-" href="#_bindfunc--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1522 "View in source") [&#x24C9;][1]
<a id="_bindfunc--arg1-arg2-" href="#_bindfunc--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1557 "View in source") [&#x24C9;][1]
Creates a new function that, when called, invokes `func` with the `this` binding of `thisArg` and prepends additional arguments to those passed to the bound function. Lazy defined methods may be bound by passing the object they are bound to as `func` and the method name as `thisArg`.
Creates a new function that, when called, invokes `func` with the `this` binding of `thisArg` and prepends any additional `bind` arguments to those passed to the bound function. Lazy defined methods may be bound by passing the object they are bound to as `func` and the method name as `thisArg`.
#### Arguments
1. `func` *(Function|Object)*: The function to bind or the object the method belongs to.
2. `[arg1, arg2, ...]` *(Mixed)*: Arguments to prepend to those passed to the bound function.
2. `[arg1, arg2, ...]` *(Mixed)*: Arguments to be partially applied.
#### Returns
*(Function)*: Returns the new bound function.
@@ -245,7 +246,7 @@ func();
<!-- div -->
### `_.bindAll(object [, methodName1, methodName2, ...])`
<a id="_bindallobject--methodname1-methodname2-" href="#_bindallobject--methodname1-methodname2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1563 "View in source") [&#x24C9;][1]
<a id="_bindallobject--methodname1-methodname2-" href="#_bindallobject--methodname1-methodname2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1620 "View in source") [&#x24C9;][1]
Binds methods on the `object` to the object, overwriting the non-bound method. If no method names are provided, all the function properties of the `object` will be bound.
@@ -280,7 +281,7 @@ jQuery('#lodash_button').on('click', buttonView.onClick);
<!-- div -->
### `_.chain(value)`
<a id="_chainvalue" href="#_chainvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2714 "View in source") [&#x24C9;][1]
<a id="_chainvalue" href="#_chainvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2808 "View in source") [&#x24C9;][1]
Wraps the value in a `lodash` chainable object.
@@ -317,7 +318,7 @@ var youngest = _.chain(stooges)
<!-- div -->
### `_.clone(value)`
<a id="_clonevalue" href="#_clonevalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1848 "View in source") [&#x24C9;][1]
<a id="_clonevalue" href="#_clonevalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1942 "View in source") [&#x24C9;][1]
Create a shallow clone of the `value`. Any nested objects or arrays will be assigned by reference and not cloned.
@@ -344,7 +345,7 @@ _.clone({ 'name': 'moe' });
<!-- div -->
### `_.compact(array)`
<a id="_compactarray" href="#_compactarray">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L916 "View in source") [&#x24C9;][1]
<a id="_compactarray" href="#_compactarray">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L951 "View in source") [&#x24C9;][1]
Produces a new array with all falsey values of `array` removed. The values `false`, `null`, `0`, `""`, `undefined` and `NaN` are all falsey.
@@ -371,7 +372,7 @@ _.compact([0, 1, false, 2, '', 3]);
<!-- div -->
### `_.compose([func1, func2, ...])`
<a id="_composefunc1-func2-" href="#_composefunc1-func2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1595 "View in source") [&#x24C9;][1]
<a id="_composefunc1-func2-" href="#_composefunc1-func2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1652 "View in source") [&#x24C9;][1]
Creates a new function that is the composition of the passed functions, where each function consumes the return value of the function that follows. In math terms, composing thefunctions `f()`, `g()`, and `h()` produces `f(g(h()))`.
@@ -401,7 +402,7 @@ welcome('moe');
<!-- div -->
### `_.contains(collection, target)`
<a id="_containscollection-target" href="#_containscollection-target">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L408 "View in source") [&#x24C9;][1]
<a id="_containscollection-target" href="#_containscollection-target">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L443 "View in source") [&#x24C9;][1]
Checks if a given `target` value is present in a `collection` using strict equality for comparisons, i.e. `===`.
@@ -429,7 +430,7 @@ _.contains([1, 2, 3], 3);
<!-- div -->
### `_.debounce(func, wait, immediate)`
<a id="_debouncefunc-wait-immediate" href="#_debouncefunc-wait-immediate">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1627 "View in source") [&#x24C9;][1]
<a id="_debouncefunc-wait-immediate" href="#_debouncefunc-wait-immediate">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1684 "View in source") [&#x24C9;][1]
Creates a new function that will delay the execution of `func` until after `wait` milliseconds have elapsed since the last time it was invoked. Pass `true` for `immediate` to cause debounce to invoke `func` on the leading, instead of the trailing, edge of the `wait` timeout.
@@ -458,7 +459,7 @@ jQuery(window).on('resize', lazyLayout);
<!-- div -->
### `_.defaults(object [, defaults1, defaults2, ..])`
<a id="_defaultsobject--defaults1-defaults2-" href="#_defaultsobject--defaults1-defaults2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1872 "View in source") [&#x24C9;][1]
<a id="_defaultsobject--defaults1-defaults2-" href="#_defaultsobject--defaults1-defaults2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1966 "View in source") [&#x24C9;][1]
Assigns missing properties in `object` with default values from the defaults objects. As soon as a property is set, additional defaults of the same property will be ignored.
@@ -487,7 +488,7 @@ _.defaults(iceCream, { 'flavor': 'vanilla', 'sprinkles': 'lots' });
<!-- div -->
### `_.defer(func [, arg1, arg2, ...])`
<a id="_deferfunc--arg1-arg2-" href="#_deferfunc--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1692 "View in source") [&#x24C9;][1]
<a id="_deferfunc--arg1-arg2-" href="#_deferfunc--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1749 "View in source") [&#x24C9;][1]
Defers executing the `func` function until the current call stack has cleared. Additional arguments are passed to `func` when it is invoked.
@@ -515,7 +516,7 @@ _.defer(function() { alert('deferred'); });
<!-- div -->
### `_.delay(func, wait [, arg1, arg2, ...])`
<a id="_delayfunc-wait--arg1-arg2-" href="#_delayfunc-wait--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1672 "View in source") [&#x24C9;][1]
<a id="_delayfunc-wait--arg1-arg2-" href="#_delayfunc-wait--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1729 "View in source") [&#x24C9;][1]
Executes the `func` function after `wait` milliseconds. Additional arguments are passed to `func` when it is invoked.
@@ -545,7 +546,7 @@ _.delay(log, 1000, 'logged later');
<!-- div -->
### `_.difference(array [, array1, array2, ...])`
<a id="_differencearray--array1-array2-" href="#_differencearray--array1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L945 "View in source") [&#x24C9;][1]
<a id="_differencearray--array1-array2-" href="#_differencearray--array1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L980 "View in source") [&#x24C9;][1]
Produces a new array of `array` values not present in the other arrays using strict equality for comparisons, i.e. `===`.
@@ -573,7 +574,7 @@ _.difference([1, 2, 3, 4, 5], [5, 2, 10]);
<!-- div -->
### `_.escape(string)`
<a id="_escapestring" href="#_escapestring">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2431 "View in source") [&#x24C9;][1]
<a id="_escapestring" href="#_escapestring">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2525 "View in source") [&#x24C9;][1]
Escapes a string for insertion into HTML, replacing `&`, `<`, `"`, `'`, and `/` characters.
@@ -600,7 +601,7 @@ _.escape('Curly, Larry & Moe');
<!-- div -->
### `_.every(collection, callback [, thisArg])`
<a id="_everycollection-callback--thisarg" href="#_everycollection-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L432 "View in source") [&#x24C9;][1]
<a id="_everycollection-callback--thisarg" href="#_everycollection-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L467 "View in source") [&#x24C9;][1]
Checks if the `callback` returns a truthy value for **all** elements of a `collection`. The `callback` is invoked with `3` arguments; for arrays they are *(value, index, array)* and for objects they are *(value, key, object)*.
@@ -629,7 +630,7 @@ _.every([true, 1, null, 'yes'], Boolean);
<!-- div -->
### `_.extend(object [, source1, source2, ..])`
<a id="_extendobject--source1-source2-" href="#_extendobject--source1-source2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1891 "View in source") [&#x24C9;][1]
<a id="_extendobject--source1-source2-" href="#_extendobject--source1-source2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1985 "View in source") [&#x24C9;][1]
Copies enumerable properties from the source objects to the `destination` object. Subsequent sources will overwrite propery assignments of previous sources.
@@ -657,7 +658,7 @@ _.extend({ 'name': 'moe' }, { 'age': 40 });
<!-- div -->
### `_.filter(collection, callback [, thisArg])`
<a id="_filtercollection-callback--thisarg" href="#_filtercollection-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L453 "View in source") [&#x24C9;][1]
<a id="_filtercollection-callback--thisarg" href="#_filtercollection-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L488 "View in source") [&#x24C9;][1]
Examines each value in a `collection`, returning an array of all values the `callback` returns truthy for. The `callback` is invoked with `3` arguments; for arrays they are *(value, index, array)* and for objects they are *(value, key, object)*.
@@ -686,7 +687,7 @@ var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; })
<!-- div -->
### `_.find(collection, callback [, thisArg])`
<a id="_findcollection-callback--thisarg" href="#_findcollection-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L475 "View in source") [&#x24C9;][1]
<a id="_findcollection-callback--thisarg" href="#_findcollection-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L510 "View in source") [&#x24C9;][1]
Examines each value in a `collection`, returning the first one the `callback` returns truthy for. The function returns as soon as it finds an acceptable value, and does not iterate over the entire `collection`. The `callback` is invoked with `3` arguments; for arrays they are *(value, index, array)* and for objects they are *(value, key, object)*.
@@ -715,7 +716,7 @@ var even = _.find([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; });
<!-- div -->
### `_.first(array [, n, guard])`
<a id="_firstarray--n-guard" href="#_firstarray--n-guard">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L978 "View in source") [&#x24C9;][1]
<a id="_firstarray--n-guard" href="#_firstarray--n-guard">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1013 "View in source") [&#x24C9;][1]
Gets the first value of the `array`. Pass `n` to return the first `n` values of the `array`.
@@ -744,7 +745,7 @@ _.first([5, 4, 3, 2, 1]);
<!-- div -->
### `_.flatten(array, shallow)`
<a id="_flattenarray-shallow" href="#_flattenarray-shallow">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1000 "View in source") [&#x24C9;][1]
<a id="_flattenarray-shallow" href="#_flattenarray-shallow">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1035 "View in source") [&#x24C9;][1]
Flattens a nested array *(the nesting can be to any depth)*. If `shallow` is truthy, `array` will only be flattened a single level.
@@ -775,7 +776,7 @@ _.flatten([1, [2], [3, [[4]]]], true);
<!-- div -->
### `_.forEach(collection, callback [, thisArg])`
<a id="_foreachcollection-callback--thisarg" href="#_foreachcollection-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L501 "View in source") [&#x24C9;][1]
<a id="_foreachcollection-callback--thisarg" href="#_foreachcollection-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L536 "View in source") [&#x24C9;][1]
Iterates over a `collection`, executing the `callback` for each value in the `collection`. The `callback` is bound to the `thisArg` value, if one is passed. The `callback` is invoked with `3` arguments; for arrays they are *(value, index, array)* and for objects they are *(value, key, object)*.
@@ -807,7 +808,7 @@ _.forEach({ 'one': 1, 'two': 2, 'three': 3}, function(num) { alert(num); });
<!-- div -->
### `_.functions(object)`
<a id="_functionsobject" href="#_functionsobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1908 "View in source") [&#x24C9;][1]
<a id="_functionsobject" href="#_functionsobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2002 "View in source") [&#x24C9;][1]
Produces a sorted array of the properties, own and inherited, of `object` that have function values.
@@ -834,7 +835,7 @@ _.functions(_);
<!-- div -->
### `_.groupBy(collection, callback [, thisArg])`
<a id="_groupbycollection-callback--thisarg" href="#_groupbycollection-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L525 "View in source") [&#x24C9;][1]
<a id="_groupbycollection-callback--thisarg" href="#_groupbycollection-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L560 "View in source") [&#x24C9;][1]
Splits a `collection` into sets, grouped by the result of running each value through `callback`. The `callback` is invoked with `3` arguments; for arrays they are *(value, index, array)* and for objects they are *(value, key, object)*. The `callback` argument may also be the name of a property to group by.
@@ -866,7 +867,7 @@ _.groupBy(['one', 'two', 'three'], 'length');
<!-- div -->
### `_.has(object, property)`
<a id="_hasobject-property" href="#_hasobject-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1931 "View in source") [&#x24C9;][1]
<a id="_hasobject-property" href="#_hasobject-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2025 "View in source") [&#x24C9;][1]
Checks if the specified object `property` exists and is a direct property, instead of an inherited property.
@@ -894,7 +895,7 @@ _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b');
<!-- div -->
### `_.identity(value)`
<a id="_identityvalue" href="#_identityvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2455 "View in source") [&#x24C9;][1]
<a id="_identityvalue" href="#_identityvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2549 "View in source") [&#x24C9;][1]
This function simply returns the first argument passed to it. Note: It is used throughout Lo-Dash as a default callback.
@@ -922,7 +923,7 @@ moe === _.identity(moe);
<!-- div -->
### `_.indexOf(array, value [, isSorted=false])`
<a id="_indexofarray-value--issortedfalse" href="#_indexofarray-value--issortedfalse">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1037 "View in source") [&#x24C9;][1]
<a id="_indexofarray-value--issortedfalse" href="#_indexofarray-value--issortedfalse">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1072 "View in source") [&#x24C9;][1]
Gets the index at which the first occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `isSorted` will run a faster binary search.
@@ -951,7 +952,7 @@ _.indexOf([1, 2, 3], 2);
<!-- div -->
### `_.initial(array [, n, guard])`
<a id="_initialarray--n-guard" href="#_initialarray--n-guard">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1071 "View in source") [&#x24C9;][1]
<a id="_initialarray--n-guard" href="#_initialarray--n-guard">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1106 "View in source") [&#x24C9;][1]
Gets all but the last value of the `array`. Pass `n` to exclude the last `n` values from the result.
@@ -980,7 +981,7 @@ _.initial([5, 4, 3, 2, 1]);
<!-- div -->
### `_.intersection([array1, array2, ...])`
<a id="_intersectionarray1-array2-" href="#_intersectionarray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1090 "View in source") [&#x24C9;][1]
<a id="_intersectionarray1-array2-" href="#_intersectionarray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1125 "View in source") [&#x24C9;][1]
Computes the intersection of all the passed-in arrays.
@@ -1007,7 +1008,7 @@ _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
<!-- div -->
### `_.invoke(array, methodName [, arg1, arg2, ...])`
<a id="_invokearray-methodname--arg1-arg2-" href="#_invokearray-methodname--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1123 "View in source") [&#x24C9;][1]
<a id="_invokearray-methodname--arg1-arg2-" href="#_invokearray-methodname--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1158 "View in source") [&#x24C9;][1]
Calls the method named by `methodName` for each value of the `collection`. Additional arguments will be passed to each invoked method.
@@ -1036,7 +1037,7 @@ _.invoke([[5, 1, 7], [3, 2, 1]], 'sort');
<!-- div -->
### `_.isArguments(value)`
<a id="_isargumentsvalue" href="#_isargumentsvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1951 "View in source") [&#x24C9;][1]
<a id="_isargumentsvalue" href="#_isargumentsvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2045 "View in source") [&#x24C9;][1]
Checks if a `value` is an `arguments` object.
@@ -1066,7 +1067,7 @@ _.isArguments([1, 2, 3]);
<!-- div -->
### `_.isArray(value)`
<a id="_isarrayvalue" href="#_isarrayvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L192 "View in source") [&#x24C9;][1]
<a id="_isarrayvalue" href="#_isarrayvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L199 "View in source") [&#x24C9;][1]
Checks if a `value` is an array.
@@ -1096,7 +1097,7 @@ _.isArray([1, 2, 3]);
<!-- div -->
### `_.isBoolean(value)`
<a id="_isbooleanvalue" href="#_isbooleanvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1974 "View in source") [&#x24C9;][1]
<a id="_isbooleanvalue" href="#_isbooleanvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2068 "View in source") [&#x24C9;][1]
Checks if a `value` is a boolean *(`true` or `false`)* value.
@@ -1123,7 +1124,7 @@ _.isBoolean(null);
<!-- div -->
### `_.isDate(value)`
<a id="_isdatevalue" href="#_isdatevalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1991 "View in source") [&#x24C9;][1]
<a id="_isdatevalue" href="#_isdatevalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2085 "View in source") [&#x24C9;][1]
Checks if a `value` is a date.
@@ -1150,7 +1151,7 @@ _.isDate(new Date);
<!-- div -->
### `_.isElement(value)`
<a id="_iselementvalue" href="#_iselementvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2008 "View in source") [&#x24C9;][1]
<a id="_iselementvalue" href="#_iselementvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2102 "View in source") [&#x24C9;][1]
Checks if a `value` is a DOM element.
@@ -1177,7 +1178,7 @@ _.isElement(document.body);
<!-- div -->
### `_.isEmpty(value)`
<a id="_isemptyvalue" href="#_isemptyvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L213 "View in source") [&#x24C9;][1]
<a id="_isemptyvalue" href="#_isemptyvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L220 "View in source") [&#x24C9;][1]
Checks if a `value` is empty. Arrays or strings with a length of `0` and objects with no enumerable own properties are considered "empty".
@@ -1207,7 +1208,7 @@ _.isEmpty({});
<!-- div -->
### `_.isEqual(a, b [, stack])`
<a id="_isequala-b--stack" href="#_isequala-b--stack">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2035 "View in source") [&#x24C9;][1]
<a id="_isequala-b--stack" href="#_isequala-b--stack">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2129 "View in source") [&#x24C9;][1]
Performs a deep comparison between two values to determine if they are equivalent to each other.
@@ -1242,7 +1243,7 @@ _.isEqual(moe, clone);
<!-- div -->
### `_.isFinite(value)`
<a id="_isfinitevalue" href="#_isfinitevalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2178 "View in source") [&#x24C9;][1]
<a id="_isfinitevalue" href="#_isfinitevalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2272 "View in source") [&#x24C9;][1]
Checks if a `value` is a finite number.
@@ -1275,7 +1276,7 @@ _.isFinite(Infinity);
<!-- div -->
### `_.isFunction(value)`
<a id="_isfunctionvalue" href="#_isfunctionvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2195 "View in source") [&#x24C9;][1]
<a id="_isfunctionvalue" href="#_isfunctionvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2289 "View in source") [&#x24C9;][1]
Checks if a `value` is a function.
@@ -1302,7 +1303,7 @@ _.isFunction(''.concat);
<!-- div -->
### `_.isNaN(value)`
<a id="_isnanvalue" href="#_isnanvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2243 "View in source") [&#x24C9;][1]
<a id="_isnanvalue" href="#_isnanvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2337 "View in source") [&#x24C9;][1]
Checks if a `value` is `NaN`. Note: this is not the same as native `isNaN`, which will return true for `undefined` and other values. See http://es5.github.com/#x15.1.2.4.
@@ -1338,7 +1339,7 @@ _.isNaN(undefined);
<!-- div -->
### `_.isNull(value)`
<a id="_isnullvalue" href="#_isnullvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2265 "View in source") [&#x24C9;][1]
<a id="_isnullvalue" href="#_isnullvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2359 "View in source") [&#x24C9;][1]
Checks if a `value` is `null`.
@@ -1368,7 +1369,7 @@ _.isNull(undefined);
<!-- div -->
### `_.isNumber(value)`
<a id="_isnumbervalue" href="#_isnumbervalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2282 "View in source") [&#x24C9;][1]
<a id="_isnumbervalue" href="#_isnumbervalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2376 "View in source") [&#x24C9;][1]
Checks if a `value` is a number.
@@ -1395,7 +1396,7 @@ _.isNumber(8.4 * 5;
<!-- div -->
### `_.isObject(value)`
<a id="_isobjectvalue" href="#_isobjectvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2215 "View in source") [&#x24C9;][1]
<a id="_isobjectvalue" href="#_isobjectvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2309 "View in source") [&#x24C9;][1]
Checks if a `value` is an object.
@@ -1425,7 +1426,7 @@ _.isObject(1);
<!-- div -->
### `_.isRegExp(value)`
<a id="_isregexpvalue" href="#_isregexpvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2299 "View in source") [&#x24C9;][1]
<a id="_isregexpvalue" href="#_isregexpvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2393 "View in source") [&#x24C9;][1]
Checks if a `value` is a regular expression.
@@ -1452,7 +1453,7 @@ _.isRegExp(/moe/);
<!-- div -->
### `_.isString(value)`
<a id="_isstringvalue" href="#_isstringvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2316 "View in source") [&#x24C9;][1]
<a id="_isstringvalue" href="#_isstringvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2410 "View in source") [&#x24C9;][1]
Checks if a `value` is a string.
@@ -1479,7 +1480,7 @@ _.isString('moe');
<!-- div -->
### `_.isUndefined(value)`
<a id="_isundefinedvalue" href="#_isundefinedvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2333 "View in source") [&#x24C9;][1]
<a id="_isundefinedvalue" href="#_isundefinedvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2427 "View in source") [&#x24C9;][1]
Checks if a `value` is `undefined`.
@@ -1506,7 +1507,7 @@ _.isUndefined(void 0);
<!-- div -->
### `_.keys(object)`
<a id="_keysobject" href="#_keysobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2350 "View in source") [&#x24C9;][1]
<a id="_keysobject" href="#_keysobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2444 "View in source") [&#x24C9;][1]
Produces an array of the `object`'s enumerable own property names.
@@ -1533,7 +1534,7 @@ _.keys({ 'one': 1, 'two': 2, 'three': 3 });
<!-- div -->
### `_.last(array [, n, guard])`
<a id="_lastarray--n-guard" href="#_lastarray--n-guard">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1153 "View in source") [&#x24C9;][1]
<a id="_lastarray--n-guard" href="#_lastarray--n-guard">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1188 "View in source") [&#x24C9;][1]
Gets the last value of the `array`. Pass `n` to return the lasy `n` values of the `array`.
@@ -1562,7 +1563,7 @@ _.last([5, 4, 3, 2, 1]);
<!-- div -->
### `_.lastIndexOf(array, value)`
<a id="_lastindexofarray-value" href="#_lastindexofarray-value">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1173 "View in source") [&#x24C9;][1]
<a id="_lastindexofarray-value" href="#_lastindexofarray-value">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1208 "View in source") [&#x24C9;][1]
Gets the index at which the last occurrence of `value` is found using strict equality for comparisons, i.e. `===`.
@@ -1590,7 +1591,7 @@ _.lastIndexOf([1, 2, 3, 1, 2, 3], 2);
<!-- div -->
### `_.map(collection, callback [, thisArg])`
<a id="_mapcollection-callback--thisarg" href="#_mapcollection-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L559 "View in source") [&#x24C9;][1]
<a id="_mapcollection-callback--thisarg" href="#_mapcollection-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L594 "View in source") [&#x24C9;][1]
Produces a new array of values by mapping each value in the `collection` through a transformation `callback`. The `callback` is bound to the `thisArg` value, if one is passed. The `callback` is invoked with `3` arguments; for arrays they are *(value, index, array)* and for objects they are *(value, key, object)*.
@@ -1622,7 +1623,7 @@ _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; });
<!-- div -->
### `_.max(collection [, callback, thisArg])`
<a id="_maxcollection--callback-thisarg" href="#_maxcollection--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L586 "View in source") [&#x24C9;][1]
<a id="_maxcollection--callback-thisarg" href="#_maxcollection--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L621 "View in source") [&#x24C9;][1]
Retrieves the maximum value of a `collection`. If `callback` is passed, it will be executed for each value in the `collection` to generate the criterion by which the value is ranked. The `callback` is invoked with `3` arguments; for arrays they are *(value, index, array)* and for objects they are *(value, key, object)*.
@@ -1657,7 +1658,7 @@ _.max(stooges, function(stooge) { return stooge.age; });
<!-- div -->
### `_.memoize(func [, resolver])`
<a id="_memoizefunc--resolver" href="#_memoizefunc--resolver">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1715 "View in source") [&#x24C9;][1]
<a id="_memoizefunc--resolver" href="#_memoizefunc--resolver">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1772 "View in source") [&#x24C9;][1]
Creates a new function that memoizes the result of `func`. If `resolver` is passed, it will be used to determine the cache key for storing the result based on the arguments passed to the memoized function. By default, the first argument passed to the memoized function is used as the cache key.
@@ -1686,7 +1687,7 @@ var fibonacci = _.memoize(function(n) {
<!-- div -->
### `_.min(collection [, callback, thisArg])`
<a id="_mincollection--callback-thisarg" href="#_mincollection--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L607 "View in source") [&#x24C9;][1]
<a id="_mincollection--callback-thisarg" href="#_mincollection--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L642 "View in source") [&#x24C9;][1]
Retrieves the minimum value of a `collection`. If `callback` is passed, it will be executed for each value in the `collection` to generate the criterion by which the value is ranked. The `callback` is invoked with `3` arguments; for arrays they are *(value, index, array)* and for objects they are *(value, key, object)*.
@@ -1715,7 +1716,7 @@ _.min([10, 5, 100, 2, 1000]);
<!-- div -->
### `_.mixin(object)`
<a id="_mixinobject" href="#_mixinobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2481 "View in source") [&#x24C9;][1]
<a id="_mixinobject" href="#_mixinobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2575 "View in source") [&#x24C9;][1]
Adds functions properties of `object` to the `lodash` function and chainable wrapper.
@@ -1748,7 +1749,7 @@ _('larry').capitalize();
<!-- div -->
### `_.noConflict()`
<a id="_noconflict" href="#_noconflict">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2507 "View in source") [&#x24C9;][1]
<a id="_noconflict" href="#_noconflict">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2601 "View in source") [&#x24C9;][1]
Reverts the '_' variable to its previous value and returns a reference to the `lodash` function.
@@ -1771,7 +1772,7 @@ var lodash = _.noConflict();
<!-- div -->
### `_.once(func)`
<a id="_oncefunc" href="#_oncefunc">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1741 "View in source") [&#x24C9;][1]
<a id="_oncefunc" href="#_oncefunc">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1798 "View in source") [&#x24C9;][1]
Creates a new function that is restricted to one execution. Repeat calls to the function will return the value of the first call.
@@ -1797,10 +1798,40 @@ initialize();
<!-- div -->
<!-- div -->
### `_.partial(func [, arg1, arg2, ...])`
<a id="_partialfunc--arg1-arg2-" href="#_partialfunc--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1831 "View in source") [&#x24C9;][1]
Creates a new function that, when called, invokes `func` with any additional `partial` arguments prepended to those passed to the partially applied function. This method is similar `bind`, except it does **not** alter the `this` binding.
#### Arguments
1. `func` *(Function)*: The function to partially apply arguments to.
2. `[arg1, arg2, ...]` *(Mixed)*: Arguments to be partially applied.
#### Returns
*(Function)*: Returns the new partially applied function.
#### Example
~~~ js
var greet = function(greeting, name) { return greeting + ': ' + name; };
var hi = _.partial(greet, 'hi');
hi('moe');
// => 'hi: moe'
~~~
* * *
<!-- /div -->
<!-- div -->
<!-- div -->
### `_.pick(object [, prop1, prop2, ..])`
<a id="_pickobject--prop1-prop2-" href="#_pickobject--prop1-prop2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2372 "View in source") [&#x24C9;][1]
<a id="_pickobject--prop1-prop2-" href="#_pickobject--prop1-prop2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2466 "View in source") [&#x24C9;][1]
Creates an object composed of the specified properties. Property names may be specified as individual arguments or as arrays of property names.
@@ -1828,7 +1859,7 @@ _.pick({ 'name': 'moe', 'age': 40, 'userid': 'moe1' }, 'name', 'age');
<!-- div -->
### `_.pluck(collection, property)`
<a id="_pluckcollection-property" href="#_pluckcollection-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L632 "View in source") [&#x24C9;][1]
<a id="_pluckcollection-property" href="#_pluckcollection-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L667 "View in source") [&#x24C9;][1]
Retrieves the value of a specified property from all values in a `collection`.
@@ -1862,7 +1893,7 @@ _.pluck(stooges, 'name');
<!-- div -->
### `_.range([start=0], end [, step=1])`
<a id="_rangestart0-end--step1" href="#_rangestart0-end--step1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1215 "View in source") [&#x24C9;][1]
<a id="_rangestart0-end--step1" href="#_rangestart0-end--step1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1250 "View in source") [&#x24C9;][1]
Creates an array of numbers *(positive and/or negative)* progressing from `start` up to but not including `stop`. This method is a port of Python's `range()` function. See http://docs.python.org/library/functions.html#range.
@@ -1903,7 +1934,7 @@ _.range(0);
<!-- div -->
### `_.reduce(collection, callback [, accumulator, thisArg])`
<a id="_reducecollection-callback--accumulator-thisarg" href="#_reducecollection-callback--accumulator-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L662 "View in source") [&#x24C9;][1]
<a id="_reducecollection-callback--accumulator-thisarg" href="#_reducecollection-callback--accumulator-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L697 "View in source") [&#x24C9;][1]
Boils down a `collection` to a single value. The initial state of the reduction is `accumulator` and each successive step of it should be returned by the `callback`. The `callback` is bound to the `thisArg` value, if one is passed. The `callback` is invoked with `4` arguments; for arrays they are *(accumulator, value, index, array)* and for objects they are *(accumulator, value, key, object)*.
@@ -1933,7 +1964,7 @@ var sum = _.reduce([1, 2, 3], function(memo, num) { return memo + num; });
<!-- div -->
### `_.reduceRight(collection, callback [, accumulator, thisArg])`
<a id="_reducerightcollection-callback--accumulator-thisarg" href="#_reducerightcollection-callback--accumulator-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L702 "View in source") [&#x24C9;][1]
<a id="_reducerightcollection-callback--accumulator-thisarg" href="#_reducerightcollection-callback--accumulator-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L737 "View in source") [&#x24C9;][1]
The right-associative version of `_.reduce`. The `callback` is bound to the `thisArg` value, if one is passed. The `callback` is invoked with `4` arguments; for arrays they are *(accumulator, value, index, array)* and for objects they are *(accumulator, value, key, object)*.
@@ -1964,7 +1995,7 @@ var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []);
<!-- div -->
### `_.reject(collection, callback [, thisArg])`
<a id="_rejectcollection-callback--thisarg" href="#_rejectcollection-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L755 "View in source") [&#x24C9;][1]
<a id="_rejectcollection-callback--thisarg" href="#_rejectcollection-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L790 "View in source") [&#x24C9;][1]
The opposite of `_.filter`, this method returns the values of a `collection` that `callback` does **not** return truthy for. The `callback` is invoked with `3` arguments; for arrays they are *(value, index, array)* and for objects they are *(value, key, object)*.
@@ -1993,7 +2024,7 @@ var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; });
<!-- div -->
### `_.rest(array [, n, guard])`
<a id="_restarray--n-guard" href="#_restarray--n-guard">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1251 "View in source") [&#x24C9;][1]
<a id="_restarray--n-guard" href="#_restarray--n-guard">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1286 "View in source") [&#x24C9;][1]
The opposite of `_.initial`, this method gets all but the first value of the `array`. Pass `n` to exclude the first `n` values from the result.
@@ -2022,7 +2053,7 @@ _.rest([5, 4, 3, 2, 1]);
<!-- div -->
### `_.result(object, property)`
<a id="_resultobject-property" href="#_resultobject-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2537 "View in source") [&#x24C9;][1]
<a id="_resultobject-property" href="#_resultobject-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2631 "View in source") [&#x24C9;][1]
Resolves the value of `property` on `object`. If the property is a function it will be invoked and its result returned, else the property value is returned.
@@ -2060,7 +2091,7 @@ _.result(object, 'stuff');
<!-- div -->
### `_.shuffle(array)`
<a id="_shufflearray" href="#_shufflearray">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1269 "View in source") [&#x24C9;][1]
<a id="_shufflearray" href="#_shufflearray">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1304 "View in source") [&#x24C9;][1]
Produces a new array of shuffled `array` values, using a version of the Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle.
@@ -2087,7 +2118,7 @@ _.shuffle([1, 2, 3, 4, 5, 6]);
<!-- div -->
### `_.size(collection)`
<a id="_sizecollection" href="#_sizecollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L772 "View in source") [&#x24C9;][1]
<a id="_sizecollection" href="#_sizecollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L807 "View in source") [&#x24C9;][1]
Gets the number of values in the `collection`.
@@ -2114,7 +2145,7 @@ _.size({ 'one': 1, 'two': 2, 'three': 3 });
<!-- div -->
### `_.some(collection, callback [, thisArg])`
<a id="_somecollection-callback--thisarg" href="#_somecollection-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L845 "View in source") [&#x24C9;][1]
<a id="_somecollection-callback--thisarg" href="#_somecollection-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L880 "View in source") [&#x24C9;][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 invoked with `3` arguments; for arrays they are *(value, index, array)* and for objects they are *(value, key, object)*.
@@ -2143,7 +2174,7 @@ _.some([null, 0, 'yes', false]);
<!-- div -->
### `_.sortBy(collection, callback [, thisArg])`
<a id="_sortbycollection-callback--thisarg" href="#_sortbycollection-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L799 "View in source") [&#x24C9;][1]
<a id="_sortbycollection-callback--thisarg" href="#_sortbycollection-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L834 "View in source") [&#x24C9;][1]
Produces a new sorted array, ranked in ascending order by the results of running each value of a `collection` through `callback`. The `callback` is invoked with `3` arguments; for arrays they are *(value, index, array)* and for objects they are *(value, key, object)*. The `callback` argument may also be the name of a property to sort by *(e.g. 'length')*.
@@ -2172,7 +2203,7 @@ _.sortBy([1, 2, 3, 4, 5, 6], function(num) { return Math.sin(num); });
<!-- div -->
### `_.sortedIndex(array, value [, callback])`
<a id="_sortedindexarray-value--callback" href="#_sortedindexarray-value--callback">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1303 "View in source") [&#x24C9;][1]
<a id="_sortedindexarray-value--callback" href="#_sortedindexarray-value--callback">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1338 "View in source") [&#x24C9;][1]
Uses a binary search to determine the smallest index at which the `value` should be inserted into the `collection` in order to maintain the sort order of the `collection`. If `callback` is passed, it will be executed for each value in the `collection` to compute their sort ranking. The `callback` is invoked with `1` argument; *(value)*.
@@ -2201,7 +2232,7 @@ _.sortedIndex([10, 20, 30, 40, 50], 35);
<!-- div -->
### `_.tap(value, interceptor)`
<a id="_tapvalue-interceptor" href="#_tapvalue-interceptor">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2410 "View in source") [&#x24C9;][1]
<a id="_tapvalue-interceptor" href="#_tapvalue-interceptor">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2504 "View in source") [&#x24C9;][1]
Invokes `interceptor` with the `value` as the first argument, and then returns `value`. The primary purpose of this method is to "tap into" a method chain, in order to performoperations on intermediate results within the chain.
@@ -2234,7 +2265,7 @@ _.chain([1,2,3,200])
<!-- div -->
### `_.template(text, data, options)`
<a id="_templatetext-data-options" href="#_templatetext-data-options">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2597 "View in source") [&#x24C9;][1]
<a id="_templatetext-data-options" href="#_templatetext-data-options">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2691 "View in source") [&#x24C9;][1]
A JavaScript micro-templating method, similar to John Resig's implementation. Lo-Dash templating handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code.
@@ -2297,7 +2328,7 @@ _.template('<%= data.hasWith %>', { 'hasWith': 'no' }, { 'variable': 'data' });
<!-- div -->
### `_.throttle(func, wait)`
<a id="_throttlefunc-wait" href="#_throttlefunc-wait">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1772 "View in source") [&#x24C9;][1]
<a id="_throttlefunc-wait" href="#_throttlefunc-wait">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1866 "View in source") [&#x24C9;][1]
Creates a new function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. If the throttled function is invoked more than once, `func` will also be called on the trailing edge of the `wait` timeout.
@@ -2325,7 +2356,7 @@ jQuery(window).on('scroll', throttled);
<!-- div -->
### `_.times(n, callback [, thisArg])`
<a id="_timesn-callback--thisarg" href="#_timesn-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2661 "View in source") [&#x24C9;][1]
<a id="_timesn-callback--thisarg" href="#_timesn-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2755 "View in source") [&#x24C9;][1]
Executes the `callback` function `n` times. The `callback` is invoked with `1` argument; *(index)*.
@@ -2350,7 +2381,7 @@ _.times(3, function() { genie.grantWish(); });
<!-- div -->
### `_.toArray(collection)`
<a id="_toarraycollection" href="#_toarraycollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L864 "View in source") [&#x24C9;][1]
<a id="_toarraycollection" href="#_toarraycollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L899 "View in source") [&#x24C9;][1]
Converts the `collection`, into an array. Useful for converting the `arguments` object.
@@ -2377,7 +2408,7 @@ Converts the `collection`, into an array. Useful for converting the `arguments`
<!-- div -->
### `_.union([array1, array2, ...])`
<a id="_unionarray1-array2-" href="#_unionarray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1336 "View in source") [&#x24C9;][1]
<a id="_unionarray1-array2-" href="#_unionarray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1371 "View in source") [&#x24C9;][1]
Computes the union of the passed-in arrays.
@@ -2404,7 +2435,7 @@ _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
<!-- div -->
### `_.uniq(array [, isSorted=false, callback])`
<a id="_uniqarray--issortedfalse-callback" href="#_uniqarray--issortedfalse-callback">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1371 "View in source") [&#x24C9;][1]
<a id="_uniqarray--issortedfalse-callback" href="#_uniqarray--issortedfalse-callback">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1406 "View in source") [&#x24C9;][1]
Produces a duplicate-value-free version of the `array` using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `isSorted` will run a faster algorithm. If `callback` is passed, each value of `array` is passed through a transformation `callback` before uniqueness is computed. The `callback` is invoked with `3` arguments; *(value, index, array)*.
@@ -2433,7 +2464,7 @@ _.uniq([1, 2, 1, 3, 1, 4]);
<!-- div -->
### `_.uniqueId([prefix])`
<a id="_uniqueidprefix" href="#_uniqueidprefix">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2684 "View in source") [&#x24C9;][1]
<a id="_uniqueidprefix" href="#_uniqueidprefix">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2778 "View in source") [&#x24C9;][1]
Generates a unique id. If `prefix` is passed, the id will be appended to it.
@@ -2460,7 +2491,7 @@ _.uniqueId('contact_');
<!-- div -->
### `_.values(collection)`
<a id="_valuescollection" href="#_valuescollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L892 "View in source") [&#x24C9;][1]
<a id="_valuescollection" href="#_valuescollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L927 "View in source") [&#x24C9;][1]
Produces an array of enumerable own property values of the `collection`.
@@ -2487,9 +2518,9 @@ _.values({ 'one': 1, 'two': 2, 'three': 3 });
<!-- div -->
### `_.without(array [, value1, value2, ...])`
<a id="_withoutarray--value1-value2-" href="#_withoutarray--value1-value2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1409 "View in source") [&#x24C9;][1]
<a id="_withoutarray--value1-value2-" href="#_withoutarray--value1-value2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1444 "View in source") [&#x24C9;][1]
Produces a new array with all occurrences of the values removed using strict equality for comparisons, i.e. `===`.
Produces a new array with all occurrences of the passed values removed using strict equality for comparisons, i.e. `===`.
#### Arguments
1. `array` *(Array)*: The array to filter.
@@ -2515,7 +2546,7 @@ _.without([1, 2, 1, 0, 3, 1, 4], 0, 1);
<!-- div -->
### `_.wrap(func, wrapper [, arg1, arg2, ...])`
<a id="_wrapfunc-wrapper--arg1-arg2-" href="#_wrapfunc-wrapper--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1824 "View in source") [&#x24C9;][1]
<a id="_wrapfunc-wrapper--arg1-arg2-" href="#_wrapfunc-wrapper--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1918 "View in source") [&#x24C9;][1]
Create a new function that passes the `func` function to the `wrapper` function as its first argument. Additional arguments are appended to those passed to the `wrapper` function.
@@ -2548,7 +2579,7 @@ hello();
<!-- div -->
### `_.zip([array1, array2, ...])`
<a id="_ziparray1-array2-" href="#_ziparray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1439 "View in source") [&#x24C9;][1]
<a id="_ziparray1-array2-" href="#_ziparray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1474 "View in source") [&#x24C9;][1]
Merges together the values of each of the arrays with the value at the corresponding position. Useful for separate data sources that are coordinated through matching array indexes. For a matrix of nested arrays, `_.zip.apply(...)` can transpose the matrix in a similar fashion.
@@ -2582,7 +2613,7 @@ _.zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]);
<!-- div -->
### `_.prototype.chain()`
<a id="_prototypechain" href="#_prototypechain">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2730 "View in source") [&#x24C9;][1]
<a id="_prototypechain" href="#_prototypechain">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2824 "View in source") [&#x24C9;][1]
Extracts the value from a wrapped chainable object.
@@ -2606,7 +2637,7 @@ _([1, 2, 3]).value();
<!-- div -->
### `_.prototype.value()`
<a id="_prototypevalue" href="#_prototypevalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2747 "View in source") [&#x24C9;][1]
<a id="_prototypevalue" href="#_prototypevalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2841 "View in source") [&#x24C9;][1]
Extracts the value from a wrapped chainable object.
@@ -2637,7 +2668,7 @@ _([1, 2, 3]).value();
<!-- div -->
### `_.templateSettings`
<a id="_templatesettings" href="#_templatesettings">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2772 "View in source") [&#x24C9;][1]
<a id="_templatesettings" href="#_templatesettings">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2866 "View in source") [&#x24C9;][1]
*(Object)*: By default, Lo-Dash uses ERB-style template delimiters, change the following template settings to use alternative delimiters.
@@ -2652,7 +2683,7 @@ _([1, 2, 3]).value();
<!-- div -->
### `_.templateSettings.escape`
<a id="_templatesettingsescape" href="#_templatesettingsescape">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2781 "View in source") [&#x24C9;][1]
<a id="_templatesettingsescape" href="#_templatesettingsescape">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2875 "View in source") [&#x24C9;][1]
*(RegExp)*: Used to detect `data` property values to be HTML-escaped.
@@ -2667,7 +2698,7 @@ _([1, 2, 3]).value();
<!-- div -->
### `_.templateSettings.evaluate`
<a id="_templatesettingsevaluate" href="#_templatesettingsevaluate">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2790 "View in source") [&#x24C9;][1]
<a id="_templatesettingsevaluate" href="#_templatesettingsevaluate">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2884 "View in source") [&#x24C9;][1]
*(RegExp)*: Used to detect code to be evaluated.
@@ -2682,7 +2713,7 @@ _([1, 2, 3]).value();
<!-- div -->
### `_.templateSettings.interpolate`
<a id="_templatesettingsinterpolate" href="#_templatesettingsinterpolate">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2799 "View in source") [&#x24C9;][1]
<a id="_templatesettingsinterpolate" href="#_templatesettingsinterpolate">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2893 "View in source") [&#x24C9;][1]
*(RegExp)*: Used to detect `data` property values to inject.

View File

@@ -70,7 +70,7 @@
/* Used if `Function#bind` exists and is inferred to be fast (i.e. all but V8) */
var nativeBind = reNative.test(nativeBind = slice.bind) &&
(/\n/.test(nativeBind) || toString.call(window.opera) == '[object Opera]') && nativeBind;
/\n|Opera/.test(nativeBind + toString.call(window.opera)) && nativeBind;
/* Native method shortcuts for methods with the same name as other `lodash` methods */
var nativeIsArray = reNative.test(nativeIsArray = Array.isArray) && nativeIsArray,
@@ -1516,16 +1516,16 @@
/**
* Creates a new function that, when called, invokes `func` with the `this`
* binding of `thisArg` and prepends additional arguments to those passed to
* the bound function. Lazy defined methods may be bound by passing the object
* they are bound to as `func` and the method name as `thisArg`.
* binding of `thisArg` and prepends any additional `bind` arguments to those
* passed to the bound function. Lazy defined methods may be bound by passing
* the object they are bound to as `func` and the method name as `thisArg`.
*
* @static
* @memberOf _
* @category Functions
* @param {Function|Object} func The function to bind or the object the method belongs to.
* @param @param {Mixed} [thisArg] The `this` binding of `func` or the method name.
* @param {Mixed} [arg1, arg2, ...] Arguments to prepend to those passed to the bound function.
* @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied.
* @returns {Function} Returns the new bound function.
* @example
*
@@ -1563,11 +1563,11 @@
methodName = thisArg;
thisArg = func;
}
// use native `Function#bind` if faster
// use if `Function#bind` is faster
else if (nativeBind) {
func = nativeBind.call.apply(nativeBind, arguments);
return function() {
return func.apply(undefined, arguments);
return arguments.length ? func.apply(undefined, arguments) : func();
};
}
@@ -1809,6 +1809,43 @@
};
}
/**
* Creates a new function that, when called, invokes `func` with any additional
* `partial` arguments prepended to those passed to the partially applied
* function. This method is similar `bind`, except it does **not** alter the
* `this` binding.
*
* @static
* @memberOf _
* @category Functions
* @param {Function} func The function to partially apply arguments to.
* @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied.
* @returns {Function} Returns the new partially applied function.
* @example
*
* var greet = function(greeting, name) { return greeting + ': ' + name; };
* var hi = _.partial(greet, 'hi');
* hi('moe');
* // => 'hi: moe'
*/
function partial(func) {
var args = slice.call(arguments, 1),
argsLength = args.length;
return function() {
var result,
others = arguments;
if (others.length) {
args.length = argsLength;
push.apply(args, others);
}
result = args.length == 1 ? func.call(this, args[0]) : func.apply(this, args);
args.length = argsLength;
return result;
};
}
/**
* Creates a new function that, when executed, will only call the `func`
* function at most once per every `wait` milliseconds. If the throttled function
@@ -2912,6 +2949,7 @@
'mixin': mixin,
'noConflict': noConflict,
'once': once,
'partial': partial,
'pick': pick,
'pluck': pluck,
'range': range,

47
lodash.min.js vendored
View File

@@ -2,26 +2,27 @@
Lo-Dash 0.1.0 github.com/bestiejs/lodash/blob/master/LICENSE.txt
Underscore.js 1.3.3 github.com/documentcloud/underscore/blob/master/LICENSE
*/
;(function(u,k){"use strict";var n=!0,t=!1;function M(a){return"[object Arguments]"==i.call(a)}function j(a){return new p(a)}function p(a){this.m=a}function qa(a,b){return q[b]}function ra(a){return"\\"+sa[a]}function g(){for(var a,b=-1,c={},d={},e={},f=["c","i","f"];++b<arguments.length;)for(a in arguments[b])e[a]=arguments[b][a];for(;a=f.pop();)"object"==typeof e[a]?(c[a]=e[a].b,d[a]=e[a].j):c[a]=d[a]=e[a]||"";a=e.a;var b=/^[^,]+/.exec(a)[0],f=e.g,h=e.h,N=!("w"==b||"b"==h),h=!("c"==b||"a"==h),g=e.l!==t;return Function("d,e,j,m,n,o,q,r,s,t,x,C,E,H,I,l,J",
'"use strict";return function('+a+"){"+("var p,B"+(f?"="+f:""))+";"+(e.e||"if(!"+b+")return B")+";"+(e.k||"")+";"+(N?"var v="+b+".length;p=-1;"+((h?"if(v===+v){":"")+(c.c||"")+";while("+(c.i||"++p<v")+"){"+c.f+"}"+(h?"}":"")):"")+(h?(N?"else{":"")+(d.c||"")+";for("+(d.i||"p in "+b)+"){"+(g?"if(n.call("+/\S+$/.exec(d.i||b)[0]+",p)){":"")+d.f+(g?"}":"")+"}"+(N?"}":""):"")+(e.d||"")+";return B}")(C,w,z,o,v,Y,r,Infinity,D,Z,Math,l,E,i,n,t)}function ta(a,b){var c=q.length;q[c]="'+((__t=("+b+"))==null?'':__e(__t))+'";
return O+c}function ua(a,b){var c=q.length;q[c]="'+((__t=("+b+"))==null?'':__t)+'";return O+c}function va(a,b){var c=q.length;q[c]="';"+b+";__p+='";return O+c}function $(a,b,c,d){if(!a)return c;var e=a.length,f=3>arguments.length;d&&(b=w(b,d));if(e===+e){for(e&&f&&(c=a[--e]);e--;)c=b(c,a[e],e,a);return c}var h=P(a);for((e=h.length)&&f&&(c=a[h[--e]]);e--;)f=h[e],c=b(c,a[f],f,a);return c}function Q(a,b,c){return b==k||c?a[0]:l.call(a,0,b)}function aa(a,b){if(b)return z.apply(s,a);for(var c,d=-1,e=a.length,
f=[];++d<e;)c=a[d],D(c)?F.apply(f,aa(c)):f.push(c);return f}function r(a,b,c){var d;if(!a)return-1;if(c)return c=ba(a,b),a[c]===b?c:-1;c=0;for(d=a.length;c<d;c++)if(a[c]===b)return c;return-1}function ca(a){for(var b,c=-1,d=a.length,e=l.call(arguments,1),f=[];++c<d;)b=a[c],0>r(f,b)&&R(e,function(a){return-1<r(a,b)})&&f.push(b);return f}function da(a,b,c){return l.call(a,b==k||c?1:b)}function ba(a,b,c){var d,e=0,f=a.length;for(c&&(b=c(b));e<f;)d=e+f>>1,(c?c(a[d]):a[d])<b?e=d+1:f=d;return e}function ea(a,
b,c){var d,e=-1,f=a.length,h=[],g=[];for(3>f&&(b=n);++e<f;)if(d=c?c(a[e]):a[e],b?!e||g[g.length-1]!==d:0>r(g,d))g.push(d),h.push(a[e]);return h}function w(a,b){var c=l.call(arguments,2),d=c.length,e=i.call(a)==o;if(!e)var f=b,b=a;return function(){F.apply(c,arguments);var h=(e?a:b[f]).apply(b,c);c.length=d;return h}}function S(a,b,c){c||(c=[]);if(a===b)return 0!==a||1/a==1/b;if(a==k||b==k)return a===b;a.n&&(a=a.m);b.n&&(b=b.m);if(a.isEqual&&i.call(a.isEqual)==o)return a.isEqual(b);if(b.isEqual&&i.call(b.isEqual)==
o)return b.isEqual(a);var d=i.call(a);if(d!=i.call(b))return t;switch(d){case E:return a==""+b;case G:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case fa:case ga:return+a==+b;case ha:return a.source==b.source&&a.global==b.global&&a.multiline==b.multiline&&a.ignoreCase==b.ignoreCase}if("object"!=typeof a||"object"!=typeof b)return t;for(var e=c.length;e--;)if(c[e]==a)return n;var e=n,f=0;c.push(a);if(d==C){if(f=a.length,e=f==b.length)for(;f--&&(e=f in a==f in b&&S(a[f],b[f],c)););}else{if("constructor"in
a!="constructor"in b||a.constructor!=b.constructor)return t;for(var h in a)if(v.call(a,h)&&(f++,!(e=v.call(b,h)&&S(a[h],b[h],c))))break;if(e){for(h in b)if(v.call(b,h)&&!f--)break;e=!f}}c.pop();return e}function ia(a){return(a+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")}function Y(a){return a}function ja(a){A(H(a),function(b){var c=j[b]=a[b];j.prototype[b]=function(){var a=[this.m];F.apply(a,arguments);a=c.apply(j,a);return this.n?
(new p(a)).chain():a}})}var sa={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},T="object"==typeof exports&&exports&&("object"==typeof global&&global&&global==global.global&&(u=global),exports),wa=0,xa=u._,ya=/__token__(\d+)/g,za=/\\|['\n\r\t\u2028\u2029]/g,O="__token__",q=[],C="[object Array]",fa="[object Boolean]",ga="[object Date]",o="[object Function]",G="[object Number]",ha="[object RegExp]",E="[object String]",s=Array.prototype,I=Object.prototype,z=s.concat,v=
I.hasOwnProperty,Aa=s.join,F=s.push,l=s.slice,i=I.toString,Ba=u.isFinite,I=Object.keys,Ca=u.clearTimeout,J=u.setTimeout,x={g:"I",f:"if(!f(h[p],p,h))return!B"},U={a:"w",g:"w",k:"for(var D,j=1,v=arguments.length;j<v;j++){D=arguments[j]",i:"p in D",l:t,f:"w[p]=D[p]",d:"}"},B={g:"[]",f:"f(h[p],p,h)&&B.push(h[p])"},m={a:"h,f,G",g:"h",k:"if(!f){f=o}else if(G){f=e(f,G)}",f:"f(h[p],p,h)"},V={g:"",e:"if(!h)return[]",c:{b:"B=Array(v)",j:"B=[]"},f:{b:"B[p]=f(h[p],p,h)",j:"B.push(f(h[p],p,h))"}},y={k:"var k,i=-r,B=i;if(!f){if(s(h)&&h[0]===+h[0])return x.max.apply(x,h);if(t(h))return B}else if(G)f=e(f,G)",
f:"k=f?f(h[p],p,h):h[p];if(k>=i)i=k,B=h[p]"},D=Array.isArray||function(a){return i.call(a)==C},Z=g({a:"K",h:"b",g:"I",k:"var g=H.call(K);if(g==d||g==E)return!K.length",f:"return l"}),ka=g({a:"h,F",g:"l",f:"if(h[p]===F)return I"}),R=g(m,x),la=g(m,B),ma=g(m,{f:"if(f(h[p],p,h))return h[p]"}),A=g(m),Da=g(m,{g:"{}",k:"var z,u=H.call(f)==m;if(u&&G)f=e(f,G)",f:"z=u?f(h[p],p,h):h[p][f];(B[z]||(B[z]=[])).push(h[p])"}),W=g(m,V),na=g(m,y),y=g(m,y,{k:y.k.replace("-","").replace("max","min"),f:y.f.replace(">=",
"<")}),K=g(V,{a:"h,A",f:{b:"B[p]=h[p][A]",j:"B.push(h[p][A])"}}),X=g({a:"h,f,a,G",g:"a",k:"var y=arguments.length<3;if(G)f=e(f,G)",c:{b:"if(y)B=h[++p]"},f:{b:"B=f(B,h[p],p,h)",j:"B=y?(y=l,h[p]):f(B,h[p],p,h)"}}),B=g(m,B,{f:"!"+B.f}),x=g(m,x,{g:"l",f:x.f.replace("!","")}),oa=g(V,{a:"h",f:{b:"B[p]=h[p]",j:"B.push(h[p])"}}),pa=g(U,{f:"if(w[p]==J)"+U.f}),L=g(U),H=g({a:"w",g:"[]",l:t,f:"if(H.call(w[p])==m)B.push(p)",d:"B.sort()"});M(arguments)||(M=function(a){return!(!a||!v.call(a,"callee"))});var P=I||
g({a:"w",e:"if(w!==Object(w))throw TypeError()",g:"[]",f:"B.push(p)"});L(j,{VERSION:"0.1.0",templateSettings:{escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g},after:function(a,b){return 1>a?b():function(){if(1>--a)return b.apply(this,arguments)}},bind:w,bindAll:function(a){var b=arguments,c=1;1==b.length&&(c=0,b=H(a));for(var d=b.length;c<d;c++)a[b[c]]=w(a[b[c]],a);return a},chain:function(a){return(new p(a)).chain()},clone:function(a){return a!==Object(a)?a:D(a)?
a.slice():L({},a)},compact:function(a){for(var b=-1,c=a.length,d=[];++b<c;)a[b]&&d.push(a[b]);return d},compose:function(){var a=arguments;return function(){for(var b=arguments,c=a.length;c--;)b=[a[c].apply(this,b)];return b[0]}},contains:ka,debounce:function(a,b,c){function d(){g=k;c||a.apply(h,e)}var e,f,h,g;return function(){var i=c&&!g;e=arguments;h=this;Ca(g);g=J(d,b);i&&(f=a.apply(h,e));return f}},defaults:pa,defer:function(a){var b=l.call(arguments,1);return J(function(){return a.apply(k,b)},
1)},delay:function(a,b){var c=l.call(arguments,2);return J(function(){return a.apply(k,c)},b)},difference:function(a){for(var b=-1,c=a.length,d=[],e=z.apply(d,l.call(arguments,1));++b<c;)0>r(e,a[b])&&d.push(a[b]);return d},escape:ia,every:R,extend:L,filter:la,find:ma,first:Q,flatten:aa,forEach:A,functions:H,groupBy:Da,has:function(a,b){return v.call(a,b)},identity:Y,indexOf:r,initial:function(a,b,c){return l.call(a,0,-(b==k||c?1:b))},intersection:ca,invoke:function(a,b){for(var c=l.call(arguments,
2),d=-1,e=a.length,f=i.call(b)==o,h=[];++d<e;)h[d]=(f?b:a[d][b]).apply(a[d],c);return h},isArguments:M,isArray:D,isBoolean:function(a){return a===n||a===t||i.call(a)==fa},isDate:function(a){return i.call(a)==ga},isElement:function(a){return!!(a&&1==a.nodeType)},isEmpty:Z,isEqual:S,isFinite:function(a){return Ba(a)&&i.call(a)==G},isFunction:function(a){return i.call(a)==o},isNaN:function(a){return i.call(a)==G&&a!=+a},isNull:function(a){return null===a},isNumber:function(a){return i.call(a)==G},isObject:function(a){return a===
Object(a)},isRegExp:function(a){return i.call(a)==ha},isString:function(a){return i.call(a)==E},isUndefined:function(a){return a===k},keys:P,last:function(a,b,c){var d=a.length;return b==k||c?a[d-1]:l.call(a,-b||d)},lastIndexOf:function(a,b){if(!a)return-1;for(var c=a.length;c--;)if(a[c]===b)return c;return-1},map:W,max:na,memoize:function(a,b){var c={};return function(){var d=b?b.apply(this,arguments):arguments[0];return v.call(c,d)?c[d]:c[d]=a.apply(this,arguments)}},min:y,mixin:ja,noConflict:function(){u._=
xa;return this},once:function(a){var b,c=t;return function(){if(c)return b;c=n;return b=a.apply(this,arguments)}},pick:function(a){for(var b,c=0,d=z.apply(s,arguments),e=d.length,f={};++c<e;)b=d[c],b in a&&(f[b]=a[b]);return f},pluck:K,range:function(a,b,c){c||(c=1);2>arguments.length&&(b=a||0,a=0);for(var d=-1,e=Math.max(Math.ceil((b-a)/c),0),f=Array(e);++d<e;)f[d]=a,a+=c;return f},reduce:X,reduceRight:$,reject:B,rest:da,result:function(a,b){if(!a)return null;var c=a[b];return i.call(c)==o?a[b]():
c},shuffle:function(a){for(var b,c=-1,d=a.length,e=Array(d);++c<d;)b=Math.floor(Math.random()*(c+1)),e[c]=e[b],e[b]=a[c];return e},size:function(a){var b=i.call(a);return b==C||b==E?a.length:P(a).length},some:x,sortBy:function(a,b,c){if(i.call(b)!=o)var d=b,b=function(a){return a[d]};else c&&(b=w(b,c));return K(W(a,function(c,d){return{a:b(c,d,a),b:c}}).sort(function(a,b){var c=a.a,d=b.a;return c===k?1:d===k?-1:c<d?-1:c>d?1:0}),"b")},sortedIndex:ba,tap:function(a,b){b(a);return a},template:function(a,
b,c){var c=pa(c||{},j.templateSettings),d;d=c.escape;var e=c.evaluate,f=c.interpolate,c=c.variable;d&&(a=a.replace(d,ta));f&&(a=a.replace(f,ua));e&&(a=a.replace(e,va));a="__p='"+a.replace(za,ra).replace(ya,qa)+"';\n";q.length=0;c||(a="with(object||{}){"+a+"}");a="function("+(c||"object")+'){var __p,__t;function print(){__p+=__j.call(arguments,"")}'+a+"return __p}";d=Function("_,__e,__j","return "+a)(j,ia,Aa);if(b)return d(b);d.source=a;return d},throttle:function(a,b){function c(){g=new Date;h=k;
a.apply(f,d)}var d,e,f,h,g=0;return function(){var i=new Date,j=b-(i-g);d=arguments;f=this;0>=j?(g=i,e=a.apply(f,d)):h||(h=J(c,j));return e}},times:function(a,b,c){c&&(b=w(b,c));for(c=0;c<a;c++)b(c)},toArray:function(a){if(!a)return[];if(i.call(a.toArray)==o)return a.toArray();var b=a.length;return b===+b?l.call(a):oa(a)},union:function(){for(var a=-1,b=[],c=z.apply(b,arguments),d=c.length;++a<d;)0>r(b,c[a])&&b.push(c[a]);return b},uniq:ea,uniqueId:function(a){var b=wa++;return a?a+b:b},values:oa,
without:function(a){for(var b=l.call(arguments,1),c=-1,d=a.length,e=[];++c<d;)0>r(b,a[c])&&e.push(a[c]);return e},wrap:function(a,b){return function(){var c=[a];F.apply(c,arguments);return b.apply(this,c)}},zip:function(){for(var a=-1,b=na(K(arguments,"length")),c=Array(b);++a<b;)c[a]=K(arguments,a);return c},all:R,any:x,collect:W,detect:ma,each:A,foldl:X,foldr:$,head:Q,include:ka,inject:X,intersect:ca,methods:H,select:la,tail:da,take:Q,unique:ea});p.prototype=j.prototype;ja(j);A("pop,push,reverse,shift,sort,splice,unshift".split(","),
function(a){var b=s[a];j.prototype[a]=function(){var a=this.m;b.apply(a,arguments);a.length===0&&delete a[0];return this.n?(new p(a)).chain():a}});A(["concat","join","slice"],function(a){var b=s[a];p.prototype[a]=function(){var a=b.apply(this.m,arguments);return this.n?(new p(a)).chain():a}});L(p.prototype,{chain:function(){this.n=n;return this},value:function(){return this.m}});T?"object"==typeof module&&module&&module.o==T?(module.o=j)._=j:T._=j:(u._=j,"function"==typeof define&&"object"==typeof define.amd&&
define.amd&&define(function(){return j}))})(this);
;(function(q,k){"use strict";var o=!0,u=!1;function P(a){return"[object Arguments]"==h.call(a)}function l(a){return new m(a)}function m(a){this.m=a}function ra(a,b){return r[b]}function sa(a){return"\\"+ta[a]}function i(){for(var a,b=-1,c={},d={},e={},f=["c","i","f"];++b<arguments.length;)for(a in arguments[b])e[a]=arguments[b][a];for(;a=f.pop();)"object"==typeof e[a]?(c[a]=e[a].b,d[a]=e[a].j):c[a]=d[a]=e[a]||"";a=e.a;var b=/^[^,]+/.exec(a)[0],f=e.g,g=e.h,Q=!("w"==b||"b"==g),g=!("c"==b||"a"==g),i=e.l!==u;return Function("d,e,j,m,n,o,q,r,s,t,x,C,E,H,I,l,J",
'"use strict";return function('+a+"){"+("var p,B"+(f?"="+f:""))+";"+(e.e||"if(!"+b+")return B")+";"+(e.k||"")+";"+(Q?"var v="+b+".length;p=-1;"+((g?"if(v===+v){":"")+(c.c||"")+";while("+(c.i||"++p<v")+"){"+c.f+"}"+(g?"}":"")):"")+(g?(Q?"else{":"")+(d.c||"")+";for("+(d.i||"p in "+b)+"){"+(i?"if(n.call("+/\S+$/.exec(d.i||b)[0]+",p)){":"")+d.f+(i?"}":"")+"}"+(Q?"}":""):"")+(e.d||"")+";return B}")(H,x,D,p,v,$,s,Infinity,I,aa,Math,j,J,h,o,u)}function ua(a,b){var c=r.length;r[c]="'+((__t=("+b+"))==null?'':__e(__t))+'";
return R+c}function va(a,b){var c=r.length;r[c]="'+((__t=("+b+"))==null?'':__t)+'";return R+c}function wa(a,b){var c=r.length;r[c]="';"+b+";__p+='";return R+c}function ba(a,b,c,d){if(!a)return c;var e=a.length,f=3>arguments.length;d&&(b=x(b,d));if(e===+e){for(e&&f&&(c=a[--e]);e--;)c=b(c,a[e],e,a);return c}var g=S(a);for((e=g.length)&&f&&(c=a[g[--e]]);e--;)f=g[e],c=b(c,a[f],f,a);return c}function T(a,b,c){return b==k||c?a[0]:j.call(a,0,b)}function ca(a,b){if(b)return D.apply(t,a);for(var c,d=-1,e=
a.length,f=[];++d<e;)c=a[d],I(c)?E.apply(f,ca(c)):f.push(c);return f}function s(a,b,c){var d;if(!a)return-1;if(c)return c=da(a,b),a[c]===b?c:-1;c=0;for(d=a.length;c<d;c++)if(a[c]===b)return c;return-1}function ea(a){for(var b,c=-1,d=a.length,e=j.call(arguments,1),f=[];++c<d;)b=a[c],0>s(f,b)&&U(e,function(a){return-1<s(a,b)})&&f.push(b);return f}function fa(a,b,c){return j.call(a,b==k||c?1:b)}function da(a,b,c){var d,e=0,f=a.length;for(c&&(b=c(b));e<f;)d=e+f>>1,(c?c(a[d]):a[d])<b?e=d+1:f=d;return e}
function ga(a,b,c){var d,e=-1,f=a.length,g=[],h=[];for(3>f&&(b=o);++e<f;)if(d=c?c(a[e]):a[e],b?!e||h[h.length-1]!==d:0>s(h,d))h.push(d),g.push(a[e]);return g}function x(a,b){var c,d=h.call(a)==p;if(d){if(y)return a=y.call.apply(y,arguments),function(){return arguments.length?a.apply(k,arguments):a()}}else c=b,b=a;var e=j.call(arguments,2),f=e.length;return function(){var g;g=arguments;d||(a=b[c]);f&&(g.length&&(e.length=f,E.apply(e,g)),g=e);g=g.length?a.apply(b,g):a.call(b);e.length=f;return g}}function V(a,
b,c){c||(c=[]);if(a===b)return 0!==a||1/a==1/b;if(a==k||b==k)return a===b;a.n&&(a=a.m);b.n&&(b=b.m);if(a.isEqual&&h.call(a.isEqual)==p)return a.isEqual(b);if(b.isEqual&&h.call(b.isEqual)==p)return b.isEqual(a);var d=h.call(a);if(d!=h.call(b))return u;switch(d){case J:return a==""+b;case K:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case ha:case ia:return+a==+b;case ja:return a.source==b.source&&a.global==b.global&&a.multiline==b.multiline&&a.ignoreCase==b.ignoreCase}if("object"!=typeof a||"object"!=typeof b)return u;
for(var e=c.length;e--;)if(c[e]==a)return o;var e=o,f=0;c.push(a);if(d==H){if(f=a.length,e=f==b.length)for(;f--&&(e=f in a==f in b&&V(a[f],b[f],c)););}else{if("constructor"in a!="constructor"in b||a.constructor!=b.constructor)return u;for(var g in a)if(v.call(a,g)&&(f++,!(e=v.call(b,g)&&V(a[g],b[g],c))))break;if(e){for(g in b)if(v.call(b,g)&&!f--)break;e=!f}}c.pop();return e}function ka(a){return(a+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,
"&#x2F;")}function $(a){return a}function la(a){F(L(a),function(b){var c=l[b]=a[b];m.prototype[b]=function(){var a=[this.m];E.apply(a,arguments);a=c.apply(l,a);return this.n?(new m(a)).chain():a}})}var ta={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},W="object"==typeof exports&&exports&&("object"==typeof global&&global&&global==global.global&&(q=global),exports),xa=0,ya=q._,w=/\{\s*\[native code\]\s*\}/,za=/__token__(\d+)/g,Aa=/\\|['\n\r\t\u2028\u2029]/g,R="__token__",
r=[],H="[object Array]",ha="[object Boolean]",ia="[object Date]",p="[object Function]",K="[object Number]",ja="[object RegExp]",J="[object String]",t=Array.prototype,z=Object.prototype,D=t.concat,v=z.hasOwnProperty,Ba=t.join,E=t.push,j=t.slice,h=z.toString,y=w.test(y=j.bind)&&/\n|Opera/.test(y+h.call(q.opera))&&y,A=w.test(A=Array.isArray)&&A,Ca=q.isFinite,X=w.test(X=Object.keys)&&X,Da=q.clearTimeout,M=q.setTimeout,B={g:"I",f:"if(!f(h[p],p,h))return!B"},w={a:"w",g:"w",k:"for(var D,j=1,v=arguments.length;j<v;j++){D=arguments[j]",
i:"p in D",l:u,f:"w[p]=D[p]",d:"}"},G={g:"[]",f:"f(h[p],p,h)&&B.push(h[p])"},n={a:"h,f,G",g:"h",k:"if(!f){f=o}else if(G){f=e(f,G)}",f:"f(h[p],p,h)"},z={g:"",e:"if(!h)return[]",c:{b:"B=Array(v)",j:"B=[]"},f:{b:"B[p]=f(h[p],p,h)",j:"B.push(f(h[p],p,h))"}},C={k:"var k,i=-r,B=i;if(!f){if(s(h)&&h[0]===+h[0])return x.max.apply(x,h);if(t(h))return B}else if(G)f=e(f,G)",f:"k=f?f(h[p],p,h):h[p];if(k>=i)i=k,B=h[p]"},I=A||function(a){return h.call(a)==H},aa=i({a:"K",h:"b",g:"I",k:"var g=H.call(K);if(g==d||g==E)return!K.length",
f:"return l"}),A=i({a:"h,F",g:"l",f:"if(h[p]===F)return I"}),U=i(n,B),ma=i(n,G),na=i(n,{f:"if(f(h[p],p,h))return h[p]"}),F=i(n),Ea=i(n,{g:"{}",k:"var z,u=H.call(f)==m;if(u&&G)f=e(f,G)",f:"z=u?f(h[p],p,h):h[p][f];(B[z]||(B[z]=[])).push(h[p])"}),Y=i(n,z),oa=i(n,C),C=i(n,C,{k:C.k.replace("-","").replace("max","min"),f:C.f.replace(">=","<")}),N=i(z,{a:"h,A",f:{b:"B[p]=h[p][A]",j:"B.push(h[p][A])"}}),Z=i({a:"h,f,a,G",g:"a",k:"var y=arguments.length<3;if(G)f=e(f,G)",c:{b:"if(y)B=h[++p]"},f:{b:"B=f(B,h[p],p,h)",
j:"B=y?(y=l,h[p]):f(B,h[p],p,h)"}}),G=i(n,G,{f:"!"+G.f}),B=i(n,B,{g:"l",f:B.f.replace("!","")}),pa=i(z,{a:"h",f:{b:"B[p]=h[p]",j:"B.push(h[p])"}}),qa=i(w,{f:"if(w[p]==J)"+w.f}),O=i(w),L=i({a:"w",g:"[]",l:u,f:"if(H.call(w[p])==m)B.push(p)",d:"B.sort()"});P(arguments)||(P=function(a){return!(!a||!v.call(a,"callee"))});var S=X||i({a:"w",e:"if(w!==Object(w))throw TypeError()",g:"[]",f:"B.push(p)"});O(l,{VERSION:"0.1.0",templateSettings:{escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g},
after:function(a,b){return 1>a?b():function(){if(1>--a)return b.apply(this,arguments)}},bind:x,bindAll:function(a){var b=arguments,c=1;1==b.length&&(c=0,b=L(a));for(var d=b.length;c<d;c++)a[b[c]]=x(a[b[c]],a);return a},chain:function(a){return(new m(a)).chain()},clone:function(a){return a!==Object(a)?a:I(a)?a.slice():O({},a)},compact:function(a){for(var b=-1,c=a.length,d=[];++b<c;)a[b]&&d.push(a[b]);return d},compose:function(){var a=arguments;return function(){for(var b=arguments,c=a.length;c--;)b=
[a[c].apply(this,b)];return b[0]}},contains:A,debounce:function(a,b,c){function d(){h=k;c||a.apply(g,e)}var e,f,g,h;return function(){var i=c&&!h;e=arguments;g=this;Da(h);h=M(d,b);i&&(f=a.apply(g,e));return f}},defaults:qa,defer:function(a){var b=j.call(arguments,1);return M(function(){return a.apply(k,b)},1)},delay:function(a,b){var c=j.call(arguments,2);return M(function(){return a.apply(k,c)},b)},difference:function(a){for(var b=-1,c=a.length,d=[],e=D.apply(d,j.call(arguments,1));++b<c;)0>s(e,
a[b])&&d.push(a[b]);return d},escape:ka,every:U,extend:O,filter:ma,find:na,first:T,flatten:ca,forEach:F,functions:L,groupBy:Ea,has:function(a,b){return v.call(a,b)},identity:$,indexOf:s,initial:function(a,b,c){return j.call(a,0,-(b==k||c?1:b))},intersection:ea,invoke:function(a,b){for(var c=j.call(arguments,2),d=-1,e=a.length,f=h.call(b)==p,g=[];++d<e;)g[d]=(f?b:a[d][b]).apply(a[d],c);return g},isArguments:P,isArray:I,isBoolean:function(a){return a===o||a===u||h.call(a)==ha},isDate:function(a){return h.call(a)==
ia},isElement:function(a){return!!(a&&1==a.nodeType)},isEmpty:aa,isEqual:V,isFinite:function(a){return Ca(a)&&h.call(a)==K},isFunction:function(a){return h.call(a)==p},isNaN:function(a){return h.call(a)==K&&a!=+a},isNull:function(a){return null===a},isNumber:function(a){return h.call(a)==K},isObject:function(a){return a===Object(a)},isRegExp:function(a){return h.call(a)==ja},isString:function(a){return h.call(a)==J},isUndefined:function(a){return a===k},keys:S,last:function(a,b,c){var d=a.length;
return b==k||c?a[d-1]:j.call(a,-b||d)},lastIndexOf:function(a,b){if(!a)return-1;for(var c=a.length;c--;)if(a[c]===b)return c;return-1},map:Y,max:oa,memoize:function(a,b){var c={};return function(){var d=b?b.apply(this,arguments):arguments[0];return v.call(c,d)?c[d]:c[d]=a.apply(this,arguments)}},min:C,mixin:la,noConflict:function(){q._=ya;return this},once:function(a){var b,c=u;return function(){if(c)return b;c=o;return b=a.apply(this,arguments)}},partial:function(a){var b=j.call(arguments,1),c=b.length;
return function(){var d;d=arguments;d.length&&(b.length=c,E.apply(b,d));d=1==b.length?a.call(this,b[0]):a.apply(this,b);b.length=c;return d}},pick:function(a){for(var b,c=0,d=D.apply(t,arguments),e=d.length,f={};++c<e;)b=d[c],b in a&&(f[b]=a[b]);return f},pluck:N,range:function(a,b,c){c||(c=1);2>arguments.length&&(b=a||0,a=0);for(var d=-1,e=Math.max(Math.ceil((b-a)/c),0),f=Array(e);++d<e;)f[d]=a,a+=c;return f},reduce:Z,reduceRight:ba,reject:G,rest:fa,result:function(a,b){if(!a)return null;var c=a[b];
return h.call(c)==p?a[b]():c},shuffle:function(a){for(var b,c=-1,d=a.length,e=Array(d);++c<d;)b=Math.floor(Math.random()*(c+1)),e[c]=e[b],e[b]=a[c];return e},size:function(a){var b=h.call(a);return b==H||b==J?a.length:S(a).length},some:B,sortBy:function(a,b,c){if(h.call(b)!=p)var d=b,b=function(a){return a[d]};else c&&(b=x(b,c));return N(Y(a,function(c,d){return{a:b(c,d,a),b:c}}).sort(function(a,b){var c=a.a,d=b.a;return c===k?1:d===k?-1:c<d?-1:c>d?1:0}),"b")},sortedIndex:da,tap:function(a,b){b(a);
return a},template:function(a,b,c){var c=qa(c||{},l.templateSettings),d;d=c.escape;var e=c.evaluate,f=c.interpolate,c=c.variable;d&&(a=a.replace(d,ua));f&&(a=a.replace(f,va));e&&(a=a.replace(e,wa));a="__p='"+a.replace(Aa,sa).replace(za,ra)+"';\n";r.length=0;c||(a="with(object||{}){"+a+"}");a="function("+(c||"object")+'){var __p,__t;function print(){__p+=__j.call(arguments,"")}'+a+"return __p}";d=Function("_,__e,__j","return "+a)(l,ka,Ba);if(b)return d(b);d.source=a;return d},throttle:function(a,b){function c(){h=
new Date;g=k;a.apply(f,d)}var d,e,f,g,h=0;return function(){var i=new Date,j=b-(i-h);d=arguments;f=this;0>=j?(h=i,e=a.apply(f,d)):g||(g=M(c,j));return e}},times:function(a,b,c){c&&(b=x(b,c));for(c=0;c<a;c++)b(c)},toArray:function(a){if(!a)return[];if(h.call(a.toArray)==p)return a.toArray();var b=a.length;return b===+b?j.call(a):pa(a)},union:function(){for(var a=-1,b=[],c=D.apply(b,arguments),d=c.length;++a<d;)0>s(b,c[a])&&b.push(c[a]);return b},uniq:ga,uniqueId:function(a){var b=xa++;return a?a+b:
b},values:pa,without:function(a){for(var b=j.call(arguments,1),c=-1,d=a.length,e=[];++c<d;)0>s(b,a[c])&&e.push(a[c]);return e},wrap:function(a,b){return function(){var c=[a];E.apply(c,arguments);return b.apply(this,c)}},zip:function(){for(var a=-1,b=oa(N(arguments,"length")),c=Array(b);++a<b;)c[a]=N(arguments,a);return c},all:U,any:B,collect:Y,detect:na,each:F,foldl:Z,foldr:ba,head:T,include:A,inject:Z,intersect:ea,methods:L,select:ma,tail:fa,take:T,unique:ga});m.prototype=l.prototype;la(l);F("pop,push,reverse,shift,sort,splice,unshift".split(","),
function(a){var b=t[a];m.prototype[a]=function(){var a=this.m;b.apply(a,arguments);a.length===0&&delete a[0];return this.n?(new m(a)).chain():a}});F(["concat","join","slice"],function(a){var b=t[a];m.prototype[a]=function(){var a=b.apply(this.m,arguments);return this.n?(new m(a)).chain():a}});O(m.prototype,{chain:function(){this.n=o;return this},value:function(){return this.m}});W?"object"==typeof module&&module&&module.o==W?(module.o=l)._=l:W._=l:(q._=l,"function"==typeof define&&"object"==typeof define.amd&&
define.amd&&define(function(){return l}))})(this);

View File

@@ -176,6 +176,48 @@
/*--------------------------------------------------------------------------*/
QUnit.module('lodash.partial');
(function() {
test('partially applies an argument, without additional arguments', function() {
var arg = 'catnip',
func = function(x) { return x; };
equal(_.partial(func, arg)(), arg);
});
test('partially applies an argument, with additional arguments', function() {
var arg1 = 'catnip',
arg2 = 'cheese',
func = function(x, y) { return [x, y]; };
deepEqual(_.partial(func, arg1)(arg2), [arg1, arg2]);
});
test('works without partially applying arguments, without additional arguments', function() {
var func = function() { return arguments.length; };
equal(_.partial(func)(), 0);
});
test('works without partially applying arguments, with additional arguments', function() {
var arg = 'catnip',
func = function(x) { return x; };
equal(_.partial(func)(arg), arg);
});
test('should not alter the `this` binding of either function', function() {
var o = { 'cat': 'nip' },
func = function() { return this.cat; };
equal(_.partial(_.bind(func, o))(), o.cat);
equal(_.bind(_.partial(func), o)(), o.cat);
});
}());
/*--------------------------------------------------------------------------*/
QUnit.module('lodash.reduceRight');
(function() {