mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
Update docs and minified build.
Former-commit-id: 8ece30dc91c7cd9fe9f936fdf09e6d673566eaef
This commit is contained in:
134
doc/README.md
134
doc/README.md
@@ -145,7 +145,7 @@ The `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_version"></a>`_.VERSION`
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3106 "View in source") [Ⓣ][1]
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3103 "View in source") [Ⓣ][1]
|
||||
|
||||
*(String)*: The semantic version number.
|
||||
|
||||
@@ -157,7 +157,7 @@ The `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_aftern-func"></a>`_.after(n, func)`
|
||||
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1645 "View in source") [Ⓣ][1]
|
||||
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1642 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new function that is restricted to executing only after it is called `n` times.
|
||||
|
||||
@@ -185,7 +185,7 @@ _.forEach(notes, function(note) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindfunc--arg1-arg2-"></a>`_.bind(func [, arg1, arg2, ...])`
|
||||
<a href="#_bindfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1696 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1693 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new function that, when called, invokes `func` with the `this` binding of `thisArg` and prepends any additional `bind` arguments to those passed to the bound function. Lazy defined methods may be bound by passing the object they are bound to as `func` and the method name as `thisArg`.
|
||||
|
||||
@@ -232,7 +232,7 @@ func();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindallobject--methodname1-methodname2-"></a>`_.bindAll(object [, methodName1, methodName2, ...])`
|
||||
<a href="#_bindallobject--methodname1-methodname2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1759 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindallobject--methodname1-methodname2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1756 "View in source") [Ⓣ][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.
|
||||
|
||||
@@ -264,7 +264,7 @@ jQuery('#lodash_button').on('click', buttonView.onClick);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_chainvalue"></a>`_.chain(value)`
|
||||
<a href="#_chainvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3058 "View in source") [Ⓣ][1]
|
||||
<a href="#_chainvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3055 "View in source") [Ⓣ][1]
|
||||
|
||||
Wraps the value in a `lodash` chainable object.
|
||||
|
||||
@@ -298,7 +298,7 @@ var youngest = _.chain(stooges)
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_clonevalue"></a>`_.clone(value)`
|
||||
<a href="#_clonevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2085 "View in source") [Ⓣ][1]
|
||||
<a href="#_clonevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2082 "View in source") [Ⓣ][1]
|
||||
|
||||
Create a shallow clone of the `value`. Any nested objects or arrays will be assigned by reference and not cloned.
|
||||
|
||||
@@ -346,7 +346,7 @@ _.compact([0, 1, false, 2, '', 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_composefunc1-func2-"></a>`_.compose([func1, func2, ...])`
|
||||
<a href="#_composefunc1-func2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1791 "View in source") [Ⓣ][1]
|
||||
<a href="#_composefunc1-func2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1788 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new function that is the composition of the passed functions, where each function consumes the return value of the function that follows. In math terms, composing thefunctions `f()`, `g()`, and `h()` produces `f(g(h()))`.
|
||||
|
||||
@@ -398,7 +398,7 @@ _.contains([1, 2, 3], 3);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_debouncefunc-wait-immediate"></a>`_.debounce(func, wait, immediate)`
|
||||
<a href="#_debouncefunc-wait-immediate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1824 "View in source") [Ⓣ][1]
|
||||
<a href="#_debouncefunc-wait-immediate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1821 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new function that will delay the execution of `func` until after `wait` milliseconds have elapsed since the last time it was invoked. Pass `true` for `immediate` to cause debounce to invoke `func` on the leading, instead of the trailing, edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call.
|
||||
|
||||
@@ -424,7 +424,7 @@ jQuery(window).on('resize', lazyLayout);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_defaultsobject--defaults1-defaults2-"></a>`_.defaults(object [, defaults1, defaults2, ...])`
|
||||
<a href="#_defaultsobject--defaults1-defaults2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2108 "View in source") [Ⓣ][1]
|
||||
<a href="#_defaultsobject--defaults1-defaults2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2105 "View in source") [Ⓣ][1]
|
||||
|
||||
Assigns missing properties in `object` with default values from the defaults objects. As soon as a property is set, additional defaults of the same property will be ignored.
|
||||
|
||||
@@ -450,7 +450,7 @@ _.defaults(iceCream, { 'flavor': 'vanilla', 'sprinkles': 'lots' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_deferfunc--arg1-arg2-"></a>`_.defer(func [, arg1, arg2, ...])`
|
||||
<a href="#_deferfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1889 "View in source") [Ⓣ][1]
|
||||
<a href="#_deferfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1886 "View in source") [Ⓣ][1]
|
||||
|
||||
Defers executing the `func` function until the current call stack has cleared. Additional arguments are passed to `func` when it is invoked.
|
||||
|
||||
@@ -475,7 +475,7 @@ _.defer(function() { alert('deferred'); });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_delayfunc-wait--arg1-arg2-"></a>`_.delay(func, wait [, arg1, arg2, ...])`
|
||||
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1869 "View in source") [Ⓣ][1]
|
||||
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1866 "View in source") [Ⓣ][1]
|
||||
|
||||
Executes the `func` function after `wait` milliseconds. Additional arguments are passed to `func` when it is invoked.
|
||||
|
||||
@@ -527,7 +527,7 @@ _.difference([1, 2, 3, 4, 5], [5, 2, 10]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_escapestring"></a>`_.escape(string)`
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2754 "View in source") [Ⓣ][1]
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2751 "View in source") [Ⓣ][1]
|
||||
|
||||
Escapes a string for insertion into HTML, replacing `&`, `<`, `"`, `'`, and `/` characters.
|
||||
|
||||
@@ -577,7 +577,7 @@ _.every([true, 1, null, 'yes'], Boolean);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_extendobject--source1-source2-"></a>`_.extend(object [, source1, source2, ...])`
|
||||
<a href="#_extendobject--source1-source2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2127 "View in source") [Ⓣ][1]
|
||||
<a href="#_extendobject--source1-source2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2124 "View in source") [Ⓣ][1]
|
||||
|
||||
Copies enumerable properties from the source objects to the `destination` object. Subsequent sources will overwrite propery assignments of previous sources.
|
||||
|
||||
@@ -737,7 +737,7 @@ _([1, 2, 3]).forEach(function(num) { alert(num); }).join(',');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_functionsobject"></a>`_.functions(object)`
|
||||
<a href="#_functionsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2144 "View in source") [Ⓣ][1]
|
||||
<a href="#_functionsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2141 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces a sorted array of the properties, own and inherited, of `object` that have function values.
|
||||
|
||||
@@ -761,7 +761,7 @@ _.functions(_);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_groupbyarray-callback--thisarg"></a>`_.groupBy(array, callback [, thisArg])`
|
||||
<a href="#_groupbyarray-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1023 "View in source") [Ⓣ][1]
|
||||
<a href="#_groupbyarray-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1020 "View in source") [Ⓣ][1]
|
||||
|
||||
Splits a `collection` into sets, grouped by the result of running each value through `callback`. The `callback` is invoked with `3` arguments; *(value, index, array)*. The `callback` argument may also be the name of a property to group by.
|
||||
|
||||
@@ -793,7 +793,7 @@ _.groupBy(['one', 'two', 'three'], 'length');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_hasobject-property"></a>`_.has(object, property)`
|
||||
<a href="#_hasobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2167 "View in source") [Ⓣ][1]
|
||||
<a href="#_hasobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2164 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if the specified object `property` exists and is a direct property, instead of an inherited property.
|
||||
|
||||
@@ -818,7 +818,7 @@ _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_identityvalue"></a>`_.identity(value)`
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2781 "View in source") [Ⓣ][1]
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2778 "View in source") [Ⓣ][1]
|
||||
|
||||
This function returns the first argument passed to it. Note: It is used throughout Lo-Dash as a default callback.
|
||||
|
||||
@@ -843,7 +843,7 @@ moe === _.identity(moe);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_indexofarray-value--issortedfalse"></a>`_.indexOf(array, value [, isSorted=false])`
|
||||
<a href="#_indexofarray-value--issortedfalse">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1108 "View in source") [Ⓣ][1]
|
||||
<a href="#_indexofarray-value--issortedfalse">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1105 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the index at which the first occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `isSorted` will run a faster binary search.
|
||||
|
||||
@@ -869,7 +869,7 @@ _.indexOf([1, 2, 3], 2);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_initialarray--n-guard"></a>`_.initial(array [, n, guard])`
|
||||
<a href="#_initialarray--n-guard">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1142 "View in source") [Ⓣ][1]
|
||||
<a href="#_initialarray--n-guard">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1139 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets all but the last value of the `array`. Pass `n` to exclude the last `n` values from the result.
|
||||
|
||||
@@ -895,7 +895,7 @@ _.initial([5, 4, 3, 2, 1]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_intersectionarray1-array2-"></a>`_.intersection([array1, array2, ...])`
|
||||
<a href="#_intersectionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1161 "View in source") [Ⓣ][1]
|
||||
<a href="#_intersectionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1158 "View in source") [Ⓣ][1]
|
||||
|
||||
Computes the intersection of all the passed-in arrays.
|
||||
|
||||
@@ -919,7 +919,7 @@ _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_invokearray-methodname--arg1-arg2-"></a>`_.invoke(array, methodName [, arg1, arg2, ...])`
|
||||
<a href="#_invokearray-methodname--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1194 "View in source") [Ⓣ][1]
|
||||
<a href="#_invokearray-methodname--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1191 "View in source") [Ⓣ][1]
|
||||
|
||||
Calls the method named by `methodName` for each value of the `collection`. Additional arguments will be passed to each invoked method.
|
||||
|
||||
@@ -945,7 +945,7 @@ _.invoke([[5, 1, 7], [3, 2, 1]], 'sort');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isargumentsvalue"></a>`_.isArguments(value)`
|
||||
<a href="#_isargumentsvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2187 "View in source") [Ⓣ][1]
|
||||
<a href="#_isargumentsvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2184 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a `value` is an `arguments` object.
|
||||
|
||||
@@ -972,7 +972,7 @@ _.isArguments([1, 2, 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isarrayvalue"></a>`_.isArray(value)`
|
||||
<a href="#_isarrayvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2213 "View in source") [Ⓣ][1]
|
||||
<a href="#_isarrayvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2210 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a `value` is an array.
|
||||
|
||||
@@ -999,7 +999,7 @@ _.isArray([1, 2, 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isbooleanvalue"></a>`_.isBoolean(value)`
|
||||
<a href="#_isbooleanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2230 "View in source") [Ⓣ][1]
|
||||
<a href="#_isbooleanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2227 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a `value` is a boolean *(`true` or `false`)* value.
|
||||
|
||||
@@ -1023,7 +1023,7 @@ _.isBoolean(null);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isdatevalue"></a>`_.isDate(value)`
|
||||
<a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2247 "View in source") [Ⓣ][1]
|
||||
<a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2244 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a `value` is a date.
|
||||
|
||||
@@ -1047,7 +1047,7 @@ _.isDate(new Date);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_iselementvalue"></a>`_.isElement(value)`
|
||||
<a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2264 "View in source") [Ⓣ][1]
|
||||
<a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2261 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a `value` is a DOM element.
|
||||
|
||||
@@ -1071,7 +1071,7 @@ _.isElement(document.body);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isemptyvalue"></a>`_.isEmpty(value)`
|
||||
<a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2285 "View in source") [Ⓣ][1]
|
||||
<a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2282 "View in source") [Ⓣ][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".
|
||||
|
||||
@@ -1098,7 +1098,7 @@ _.isEmpty({});
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isequala-b--stack"></a>`_.isEqual(a, b [, stack])`
|
||||
<a href="#_isequala-b--stack">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2319 "View in source") [Ⓣ][1]
|
||||
<a href="#_isequala-b--stack">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2316 "View in source") [Ⓣ][1]
|
||||
|
||||
Performs a deep comparison between two values to determine if they are equivalent to each other.
|
||||
|
||||
@@ -1130,7 +1130,7 @@ _.isEqual(moe, clone);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isfinitevalue"></a>`_.isFinite(value)`
|
||||
<a href="#_isfinitevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2471 "View in source") [Ⓣ][1]
|
||||
<a href="#_isfinitevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2468 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a `value` is a finite number.
|
||||
|
||||
@@ -1160,7 +1160,7 @@ _.isFinite(Infinity);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isfunctionvalue"></a>`_.isFunction(value)`
|
||||
<a href="#_isfunctionvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2488 "View in source") [Ⓣ][1]
|
||||
<a href="#_isfunctionvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2485 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a `value` is a function.
|
||||
|
||||
@@ -1184,7 +1184,7 @@ _.isFunction(''.concat);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnanvalue"></a>`_.isNaN(value)`
|
||||
<a href="#_isnanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2539 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2536 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a `value` is `NaN`. Note: this is not the same as native `isNaN`, which will return true for `undefined` and other values. See http://es5.github.com/#x15.1.2.4.
|
||||
|
||||
@@ -1217,7 +1217,7 @@ _.isNaN(undefined);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnullvalue"></a>`_.isNull(value)`
|
||||
<a href="#_isnullvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2561 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnullvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2558 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a `value` is `null`.
|
||||
|
||||
@@ -1244,7 +1244,7 @@ _.isNull(undefined);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnumbervalue"></a>`_.isNumber(value)`
|
||||
<a href="#_isnumbervalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2578 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnumbervalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2575 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a `value` is a number.
|
||||
|
||||
@@ -1268,7 +1268,7 @@ _.isNumber(8.4 * 5;
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isobjectvalue"></a>`_.isObject(value)`
|
||||
<a href="#_isobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2509 "View in source") [Ⓣ][1]
|
||||
<a href="#_isobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2506 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a `value` is the language type of Object. *(e.g. arrays, functions, objects, regexps, `new Number(0)*`, and `new String('')`)
|
||||
|
||||
@@ -1295,7 +1295,7 @@ _.isObject(1);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isregexpvalue"></a>`_.isRegExp(value)`
|
||||
<a href="#_isregexpvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2595 "View in source") [Ⓣ][1]
|
||||
<a href="#_isregexpvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2592 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a `value` is a regular expression.
|
||||
|
||||
@@ -1319,7 +1319,7 @@ _.isRegExp(/moe/);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isstringvalue"></a>`_.isString(value)`
|
||||
<a href="#_isstringvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2612 "View in source") [Ⓣ][1]
|
||||
<a href="#_isstringvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2609 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a `value` is a string.
|
||||
|
||||
@@ -1343,7 +1343,7 @@ _.isString('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isundefinedvalue"></a>`_.isUndefined(value)`
|
||||
<a href="#_isundefinedvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2629 "View in source") [Ⓣ][1]
|
||||
<a href="#_isundefinedvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2626 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a `value` is `undefined`.
|
||||
|
||||
@@ -1367,7 +1367,7 @@ _.isUndefined(void 0);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_keysobject"></a>`_.keys(object)`
|
||||
<a href="#_keysobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2646 "View in source") [Ⓣ][1]
|
||||
<a href="#_keysobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2643 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces an array of the `object`'s enumerable own property names.
|
||||
|
||||
@@ -1391,7 +1391,7 @@ _.keys({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_lastarray--n-guard"></a>`_.last(array [, n, guard])`
|
||||
<a href="#_lastarray--n-guard">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1224 "View in source") [Ⓣ][1]
|
||||
<a href="#_lastarray--n-guard">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1221 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the last value of the `array`. Pass `n` to return the lasy `n` values of the `array`.
|
||||
|
||||
@@ -1417,7 +1417,7 @@ _.last([5, 4, 3, 2, 1]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_lastindexofarray-value"></a>`_.lastIndexOf(array, value)`
|
||||
<a href="#_lastindexofarray-value">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1244 "View in source") [Ⓣ][1]
|
||||
<a href="#_lastindexofarray-value">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1241 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the index at which the last occurrence of `value` is found using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -1471,7 +1471,7 @@ _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_maxarray--callback-thisarg"></a>`_.max(array [, callback, thisArg])`
|
||||
<a href="#_maxarray--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1281 "View in source") [Ⓣ][1]
|
||||
<a href="#_maxarray--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1278 "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 invoked with `3` arguments; *(value, index, array)*.
|
||||
|
||||
@@ -1503,7 +1503,7 @@ _.max(stooges, function(stooge) { return stooge.age; });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_memoizefunc--resolver"></a>`_.memoize(func [, resolver])`
|
||||
<a href="#_memoizefunc--resolver">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1912 "View in source") [Ⓣ][1]
|
||||
<a href="#_memoizefunc--resolver">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1909 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new function that memoizes the result of `func`. If `resolver` is passed, it will be used to determine the cache key for storing the result based on the arguments passed to the memoized function. By default, the first argument passed to the memoized function is used as the cache key.
|
||||
|
||||
@@ -1529,7 +1529,7 @@ var fibonacci = _.memoize(function(n) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_minarray--callback-thisarg"></a>`_.min(array [, callback, thisArg])`
|
||||
<a href="#_minarray--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1331 "View in source") [Ⓣ][1]
|
||||
<a href="#_minarray--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1328 "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 invoked with `3` arguments; *(value, index, array)*.
|
||||
|
||||
@@ -1555,7 +1555,7 @@ _.min([10, 5, 100, 2, 1000]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mixinobject"></a>`_.mixin(object)`
|
||||
<a href="#_mixinobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2807 "View in source") [Ⓣ][1]
|
||||
<a href="#_mixinobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2804 "View in source") [Ⓣ][1]
|
||||
|
||||
Adds functions properties of `object` to the `lodash` function and chainable wrapper.
|
||||
|
||||
@@ -1585,7 +1585,7 @@ _('larry').capitalize();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_noconflict"></a>`_.noConflict()`
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2838 "View in source") [Ⓣ][1]
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2835 "View in source") [Ⓣ][1]
|
||||
|
||||
Reverts the '_' variable to its previous value and returns a reference to the `lodash` function.
|
||||
|
||||
@@ -1605,7 +1605,7 @@ var lodash = _.noConflict();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_oncefunc"></a>`_.once(func)`
|
||||
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1938 "View in source") [Ⓣ][1]
|
||||
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1935 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new function that is restricted to one execution. Repeat calls to the function will return the value of the first call.
|
||||
|
||||
@@ -1631,7 +1631,7 @@ initialize();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_partialfunc--arg1-arg2-"></a>`_.partial(func [, arg1, arg2, ...])`
|
||||
<a href="#_partialfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1971 "View in source") [Ⓣ][1]
|
||||
<a href="#_partialfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1968 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new function that, when called, invokes `func` with any additional `partial` arguments prepended to those passed to the partially applied function. This method is similar `bind`, except it does **not** alter the `this` binding.
|
||||
|
||||
@@ -1658,7 +1658,7 @@ hi('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pickobject--prop1-prop2-"></a>`_.pick(object [, prop1, prop2, ...])`
|
||||
<a href="#_pickobject--prop1-prop2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2668 "View in source") [Ⓣ][1]
|
||||
<a href="#_pickobject--prop1-prop2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2665 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed of the specified properties. Property names may be specified as individual arguments or as arrays of property names.
|
||||
|
||||
@@ -1714,7 +1714,7 @@ _.pluck(stooges, 'name');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_rangestart0-end--step1"></a>`_.range([start=0], end [, step=1])`
|
||||
<a href="#_rangestart0-end--step1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1389 "View in source") [Ⓣ][1]
|
||||
<a href="#_rangestart0-end--step1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1386 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of numbers *(positive and/or negative)* progressing from `start` up to but not including `stop`. This method is a port of Python's `range()` function. See http://docs.python.org/library/functions.html#range.
|
||||
|
||||
@@ -1833,7 +1833,7 @@ var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_restarray--n-guard"></a>`_.rest(array [, n, guard])`
|
||||
<a href="#_restarray--n-guard">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1425 "View in source") [Ⓣ][1]
|
||||
<a href="#_restarray--n-guard">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1422 "View in source") [Ⓣ][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.
|
||||
|
||||
@@ -1859,7 +1859,7 @@ _.rest([5, 4, 3, 2, 1]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_resultobject-property"></a>`_.result(object, property)`
|
||||
<a href="#_resultobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2868 "View in source") [Ⓣ][1]
|
||||
<a href="#_resultobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2865 "View in source") [Ⓣ][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.
|
||||
|
||||
@@ -1894,7 +1894,7 @@ _.result(object, 'stuff');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_shufflearray"></a>`_.shuffle(array)`
|
||||
<a href="#_shufflearray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1443 "View in source") [Ⓣ][1]
|
||||
<a href="#_shufflearray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1440 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces a new array of shuffled `array` values, using a version of the Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle.
|
||||
|
||||
@@ -1918,7 +1918,7 @@ _.shuffle([1, 2, 3, 4, 5, 6]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sizevalue"></a>`_.size(value)`
|
||||
<a href="#_sizevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2705 "View in source") [Ⓣ][1]
|
||||
<a href="#_sizevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2702 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the `length` of `value` when `value` is an array or string, or gets the number of enumerable own properties when `value` is an object.
|
||||
|
||||
@@ -1974,7 +1974,7 @@ _.some([null, 0, 'yes', false]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sortbyarray-callback--thisarg"></a>`_.sortBy(array, callback [, thisArg])`
|
||||
<a href="#_sortbyarray-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1065 "View in source") [Ⓣ][1]
|
||||
<a href="#_sortbyarray-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1062 "View in source") [Ⓣ][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')*.
|
||||
|
||||
@@ -2003,7 +2003,7 @@ _.sortBy([1, 2, 3, 4, 5, 6], function(num) { return this.sin(num); }, Math);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sortedindexarray-value--callback"></a>`_.sortedIndex(array, value [, callback])`
|
||||
<a href="#_sortedindexarray-value--callback">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1477 "View in source") [Ⓣ][1]
|
||||
<a href="#_sortedindexarray-value--callback">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1474 "View in source") [Ⓣ][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)*.
|
||||
|
||||
@@ -2029,7 +2029,7 @@ _.sortedIndex([10, 20, 30, 40, 50], 35);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_tapvalue-interceptor"></a>`_.tap(value, interceptor)`
|
||||
<a href="#_tapvalue-interceptor">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2733 "View in source") [Ⓣ][1]
|
||||
<a href="#_tapvalue-interceptor">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2730 "View in source") [Ⓣ][1]
|
||||
|
||||
Invokes `interceptor` with the `value` as the first argument, and then returns `value`. The primary purpose of this method is to "tap into" a method chain, in order to performoperations on intermediate results within the chain.
|
||||
|
||||
@@ -2059,7 +2059,7 @@ _.chain([1,2,3,200])
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatetext-data-options"></a>`_.template(text, data, options)`
|
||||
<a href="#_templatetext-data-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2928 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatetext-data-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2925 "View in source") [Ⓣ][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.
|
||||
|
||||
@@ -2119,7 +2119,7 @@ _.template('<%= data.hasWith %>', { 'hasWith': 'no' }, { 'variable': 'data' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_throttlefunc-wait"></a>`_.throttle(func, wait)`
|
||||
<a href="#_throttlefunc-wait">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2007 "View in source") [Ⓣ][1]
|
||||
<a href="#_throttlefunc-wait">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2004 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. If the throttled function is invoked more than once, `func` will also be called on the trailing edge of the `wait` timeout. Subsequent calls to the throttled function will return the result of the last `func` call.
|
||||
|
||||
@@ -2144,7 +2144,7 @@ jQuery(window).on('scroll', throttled);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_timesn-callback--thisarg"></a>`_.times(n, callback [, thisArg])`
|
||||
<a href="#_timesn-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3005 "View in source") [Ⓣ][1]
|
||||
<a href="#_timesn-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3002 "View in source") [Ⓣ][1]
|
||||
|
||||
Executes the `callback` function `n` times. The `callback` is invoked with `1` argument; *(index)*.
|
||||
|
||||
@@ -2190,7 +2190,7 @@ Converts the `collection`, into an array. Useful for converting the `arguments`
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_unionarray1-array2-"></a>`_.union([array1, array2, ...])`
|
||||
<a href="#_unionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1510 "View in source") [Ⓣ][1]
|
||||
<a href="#_unionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1507 "View in source") [Ⓣ][1]
|
||||
|
||||
Computes the union of the passed-in arrays.
|
||||
|
||||
@@ -2214,7 +2214,7 @@ _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_uniqarray--issortedfalse-callback"></a>`_.uniq(array [, isSorted=false, callback])`
|
||||
<a href="#_uniqarray--issortedfalse-callback">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1545 "View in source") [Ⓣ][1]
|
||||
<a href="#_uniqarray--issortedfalse-callback">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1542 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces a duplicate-value-free version of the `array` using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `isSorted` will run a faster algorithm. If `callback` is passed, each value of `array` is passed through a transformation `callback` before uniqueness is computed. The `callback` is invoked with `3` arguments; *(value, index, array)*.
|
||||
|
||||
@@ -2240,7 +2240,7 @@ _.uniq([1, 2, 1, 3, 1, 4]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_uniqueidprefix"></a>`_.uniqueId([prefix])`
|
||||
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3028 "View in source") [Ⓣ][1]
|
||||
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3025 "View in source") [Ⓣ][1]
|
||||
|
||||
Generates a unique id. If `prefix` is passed, the id will be appended to it.
|
||||
|
||||
@@ -2288,7 +2288,7 @@ _.values({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_withoutarray--value1-value2-"></a>`_.without(array [, value1, value2, ...])`
|
||||
<a href="#_withoutarray--value1-value2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1583 "View in source") [Ⓣ][1]
|
||||
<a href="#_withoutarray--value1-value2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1580 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces a new array with all occurrences of the passed values removed using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -2313,7 +2313,7 @@ _.without([1, 2, 1, 0, 3, 1, 4], 0, 1);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_wrapfunc-wrapper--arg1-arg2-"></a>`_.wrap(func, wrapper [, arg1, arg2, ...])`
|
||||
<a href="#_wrapfunc-wrapper--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2059 "View in source") [Ⓣ][1]
|
||||
<a href="#_wrapfunc-wrapper--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2056 "View in source") [Ⓣ][1]
|
||||
|
||||
Create a new function that passes the `func` function to the `wrapper` function as its first argument. Additional arguments are appended to those passed to the `wrapper` function.
|
||||
|
||||
@@ -2343,7 +2343,7 @@ hello();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_ziparray1-array2-"></a>`_.zip([array1, array2, ...])`
|
||||
<a href="#_ziparray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1613 "View in source") [Ⓣ][1]
|
||||
<a href="#_ziparray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1610 "View in source") [Ⓣ][1]
|
||||
|
||||
Merges together the values of each of the arrays with the value at the corresponding position. Useful for separate data sources that are coordinated through matching array indexes. For a matrix of nested arrays, `_.zip.apply(...)` can transpose the matrix in a similar fashion.
|
||||
|
||||
@@ -2374,7 +2374,7 @@ _.zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_prototypechain"></a>`_.prototype.chain()`
|
||||
<a href="#_prototypechain">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3076 "View in source") [Ⓣ][1]
|
||||
<a href="#_prototypechain">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3073 "View in source") [Ⓣ][1]
|
||||
|
||||
Extracts the value from a wrapped chainable object.
|
||||
|
||||
@@ -2395,7 +2395,7 @@ _([1, 2, 3]).value();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_prototypevalue"></a>`_.prototype.value()`
|
||||
<a href="#_prototypevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3093 "View in source") [Ⓣ][1]
|
||||
<a href="#_prototypevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3090 "View in source") [Ⓣ][1]
|
||||
|
||||
Extracts the value from a wrapped chainable object.
|
||||
|
||||
|
||||
52
lodash.min.js
vendored
52
lodash.min.js
vendored
@@ -2,30 +2,30 @@
|
||||
Lo-Dash 0.2.0 lodash.com/license
|
||||
Underscore.js 1.3.3 github.com/documentcloud/underscore/blob/master/LICENSE
|
||||
*/
|
||||
;(function(v,l){"use strict";function R(a){return"[object Arguments]"==h.call(a)}function b(a){return new p(a)}function p(a){if(a&&a._wrapped)return a;this._wrapped=a}function k(){for(var a,c,d,j=-1,b=arguments.length,e={e:"",f:"",k:"",q:"",c:{d:"",m:"++l<m"},o:{d:""}};++j<b;)for(c in a=arguments[j],a)d=(d=a[c])==o?"":d,/d|m|j/.test(c)?("string"==typeof d&&(d={b:d,n:d}),e.c[c]=d.b,e.o[c]=d.n):e[c]=d;a=e.a,c=e.c,d=e.o;var j=/^[^,]+/.exec(a)[0],b=d.m,g=/\S+$/.exec(b||j)[0];e.g=j,e.i=H,e.h="j.call("+
|
||||
g+",l)",e.l=g,e.p=da,e.r=e.r!==q,e.f||(e.f="if(!"+j+")return r");if("n"==j||!c.j)e.c=o;return b||(d.m="l in "+g),Function("b,c,i,j,k,o,v,y,z,h,A",'"use strict";return function('+a+"){"+ta(e)+"}")(I,u,r,s,ea,S,J,h,n,q)}function ua(a,c){return w[c]}function va(a){return"\\"+wa[a]}function xa(a,c){var d=w.length;return w[d]="'+((__t=("+c+"))==null?'':_['escape'](__t))+'",T+d}function ya(a,c){var d=w.length;return w[d]="'+((__t=("+c+"))==null?'':__t)+'",T+d}function za(a,c){var d=w.length;return w[d]="';"+
|
||||
c+";__p+='",T+d}function fa(a,c,d,j){if(!a)return d;var b=a.length,e=3>arguments.length;j&&(c=u(c,j));if(b===+b){for(b&&e&&(d=a[--b]);b--;)d=c(d,a[b],b,a);return d}var g=U(a);for((b=g.length)&&e&&(d=a[g[--b]]);b--;)e=g[b],d=c(d,a[e],e,a);return d}function V(a,c,d){return c==l||d?a[0]:m.call(a,0,c)}function ga(a,c){if(c)return K.apply(x,a);for(var d,b=-1,f=a.length,e=[];++b<f;)d=a[b],W(d)?B.apply(e,ga(d)):e.push(d);return e}function y(a,c,d){var b;if(!a)return-1;if(d)return d=ha(a,c),a[d]===c?d:-1
|
||||
;d=0;for(b=a.length;d<b;d++)if(a[d]===c)return d;return-1}function ia(a){for(var c,d=-1,b=a.length,f=m.call(arguments,1),e=[];++d<b;)c=a[d],0>y(e,c)&&X(f,function(a){return-1<y(a,c)})&&e.push(c);return e}function ja(a,c,d){var b=-Infinity,f=-1,e=a.length,g=b;if(c)d&&(c=u(c,d));else{if(a[0]===+a[0]&&e<=L)try{return Math.max.apply(Math,a)}catch(i){}if(!a.length)return g}for(;++f<e;)d=c?c(a[f],f,a):a[f],d>b&&(b=d,g=a[f]);return g}function ka(a,c,d){return m.call(a,c==l||d?1:c)}function ha(a,c,d){var b
|
||||
,f=0,e=a.length;for(d&&(c=d(c));f<e;)b=f+e>>1,(d?d(a[b]):a[b])<c?f=b+1:e=b;return f}function la(a,c,d){var b,f=-1,e=a.length,g=[],i=[];for(3>e&&(c=n);++f<e;)if(b=d?d(a[f]):a[f],c?!f||i[i.length-1]!==b:0>y(i,b))i.push(b),g.push(a[f]);return g}function u(a,c){var d,b=h.call(a)==r;if(b){if(z)return a=z.call.apply(z,arguments),function(){return arguments.length?a.apply(l,arguments):a()}}else d=c,c=a;var f=m.call(arguments,2),e=f.length;return function(){var g;return g=arguments,b||(a=c[d]),e&&(g.length&&
|
||||
(f.length=e,B.apply(f,g)),g=f),g=g.length?a.apply(c,g):a.call(c),f.length=e,g}}function M(a,c,d){d||(d=[]);if(a===c)return 0!==a||1/a==1/c;if(a==l||c==l)return a===c;a.s&&(a=a._wrapped),c.s&&(c=c._wrapped);if(a.isEqual&&h.call(a.isEqual)==r)return a.isEqual(c);if(c.isEqual&&h.call(c.isEqual)==r)return c.isEqual(a);var b=h.call(a);if(b!=h.call(c))return q;switch(b){case J:return a==""+c;case N:return a!=+a?c!=+c:0==a?1/a==1/c:a==+c;case ma:case na:return+a==+c;case oa:return a.source==c.source&&a.
|
||||
global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if("object"!=typeof a||"object"!=typeof c)return q;for(var f=d.length;f--;)if(d[f]==a)return n;var f=-1,e=n,g=0;d.push(a);if(b==I){if(g=a.length,e=g==c.length)for(;g--&&(e=M(a[g],c[g],d)););}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return q;for(var i in a)if(s.call(a,i)&&(g++,!(e=s.call(c,i)&&M(a[i],c[i],d))))break;if(e){for(i in c)if(s.call(c,i)&&!(g--))break;e=!g}if(e&&H)for(;7>++f&&(i=da[f]
|
||||
,!s.call(a,i)||!!(e=s.call(c,i)&&M(a[i],c[i],d))););}return d.pop(),e}function ea(a){return a}function pa(a){C(O(a),function(c){var d=b[c]=a[c];p.prototype[c]=function(){var a=[this._wrapped];return arguments.length&&B.apply(a,arguments),a=1==a.length?d.call(b,a[0]):d.apply(b,a),this.s&&(a=new p(a),a.s=n),a}})}var n=!0,o=null,q=!1,Y="object"==typeof exports&&exports&&("object"==typeof global&&global&&global==global.global&&(v=global),exports),L=5e4;try{(function(){L=arguments.length}).apply(o,Array
|
||||
(L))}catch(Ga){}var wa={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},H=!{valueOf:0}.propertyIsEnumerable("valueOf"),Aa=0,S={"boolean":q,"function":n,object:n,number:q,string:q,"undefined":q},Ba=v._,A=RegExp("^"+({}.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Ca=/__token__(\d+)/g,Da=/['\n\r\t\u2028\u2029\\]/g,da="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split
|
||||
(" "),T="__token__",w=[],I="[object Array]",ma="[object Boolean]",na="[object Date]",r="[object Function]",N="[object Number]",oa="[object RegExp]",J="[object String]",x=Array.prototype,D=Object.prototype,K=x.concat,s=D.hasOwnProperty,B=x.push,m=x.slice,h=D.toString,z=A.test(z=m.bind)&&/\n|Opera/.test(z+h.call(v.opera))&&z,E=A.test(E=Array.isArray)&&E,Ea=v.isFinite,Z=A.test(Z=Object.keys)&&Z,Fa=v.clearTimeout,P=v.setTimeout;b.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,
|
||||
interpolate:/<%=([\s\S]+?)%>/g,variable:"object"};var ta=Function("n","var __p;with(n){__p='var l,r';if(k){__p+='='+k};__p+=';'+f+';'+q+';';if(c){__p+='var m='+g+'.length;l=-1;';if(o){__p+='if(m===+m){'};__p+=''+c['d']+';while('+c['m']+'){'+c['j']+'}';if(o){__p+='}'}}if(o){if(c){__p+='else{'}if(!i){__p+='var s=typeof '+l+'==\\'function\\';'};__p+=''+o['d']+';for('+o['m']+'){';if(i){if(r){__p+='if('+h+'){'};__p+=''+o['j']+';';if(r){__p+='}'}}else{__p+='if(!(s&&l==\\'prototype\\')';if(r){__p+='&&'+h};__p+='){'+o['j']+'}'};__p+='}';if(i){__p+='var g='+l+'.constructor;';for(var k=0;k<7;k++){__p+='l=\\''+p[k]+'\\';if(';if(p[k]=='constructor'){__p+='!(g&&g.prototype==='+l+')&&'};__p+=''+h+'){'+o['j']+'}'}}if(c){__p+='}'}};__p+=''+e+';return r'}return __p"
|
||||
),t={a:"f,d,x",k:"f",q:"if(!d){d=k}else if(x){d=c(d,x)}",j:"d(f[l],l,f)"},$={k:"z",j:"if(!d(f[l],l,f))return!r"},aa={a:"n",k:"n",q:"for(var t,u=1,m=arguments.length;u<m;u++){t=arguments[u];"+(H?"if(t){":""),m:"l in t",r:q,j:"n[l]=t[l]",e:(H?"}":"")+"}"},F={k:"[]",j:"d(f[l],l,f)&&r.push(f[l])"},G={k:"",f:"if(!f)return[]",d:{b:"r=Array(m)",n:"r=[]"},j:{b:"r[l]=d(f[l],l,f)",n:"r.push(d(f[l],l,f))"}},A=k({a:"f,w",k:"h",j:"if(f[l]===w)return z"}),X=k(t,$),D=k(t,F),qa=k(t,{j:"if(d(f[l],l,f))return f[l]"
|
||||
}),C=k(t,{q:"if(x)d=c(d,x)"}),ba=k(t,G),Q=k(G,{a:"f,q",j:{b:"r[l]=f[l][q]",n:"r.push(f[l][q])"}}),ca=k({a:"f,d,a,x",k:"a",q:"var p=arguments.length<3;if(x)d=c(d,x)",d:{b:"if(p)r=f[++l]"},j:{b:"r=d(r,f[l],l,f)",n:"r=p?(p=h,f[l]):d(r,f[l],l,f)"}}),F=k(t,F,{j:"!"+F.j}),t=k(t,$,{k:"h",j:$.j.replace("!","")}),ra=k(G,{a:"f",j:{b:"r[l]=f[l]",n:"r.push(f[l])"}}),G=k(aa,{j:"if(n[l]==A)"+aa.j}),sa=k(aa),O=k({a:"n",k:"[]",r:q,j:"if(y.call(n[l])==i)r.push(l)",e:"r.sort()"});R(arguments)||(R=function(a){return!!
|
||||
a&&!!s.call(a,"callee")});var W=E||function(a){return h.call(a)==I},E=k({a:"B",k:"z",q:"var e=y.call(B);if(e==b||e==v)return!B.length",j:{n:"return h"}}),U=Z||k({a:"n",f:"if(!o[typeof n]||n===null)throw TypeError()",k:"[]",j:"r.push(l)"});b.VERSION="0.2.0",b.after=function(a,c){return 1>a?c():function(){if(1>--a)return c.apply(this,arguments)}},b.bind=u,b.bindAll=function(a){var c=arguments,d=1;1==c.length&&(d=0,c=O(a));for(var b=c.length;d<b;d++)a[c[d]]=u(a[c[d]],a);return a},b.chain=function(a)
|
||||
{return a=new p(a),a.s=n,a},b.clone=function(a){return S[typeof a]&&a!==o?W(a)?a.slice():sa({},a):a},b.compact=function(a){for(var c=-1,d=a.length,b=[];++c<d;)a[c]&&b.push(a[c]);return b},b.compose=function(){var a=arguments;return function(){for(var c=arguments,d=a.length;d--;)c=[a[d].apply(this,c)];return c[0]}},b.contains=A,b.debounce=function(a,c,d){function b(){i=l,d||a.apply(g,f)}var f,e,g,i;return function(){var h=d&&!i;return f=arguments,g=this,Fa(i),i=P(b,c),h&&(e=a.apply(g,f)),e}},b.defaults=
|
||||
G,b.defer=function(a){var c=m.call(arguments,1);return P(function(){return a.apply(l,c)},1)},b.delay=function(a,c){var d=m.call(arguments,2);return P(function(){return a.apply(l,d)},c)},b.difference=function(a){for(var c=-1,d=a.length,b=[],f=K.apply(b,m.call(arguments,1));++c<d;)0>y(f,a[c])&&b.push(a[c]);return b},b.escape=function(a){return(a+"").replace(/&/g,"&").replace(/</g,"<").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},b.every=X,b.extend=sa,b.filter=D,b.find=
|
||||
qa,b.first=V,b.flatten=ga,b.forEach=C,b.functions=O,b.groupBy=function(a,c,d){var b,f=-1,e=h.call(c)==r,g=a.length,i={};for(e&&d&&(c=u(c,d));++f<g;)b=a[f],d=e?c(b,f,a):b[c],(s.call(i,d)?i[d]:i[d]=[]).push(b);return i},b.has=function(a,c){return s.call(a,c)},b.identity=ea,b.indexOf=y,b.initial=function(a,c,d){return m.call(a,0,-(c==l||d?1:c))},b.intersection=ia,b.invoke=function(a,c){for(var d=m.call(arguments,2),b=-1,f=a.length,e=h.call(c)==r,g=[];++b<f;)g[b]=(e?c:a[b][c]).apply(a[b],d);return g}
|
||||
,b.isArguments=R,b.isArray=W,b.isBoolean=function(a){return a===n||a===q||h.call(a)==ma},b.isDate=function(a){return h.call(a)==na},b.isElement=function(a){return!!a&&1==a.nodeType},b.isEmpty=E,b.isEqual=M,b.isFinite=function(a){return Ea(a)&&h.call(a)==N},b.isFunction=function(a){return h.call(a)==r},b.isNaN=function(a){return h.call(a)==N&&a!=+a},b.isNull=function(a){return a===o},b.isNumber=function(a){return h.call(a)==N},b.isObject=function(a){return S[typeof a]&&a!==o},b.isRegExp=function(a
|
||||
){return h.call(a)==oa},b.isString=function(a){return h.call(a)==J},b.isUndefined=function(a){return a===l},b.keys=U,b.last=function(a,c,d){var b=a.length;return c==l||d?a[b-1]:m.call(a,-c||b)},b.lastIndexOf=function(a,c){if(!a)return-1;for(var d=a.length;d--;)if(a[d]===c)return d;return-1},b.map=ba,b.max=ja,b.memoize=function(a,c){var d={};return function(){var b=c?c.apply(this,arguments):arguments[0];return s.call(d,b)?d[b]:d[b]=a.apply(this,arguments)}},b.min=function(a,c,d){var b=Infinity,f=-1
|
||||
,e=a.length,g=b;if(c)d&&(c=u(c,d));else{if(a[0]===+a[0]&&e<=L)try{return Math.min.apply(Math,a)}catch(i){}if(!a.length)return g}for(;++f<e;)d=c?c(a[f],f,a):a[f],d<b&&(b=d,g=a[f]);return g},b.mixin=pa,b.noConflict=function(){return v._=Ba,this},b.once=function(a){var c,d=q;return function(){return d?c:(d=n,c=a.apply(this,arguments))}},b.partial=function(a){var c=m.call(arguments,1),d=c.length;return function(){var b;return b=arguments,b.length&&(c.length=d,B.apply(c,b)),b=1==c.length?a.call(this,c
|
||||
[0]):a.apply(this,c),c.length=d,b}},b.pick=function(a){for(var c,d=0,b=K.apply(x,arguments),f=b.length,e={};++d<f;)c=b[d],c in a&&(e[c]=a[c]);return e},b.pluck=Q,b.range=function(a,c,d){d||(d=1),2>arguments.length&&(c=a||0,a=0);for(var b=-1,f=Math.max(Math.ceil((c-a)/d),0),e=Array(f);++b<f;)e[b]=a,a+=d;return e},b.reduce=ca,b.reduceRight=fa,b.reject=F,b.rest=ka,b.result=function(a,c){if(!a)return o;var d=a[c];return h.call(d)==r?a[c]():d},b.shuffle=function(a){for(var c,d=-1,b=a.length,f=Array(b)
|
||||
;++d<b;)c=Math.floor(Math.random()*(d+1)),f[d]=f[c],f[c]=a[d];return f},b.size=function(a){var c=h.call(a);return c==I||c==J?a.length:U(a).length},b.some=t,b.sortBy=function(a,c,d){if(h.call(c)!=r)var b=c,c=function(a){return a[b]};else d&&(c=u(c,d));return Q(ba(a,function(b,d){return{a:c(b,d,a),b:b}}).sort(function(a,c){var b=a.a,d=c.a;return b===l?1:d===l?-1:b<d?-1:b>d?1:0}),"b")},b.sortedIndex=ha,b.tap=function(a,c){return c(a),a},b.template=function(a,c,d){d||(d={});var j;j=b.templateSettings
|
||||
;(function(v,l){"use strict";function Q(a){return"[object Arguments]"==h.call(a)}function b(a){return new p(a)}function p(a){if(a&&a._wrapped)return a;this._wrapped=a}function k(){for(var a,c,d,j=-1,b=arguments.length,e={e:"",f:"",k:"",q:"",c:{d:"",m:"++l<m"},o:{d:""}};++j<b;)for(c in a=arguments[j],a)d=(d=a[c])==o?"":d,/d|m|j/.test(c)?("string"==typeof d&&(d={b:d,n:d}),e.c[c]=d.b,e.o[c]=d.n):e[c]=d;a=e.a,c=e.c,d=e.o;var j=/^[^,]+/.exec(a)[0],b=d.m,g=/\S+$/.exec(b||j)[0];e.g=j,e.i=H,e.h="j.call("+
|
||||
g+",l)",e.l=g,e.p=da,e.r=e.r!==q,e.f||(e.f="if(!"+j+")return r");if("n"==j||!c.j)e.c=o;return b||(d.m="l in "+g),Function("b,c,i,j,k,o,v,y,z,h,A",'"use strict";return function('+a+"){"+ta(e)+"}")(I,u,r,s,ea,R,J,h,n,q)}function ua(a,c){return w[c]}function va(a){return"\\"+wa[a]}function xa(a,c){var d=w.length;return w[d]="'+((__t=("+c+"))==null?'':_['escape'](__t))+'",S+d}function ya(a,c){var d=w.length;return w[d]="'+((__t=("+c+"))==null?'':__t)+'",S+d}function za(a,c){var d=w.length;return w[d]="';"+
|
||||
c+";__p+='",S+d}function fa(a,c,d,j){if(!a)return d;var b=a.length,e=3>arguments.length;j&&(c=u(c,j));if(b===+b){for(b&&e&&(d=a[--b]);b--;)d=c(d,a[b],b,a);return d}var g=T(a);for((b=g.length)&&e&&(d=a[g[--b]]);b--;)e=g[b],d=c(d,a[e],e,a);return d}function U(a,c,d){return c==l||d?a[0]:m.call(a,0,c)}function ga(a,c){for(var d,b=-1,f=a.length,e=[];++b<f;)d=a[b],V(d)?B.apply(e,c?d:ga(d)):e.push(d);return e}function x(a,c,d){var b;if(!a)return-1;if(d)return d=ha(a,c),a[d]===c?d:-1;d=0;for(b=a.length;d<
|
||||
b;d++)if(a[d]===c)return d;return-1}function ia(a){for(var c,d=-1,b=a.length,f=m.call(arguments,1),e=[];++d<b;)c=a[d],0>x(e,c)&&W(f,function(a){return-1<x(a,c)})&&e.push(c);return e}function ja(a,c,d){var b=-Infinity,f=-1,e=a.length,g=b;if(c)d&&(c=u(c,d));else{if(a[0]===+a[0]&&e<=K)try{return Math.max.apply(Math,a)}catch(i){}if(!a.length)return g}for(;++f<e;)d=c?c(a[f],f,a):a[f],d>b&&(b=d,g=a[f]);return g}function ka(a,c,d){return m.call(a,c==l||d?1:c)}function ha(a,c,d){var b,f=0,e=a.length;for(
|
||||
d&&(c=d(c));f<e;)b=f+e>>1,(d?d(a[b]):a[b])<c?f=b+1:e=b;return f}function la(a,c,d){var b,f=-1,e=a.length,g=[],i=[];for(3>e&&(c=n);++f<e;)if(b=d?d(a[f]):a[f],c?!f||i[i.length-1]!==b:0>x(i,b))i.push(b),g.push(a[f]);return g}function u(a,c){var d,b=h.call(a)==r;if(b){if(y)return a=y.call.apply(y,arguments),function(){return arguments.length?a.apply(l,arguments):a()}}else d=c,c=a;var f=m.call(arguments,2),e=f.length;return function(){var g;return g=arguments,b||(a=c[d]),e&&(g.length&&(f.length=e,B.apply
|
||||
(f,g)),g=f),g=g.length?a.apply(c,g):a.call(c),f.length=e,g}}function L(a,c,d){d||(d=[]);if(a===c)return 0!==a||1/a==1/c;if(a==l||c==l)return a===c;a.s&&(a=a._wrapped),c.s&&(c=c._wrapped);if(a.isEqual&&h.call(a.isEqual)==r)return a.isEqual(c);if(c.isEqual&&h.call(c.isEqual)==r)return c.isEqual(a);var b=h.call(a);if(b!=h.call(c))return q;switch(b){case J:return a==""+c;case M:return a!=+a?c!=+c:0==a?1/a==1/c:a==+c;case ma:case na:return+a==+c;case oa:return a.source==c.source&&a.global==c.global&&a
|
||||
.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if("object"!=typeof a||"object"!=typeof c)return q;for(var f=d.length;f--;)if(d[f]==a)return n;var f=-1,e=n,g=0;d.push(a);if(b==I){if(g=a.length,e=g==c.length)for(;g--&&(e=L(a[g],c[g],d)););}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return q;for(var i in a)if(s.call(a,i)&&(g++,!(e=s.call(c,i)&&L(a[i],c[i],d))))break;if(e){for(i in c)if(s.call(c,i)&&!(g--))break;e=!g}if(e&&H)for(;7>++f&&(i=da[f],!s.call(a,i)||!!(e=
|
||||
s.call(c,i)&&L(a[i],c[i],d))););}return d.pop(),e}function ea(a){return a}function pa(a){C(N(a),function(c){var d=b[c]=a[c];p.prototype[c]=function(){var a=[this._wrapped];return arguments.length&&B.apply(a,arguments),a=1==a.length?d.call(b,a[0]):d.apply(b,a),this.s&&(a=new p(a),a.s=n),a}})}var n=!0,o=null,q=!1,X="object"==typeof exports&&exports&&("object"==typeof global&&global&&global==global.global&&(v=global),exports),K=5e4;try{(function(){K=arguments.length}).apply(o,Array(K))}catch(Ga){}var wa=
|
||||
{"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},H=!{valueOf:0}.propertyIsEnumerable("valueOf"),Aa=0,R={"boolean":q,"function":n,object:n,number:q,string:q,"undefined":q},Ba=v._,z=RegExp("^"+({}.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Ca=/__token__(\d+)/g,Da=/['\n\r\t\u2028\u2029\\]/g,da="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),S="__token__",w=[
|
||||
],I="[object Array]",ma="[object Boolean]",na="[object Date]",r="[object Function]",M="[object Number]",oa="[object RegExp]",J="[object String]",A=Array.prototype,D=Object.prototype,Y=A.concat,s=D.hasOwnProperty,B=A.push,m=A.slice,h=D.toString,y=z.test(y=m.bind)&&/\n|Opera/.test(y+h.call(v.opera))&&y,E=z.test(E=Array.isArray)&&E,Ea=v.isFinite,Z=z.test(Z=Object.keys)&&Z,Fa=v.clearTimeout,O=v.setTimeout;b.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g
|
||||
,variable:"object"};var ta=Function("n","var __p;with(n){__p='var l,r';if(k){__p+='='+k};__p+=';'+f+';'+q+';';if(c){__p+='var m='+g+'.length;l=-1;';if(o){__p+='if(m===+m){'};__p+=''+c['d']+';while('+c['m']+'){'+c['j']+'}';if(o){__p+='}'}}if(o){if(c){__p+='else{'}if(!i){__p+='var s=typeof '+l+'==\\'function\\';'};__p+=''+o['d']+';for('+o['m']+'){';if(i){if(r){__p+='if('+h+'){'};__p+=''+o['j']+';';if(r){__p+='}'}}else{__p+='if(!(s&&l==\\'prototype\\')';if(r){__p+='&&'+h};__p+='){'+o['j']+'}'};__p+='}';if(i){__p+='var g='+l+'.constructor;';for(var k=0;k<7;k++){__p+='l=\\''+p[k]+'\\';if(';if(p[k]=='constructor'){__p+='!(g&&g.prototype==='+l+')&&'};__p+=''+h+'){'+o['j']+'}'}}if(c){__p+='}'}};__p+=''+e+';return r'}return __p"
|
||||
),t={a:"f,d,x",k:"f",q:"if(!d){d=k}else if(x){d=c(d,x)}",j:"d(f[l],l,f)"},$={k:"z",j:"if(!d(f[l],l,f))return!r"},aa={a:"n",k:"n",q:"for(var t,u=1,m=arguments.length;u<m;u++){t=arguments[u];"+(H?"if(t){":""),m:"l in t",r:q,j:"n[l]=t[l]",e:(H?"}":"")+"}"},F={k:"[]",j:"d(f[l],l,f)&&r.push(f[l])"},G={k:"",f:"if(!f)return[]",d:{b:"r=Array(m)",n:"r=[]"},j:{b:"r[l]=d(f[l],l,f)",n:"r.push(d(f[l],l,f))"}},z=k({a:"f,w",k:"h",j:"if(f[l]===w)return z"}),W=k(t,$),D=k(t,F),qa=k(t,{j:"if(d(f[l],l,f))return f[l]"
|
||||
}),C=k(t,{q:"if(x)d=c(d,x)"}),ba=k(t,G),P=k(G,{a:"f,q",j:{b:"r[l]=f[l][q]",n:"r.push(f[l][q])"}}),ca=k({a:"f,d,a,x",k:"a",q:"var p=arguments.length<3;if(x)d=c(d,x)",d:{b:"if(p)r=f[++l]"},j:{b:"r=d(r,f[l],l,f)",n:"r=p?(p=h,f[l]):d(r,f[l],l,f)"}}),F=k(t,F,{j:"!"+F.j}),t=k(t,$,{k:"h",j:$.j.replace("!","")}),ra=k(G,{a:"f",j:{b:"r[l]=f[l]",n:"r.push(f[l])"}}),G=k(aa,{j:"if(n[l]==A)"+aa.j}),sa=k(aa),N=k({a:"n",k:"[]",r:q,j:"if(y.call(n[l])==i)r.push(l)",e:"r.sort()"});Q(arguments)||(Q=function(a){return!!
|
||||
a&&!!s.call(a,"callee")});var V=E||function(a){return h.call(a)==I},E=k({a:"B",k:"z",q:"var e=y.call(B);if(e==b||e==v)return!B.length",j:{n:"return h"}}),T=Z||k({a:"n",f:"if(!o[typeof n]||n===null)throw TypeError()",k:"[]",j:"r.push(l)"});b.VERSION="0.2.0",b.after=function(a,c){return 1>a?c():function(){if(1>--a)return c.apply(this,arguments)}},b.bind=u,b.bindAll=function(a){var c=arguments,d=1;1==c.length&&(d=0,c=N(a));for(var b=c.length;d<b;d++)a[c[d]]=u(a[c[d]],a);return a},b.chain=function(a)
|
||||
{return a=new p(a),a.s=n,a},b.clone=function(a){return R[typeof a]&&a!==o?V(a)?a.slice():sa({},a):a},b.compact=function(a){for(var c=-1,d=a.length,b=[];++c<d;)a[c]&&b.push(a[c]);return b},b.compose=function(){var a=arguments;return function(){for(var c=arguments,d=a.length;d--;)c=[a[d].apply(this,c)];return c[0]}},b.contains=z,b.debounce=function(a,c,d){function b(){i=l,d||a.apply(g,f)}var f,e,g,i;return function(){var h=d&&!i;return f=arguments,g=this,Fa(i),i=O(b,c),h&&(e=a.apply(g,f)),e}},b.defaults=
|
||||
G,b.defer=function(a){var c=m.call(arguments,1);return O(function(){return a.apply(l,c)},1)},b.delay=function(a,c){var d=m.call(arguments,2);return O(function(){return a.apply(l,d)},c)},b.difference=function(a){for(var c=-1,d=a.length,b=[],f=Y.apply(b,m.call(arguments,1));++c<d;)0>x(f,a[c])&&b.push(a[c]);return b},b.escape=function(a){return(a+"").replace(/&/g,"&").replace(/</g,"<").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},b.every=W,b.extend=sa,b.filter=D,b.find=
|
||||
qa,b.first=U,b.flatten=ga,b.forEach=C,b.functions=N,b.groupBy=function(a,c,d){var b,f=-1,e=h.call(c)==r,g=a.length,i={};for(e&&d&&(c=u(c,d));++f<g;)b=a[f],d=e?c(b,f,a):b[c],(s.call(i,d)?i[d]:i[d]=[]).push(b);return i},b.has=function(a,c){return s.call(a,c)},b.identity=ea,b.indexOf=x,b.initial=function(a,c,d){return m.call(a,0,-(c==l||d?1:c))},b.intersection=ia,b.invoke=function(a,c){for(var d=m.call(arguments,2),b=-1,f=a.length,e=h.call(c)==r,g=[];++b<f;)g[b]=(e?c:a[b][c]).apply(a[b],d);return g}
|
||||
,b.isArguments=Q,b.isArray=V,b.isBoolean=function(a){return a===n||a===q||h.call(a)==ma},b.isDate=function(a){return h.call(a)==na},b.isElement=function(a){return!!a&&1==a.nodeType},b.isEmpty=E,b.isEqual=L,b.isFinite=function(a){return Ea(a)&&h.call(a)==M},b.isFunction=function(a){return h.call(a)==r},b.isNaN=function(a){return h.call(a)==M&&a!=+a},b.isNull=function(a){return a===o},b.isNumber=function(a){return h.call(a)==M},b.isObject=function(a){return R[typeof a]&&a!==o},b.isRegExp=function(a
|
||||
){return h.call(a)==oa},b.isString=function(a){return h.call(a)==J},b.isUndefined=function(a){return a===l},b.keys=T,b.last=function(a,c,d){var b=a.length;return c==l||d?a[b-1]:m.call(a,-c||b)},b.lastIndexOf=function(a,c){if(!a)return-1;for(var d=a.length;d--;)if(a[d]===c)return d;return-1},b.map=ba,b.max=ja,b.memoize=function(a,c){var d={};return function(){var b=c?c.apply(this,arguments):arguments[0];return s.call(d,b)?d[b]:d[b]=a.apply(this,arguments)}},b.min=function(a,c,d){var b=Infinity,f=-1
|
||||
,e=a.length,g=b;if(c)d&&(c=u(c,d));else{if(a[0]===+a[0]&&e<=K)try{return Math.min.apply(Math,a)}catch(i){}if(!a.length)return g}for(;++f<e;)d=c?c(a[f],f,a):a[f],d<b&&(b=d,g=a[f]);return g},b.mixin=pa,b.noConflict=function(){return v._=Ba,this},b.once=function(a){var c,d=q;return function(){return d?c:(d=n,c=a.apply(this,arguments))}},b.partial=function(a){var c=m.call(arguments,1),d=c.length;return function(){var b;return b=arguments,b.length&&(c.length=d,B.apply(c,b)),b=1==c.length?a.call(this,c
|
||||
[0]):a.apply(this,c),c.length=d,b}},b.pick=function(a){for(var c,d=0,b=Y.apply(A,arguments),f=b.length,e={};++d<f;)c=b[d],c in a&&(e[c]=a[c]);return e},b.pluck=P,b.range=function(a,c,d){d||(d=1),2>arguments.length&&(c=a||0,a=0);for(var b=-1,f=Math.max(Math.ceil((c-a)/d),0),e=Array(f);++b<f;)e[b]=a,a+=d;return e},b.reduce=ca,b.reduceRight=fa,b.reject=F,b.rest=ka,b.result=function(a,c){if(!a)return o;var d=a[c];return h.call(d)==r?a[c]():d},b.shuffle=function(a){for(var c,d=-1,b=a.length,f=Array(b)
|
||||
;++d<b;)c=Math.floor(Math.random()*(d+1)),f[d]=f[c],f[c]=a[d];return f},b.size=function(a){var c=h.call(a);return c==I||c==J?a.length:T(a).length},b.some=t,b.sortBy=function(a,c,d){if(h.call(c)!=r)var b=c,c=function(a){return a[b]};else d&&(c=u(c,d));return P(ba(a,function(b,d){return{a:c(b,d,a),b:b}}).sort(function(a,c){var b=a.a,d=c.a;return b===l?1:d===l?-1:b<d?-1:b>d?1:0}),"b")},b.sortedIndex=ha,b.tap=function(a,c){return c(a),a},b.template=function(a,c,d){d||(d={});var j;j=b.templateSettings
|
||||
;var f=d.escape,e=d.evaluate,g=d.interpolate,d=d.variable;return f==o&&(f=j.escape),e==o&&(e=j.evaluate),g==o&&(g=j.interpolate),f&&(a=a.replace(f,xa)),g&&(a=a.replace(g,ya)),e&&(a=a.replace(e,za)),a="__p='"+a.replace(Da,va).replace(Ca,ua)+"';\n",w.length=0,d||(d=j.variable,a="with("+d+"||{}){"+a+"}"),a="function("+d+"){var __p,__t,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+a+"return __p}",j=Function("_","return "+a)(b),c?j(c):(j.source=a,j)},b.throttle=function(a,c){
|
||||
function b(){i=new Date,g=l,a.apply(e,j)}var j,f,e,g,i=0;return function(){var h=new Date,k=c-(h-i);return j=arguments,e=this,0>=k?(i=h,f=a.apply(e,j)):g||(g=P(b,k)),f}},b.times=function(a,c,b){b&&(c=u(c,b));for(b=0;b<a;b++)c(b)},b.toArray=function(a){if(!a)return[];if(h.call(a.toArray)==r)return a.toArray();var c=a.length;return c===+c?m.call(a):ra(a)},b.union=function(){for(var a=-1,c=[],b=K.apply(c,arguments),h=b.length;++a<h;)0>y(c,b[a])&&c.push(b[a]);return c},b.uniq=la,b.uniqueId=function(a
|
||||
){var b=Aa++;return a?a+b:b},b.values=ra,b.without=function(a){for(var b=m.call(arguments,1),d=-1,h=a.length,f=[];++d<h;)0>y(b,a[d])&&f.push(a[d]);return f},b.wrap=function(a,b){return function(){var d=[a];return arguments.length&&B.apply(d,arguments),b.apply(this,d)}},b.zip=function(){for(var a=-1,b=ja(Q(arguments,"length")),d=Array(b);++a<b;)d[a]=Q(arguments,a);return d},b.all=X,b.any=t,b.collect=ba,b.detect=qa,b.each=C,b.foldl=ca,b.foldr=fa,b.head=V,b.include=A,b.inject=ca,b.intersect=ia,b.methods=
|
||||
O,b.select=D,b.tail=ka,b.take=V,b.unique=la,p.prototype=b.prototype,pa(b),p.prototype.chain=function(){return this.s=n,this},p.prototype.value=function(){return this._wrapped},C("pop push reverse shift sort splice unshift".split(" "),function(a){var b=x[a];p.prototype[a]=function(){var a=this._wrapped;return arguments.length?b.apply(a,arguments):b.call(a),a.length===0&&delete a[0],this.s&&(a=new p(a),a.s=n),a}}),C(["concat","join","slice"],function(a){var b=x[a];p.prototype[a]=function(){var a=this
|
||||
._wrapped,a=arguments.length?b.apply(a,arguments):b.call(a);return this.s&&(a=new p(a),a.s=n),a}}),Y?"object"==typeof module&&module&&module.t==Y?(module.t=b)._=b:Y._=b:(v._=b,typeof define=="function"&&typeof define.amd=="object"&&define.amd&&define(function(){return b}))})(this);
|
||||
function b(){i=new Date,g=l,a.apply(e,j)}var j,f,e,g,i=0;return function(){var h=new Date,k=c-(h-i);return j=arguments,e=this,0>=k?(i=h,f=a.apply(e,j)):g||(g=O(b,k)),f}},b.times=function(a,c,b){b&&(c=u(c,b));for(b=0;b<a;b++)c(b)},b.toArray=function(a){if(!a)return[];if(h.call(a.toArray)==r)return a.toArray();var c=a.length;return c===+c?m.call(a):ra(a)},b.union=function(){for(var a=-1,c=[],b=Y.apply(c,arguments),h=b.length;++a<h;)0>x(c,b[a])&&c.push(b[a]);return c},b.uniq=la,b.uniqueId=function(a
|
||||
){var b=Aa++;return a?a+b:b},b.values=ra,b.without=function(a){for(var b=m.call(arguments,1),d=-1,h=a.length,f=[];++d<h;)0>x(b,a[d])&&f.push(a[d]);return f},b.wrap=function(a,b){return function(){var d=[a];return arguments.length&&B.apply(d,arguments),b.apply(this,d)}},b.zip=function(){for(var a=-1,b=ja(P(arguments,"length")),d=Array(b);++a<b;)d[a]=P(arguments,a);return d},b.all=W,b.any=t,b.collect=ba,b.detect=qa,b.each=C,b.foldl=ca,b.foldr=fa,b.head=U,b.include=z,b.inject=ca,b.intersect=ia,b.methods=
|
||||
N,b.select=D,b.tail=ka,b.take=U,b.unique=la,p.prototype=b.prototype,pa(b),p.prototype.chain=function(){return this.s=n,this},p.prototype.value=function(){return this._wrapped},C("pop push reverse shift sort splice unshift".split(" "),function(a){var b=A[a];p.prototype[a]=function(){var a=this._wrapped;return arguments.length?b.apply(a,arguments):b.call(a),a.length===0&&delete a[0],this.s&&(a=new p(a),a.s=n),a}}),C(["concat","join","slice"],function(a){var b=A[a];p.prototype[a]=function(){var a=this
|
||||
._wrapped,a=arguments.length?b.apply(a,arguments):b.call(a);return this.s&&(a=new p(a),a.s=n),a}}),X?"object"==typeof module&&module&&module.t==X?(module.t=b)._=b:X._=b:(v._=b,typeof define=="function"&&typeof define.amd=="object"&&define.amd&&define(function(){return b}))})(this);
|
||||
Reference in New Issue
Block a user