mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1baefebe8f | ||
|
|
39fb05033f | ||
|
|
c6093c084c | ||
|
|
dfec6d9a6d | ||
|
|
08b1261c75 | ||
|
|
2ad6faae3a | ||
|
|
4eff301db3 | ||
|
|
447e43e8f4 | ||
|
|
7457001275 | ||
|
|
fcabd5e79e |
@@ -15,8 +15,11 @@ vendor/benchmark.js/*.jar
|
|||||||
vendor/closure-compiler
|
vendor/closure-compiler
|
||||||
vendor/docdown
|
vendor/docdown
|
||||||
vendor/firebug-lite/
|
vendor/firebug-lite/
|
||||||
|
vendor/json3/
|
||||||
vendor/jquery/
|
vendor/jquery/
|
||||||
vendor/qunit/qunit/*.css
|
vendor/qunit/qunit/*.css
|
||||||
|
vendor/qunit/qunit/*-1.8.0.js
|
||||||
vendor/requirejs/
|
vendor/requirejs/
|
||||||
|
vendor/underscore/*-min.js
|
||||||
vendor/uglifyjs
|
vendor/uglifyjs
|
||||||
vendor/underscore/test/
|
vendor/underscore/test/
|
||||||
|
|||||||
57
README.md
57
README.md
@@ -1,4 +1,4 @@
|
|||||||
# Lo-Dash <sup>v0.9.0</sup>
|
# Lo-Dash <sup>v0.9.1</sup>
|
||||||
[](http://travis-ci.org/bestiejs/lodash)
|
[](http://travis-ci.org/bestiejs/lodash)
|
||||||
|
|
||||||
A drop-in replacement<sup>[*](https://github.com/bestiejs/lodash/wiki/Drop-in-Disclaimer)</sup> for Underscore.js, from the devs behind [jsPerf.com](http://jsperf.com), delivering [performance](http://lodash.com/benchmarks), [bug fixes](https://github.com/bestiejs/lodash#resolved-underscorejs-issues), and [additional features](http://lodash.com/#features).
|
A drop-in replacement<sup>[*](https://github.com/bestiejs/lodash/wiki/Drop-in-Disclaimer)</sup> for Underscore.js, from the devs behind [jsPerf.com](http://jsperf.com), delivering [performance](http://lodash.com/benchmarks), [bug fixes](https://github.com/bestiejs/lodash#resolved-underscorejs-issues), and [additional features](http://lodash.com/#features).
|
||||||
@@ -7,10 +7,10 @@ Lo-Dash’s performance is gained by avoiding slower native methods, instead opt
|
|||||||
|
|
||||||
## Download
|
## Download
|
||||||
|
|
||||||
* [Development build](https://raw.github.com/bestiejs/lodash/v0.9.0/lodash.js)
|
* [Development build](https://raw.github.com/bestiejs/lodash/v0.9.1/lodash.js)
|
||||||
* [Production build](https://raw.github.com/bestiejs/lodash/v0.9.0/lodash.min.js)
|
* [Production build](https://raw.github.com/bestiejs/lodash/v0.9.1/lodash.min.js)
|
||||||
* [Underscore build](https://raw.github.com/bestiejs/lodash/v0.9.0/lodash.underscore.min.js) tailored for projects already using Underscore
|
* [Underscore build](https://raw.github.com/bestiejs/lodash/v0.9.1/lodash.underscore.min.js) tailored for projects already using Underscore
|
||||||
* CDN copies of ≤ [v0.9.0](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/0.9.0/lodash.min.js) are available on [cdnjs](http://cdnjs.com/) thanks to [CloudFlare](http://www.cloudflare.com/)
|
* CDN copies of ≤ v0.9.1’s [Production](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/0.9.1/lodash.min.js), [Underscore](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/0.9.1/lodash.underscore.min.js), and [Development](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/0.9.1/lodash.js) builds are available on [cdnjs](http://cdnjs.com/) thanks to [CloudFlare](http://www.cloudflare.com/)
|
||||||
* For optimal file size, [create a custom build](https://github.com/bestiejs/lodash#custom-builds) with only the features you need
|
* For optimal file size, [create a custom build](https://github.com/bestiejs/lodash#custom-builds) with only the features you need
|
||||||
|
|
||||||
## Dive in
|
## Dive in
|
||||||
@@ -49,7 +49,7 @@ For more information check out these screencasts over Lo-Dash:
|
|||||||
|
|
||||||
## Support
|
## Support
|
||||||
|
|
||||||
Lo-Dash has been tested in at least Chrome 5~22, Firefox 1~16, IE 6-10, Opera 9.25-12, Safari 3-6, Node.js 0.4.8-0.8.12, Narwhal 0.3.2, RingoJS 0.8, and Rhino 1.7RC5.
|
Lo-Dash has been tested in at least Chrome 5~22, Firefox 1~16, IE 6-10, Opera 9.25-12, Safari 3-6, Node.js 0.4.8-0.8.14, Narwhal 0.3.2, RingoJS 0.8, and Rhino 1.7RC5.
|
||||||
|
|
||||||
## Custom builds
|
## Custom builds
|
||||||
|
|
||||||
@@ -202,36 +202,29 @@ require({
|
|||||||
|
|
||||||
## Resolved Underscore.js issues
|
## Resolved Underscore.js issues
|
||||||
|
|
||||||
* Add AMD loader support [[#431](https://github.com/documentcloud/underscore/pull/431), [test](https://github.com/bestiejs/lodash/blob/v0.9.0/test/test.js#L116-138)]
|
* Add AMD loader support [[#431](https://github.com/documentcloud/underscore/pull/431), [test](https://github.com/bestiejs/lodash/blob/v0.9.1/test/test.js#L116-146)]
|
||||||
* Allow iteration of objects with a `length` property [[#799](https://github.com/documentcloud/underscore/pull/799), [test](https://github.com/bestiejs/lodash/blob/v0.9.0/test/test.js#L508-514)]
|
* Allow iteration of objects with a `length` property [[#799](https://github.com/documentcloud/underscore/pull/799), [test](https://github.com/bestiejs/lodash/blob/v0.9.1/test/test.js#L518-524)]
|
||||||
* Ensure *“Collections”* methods allow string `collection` arguments [[#247](https://github.com/documentcloud/underscore/issues/247), [#276](https://github.com/documentcloud/underscore/issues/276), [#561](https://github.com/documentcloud/underscore/pull/561), [test](https://github.com/bestiejs/lodash/blob/v0.9.0/test/test.js#L468-485)]
|
* Ensure *“Collections”* methods allow string `collection` arguments [[#247](https://github.com/documentcloud/underscore/issues/247), [#276](https://github.com/documentcloud/underscore/issues/276), [#561](https://github.com/documentcloud/underscore/pull/561), [test](https://github.com/bestiejs/lodash/blob/v0.9.1/test/test.js#L478-495)]
|
||||||
* Fix cross-browser object iteration bugs [[#60](https://github.com/documentcloud/underscore/issues/60), [#376](https://github.com/documentcloud/underscore/issues/376), [test](https://github.com/bestiejs/lodash/blob/v0.9.0/test/test.js#L521-545)]
|
* Fix cross-browser object iteration bugs [[#60](https://github.com/documentcloud/underscore/issues/60), [#376](https://github.com/documentcloud/underscore/issues/376), [test](https://github.com/bestiejs/lodash/blob/v0.9.1/test/test.js#L531-555)]
|
||||||
* Methods should work on pages with incorrectly shimmed native methods [[#7](https://github.com/documentcloud/underscore/issues/7), [#742](https://github.com/documentcloud/underscore/issues/742), [test](https://github.com/bestiejs/lodash/blob/v0.9.0/test/test.js#L140-146)]
|
* Methods should work on pages with incorrectly shimmed native methods [[#7](https://github.com/documentcloud/underscore/issues/7), [#742](https://github.com/documentcloud/underscore/issues/742), [test](https://github.com/bestiejs/lodash/blob/v0.9.1/test/test.js#L140-146)]
|
||||||
* `_.clone` should allow `deep` cloning [[#595](https://github.com/documentcloud/underscore/pull/595), [test](https://github.com/bestiejs/lodash/blob/v0.9.0/test/test.js#L212-223)]
|
* `_.clone` should allow `deep` cloning [[#595](https://github.com/documentcloud/underscore/pull/595), [test](https://github.com/bestiejs/lodash/blob/v0.9.1/test/test.js#L212-223)]
|
||||||
* `_.contains` should work with strings [[#667](https://github.com/documentcloud/underscore/pull/667), [test](https://github.com/bestiejs/lodash/blob/v0.9.0/test/test.js#L265-274)]
|
* `_.contains` should work with strings [[#667](https://github.com/documentcloud/underscore/pull/667), [test](https://github.com/bestiejs/lodash/blob/v0.9.1/test/test.js#L265-274)]
|
||||||
* `_.extend` should recursively extend objects [[#379](https://github.com/documentcloud/underscore/pull/379), [#718](https://github.com/documentcloud/underscore/issues/718), [test](https://github.com/bestiejs/lodash/blob/v0.9.0/test/test.js#L989-1011)]
|
* `_.extend` should recursively extend objects [[#379](https://github.com/documentcloud/underscore/pull/379), [#718](https://github.com/documentcloud/underscore/issues/718), [test](https://github.com/bestiejs/lodash/blob/v0.9.1/test/test.js#L1020-1042)]
|
||||||
* `_.forEach` should be chainable [[#142](https://github.com/documentcloud/underscore/issues/142), [test](https://github.com/bestiejs/lodash/blob/v0.9.0/test/test.js#L463-466)]
|
* `_.forEach` should be chainable [[#142](https://github.com/documentcloud/underscore/issues/142), [test](https://github.com/bestiejs/lodash/blob/v0.9.1/test/test.js#L473-476)]
|
||||||
* `_.forEach` should allow exiting iteration early [[#211](https://github.com/documentcloud/underscore/issues/211), [test](https://github.com/bestiejs/lodash/blob/v0.9.0/test/test.js#L551-569)]
|
* `_.forEach` should allow exiting iteration early [[#211](https://github.com/documentcloud/underscore/issues/211), [test](https://github.com/bestiejs/lodash/blob/v0.9.1/test/test.js#L561-579)]
|
||||||
* `_.isEmpty` should support jQuery/MooTools DOM query collections [[#690](https://github.com/documentcloud/underscore/pull/690), [test](https://github.com/bestiejs/lodash/blob/v0.9.0/test/test.js#L710-715)]
|
* `_.isEmpty` should support jQuery/MooTools DOM query collections [[#690](https://github.com/documentcloud/underscore/pull/690), [test](https://github.com/bestiejs/lodash/blob/v0.9.1/test/test.js#L720-725)]
|
||||||
* `_.isObject` should avoid V8 bug [#2291](http://code.google.com/p/v8/issues/detail?id=2291) [[#605](https://github.com/documentcloud/underscore/issues/605), [test](https://github.com/bestiejs/lodash/blob/v0.9.0/test/test.js#L770-782)]
|
* `_.isObject` should avoid V8 bug [#2291](http://code.google.com/p/v8/issues/detail?id=2291) [[#605](https://github.com/documentcloud/underscore/issues/605), [test](https://github.com/bestiejs/lodash/blob/v0.9.1/test/test.js#L801-813)]
|
||||||
* `_.keys` should work with `arguments` objects cross-browser [[#396](https://github.com/documentcloud/underscore/issues/396), [test](https://github.com/bestiejs/lodash/blob/v0.9.0/test/test.js#L863-865)]
|
* `_.keys` should work with `arguments` objects cross-browser [[#396](https://github.com/documentcloud/underscore/issues/396), [test](https://github.com/bestiejs/lodash/blob/v0.9.1/test/test.js#L894-896)]
|
||||||
* `_.range` should coerce arguments to numbers [[#634](https://github.com/documentcloud/underscore/issues/634), [#683](https://github.com/documentcloud/underscore/issues/683), [test](https://github.com/bestiejs/lodash/blob/v0.9.0/test/test.js#L1264-1267)]
|
* `_.range` should coerce arguments to numbers [[#634](https://github.com/documentcloud/underscore/issues/634), [#683](https://github.com/documentcloud/underscore/issues/683), [test](https://github.com/bestiejs/lodash/blob/v0.9.1/test/test.js#L1295-1298)]
|
||||||
|
|
||||||
## Release Notes
|
## Release Notes
|
||||||
|
|
||||||
### <sup>v0.9.0</sup>
|
### <sup>v0.9.1</sup>
|
||||||
|
|
||||||
* Added a `sourceURL` option to `_.template`
|
* Ensured `_.every` returns `false` as soon as the `callback` result is falsey
|
||||||
* Ensured `_.where` returns an empty array if passed an empty `properties` object
|
* Ensured `_.isFinite` returns `false` for non-numeric values
|
||||||
* Expanded `_.isFinite` to return `true` for numeric strings
|
* Removed `_.forEach` chainability in the `underscore` build
|
||||||
* Reduced `_.intersection`, `_.omit`, `_.pick`, `_.sortedIndex`, and `_.where`
|
* Simplified `_.union`
|
||||||
* Reduced the `npm` package file size by only downloading the minifiers for global installs
|
|
||||||
* Reduced Lo-Dash's file size
|
|
||||||
* Removed compilation from `_.bindAll`, `_.contains`, `_.countBy`, `_.every`,
|
|
||||||
`_.filter`, `_.find`, `_.functions`, `_.groupBy`, `_.invert`, `_.invoke`,
|
|
||||||
`_.isEmpty`, `_.map`, `_.merge`, `_.omit`, `_.pairs`, `_.pick`, `_.pluck`,
|
|
||||||
`_.reduce`, `_.reject`, `_.some`, `_.sortBy`, `_.values`, `_.where`, and
|
|
||||||
internal `shimKeys`
|
|
||||||
|
|
||||||
The full changelog is available [here](https://github.com/bestiejs/lodash/wiki/Changelog).
|
The full changelog is available [here](https://github.com/bestiejs/lodash/wiki/Changelog).
|
||||||
|
|
||||||
|
|||||||
7
build.js
7
build.js
@@ -149,7 +149,7 @@
|
|||||||
'times': [],
|
'times': [],
|
||||||
'toArray': ['values'],
|
'toArray': ['values'],
|
||||||
'unescape': [],
|
'unescape': [],
|
||||||
'union': ['indexOf'],
|
'union': ['uniq'],
|
||||||
'uniq': ['identity', 'indexOf'],
|
'uniq': ['identity', 'indexOf'],
|
||||||
'uniqueId': [],
|
'uniqueId': [],
|
||||||
'value': ['mixin'],
|
'value': ['mixin'],
|
||||||
@@ -1327,6 +1327,11 @@
|
|||||||
});
|
});
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
// remove chainability from `_.forEach`
|
||||||
|
source = source.replace(matchFunction(source, 'forEach'), function(match) {
|
||||||
|
return match.replace(/return result([};\s]+)$/, '$1');
|
||||||
|
});
|
||||||
|
|
||||||
// unexpose "exit early" feature from `_.forEach`, `_.forIn`, and `_.forOwn`
|
// unexpose "exit early" feature from `_.forEach`, `_.forIn`, and `_.forOwn`
|
||||||
_.each(['forEach', 'forIn', 'forOwn'], function(methodName) {
|
_.each(['forEach', 'forIn', 'forOwn'], function(methodName) {
|
||||||
source = source.replace(matchFunction(source, methodName), function(match) {
|
source = source.replace(matchFunction(source, methodName), function(match) {
|
||||||
|
|||||||
214
doc/README.md
214
doc/README.md
@@ -1,4 +1,4 @@
|
|||||||
# Lo-Dash <sup>v0.9.0</sup>
|
# Lo-Dash <sup>v0.9.1</sup>
|
||||||
|
|
||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_compactarray"></a>`_.compact(array)`
|
### <a id="_compactarray"></a>`_.compact(array)`
|
||||||
<a href="#_compactarray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2495 "View in source") [Ⓣ][1]
|
<a href="#_compactarray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2496 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates an array with all falsey values of `array` removed. The values `false`, `null`, `0`, `""`, `undefined` and `NaN` are all falsey.
|
Creates an array with all falsey values of `array` removed. The values `false`, `null`, `0`, `""`, `undefined` and `NaN` are all falsey.
|
||||||
|
|
||||||
@@ -208,7 +208,7 @@ _.compact([0, 1, false, 2, '', 3]);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_differencearray--array1-array2-"></a>`_.difference(array [, array1, array2, ...])`
|
### <a id="_differencearray--array1-array2-"></a>`_.difference(array [, array1, array2, ...])`
|
||||||
<a href="#_differencearray--array1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2525 "View in source") [Ⓣ][1]
|
<a href="#_differencearray--array1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2526 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates an array of `array` elements not present in the other arrays using strict equality for comparisons, i.e. `===`.
|
Creates an array of `array` elements not present in the other arrays using strict equality for comparisons, i.e. `===`.
|
||||||
|
|
||||||
@@ -233,7 +233,7 @@ _.difference([1, 2, 3, 4, 5], [5, 2, 10]);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_firstarray--n"></a>`_.first(array [, n])`
|
### <a id="_firstarray--n"></a>`_.first(array [, n])`
|
||||||
<a href="#_firstarray--n">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2560 "View in source") [Ⓣ][1]
|
<a href="#_firstarray--n">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2561 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Gets the first element of the `array`. Pass `n` to return the first `n` elements of the `array`.
|
Gets the first element of the `array`. Pass `n` to return the first `n` elements of the `array`.
|
||||||
|
|
||||||
@@ -261,7 +261,7 @@ _.first([5, 4, 3, 2, 1]);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_flattenarray-shallow"></a>`_.flatten(array, shallow)`
|
### <a id="_flattenarray-shallow"></a>`_.flatten(array, shallow)`
|
||||||
<a href="#_flattenarray-shallow">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2584 "View in source") [Ⓣ][1]
|
<a href="#_flattenarray-shallow">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2585 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Flattens a nested array *(the nesting can be to any depth)*. If `shallow` is truthy, `array` will only be flattened a single level.
|
Flattens a nested array *(the nesting can be to any depth)*. If `shallow` is truthy, `array` will only be flattened a single level.
|
||||||
|
|
||||||
@@ -289,7 +289,7 @@ _.flatten([1, [2], [3, [[4]]]], true);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_indexofarray-value--fromindex0"></a>`_.indexOf(array, value [, fromIndex=0])`
|
### <a id="_indexofarray-value--fromindex0"></a>`_.indexOf(array, value [, fromIndex=0])`
|
||||||
<a href="#_indexofarray-value--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2626 "View in source") [Ⓣ][1]
|
<a href="#_indexofarray-value--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2627 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Gets the index at which the first occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `fromIndex` will run a faster binary search.
|
Gets the index at which the first occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `fromIndex` will run a faster binary search.
|
||||||
|
|
||||||
@@ -321,7 +321,7 @@ _.indexOf([1, 1, 2, 2, 3, 3], 2, true);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_initialarray--n"></a>`_.initial(array [, n])`
|
### <a id="_initialarray--n"></a>`_.initial(array [, n])`
|
||||||
<a href="#_initialarray--n">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2661 "View in source") [Ⓣ][1]
|
<a href="#_initialarray--n">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2662 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Gets all but the last element of `array`. Pass `n` to exclude the last `n` elements from the result.
|
Gets all but the last element of `array`. Pass `n` to exclude the last `n` elements from the result.
|
||||||
|
|
||||||
@@ -346,7 +346,7 @@ _.initial([3, 2, 1]);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_intersectionarray1-array2-"></a>`_.intersection([array1, array2, ...])`
|
### <a id="_intersectionarray1-array2-"></a>`_.intersection([array1, array2, ...])`
|
||||||
<a href="#_intersectionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2682 "View in source") [Ⓣ][1]
|
<a href="#_intersectionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2683 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Computes the intersection of all the passed-in arrays using strict equality for comparisons, i.e. `===`.
|
Computes the intersection of all the passed-in arrays using strict equality for comparisons, i.e. `===`.
|
||||||
|
|
||||||
@@ -370,7 +370,7 @@ _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_lastarray--n"></a>`_.last(array [, n])`
|
### <a id="_lastarray--n"></a>`_.last(array [, n])`
|
||||||
<a href="#_lastarray--n">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2720 "View in source") [Ⓣ][1]
|
<a href="#_lastarray--n">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2721 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Gets the last element of the `array`. Pass `n` to return the last `n` elements of the `array`.
|
Gets the last element of the `array`. Pass `n` to return the last `n` elements of the `array`.
|
||||||
|
|
||||||
@@ -395,7 +395,7 @@ _.last([3, 2, 1]);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_lastindexofarray-value--fromindexarraylength-1"></a>`_.lastIndexOf(array, value [, fromIndex=array.length-1])`
|
### <a id="_lastindexofarray-value--fromindexarraylength-1"></a>`_.lastIndexOf(array, value [, fromIndex=array.length-1])`
|
||||||
<a href="#_lastindexofarray-value--fromindexarraylength-1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2746 "View in source") [Ⓣ][1]
|
<a href="#_lastindexofarray-value--fromindexarraylength-1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2747 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Gets the index at which the last occurrence of `value` is found using strict equality for comparisons, i.e. `===`.
|
Gets the index at which the last occurrence of `value` is found using strict equality for comparisons, i.e. `===`.
|
||||||
|
|
||||||
@@ -424,7 +424,7 @@ _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_objectkeys--values"></a>`_.object(keys [, values=[]])`
|
### <a id="_objectkeys--values"></a>`_.object(keys [, values=[]])`
|
||||||
<a href="#_objectkeys--values">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2776 "View in source") [Ⓣ][1]
|
<a href="#_objectkeys--values">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2777 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates an object composed from arrays of `keys` and `values`. Pass either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]`, or two arrays, one of `keys` and one of corresponding `values`.
|
Creates an object composed from arrays of `keys` and `values`. Pass either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]`, or two arrays, one of `keys` and one of corresponding `values`.
|
||||||
|
|
||||||
@@ -449,7 +449,7 @@ _.object(['moe', 'larry', 'curly'], [30, 40, 50]);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_rangestart0-end--step1"></a>`_.range([start=0], end [, step=1])`
|
### <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#L2821 "View in source") [Ⓣ][1]
|
<a href="#_rangestart0-end--step1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2822 "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.
|
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.
|
||||||
|
|
||||||
@@ -487,7 +487,7 @@ _.range(0);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_restarray--n"></a>`_.rest(array [, n])`
|
### <a id="_restarray--n"></a>`_.rest(array [, n])`
|
||||||
<a href="#_restarray--n">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2860 "View in source") [Ⓣ][1]
|
<a href="#_restarray--n">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2861 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
The opposite of `_.initial`, this method gets all but the first value of `array`. Pass `n` to exclude the first `n` values from the result.
|
The opposite of `_.initial`, this method gets all but the first value of `array`. Pass `n` to exclude the first `n` values from the result.
|
||||||
|
|
||||||
@@ -515,7 +515,7 @@ _.rest([3, 2, 1]);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_sortedindexarray-value--callbackidentityproperty-thisarg"></a>`_.sortedIndex(array, value [, callback=identity|property, thisArg])`
|
### <a id="_sortedindexarray-value--callbackidentityproperty-thisarg"></a>`_.sortedIndex(array, value [, callback=identity|property, thisArg])`
|
||||||
<a href="#_sortedindexarray-value--callbackidentityproperty-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2906 "View in source") [Ⓣ][1]
|
<a href="#_sortedindexarray-value--callbackidentityproperty-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2907 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Uses a binary search to determine the smallest index at which the `value` should be inserted into `array` in order to maintain the sort order of the sorted `array`. If `callback` is passed, it will be executed for `value` and each element in `array` to compute their sort ranking. The `callback` is bound to `thisArg` and invoked with one argument; *(value)*. The `callback` argument may also be the name of a property to order by.
|
Uses a binary search to determine the smallest index at which the `value` should be inserted into `array` in order to maintain the sort order of the sorted `array`. If `callback` is passed, it will be executed for `value` and each element in `array` to compute their sort ranking. The `callback` is bound to `thisArg` and invoked with one argument; *(value)*. The `callback` argument may also be the name of a property to order by.
|
||||||
|
|
||||||
@@ -559,7 +559,7 @@ _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) {
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_unionarray1-array2-"></a>`_.union([array1, array2, ...])`
|
### <a id="_unionarray1-array2-"></a>`_.union([array1, array2, ...])`
|
||||||
<a href="#_unionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2937 "View in source") [Ⓣ][1]
|
<a href="#_unionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2938 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Computes the union of the passed-in arrays using strict equality for comparisons, i.e. `===`.
|
Computes the union of the passed-in arrays using strict equality for comparisons, i.e. `===`.
|
||||||
|
|
||||||
@@ -583,7 +583,7 @@ _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_uniqarray--issortedfalse-callbackidentity-thisarg"></a>`_.uniq(array [, isSorted=false, callback=identity, thisArg])`
|
### <a id="_uniqarray--issortedfalse-callbackidentity-thisarg"></a>`_.uniq(array [, isSorted=false, callback=identity, thisArg])`
|
||||||
<a href="#_uniqarray--issortedfalse-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2982 "View in source") [Ⓣ][1]
|
<a href="#_uniqarray--issortedfalse-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2972 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates a duplicate-value-free version of the `array` using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `isSorted` will run a faster algorithm. If `callback` is passed, each element of `array` is passed through a callback` before uniqueness is computed. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
Creates a duplicate-value-free version of the `array` using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `isSorted` will run a faster algorithm. If `callback` is passed, each element of `array` is passed through a callback` before uniqueness is computed. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||||
|
|
||||||
@@ -622,7 +622,7 @@ _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return this.floor(num); }, Math);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_withoutarray--value1-value2-"></a>`_.without(array [, value1, value2, ...])`
|
### <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#L3023 "View in source") [Ⓣ][1]
|
<a href="#_withoutarray--value1-value2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3020 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates an array with all occurrences of the passed values removed using strict equality for comparisons, i.e. `===`.
|
Creates an array with all occurrences of the passed values removed using strict equality for comparisons, i.e. `===`.
|
||||||
|
|
||||||
@@ -647,7 +647,7 @@ _.without([1, 2, 1, 0, 3, 1, 4], 0, 1);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_ziparray1-array2-"></a>`_.zip([array1, array2, ...])`
|
### <a id="_ziparray1-array2-"></a>`_.zip([array1, array2, ...])`
|
||||||
<a href="#_ziparray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3054 "View in source") [Ⓣ][1]
|
<a href="#_ziparray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3051 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Groups the elements of each array at their corresponding indexes. Useful for separate data sources that are coordinated through matching array indexes. For a matrix of nested arrays, `_.zip.apply(...)` can transpose the matrix in a similar fashion.
|
Groups the elements of each array at their corresponding indexes. Useful for separate data sources that are coordinated through matching array indexes. For a matrix of nested arrays, `_.zip.apply(...)` can transpose the matrix in a similar fashion.
|
||||||
|
|
||||||
@@ -678,7 +678,7 @@ _.zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_value"></a>`_(value)`
|
### <a id="_value"></a>`_(value)`
|
||||||
<a href="#_value">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L231 "View in source") [Ⓣ][1]
|
<a href="#_value">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L232 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
The `lodash` function.
|
The `lodash` function.
|
||||||
|
|
||||||
@@ -696,7 +696,7 @@ The `lodash` function.
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_chainvalue"></a>`_.chain(value)`
|
### <a id="_chainvalue"></a>`_.chain(value)`
|
||||||
<a href="#_chainvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3906 "View in source") [Ⓣ][1]
|
<a href="#_chainvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3903 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Wraps the value in a `lodash` wrapper object.
|
Wraps the value in a `lodash` wrapper object.
|
||||||
|
|
||||||
@@ -730,7 +730,7 @@ var youngest = _.chain(stooges)
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_tapvalue-interceptor"></a>`_.tap(value, interceptor)`
|
### <a id="_tapvalue-interceptor"></a>`_.tap(value, interceptor)`
|
||||||
<a href="#_tapvalue-interceptor">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3933 "View in source") [Ⓣ][1]
|
<a href="#_tapvalue-interceptor">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3930 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Invokes `interceptor` with the `value` as the first argument, and then returns `value`. The purpose of this method is to "tap into" a method chain, in order to perform operations on intermediate results within the chain.
|
Invokes `interceptor` with the `value` as the first argument, and then returns `value`. The purpose of this method is to "tap into" a method chain, in order to perform operations on intermediate results within the chain.
|
||||||
|
|
||||||
@@ -760,7 +760,7 @@ _.chain([1, 2, 3, 200])
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_prototypechain"></a>`_.prototype.chain()`
|
### <a id="_prototypechain"></a>`_.prototype.chain()`
|
||||||
<a href="#_prototypechain">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3951 "View in source") [Ⓣ][1]
|
<a href="#_prototypechain">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3948 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Enables method chaining on the wrapper object.
|
Enables method chaining on the wrapper object.
|
||||||
|
|
||||||
@@ -781,7 +781,7 @@ _([1, 2, 3]).value();
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_prototypevalue"></a>`_.prototype.value()`
|
### <a id="_prototypevalue"></a>`_.prototype.value()`
|
||||||
<a href="#_prototypevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3968 "View in source") [Ⓣ][1]
|
<a href="#_prototypevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3965 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Extracts the wrapped value.
|
Extracts the wrapped value.
|
||||||
|
|
||||||
@@ -809,7 +809,7 @@ _([1, 2, 3]).value();
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_containscollection-target"></a>`_.contains(collection, target)`
|
### <a id="_containscollection-target"></a>`_.contains(collection, target)`
|
||||||
<a href="#_containscollection-target">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1814 "View in source") [Ⓣ][1]
|
<a href="#_containscollection-target">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1815 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Checks if a given `target` element is present in a `collection` using strict equality for comparisons, i.e. `===`.
|
Checks if a given `target` element is present in a `collection` using strict equality for comparisons, i.e. `===`.
|
||||||
|
|
||||||
@@ -843,7 +843,7 @@ _.contains('curly', 'ur');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_countbycollection-callbackproperty--thisarg"></a>`_.countBy(collection, callback|property [, thisArg])`
|
### <a id="_countbycollection-callbackproperty--thisarg"></a>`_.countBy(collection, callback|property [, thisArg])`
|
||||||
<a href="#_countbycollection-callbackproperty--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1853 "View in source") [Ⓣ][1]
|
<a href="#_countbycollection-callbackproperty--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1854 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates an object composed of keys returned from running each element of `collection` through a `callback`. The corresponding value of each key is the number of times the key was returned by `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. The `callback` argument may also be the name of a property to count by *(e.g. 'length')*.
|
Creates an object composed of keys returned from running each element of `collection` through a `callback`. The corresponding value of each key is the number of times the key was returned by `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. The `callback` argument may also be the name of a property to count by *(e.g. 'length')*.
|
||||||
|
|
||||||
@@ -875,7 +875,7 @@ _.countBy(['one', 'two', 'three'], 'length');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_everycollection--callbackidentity-thisarg"></a>`_.every(collection [, callback=identity, thisArg])`
|
### <a id="_everycollection--callbackidentity-thisarg"></a>`_.every(collection [, callback=identity, thisArg])`
|
||||||
<a href="#_everycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1882 "View in source") [Ⓣ][1]
|
<a href="#_everycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1883 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Checks if the `callback` returns a truthy value for **all** elements of a `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
Checks if the `callback` returns a truthy value for **all** elements of a `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||||
|
|
||||||
@@ -904,7 +904,7 @@ _.every([true, 1, null, 'yes'], Boolean);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_filtercollection--callbackidentity-thisarg"></a>`_.filter(collection [, callback=identity, thisArg])`
|
### <a id="_filtercollection--callbackidentity-thisarg"></a>`_.filter(collection [, callback=identity, thisArg])`
|
||||||
<a href="#_filtercollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1909 "View in source") [Ⓣ][1]
|
<a href="#_filtercollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1910 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Examines each element in a `collection`, returning an array of all elements the `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
Examines each element in a `collection`, returning an array of all elements the `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||||
|
|
||||||
@@ -933,7 +933,7 @@ var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; })
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_findcollection-callback--thisarg"></a>`_.find(collection, callback [, thisArg])`
|
### <a id="_findcollection-callback--thisarg"></a>`_.find(collection, callback [, thisArg])`
|
||||||
<a href="#_findcollection-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1940 "View in source") [Ⓣ][1]
|
<a href="#_findcollection-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1941 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Examines each element in a `collection`, returning the first one the `callback` returns truthy for. The function returns as soon as it finds an acceptable element, and does not iterate over the entire `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
Examines each element in a `collection`, returning the first one the `callback` returns truthy for. The function returns as soon as it finds an acceptable element, and does not iterate over the entire `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||||
|
|
||||||
@@ -962,7 +962,7 @@ var even = _.find([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; });
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_foreachcollection-callback--thisarg"></a>`_.forEach(collection, callback [, thisArg])`
|
### <a id="_foreachcollection-callback--thisarg"></a>`_.forEach(collection, callback [, thisArg])`
|
||||||
<a href="#_foreachcollection-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1971 "View in source") [Ⓣ][1]
|
<a href="#_foreachcollection-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1972 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Iterates over a `collection`, executing the `callback` for each element in the `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. Callbacks may exit iteration early by explicitly returning `false`.
|
Iterates over a `collection`, executing the `callback` for each element in the `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||||
|
|
||||||
@@ -994,7 +994,7 @@ _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, alert);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_groupbycollection-callbackproperty--thisarg"></a>`_.groupBy(collection, callback|property [, thisArg])`
|
### <a id="_groupbycollection-callbackproperty--thisarg"></a>`_.groupBy(collection, callback|property [, thisArg])`
|
||||||
<a href="#_groupbycollection-callbackproperty--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1999 "View in source") [Ⓣ][1]
|
<a href="#_groupbycollection-callbackproperty--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2000 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates an object composed of keys returned from running each element of `collection` through a `callback`. The corresponding value of each key is an array of elements passed to `callback` that returned the key. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. The `callback` argument may also be the name of a property to group by *(e.g. 'length')*.
|
Creates an object composed of keys returned from running each element of `collection` through a `callback`. The corresponding value of each key is an array of elements passed to `callback` that returned the key. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. The `callback` argument may also be the name of a property to group by *(e.g. 'length')*.
|
||||||
|
|
||||||
@@ -1026,7 +1026,7 @@ _.groupBy(['one', 'two', 'three'], 'length');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_invokecollection-methodname--arg1-arg2-"></a>`_.invoke(collection, methodName [, arg1, arg2, ...])`
|
### <a id="_invokecollection-methodname--arg1-arg2-"></a>`_.invoke(collection, methodName [, arg1, arg2, ...])`
|
||||||
<a href="#_invokecollection-methodname--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2031 "View in source") [Ⓣ][1]
|
<a href="#_invokecollection-methodname--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2032 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Invokes the method named by `methodName` on each element in the `collection`, returning an array of the results of each invoked method. Additional arguments will be passed to each invoked method. If `methodName` is a function it will be invoked for, and `this` bound to, each element in the `collection`.
|
Invokes the method named by `methodName` on each element in the `collection`, returning an array of the results of each invoked method. Additional arguments will be passed to each invoked method. If `methodName` is a function it will be invoked for, and `this` bound to, each element in the `collection`.
|
||||||
|
|
||||||
@@ -1055,7 +1055,7 @@ _.invoke([123, 456], String.prototype.split, '');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_mapcollection--callbackidentity-thisarg"></a>`_.map(collection [, callback=identity, thisArg])`
|
### <a id="_mapcollection--callbackidentity-thisarg"></a>`_.map(collection [, callback=identity, thisArg])`
|
||||||
<a href="#_mapcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2063 "View in source") [Ⓣ][1]
|
<a href="#_mapcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2064 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates an array of values by running each element in the `collection` through a `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
Creates an array of values by running each element in the `collection` through a `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||||
|
|
||||||
@@ -1087,12 +1087,12 @@ _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; });
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_maxcollection--callback-thisarg"></a>`_.max(collection [, callback, thisArg])`
|
### <a id="_maxcollection--callback-thisarg"></a>`_.max(collection [, callback, thisArg])`
|
||||||
<a href="#_maxcollection--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2105 "View in source") [Ⓣ][1]
|
<a href="#_maxcollection--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2106 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Retrieves the maximum value of an `array`. If `callback` is passed, it will be executed for each value in the `array` to generate the criterion by which the value is ranked. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*.
|
Retrieves the maximum value of an `array`. If `callback` is passed, it will be executed for each value in the `array` to generate the criterion by which the value is ranked. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*.
|
||||||
|
|
||||||
#### Arguments
|
#### Arguments
|
||||||
1. `collection` *(Array)*: The collection to iterate over.
|
1. `collection` *(Array|Object|String)*: The collection to iterate over.
|
||||||
2. `[callback]` *(Function)*: The function called per iteration.
|
2. `[callback]` *(Function)*: The function called per iteration.
|
||||||
3. `[thisArg]` *(Mixed)*: The `this` binding of `callback`.
|
3. `[thisArg]` *(Mixed)*: The `this` binding of `callback`.
|
||||||
|
|
||||||
@@ -1119,12 +1119,12 @@ _.max(stooges, function(stooge) { return stooge.age; });
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_mincollection--callback-thisarg"></a>`_.min(collection [, callback, thisArg])`
|
### <a id="_mincollection--callback-thisarg"></a>`_.min(collection [, callback, thisArg])`
|
||||||
<a href="#_mincollection--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2148 "View in source") [Ⓣ][1]
|
<a href="#_mincollection--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2149 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Retrieves the minimum value of an `array`. If `callback` is passed, it will be executed for each value in the `array` to generate the criterion by which the value is ranked. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*.
|
Retrieves the minimum value of an `array`. If `callback` is passed, it will be executed for each value in the `array` to generate the criterion by which the value is ranked. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*.
|
||||||
|
|
||||||
#### Arguments
|
#### Arguments
|
||||||
1. `collection` *(Array)*: The collection to iterate over.
|
1. `collection` *(Array|Object|String)*: The collection to iterate over.
|
||||||
2. `[callback]` *(Function)*: The function called per iteration.
|
2. `[callback]` *(Function)*: The function called per iteration.
|
||||||
3. `[thisArg]` *(Mixed)*: The `this` binding of `callback`.
|
3. `[thisArg]` *(Mixed)*: The `this` binding of `callback`.
|
||||||
|
|
||||||
@@ -1145,7 +1145,7 @@ _.min([10, 5, 100, 2, 1000]);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_pluckcollection-property"></a>`_.pluck(collection, property)`
|
### <a id="_pluckcollection-property"></a>`_.pluck(collection, property)`
|
||||||
<a href="#_pluckcollection-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2194 "View in source") [Ⓣ][1]
|
<a href="#_pluckcollection-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2195 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Retrieves the value of a specified property from all elements in the `collection`.
|
Retrieves the value of a specified property from all elements in the `collection`.
|
||||||
|
|
||||||
@@ -1176,7 +1176,7 @@ _.pluck(stooges, 'name');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_reducecollection-callback--accumulator-thisarg"></a>`_.reduce(collection, callback [, accumulator, thisArg])`
|
### <a id="_reducecollection-callback--accumulator-thisarg"></a>`_.reduce(collection, callback [, accumulator, thisArg])`
|
||||||
<a href="#_reducecollection-callback--accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2222 "View in source") [Ⓣ][1]
|
<a href="#_reducecollection-callback--accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2223 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Boils down a `collection` to a single value. The initial state of the reduction is `accumulator` and each successive step of it should be returned by the `callback`. The `callback` is bound to `thisArg` and invoked with `4` arguments; for arrays they are *(accumulator, value, index|key, collection)*.
|
Boils down a `collection` to a single value. The initial state of the reduction is `accumulator` and each successive step of it should be returned by the `callback`. The `callback` is bound to `thisArg` and invoked with `4` arguments; for arrays they are *(accumulator, value, index|key, collection)*.
|
||||||
|
|
||||||
@@ -1206,7 +1206,7 @@ var sum = _.reduce([1, 2, 3], function(memo, num) { return memo + num; });
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_reducerightcollection-callback--accumulator-thisarg"></a>`_.reduceRight(collection, callback [, accumulator, thisArg])`
|
### <a id="_reducerightcollection-callback--accumulator-thisarg"></a>`_.reduceRight(collection, callback [, accumulator, thisArg])`
|
||||||
<a href="#_reducerightcollection-callback--accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2251 "View in source") [Ⓣ][1]
|
<a href="#_reducerightcollection-callback--accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2252 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
The right-associative version of `_.reduce`.
|
The right-associative version of `_.reduce`.
|
||||||
|
|
||||||
@@ -1237,7 +1237,7 @@ var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_rejectcollection--callbackidentity-thisarg"></a>`_.reject(collection [, callback=identity, thisArg])`
|
### <a id="_rejectcollection--callbackidentity-thisarg"></a>`_.reject(collection [, callback=identity, thisArg])`
|
||||||
<a href="#_rejectcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2288 "View in source") [Ⓣ][1]
|
<a href="#_rejectcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2289 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
The opposite of `_.filter`, this method returns the values of a `collection` that `callback` does **not** return truthy for.
|
The opposite of `_.filter`, this method returns the values of a `collection` that `callback` does **not** return truthy for.
|
||||||
|
|
||||||
@@ -1263,12 +1263,12 @@ var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; });
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_shufflecollection"></a>`_.shuffle(collection)`
|
### <a id="_shufflecollection"></a>`_.shuffle(collection)`
|
||||||
<a href="#_shufflecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2309 "View in source") [Ⓣ][1]
|
<a href="#_shufflecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2310 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates an array of shuffled `array` values, using a version of the Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle.
|
Creates an array of shuffled `array` values, using a version of the Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle.
|
||||||
|
|
||||||
#### Arguments
|
#### Arguments
|
||||||
1. `collection` *(Array)*: The collection to shuffle.
|
1. `collection` *(Array|Object|String)*: The collection to shuffle.
|
||||||
|
|
||||||
#### Returns
|
#### Returns
|
||||||
*(Array)*: Returns a new shuffled collection.
|
*(Array)*: Returns a new shuffled collection.
|
||||||
@@ -1287,7 +1287,7 @@ _.shuffle([1, 2, 3, 4, 5, 6]);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_sizecollection"></a>`_.size(collection)`
|
### <a id="_sizecollection"></a>`_.size(collection)`
|
||||||
<a href="#_sizecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2341 "View in source") [Ⓣ][1]
|
<a href="#_sizecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2342 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Gets the size of the `collection` by returning `collection.length` for arrays and array-like objects or the number of own enumerable properties for objects.
|
Gets the size of the `collection` by returning `collection.length` for arrays and array-like objects or the number of own enumerable properties for objects.
|
||||||
|
|
||||||
@@ -1317,7 +1317,7 @@ _.size('curly');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_somecollection--callbackidentity-thisarg"></a>`_.some(collection [, callback=identity, thisArg])`
|
### <a id="_somecollection--callbackidentity-thisarg"></a>`_.some(collection [, callback=identity, thisArg])`
|
||||||
<a href="#_somecollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2366 "View in source") [Ⓣ][1]
|
<a href="#_somecollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2367 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Checks if the `callback` returns a truthy value for **any** element of a `collection`. The function returns as soon as it finds passing value, and does not iterate over the entire `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
Checks if the `callback` returns a truthy value for **any** element of a `collection`. The function returns as soon as it finds passing value, and does not iterate over the entire `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||||
|
|
||||||
@@ -1346,7 +1346,7 @@ _.some([null, 0, 'yes', false]);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_sortbycollection-callbackproperty--thisarg"></a>`_.sortBy(collection, callback|property [, thisArg])`
|
### <a id="_sortbycollection-callbackproperty--thisarg"></a>`_.sortBy(collection, callback|property [, thisArg])`
|
||||||
<a href="#_sortbycollection-callbackproperty--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2400 "View in source") [Ⓣ][1]
|
<a href="#_sortbycollection-callbackproperty--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2401 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates an array, stable sorted in ascending order by the results of running each element of `collection` through a `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. The `callback` argument may also be the name of a property to sort by *(e.g. 'length')*.
|
Creates an array, stable sorted in ascending order by the results of running each element of `collection` through a `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. The `callback` argument may also be the name of a property to sort by *(e.g. 'length')*.
|
||||||
|
|
||||||
@@ -1378,7 +1378,7 @@ _.sortBy(['larry', 'brendan', 'moe'], 'length');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_toarraycollection"></a>`_.toArray(collection)`
|
### <a id="_toarraycollection"></a>`_.toArray(collection)`
|
||||||
<a href="#_toarraycollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2432 "View in source") [Ⓣ][1]
|
<a href="#_toarraycollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2433 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Converts the `collection`, to an array.
|
Converts the `collection`, to an array.
|
||||||
|
|
||||||
@@ -1402,7 +1402,7 @@ Converts the `collection`, to an array.
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_wherecollection-properties"></a>`_.where(collection, properties)`
|
### <a id="_wherecollection-properties"></a>`_.where(collection, properties)`
|
||||||
<a href="#_wherecollection-properties">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2462 "View in source") [Ⓣ][1]
|
<a href="#_wherecollection-properties">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2463 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Examines each element in a `collection`, returning an array of all elements that contain the given `properties`.
|
Examines each element in a `collection`, returning an array of all elements that contain the given `properties`.
|
||||||
|
|
||||||
@@ -1440,7 +1440,7 @@ _.where(stooges, { 'age': 40 });
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_aftern-func"></a>`_.after(n, func)`
|
### <a id="_aftern-func"></a>`_.after(n, func)`
|
||||||
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3086 "View in source") [Ⓣ][1]
|
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3083 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates a function that is restricted to executing only after it is called `n` times.
|
Creates a function that is restricted to executing only after it is called `n` times.
|
||||||
|
|
||||||
@@ -1468,7 +1468,7 @@ _.forEach(notes, function(note) {
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_bindfunc--thisarg-arg1-arg2-"></a>`_.bind(func [, thisArg, arg1, arg2, ...])`
|
### <a id="_bindfunc--thisarg-arg1-arg2-"></a>`_.bind(func [, thisArg, arg1, arg2, ...])`
|
||||||
<a href="#_bindfunc--thisarg-arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3119 "View in source") [Ⓣ][1]
|
<a href="#_bindfunc--thisarg-arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3116 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates a function that, when called, invokes `func` with the `this` binding of `thisArg` and prepends any additional `bind` arguments to those passed to the bound function.
|
Creates a function that, when called, invokes `func` with the `this` binding of `thisArg` and prepends any additional `bind` arguments to those passed to the bound function.
|
||||||
|
|
||||||
@@ -1499,7 +1499,7 @@ func();
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_bindallobject--methodname1-methodname2-"></a>`_.bindAll(object [, methodName1, methodName2, ...])`
|
### <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#L3149 "View in source") [Ⓣ][1]
|
<a href="#_bindallobject--methodname1-methodname2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3146 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Binds methods on `object` to `object`, overwriting the existing method. If no method names are provided, all the function properties of `object` will be bound.
|
Binds methods on `object` to `object`, overwriting the existing method. If no method names are provided, all the function properties of `object` will be bound.
|
||||||
|
|
||||||
@@ -1530,7 +1530,7 @@ jQuery('#lodash_button').on('click', buttonView.onClick);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_composefunc1-func2-"></a>`_.compose([func1, func2, ...])`
|
### <a id="_composefunc1-func2-"></a>`_.compose([func1, func2, ...])`
|
||||||
<a href="#_composefunc1-func2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3179 "View in source") [Ⓣ][1]
|
<a href="#_composefunc1-func2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3176 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates a function that is the composition of the passed functions, where each function consumes the return value of the function that follows. In math terms, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`.
|
Creates a function that is the composition of the passed functions, where each function consumes the return value of the function that follows. In math terms, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`.
|
||||||
|
|
||||||
@@ -1557,7 +1557,7 @@ welcome('moe');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_debouncefunc-wait-immediate"></a>`_.debounce(func, wait, immediate)`
|
### <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#L3212 "View in source") [Ⓣ][1]
|
<a href="#_debouncefunc-wait-immediate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3209 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates a function that will delay the execution of `func` until after `wait` milliseconds have elapsed since the last time it was invoked. Pass `true` for `immediate` to cause debounce to invoke `func` on the leading, instead of the trailing, edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call.
|
Creates a function that will delay the execution of `func` until after `wait` milliseconds have elapsed since the last time it was invoked. Pass `true` for `immediate` to cause debounce to invoke `func` on the leading, instead of the trailing, edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call.
|
||||||
|
|
||||||
@@ -1583,7 +1583,7 @@ jQuery(window).on('resize', lazyLayout);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_deferfunc--arg1-arg2-"></a>`_.defer(func [, arg1, arg2, ...])`
|
### <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#L3276 "View in source") [Ⓣ][1]
|
<a href="#_deferfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3273 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Defers executing the `func` function until the current call stack has cleared. Additional arguments will be passed to `func` when it is invoked.
|
Defers executing the `func` function until the current call stack has cleared. Additional arguments will be passed to `func` when it is invoked.
|
||||||
|
|
||||||
@@ -1608,7 +1608,7 @@ _.defer(function() { alert('deferred'); });
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_delayfunc-wait--arg1-arg2-"></a>`_.delay(func, wait [, arg1, arg2, ...])`
|
### <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#L3256 "View in source") [Ⓣ][1]
|
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3253 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Executes the `func` function after `wait` milliseconds. Additional arguments will be passed to `func` when it is invoked.
|
Executes the `func` function after `wait` milliseconds. Additional arguments will be passed to `func` when it is invoked.
|
||||||
|
|
||||||
@@ -1635,7 +1635,7 @@ _.delay(log, 1000, 'logged later');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_latebindobject-methodname--arg1-arg2-"></a>`_.lateBind(object, methodName [, arg1, arg2, ...])`
|
### <a id="_latebindobject-methodname--arg1-arg2-"></a>`_.lateBind(object, methodName [, arg1, arg2, ...])`
|
||||||
<a href="#_latebindobject-methodname--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3314 "View in source") [Ⓣ][1]
|
<a href="#_latebindobject-methodname--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3311 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates a function that, when called, invokes `object[methodName]` and prepends any additional `lateBind` arguments to those passed to the bound function. This method differs from `_.bind` by allowing bound functions to reference methods that will be redefined or don't yet exist.
|
Creates a function that, when called, invokes `object[methodName]` and prepends any additional `lateBind` arguments to those passed to the bound function. This method differs from `_.bind` by allowing bound functions to reference methods that will be redefined or don't yet exist.
|
||||||
|
|
||||||
@@ -1676,7 +1676,7 @@ func();
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_memoizefunc--resolver"></a>`_.memoize(func [, resolver])`
|
### <a id="_memoizefunc--resolver"></a>`_.memoize(func [, resolver])`
|
||||||
<a href="#_memoizefunc--resolver">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3336 "View in source") [Ⓣ][1]
|
<a href="#_memoizefunc--resolver">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3333 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates a function that memoizes the result of `func`. If `resolver` is passed, it will be used to determine the cache key for storing the result based on the arguments passed to the memoized function. By default, the first argument passed to the memoized function is used as the cache key.
|
Creates a function that memoizes the result of `func`. If `resolver` is passed, it will be used to determine the cache key for storing the result based on the arguments passed to the memoized function. By default, the first argument passed to the memoized function is used as the cache key.
|
||||||
|
|
||||||
@@ -1702,7 +1702,7 @@ var fibonacci = _.memoize(function(n) {
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_oncefunc"></a>`_.once(func)`
|
### <a id="_oncefunc"></a>`_.once(func)`
|
||||||
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3362 "View in source") [Ⓣ][1]
|
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3359 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates a function that is restricted to one execution. Repeat calls to the function will return the value of the first call.
|
Creates a function that is restricted to one execution. Repeat calls to the function will return the value of the first call.
|
||||||
|
|
||||||
@@ -1728,7 +1728,7 @@ initialize();
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_partialfunc--arg1-arg2-"></a>`_.partial(func [, arg1, arg2, ...])`
|
### <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#L3397 "View in source") [Ⓣ][1]
|
<a href="#_partialfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3394 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates a function that, when called, invokes `func` with any additional `partial` arguments prepended to those passed to the new function. This method is similar to `bind`, except it does **not** alter the `this` binding.
|
Creates a function that, when called, invokes `func` with any additional `partial` arguments prepended to those passed to the new function. This method is similar to `bind`, except it does **not** alter the `this` binding.
|
||||||
|
|
||||||
@@ -1755,7 +1755,7 @@ hi('moe');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_throttlefunc-wait"></a>`_.throttle(func, wait)`
|
### <a id="_throttlefunc-wait"></a>`_.throttle(func, wait)`
|
||||||
<a href="#_throttlefunc-wait">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3419 "View in source") [Ⓣ][1]
|
<a href="#_throttlefunc-wait">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3416 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates a function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. If the throttled function is invoked more than once during the `wait` timeout, `func` will also be called on the trailing edge of the timeout. Subsequent calls to the throttled function will return the result of the last `func` call.
|
Creates a function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. If the throttled function is invoked more than once during the `wait` timeout, `func` will also be called on the trailing edge of the timeout. Subsequent calls to the throttled function will return the result of the last `func` call.
|
||||||
|
|
||||||
@@ -1780,7 +1780,7 @@ jQuery(window).on('scroll', throttled);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_wrapvalue-wrapper"></a>`_.wrap(value, wrapper)`
|
### <a id="_wrapvalue-wrapper"></a>`_.wrap(value, wrapper)`
|
||||||
<a href="#_wrapvalue-wrapper">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3470 "View in source") [Ⓣ][1]
|
<a href="#_wrapvalue-wrapper">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3467 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates a function that passes `value` to the `wrapper` function as its first argument. Additional arguments passed to the new function are appended to those passed to the `wrapper` function.
|
Creates a function that passes `value` to the `wrapper` function as its first argument. Additional arguments passed to the new function are appended to those passed to the `wrapper` function.
|
||||||
|
|
||||||
@@ -1816,7 +1816,7 @@ hello();
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_clonevalue-deep"></a>`_.clone(value, deep)`
|
### <a id="_clonevalue-deep"></a>`_.clone(value, deep)`
|
||||||
<a href="#_clonevalue-deep">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L873 "View in source") [Ⓣ][1]
|
<a href="#_clonevalue-deep">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L874 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates a clone of `value`. If `deep` is `true`, all nested objects will also be cloned otherwise they will be assigned by reference. Functions, DOM nodes, `arguments` objects, and objects created by constructors other than `Object` are **not** cloned.
|
Creates a clone of `value`. If `deep` is `true`, all nested objects will also be cloned otherwise they will be assigned by reference. Functions, DOM nodes, `arguments` objects, and objects created by constructors other than `Object` are **not** cloned.
|
||||||
|
|
||||||
@@ -1855,7 +1855,7 @@ shallow[0] === stooges[0];
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_defaultsobject--default1-default2-"></a>`_.defaults(object [, default1, default2, ...])`
|
### <a id="_defaultsobject--default1-default2-"></a>`_.defaults(object [, default1, default2, ...])`
|
||||||
<a href="#_defaultsobject--default1-default2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L956 "View in source") [Ⓣ][1]
|
<a href="#_defaultsobject--default1-default2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L957 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Assigns enumerable properties of the default object(s) to the `destination` object for all `destination` properties that resolve to `null`/`undefined`. Once a property is set, additional defaults of the same property will be ignored.
|
Assigns enumerable properties of the default object(s) to the `destination` object for all `destination` properties that resolve to `null`/`undefined`. Once a property is set, additional defaults of the same property will be ignored.
|
||||||
|
|
||||||
@@ -1881,7 +1881,7 @@ _.defaults(iceCream, { 'flavor': 'vanilla', 'sprinkles': 'rainbow' });
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_extendobject--source1-source2-"></a>`_.extend(object [, source1, source2, ...])`
|
### <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#L976 "View in source") [Ⓣ][1]
|
<a href="#_extendobject--source1-source2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L977 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Assigns enumerable properties of the source object(s) to the `destination` object. Subsequent sources will overwrite propery assignments of previous sources.
|
Assigns enumerable properties of the source object(s) to the `destination` object. Subsequent sources will overwrite propery assignments of previous sources.
|
||||||
|
|
||||||
@@ -1906,7 +1906,7 @@ _.extend({ 'name': 'moe' }, { 'age': 40 });
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_forinobject-callback--thisarg"></a>`_.forIn(object, callback [, thisArg])`
|
### <a id="_forinobject-callback--thisarg"></a>`_.forIn(object, callback [, thisArg])`
|
||||||
<a href="#_forinobject-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L731 "View in source") [Ⓣ][1]
|
<a href="#_forinobject-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L732 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Iterates over `object`'s own and inherited enumerable properties, executing the `callback` for each property. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
Iterates over `object`'s own and inherited enumerable properties, executing the `callback` for each property. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||||
|
|
||||||
@@ -1942,7 +1942,7 @@ _.forIn(new Dog('Dagny'), function(value, key) {
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_forownobject-callback--thisarg"></a>`_.forOwn(object, callback [, thisArg])`
|
### <a id="_forownobject-callback--thisarg"></a>`_.forOwn(object, callback [, thisArg])`
|
||||||
<a href="#_forownobject-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L755 "View in source") [Ⓣ][1]
|
<a href="#_forownobject-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L756 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Iterates over `object`'s own enumerable properties, executing the `callback` for each property. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
Iterates over `object`'s own enumerable properties, executing the `callback` for each property. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||||
|
|
||||||
@@ -1970,7 +1970,7 @@ _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_functionsobject"></a>`_.functions(object)`
|
### <a id="_functionsobject"></a>`_.functions(object)`
|
||||||
<a href="#_functionsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L993 "View in source") [Ⓣ][1]
|
<a href="#_functionsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L994 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates a sorted array of all enumerable properties, own and inherited, of `object` that have function values.
|
Creates a sorted array of all enumerable properties, own and inherited, of `object` that have function values.
|
||||||
|
|
||||||
@@ -1997,7 +1997,7 @@ _.functions(_);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_hasobject-property"></a>`_.has(object, property)`
|
### <a id="_hasobject-property"></a>`_.has(object, property)`
|
||||||
<a href="#_hasobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1018 "View in source") [Ⓣ][1]
|
<a href="#_hasobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1019 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Checks if the specified object `property` exists and is a direct property, instead of an inherited property.
|
Checks if the specified object `property` exists and is a direct property, instead of an inherited property.
|
||||||
|
|
||||||
@@ -2022,7 +2022,7 @@ _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_invertobject"></a>`_.invert(object)`
|
### <a id="_invertobject"></a>`_.invert(object)`
|
||||||
<a href="#_invertobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1035 "View in source") [Ⓣ][1]
|
<a href="#_invertobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1036 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates an object composed of the inverted keys and values of the given `object`.
|
Creates an object composed of the inverted keys and values of the given `object`.
|
||||||
|
|
||||||
@@ -2046,7 +2046,7 @@ _.invert({ 'first': 'Moe', 'second': 'Larry', 'third': 'Curly' });
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_isargumentsvalue"></a>`_.isArguments(value)`
|
### <a id="_isargumentsvalue"></a>`_.isArguments(value)`
|
||||||
<a href="#_isargumentsvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L693 "View in source") [Ⓣ][1]
|
<a href="#_isargumentsvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L694 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Checks if `value` is an `arguments` object.
|
Checks if `value` is an `arguments` object.
|
||||||
|
|
||||||
@@ -2073,7 +2073,7 @@ _.isArguments([1, 2, 3]);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_isarrayvalue"></a>`_.isArray(value)`
|
### <a id="_isarrayvalue"></a>`_.isArray(value)`
|
||||||
<a href="#_isarrayvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1059 "View in source") [Ⓣ][1]
|
<a href="#_isarrayvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1060 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Checks if `value` is an array.
|
Checks if `value` is an array.
|
||||||
|
|
||||||
@@ -2100,7 +2100,7 @@ _.isArray([1, 2, 3]);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_isbooleanvalue"></a>`_.isBoolean(value)`
|
### <a id="_isbooleanvalue"></a>`_.isBoolean(value)`
|
||||||
<a href="#_isbooleanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1076 "View in source") [Ⓣ][1]
|
<a href="#_isbooleanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1077 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Checks if `value` is a boolean *(`true` or `false`)* value.
|
Checks if `value` is a boolean *(`true` or `false`)* value.
|
||||||
|
|
||||||
@@ -2124,7 +2124,7 @@ _.isBoolean(null);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_isdatevalue"></a>`_.isDate(value)`
|
### <a id="_isdatevalue"></a>`_.isDate(value)`
|
||||||
<a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1093 "View in source") [Ⓣ][1]
|
<a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1094 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Checks if `value` is a date.
|
Checks if `value` is a date.
|
||||||
|
|
||||||
@@ -2148,7 +2148,7 @@ _.isDate(new Date);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_iselementvalue"></a>`_.isElement(value)`
|
### <a id="_iselementvalue"></a>`_.isElement(value)`
|
||||||
<a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1110 "View in source") [Ⓣ][1]
|
<a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1111 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Checks if `value` is a DOM element.
|
Checks if `value` is a DOM element.
|
||||||
|
|
||||||
@@ -2172,7 +2172,7 @@ _.isElement(document.body);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_isemptyvalue"></a>`_.isEmpty(value)`
|
### <a id="_isemptyvalue"></a>`_.isEmpty(value)`
|
||||||
<a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1135 "View in source") [Ⓣ][1]
|
<a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1136 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Checks if `value` is empty. Arrays, strings, or `arguments` objects with a length of `0` and objects with no own enumerable properties are considered "empty".
|
Checks if `value` is empty. Arrays, strings, or `arguments` objects with a length of `0` and objects with no own enumerable properties are considered "empty".
|
||||||
|
|
||||||
@@ -2202,7 +2202,7 @@ _.isEmpty('');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_isequala-b"></a>`_.isEqual(a, b)`
|
### <a id="_isequala-b"></a>`_.isEqual(a, b)`
|
||||||
<a href="#_isequala-b">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1177 "View in source") [Ⓣ][1]
|
<a href="#_isequala-b">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1178 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Performs a deep comparison between two values to determine if they are equivalent to each other.
|
Performs a deep comparison between two values to determine if they are equivalent to each other.
|
||||||
|
|
||||||
@@ -2233,7 +2233,7 @@ _.isEqual(moe, clone);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_isfinitevalue"></a>`_.isFinite(value)`
|
### <a id="_isfinitevalue"></a>`_.isFinite(value)`
|
||||||
<a href="#_isfinitevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1339 "View in source") [Ⓣ][1]
|
<a href="#_isfinitevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1340 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Checks if `value` is, or can be coerced to, a finite number. Note: This is not the same as native `isFinite`, which will return true for booleans and empty strings. See http://es5.github.com/#x15.1.2.5.
|
Checks if `value` is, or can be coerced to, a finite number. Note: This is not the same as native `isFinite`, which will return true for booleans and empty strings. See http://es5.github.com/#x15.1.2.5.
|
||||||
|
|
||||||
@@ -2269,7 +2269,7 @@ _.isFinite(Infinity);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_isfunctionvalue"></a>`_.isFunction(value)`
|
### <a id="_isfunctionvalue"></a>`_.isFunction(value)`
|
||||||
<a href="#_isfunctionvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1356 "View in source") [Ⓣ][1]
|
<a href="#_isfunctionvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1357 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Checks if `value` is a function.
|
Checks if `value` is a function.
|
||||||
|
|
||||||
@@ -2293,7 +2293,7 @@ _.isFunction(_);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_isnanvalue"></a>`_.isNaN(value)`
|
### <a id="_isnanvalue"></a>`_.isNaN(value)`
|
||||||
<a href="#_isnanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1420 "View in source") [Ⓣ][1]
|
<a href="#_isnanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1421 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Checks if `value` is `NaN`. Note: This is not the same as native `isNaN`, which will return true for `undefined` and other values. See http://es5.github.com/#x15.1.2.4.
|
Checks if `value` is `NaN`. Note: This is not the same as native `isNaN`, which will return true for `undefined` and other values. See http://es5.github.com/#x15.1.2.4.
|
||||||
|
|
||||||
@@ -2326,7 +2326,7 @@ _.isNaN(undefined);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_isnullvalue"></a>`_.isNull(value)`
|
### <a id="_isnullvalue"></a>`_.isNull(value)`
|
||||||
<a href="#_isnullvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1443 "View in source") [Ⓣ][1]
|
<a href="#_isnullvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1444 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Checks if `value` is `null`.
|
Checks if `value` is `null`.
|
||||||
|
|
||||||
@@ -2353,7 +2353,7 @@ _.isNull(undefined);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_isnumbervalue"></a>`_.isNumber(value)`
|
### <a id="_isnumbervalue"></a>`_.isNumber(value)`
|
||||||
<a href="#_isnumbervalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1460 "View in source") [Ⓣ][1]
|
<a href="#_isnumbervalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1461 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Checks if `value` is a number.
|
Checks if `value` is a number.
|
||||||
|
|
||||||
@@ -2377,7 +2377,7 @@ _.isNumber(8.4 * 5);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_isobjectvalue"></a>`_.isObject(value)`
|
### <a id="_isobjectvalue"></a>`_.isObject(value)`
|
||||||
<a href="#_isobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1386 "View in source") [Ⓣ][1]
|
<a href="#_isobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1387 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Checks if `value` is the language type of Object. *(e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)*
|
Checks if `value` is the language type of Object. *(e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)*
|
||||||
|
|
||||||
@@ -2407,7 +2407,7 @@ _.isObject(1);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_isplainobjectvalue"></a>`_.isPlainObject(value)`
|
### <a id="_isplainobjectvalue"></a>`_.isPlainObject(value)`
|
||||||
<a href="#_isplainobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1488 "View in source") [Ⓣ][1]
|
<a href="#_isplainobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1489 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Checks if a given `value` is an object created by the `Object` constructor.
|
Checks if a given `value` is an object created by the `Object` constructor.
|
||||||
|
|
||||||
@@ -2442,7 +2442,7 @@ _.isPlainObject({ 'name': 'moe', 'age': 40 });
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_isregexpvalue"></a>`_.isRegExp(value)`
|
### <a id="_isregexpvalue"></a>`_.isRegExp(value)`
|
||||||
<a href="#_isregexpvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1513 "View in source") [Ⓣ][1]
|
<a href="#_isregexpvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1514 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Checks if `value` is a regular expression.
|
Checks if `value` is a regular expression.
|
||||||
|
|
||||||
@@ -2466,7 +2466,7 @@ _.isRegExp(/moe/);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_isstringvalue"></a>`_.isString(value)`
|
### <a id="_isstringvalue"></a>`_.isString(value)`
|
||||||
<a href="#_isstringvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1530 "View in source") [Ⓣ][1]
|
<a href="#_isstringvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1531 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Checks if `value` is a string.
|
Checks if `value` is a string.
|
||||||
|
|
||||||
@@ -2490,7 +2490,7 @@ _.isString('moe');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_isundefinedvalue"></a>`_.isUndefined(value)`
|
### <a id="_isundefinedvalue"></a>`_.isUndefined(value)`
|
||||||
<a href="#_isundefinedvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1548 "View in source") [Ⓣ][1]
|
<a href="#_isundefinedvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1549 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Checks if `value` is `undefined`.
|
Checks if `value` is `undefined`.
|
||||||
|
|
||||||
@@ -2514,7 +2514,7 @@ _.isUndefined(void 0);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_keysobject"></a>`_.keys(object)`
|
### <a id="_keysobject"></a>`_.keys(object)`
|
||||||
<a href="#_keysobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1565 "View in source") [Ⓣ][1]
|
<a href="#_keysobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1566 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates an array composed of the own enumerable property names of `object`.
|
Creates an array composed of the own enumerable property names of `object`.
|
||||||
|
|
||||||
@@ -2538,7 +2538,7 @@ _.keys({ 'one': 1, 'two': 2, 'three': 3 });
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_mergeobject--source1-source2-"></a>`_.merge(object [, source1, source2, ...])`
|
### <a id="_mergeobject--source1-source2-"></a>`_.merge(object [, source1, source2, ...])`
|
||||||
<a href="#_mergeobject--source1-source2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1608 "View in source") [Ⓣ][1]
|
<a href="#_mergeobject--source1-source2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1609 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Merges enumerable properties of the source object(s) into the `destination` object. Subsequent sources will overwrite propery assignments of previous sources.
|
Merges enumerable properties of the source object(s) into the `destination` object. Subsequent sources will overwrite propery assignments of previous sources.
|
||||||
|
|
||||||
@@ -2573,7 +2573,7 @@ _.merge(stooges, ages);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_omitobject-callback-prop1-prop2--thisarg"></a>`_.omit(object, callback|[prop1, prop2, ..., thisArg])`
|
### <a id="_omitobject-callback-prop1-prop2--thisarg"></a>`_.omit(object, callback|[prop1, prop2, ..., thisArg])`
|
||||||
<a href="#_omitobject-callback-prop1-prop2--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1678 "View in source") [Ⓣ][1]
|
<a href="#_omitobject-callback-prop1-prop2--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1679 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates a shallow clone of `object` excluding the specified properties. Property names may be specified as individual arguments or as arrays of property names. If `callback` is passed, it will be executed for each property in the `object`, omitting the properties `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
|
Creates a shallow clone of `object` excluding the specified properties. Property names may be specified as individual arguments or as arrays of property names. If `callback` is passed, it will be executed for each property in the `object`, omitting the properties `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
|
||||||
|
|
||||||
@@ -2604,7 +2604,7 @@ _.omit({ 'name': 'moe', '_hint': 'knucklehead', '_seed': '96c4eb' }, function(va
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_pairsobject"></a>`_.pairs(object)`
|
### <a id="_pairsobject"></a>`_.pairs(object)`
|
||||||
<a href="#_pairsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1712 "View in source") [Ⓣ][1]
|
<a href="#_pairsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1713 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates a two dimensional array of the given object's key-value pairs, i.e. `[[key1, value1], [key2, value2]]`.
|
Creates a two dimensional array of the given object's key-value pairs, i.e. `[[key1, value1], [key2, value2]]`.
|
||||||
|
|
||||||
@@ -2628,7 +2628,7 @@ _.pairs({ 'moe': 30, 'larry': 40, 'curly': 50 });
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_pickobject-callback-prop1-prop2--thisarg"></a>`_.pick(object, callback|[prop1, prop2, ..., thisArg])`
|
### <a id="_pickobject-callback-prop1-prop2--thisarg"></a>`_.pick(object, callback|[prop1, prop2, ..., thisArg])`
|
||||||
<a href="#_pickobject-callback-prop1-prop2--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1745 "View in source") [Ⓣ][1]
|
<a href="#_pickobject-callback-prop1-prop2--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1746 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates a shallow clone of `object` composed of the specified properties. Property names may be specified as individual arguments or as arrays of property names. If `callback` is passed, it will be executed for each property in the `object`, picking the properties `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
|
Creates a shallow clone of `object` composed of the specified properties. Property names may be specified as individual arguments or as arrays of property names. If `callback` is passed, it will be executed for each property in the `object`, picking the properties `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
|
||||||
|
|
||||||
@@ -2659,7 +2659,7 @@ _.pick({ 'name': 'moe', '_hint': 'knucklehead', '_seed': '96c4eb' }, function(va
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_valuesobject"></a>`_.values(object)`
|
### <a id="_valuesobject"></a>`_.values(object)`
|
||||||
<a href="#_valuesobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1782 "View in source") [Ⓣ][1]
|
<a href="#_valuesobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1783 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates an array composed of the own enumerable property values of `object`.
|
Creates an array composed of the own enumerable property values of `object`.
|
||||||
|
|
||||||
@@ -2690,7 +2690,7 @@ _.values({ 'one': 1, 'two': 2, 'three': 3 });
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_escapestring"></a>`_.escape(string)`
|
### <a id="_escapestring"></a>`_.escape(string)`
|
||||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3494 "View in source") [Ⓣ][1]
|
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3491 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding HTML entities.
|
Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding HTML entities.
|
||||||
|
|
||||||
@@ -2714,7 +2714,7 @@ _.escape('Moe, Larry & Curly');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_identityvalue"></a>`_.identity(value)`
|
### <a id="_identityvalue"></a>`_.identity(value)`
|
||||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3514 "View in source") [Ⓣ][1]
|
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3511 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
This function returns the first argument passed to it. Note: It is used throughout Lo-Dash as a default callback.
|
This function returns the first argument passed to it. Note: It is used throughout Lo-Dash as a default callback.
|
||||||
|
|
||||||
@@ -2739,7 +2739,7 @@ moe === _.identity(moe);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_mixinobject"></a>`_.mixin(object)`
|
### <a id="_mixinobject"></a>`_.mixin(object)`
|
||||||
<a href="#_mixinobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3540 "View in source") [Ⓣ][1]
|
<a href="#_mixinobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3537 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Adds functions properties of `object` to the `lodash` function and chainable wrapper.
|
Adds functions properties of `object` to the `lodash` function and chainable wrapper.
|
||||||
|
|
||||||
@@ -2769,7 +2769,7 @@ _('curly').capitalize();
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_noconflict"></a>`_.noConflict()`
|
### <a id="_noconflict"></a>`_.noConflict()`
|
||||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3570 "View in source") [Ⓣ][1]
|
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3567 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Reverts the '_' variable to its previous value and returns a reference to the `lodash` function.
|
Reverts the '_' variable to its previous value and returns a reference to the `lodash` function.
|
||||||
|
|
||||||
@@ -2789,7 +2789,7 @@ var lodash = _.noConflict();
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_randommin0-max1"></a>`_.random([min=0, max=1])`
|
### <a id="_randommin0-max1"></a>`_.random([min=0, max=1])`
|
||||||
<a href="#_randommin0-max1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3593 "View in source") [Ⓣ][1]
|
<a href="#_randommin0-max1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3590 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Produces a random number between `min` and `max` *(inclusive)*. If only one argument is passed, a number between `0` and the given number will be returned.
|
Produces a random number between `min` and `max` *(inclusive)*. If only one argument is passed, a number between `0` and the given number will be returned.
|
||||||
|
|
||||||
@@ -2817,7 +2817,7 @@ _.random(5);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_resultobject-property"></a>`_.result(object, property)`
|
### <a id="_resultobject-property"></a>`_.result(object, property)`
|
||||||
<a href="#_resultobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3632 "View in source") [Ⓣ][1]
|
<a href="#_resultobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3629 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Resolves the value of `property` on `object`. If `property` is a function it will be invoked and its result returned, else the property value is returned. If `object` is falsey, then `null` is returned.
|
Resolves the value of `property` on `object`. If `property` is a function it will be invoked and its result returned, else the property value is returned. If `object` is falsey, then `null` is returned.
|
||||||
|
|
||||||
@@ -2852,7 +2852,7 @@ _.result(object, 'stuff');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_templatetext-data-options"></a>`_.template(text, data, options)`
|
### <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#L3713 "View in source") [Ⓣ][1]
|
<a href="#_templatetext-data-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3710 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code. Note: In the development build `_.template` utilizes sourceURLs for easier debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl Note: Lo-Dash may be used in Chrome extensions by either creating a `lodash csp` build and avoiding `_.template` use, or loading Lo-Dash in a sandboxed page. See http://developer.chrome.com/trunk/extensions/sandboxingEval.html
|
A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code. Note: In the development build `_.template` utilizes sourceURLs for easier debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl Note: Lo-Dash may be used in Chrome extensions by either creating a `lodash csp` build and avoiding `_.template` use, or loading Lo-Dash in a sandboxed page. See http://developer.chrome.com/trunk/extensions/sandboxingEval.html
|
||||||
|
|
||||||
@@ -2922,7 +2922,7 @@ fs.writeFileSync(path.join(cwd, 'jst.js'), '\
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_timesn-callback--thisarg"></a>`_.times(n, callback [, thisArg])`
|
### <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#L3832 "View in source") [Ⓣ][1]
|
<a href="#_timesn-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3829 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Executes the `callback` function `n` times, returning an array of the results of each `callback` execution. The `callback` is bound to `thisArg` and invoked with one argument; *(index)*.
|
Executes the `callback` function `n` times, returning an array of the results of each `callback` execution. The `callback` is bound to `thisArg` and invoked with one argument; *(index)*.
|
||||||
|
|
||||||
@@ -2954,7 +2954,7 @@ _.times(3, function(n) { this.cast(n); }, mage);
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_unescapestring"></a>`_.unescape(string)`
|
### <a id="_unescapestring"></a>`_.unescape(string)`
|
||||||
<a href="#_unescapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3858 "View in source") [Ⓣ][1]
|
<a href="#_unescapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3855 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
The opposite of `_.escape`, this method converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding characters.
|
The opposite of `_.escape`, this method converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding characters.
|
||||||
|
|
||||||
@@ -2978,7 +2978,7 @@ _.unescape('Moe, Larry & Curly');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_uniqueidprefix"></a>`_.uniqueId([prefix])`
|
### <a id="_uniqueidprefix"></a>`_.uniqueId([prefix])`
|
||||||
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3876 "View in source") [Ⓣ][1]
|
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3873 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Generates a unique id. If `prefix` is passed, the id will be appended to it.
|
Generates a unique id. If `prefix` is passed, the id will be appended to it.
|
||||||
|
|
||||||
@@ -3009,7 +3009,7 @@ _.uniqueId('contact_');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_version"></a>`_.VERSION`
|
### <a id="_version"></a>`_.VERSION`
|
||||||
<a href="#_version">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3981 "View in source") [Ⓣ][1]
|
<a href="#_version">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3978 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
*(String)*: The semantic version number.
|
*(String)*: The semantic version number.
|
||||||
|
|
||||||
@@ -3021,7 +3021,7 @@ _.uniqueId('contact_');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_templatesettings"></a>`_.templateSettings`
|
### <a id="_templatesettings"></a>`_.templateSettings`
|
||||||
<a href="#_templatesettings">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L252 "View in source") [Ⓣ][1]
|
<a href="#_templatesettings">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L253 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
*(Object)*: By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby *(ERB)*. Change the following template settings to use alternative delimiters.
|
*(Object)*: By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby *(ERB)*. Change the following template settings to use alternative delimiters.
|
||||||
|
|
||||||
@@ -3033,7 +3033,7 @@ _.uniqueId('contact_');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_templatesettingsescape"></a>`_.templateSettings.escape`
|
### <a id="_templatesettingsescape"></a>`_.templateSettings.escape`
|
||||||
<a href="#_templatesettingsescape">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L261 "View in source") [Ⓣ][1]
|
<a href="#_templatesettingsescape">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L262 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
*(RegExp)*: Used to detect `data` property values to be HTML-escaped.
|
*(RegExp)*: Used to detect `data` property values to be HTML-escaped.
|
||||||
|
|
||||||
@@ -3045,7 +3045,7 @@ _.uniqueId('contact_');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_templatesettingsevaluate"></a>`_.templateSettings.evaluate`
|
### <a id="_templatesettingsevaluate"></a>`_.templateSettings.evaluate`
|
||||||
<a href="#_templatesettingsevaluate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L270 "View in source") [Ⓣ][1]
|
<a href="#_templatesettingsevaluate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L271 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
*(RegExp)*: Used to detect code to be evaluated.
|
*(RegExp)*: Used to detect code to be evaluated.
|
||||||
|
|
||||||
@@ -3057,7 +3057,7 @@ _.uniqueId('contact_');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_templatesettingsinterpolate"></a>`_.templateSettings.interpolate`
|
### <a id="_templatesettingsinterpolate"></a>`_.templateSettings.interpolate`
|
||||||
<a href="#_templatesettingsinterpolate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L279 "View in source") [Ⓣ][1]
|
<a href="#_templatesettingsinterpolate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L280 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
*(RegExp)*: Used to detect `data` property values to inject.
|
*(RegExp)*: Used to detect `data` property values to inject.
|
||||||
|
|
||||||
@@ -3069,7 +3069,7 @@ _.uniqueId('contact_');
|
|||||||
<!-- div -->
|
<!-- div -->
|
||||||
|
|
||||||
### <a id="_templatesettingsvariable"></a>`_.templateSettings.variable`
|
### <a id="_templatesettingsvariable"></a>`_.templateSettings.variable`
|
||||||
<a href="#_templatesettingsvariable">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L288 "View in source") [Ⓣ][1]
|
<a href="#_templatesettingsvariable">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L289 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
*(String)*: Used to reference the data object in the template text.
|
*(String)*: Used to reference the data object in the template text.
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
// generate Markdown
|
// generate Markdown
|
||||||
$markdown = docdown(array(
|
$markdown = docdown(array(
|
||||||
'path' => '../' . $file,
|
'path' => '../' . $file,
|
||||||
'title' => 'Lo-Dash <sup>v0.9.0</sup>',
|
'title' => 'Lo-Dash <sup>v0.9.1</sup>',
|
||||||
'toc' => 'categories',
|
'toc' => 'categories',
|
||||||
'url' => 'https://github.com/bestiejs/lodash/blob/master/lodash.js'
|
'url' => 'https://github.com/bestiejs/lodash/blob/master/lodash.js'
|
||||||
));
|
));
|
||||||
|
|||||||
47
lodash.js
47
lodash.js
@@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* Lo-Dash v0.9.0 <http://lodash.com>
|
* Lo-Dash v0.9.1 <http://lodash.com>
|
||||||
* (c) 2012 John-David Dalton <http://allyoucanleet.com/>
|
* (c) 2012 John-David Dalton <http://allyoucanleet.com/>
|
||||||
* Based on Underscore.js 1.4.2 <http://underscorejs.org>
|
* Based on Underscore.js 1.4.2 <http://underscorejs.org>
|
||||||
* (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
|
* (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
|
||||||
@@ -89,6 +89,7 @@
|
|||||||
var nativeBind = reNative.test(nativeBind = slice.bind) && nativeBind,
|
var nativeBind = reNative.test(nativeBind = slice.bind) && nativeBind,
|
||||||
nativeIsArray = reNative.test(nativeIsArray = Array.isArray) && nativeIsArray,
|
nativeIsArray = reNative.test(nativeIsArray = Array.isArray) && nativeIsArray,
|
||||||
nativeIsFinite = window.isFinite,
|
nativeIsFinite = window.isFinite,
|
||||||
|
nativeIsNaN = window.isNaN,
|
||||||
nativeKeys = reNative.test(nativeKeys = Object.keys) && nativeKeys,
|
nativeKeys = reNative.test(nativeKeys = Object.keys) && nativeKeys,
|
||||||
nativeMax = Math.max,
|
nativeMax = Math.max,
|
||||||
nativeMin = Math.min,
|
nativeMin = Math.min,
|
||||||
@@ -1337,7 +1338,7 @@
|
|||||||
* // => false
|
* // => false
|
||||||
*/
|
*/
|
||||||
function isFinite(value) {
|
function isFinite(value) {
|
||||||
return nativeIsFinite(value ? +value : parseFloat(value));
|
return nativeIsFinite(value) && !nativeIsNaN(parseFloat(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1883,9 +1884,9 @@
|
|||||||
var result = true;
|
var result = true;
|
||||||
callback = createCallback(callback, thisArg);
|
callback = createCallback(callback, thisArg);
|
||||||
forEach(collection, function(value, index, collection) {
|
forEach(collection, function(value, index, collection) {
|
||||||
return (result = callback(value, index, collection));
|
return (result = !!callback(value, index, collection));
|
||||||
});
|
});
|
||||||
return !!result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2087,7 +2088,7 @@
|
|||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Collections
|
* @category Collections
|
||||||
* @param {Array} collection The collection to iterate over.
|
* @param {Array|Object|String} collection The collection to iterate over.
|
||||||
* @param {Function} [callback] The function called per iteration.
|
* @param {Function} [callback] The function called per iteration.
|
||||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||||
* @returns {Mixed} Returns the maximum value.
|
* @returns {Mixed} Returns the maximum value.
|
||||||
@@ -2136,7 +2137,7 @@
|
|||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Collections
|
* @category Collections
|
||||||
* @param {Array} collection The collection to iterate over.
|
* @param {Array|Object|String} collection The collection to iterate over.
|
||||||
* @param {Function} [callback] The function called per iteration.
|
* @param {Function} [callback] The function called per iteration.
|
||||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||||
* @returns {Mixed} Returns the minimum value.
|
* @returns {Mixed} Returns the minimum value.
|
||||||
@@ -2299,7 +2300,7 @@
|
|||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Collections
|
* @category Collections
|
||||||
* @param {Array} collection The collection to shuffle.
|
* @param {Array|Object|String} collection The collection to shuffle.
|
||||||
* @returns {Array} Returns a new shuffled collection.
|
* @returns {Array} Returns a new shuffled collection.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
@@ -2935,18 +2936,7 @@
|
|||||||
* // => [1, 2, 3, 101, 10]
|
* // => [1, 2, 3, 101, 10]
|
||||||
*/
|
*/
|
||||||
function union() {
|
function union() {
|
||||||
var index = -1,
|
return uniq(concat.apply(arrayRef, arguments));
|
||||||
flattened = concat.apply(arrayRef, arguments),
|
|
||||||
length = flattened.length,
|
|
||||||
result = [];
|
|
||||||
|
|
||||||
while (++index < length) {
|
|
||||||
var value = flattened[index];
|
|
||||||
if (indexOf(result, value) < 0) {
|
|
||||||
result.push(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2983,7 +2973,7 @@
|
|||||||
var index = -1,
|
var index = -1,
|
||||||
length = array ? array.length : 0,
|
length = array ? array.length : 0,
|
||||||
result = [],
|
result = [],
|
||||||
seen = [];
|
seen = result;
|
||||||
|
|
||||||
// juggle arguments
|
// juggle arguments
|
||||||
if (typeof isSorted == 'function') {
|
if (typeof isSorted == 'function') {
|
||||||
@@ -2991,15 +2981,22 @@
|
|||||||
callback = isSorted;
|
callback = isSorted;
|
||||||
isSorted = false;
|
isSorted = false;
|
||||||
}
|
}
|
||||||
callback = createCallback(callback, thisArg);
|
if (callback) {
|
||||||
|
seen = [];
|
||||||
|
callback = createCallback(callback, thisArg);
|
||||||
|
}
|
||||||
while (++index < length) {
|
while (++index < length) {
|
||||||
var computed = callback(array[index], index, array);
|
var value = array[index],
|
||||||
|
computed = callback ? callback(value, index, array) : value;
|
||||||
|
|
||||||
if (isSorted
|
if (isSorted
|
||||||
? !index || seen[seen.length - 1] !== computed
|
? !index || seen[seen.length - 1] !== computed
|
||||||
: indexOf(seen, computed) < 0
|
: indexOf(seen, computed) < 0
|
||||||
) {
|
) {
|
||||||
seen.push(computed);
|
if (callback) {
|
||||||
result.push(array[index]);
|
seen.push(computed);
|
||||||
|
}
|
||||||
|
result.push(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@@ -3978,7 +3975,7 @@
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @type String
|
* @type String
|
||||||
*/
|
*/
|
||||||
lodash.VERSION = '0.9.0';
|
lodash.VERSION = '0.9.1';
|
||||||
|
|
||||||
// assign static methods
|
// assign static methods
|
||||||
lodash.after = after;
|
lodash.after = after;
|
||||||
|
|||||||
68
lodash.min.js
vendored
68
lodash.min.js
vendored
@@ -1,39 +1,39 @@
|
|||||||
/*!
|
/*!
|
||||||
Lo-Dash 0.9.0 lodash.com/license
|
Lo-Dash 0.9.1 lodash.com/license
|
||||||
Underscore.js 1.4.2 underscorejs.org/LICENSE
|
Underscore.js 1.4.2 underscorejs.org/LICENSE
|
||||||
*/
|
*/
|
||||||
;(function(e,t){function s(e){if(e&&e.__wrapped__)return e;if(!(this instanceof s))return new s(e);this.__wrapped__=e}function o(e,t,n){t||(t=0);var r=e.length,i=r-t>=(n||Q),s=i?{}:e;if(i)for(n=t-1;++n<r;){var o=e[n]+"";(dt.call(s,o)?s[o]:s[o]=[]).push(e[n])}return function(e){if(i){var n=e+"";return dt.call(s,n)&&-1<j(s[n],e)}return-1<j(s,e,t)}}function u(e,n){var r=e.b,i=n.b,e=e.a,n=n.a;if(e!==n){if(e>n||e===t)return 1;if(e<n||n===t)return-1}return r<i?-1:1}function a(e,t,n){function r(){var u=arguments
|
;(function(e,t){function s(e){if(e&&e.__wrapped__)return e;if(!(this instanceof s))return new s(e);this.__wrapped__=e}function o(e,t,n){t||(t=0);var r=e.length,i=r-t>=(n||Q),s=i?{}:e;if(i)for(n=t-1;++n<r;){var o=e[n]+"";(dt.call(s,o)?s[o]:s[o]=[]).push(e[n])}return function(e){if(i){var n=e+"";return dt.call(s,n)&&-1<j(s[n],e)}return-1<j(s,e,t)}}function u(e,n){var r=e.b,i=n.b,e=e.a,n=n.a;if(e!==n){if(e>n||e===t)return 1;if(e<n||n===t)return-1}return r<i?-1:1}function a(e,t,n){function r(){var u=arguments
|
||||||
,a=s?this:t;return i||(e=t[o]),n.length&&(u=u.length?n.concat(gt.call(u)):n),this instanceof r?(p.prototype=e.prototype,a=new p,(u=e.apply(a,u))&&Vt[typeof u]?u:a):e.apply(a,u)}var i=S(e),s=!n,o=e;return s&&(n=t),r}function f(e,n){return e?"function"!=typeof e?function(t){return t[e]}:n!==t?function(t,r,i){return e.call(n,t,r,i)}:e:U}function l(){for(var e={b:"",c:"",e:Pt,f:Wt,g:"",h:jt,i:qt,j:ft,k:"",l:n},t,r=0;t=arguments[r];r++)for(var i in t)e[i]=t[i];t=e.a,e.d=/^[^,]+/.exec(t)[0],r="var h,w,j="+
|
,a=s?this:t;return i||(e=t[o]),n.length&&(u=u.length?n.concat(gt.call(u)):n),this instanceof r?(p.prototype=e.prototype,a=new p,(u=e.apply(a,u))&&$t[typeof u]?u:a):e.apply(a,u)}var i=S(e),s=!n,o=e;return s&&(n=t),r}function f(e,n){return e?"function"!=typeof e?function(t){return t[e]}:n!==t?function(t,r,i){return e.call(n,t,r,i)}:e:U}function l(){for(var e={b:"",c:"",e:Ht,f:Xt,g:"",h:Ft,i:Rt,j:ft,k:"",l:n},t,r=0;t=arguments[r];r++)for(var i in t)e[i]=t[i];t=e.a,e.d=/^[^,]+/.exec(t)[0],r="var h,w,j="+
|
||||||
e.d+",r="+e.d+";if(!"+e.d+")return r;"+e.k+";",e.b?(r+="var k=j.length;h=-1;if(typeof k=='number'){",e.i&&(r+="if(v.call(j)==t){j=j.split('')}"),r+="while(++h<k){w=j[h];"+e.b+"}}else {"):e.h&&(r+="var k=j.length;h=-1;if(k&&i(j)){while(++h<k){w=j[h+=''];"+e.g+"}}else {"),e.e||(r+="var s=typeof j=='function'&&q.call(j,'prototype');");if(e.f&&e.l)r+="var o=-1,p=n[typeof j]?l(j):[],k=p.length;while(++o<k){h=p[o];",e.e||(r+="if(!(s&&h=='prototype')){"),r+="w=j[h];"+e.g+"",e.e||(r+="}");else{r+="for(h in j){"
|
e.d+",r="+e.d+";if(!"+e.d+")return r;"+e.k+";",e.b?(r+="var k=j.length;h=-1;if(typeof k=='number'){",e.i&&(r+="if(v.call(j)==t){j=j.split('')}"),r+="while(++h<k){w=j[h];"+e.b+"}}else {"):e.h&&(r+="var k=j.length;h=-1;if(k&&i(j)){while(++h<k){w=j[h+=''];"+e.g+"}}else {"),e.e||(r+="var s=typeof j=='function'&&q.call(j,'prototype');");if(e.f&&e.l)r+="var o=-1,p=n[typeof j]?l(j):[],k=p.length;while(++o<k){h=p[o];",e.e||(r+="if(!(s&&h=='prototype')){"),r+="w=j[h];"+e.g+"",e.e||(r+="}");else{r+="for(h in j){"
|
||||||
;if(!e.e||e.l)r+="if(",e.e||(r+="!(s&&h=='prototype')"),!e.e&&e.l&&(r+="&&"),e.l&&(r+="g.call(j,h)"),r+="){";r+="w=j[h];"+e.g+";";if(!e.e||e.l)r+="}"}r+="}";if(e.e){r+="var f=j.constructor;";for(i=0;7>i;i++)r+="h='"+e.j[i]+"';if(","constructor"==e.j[i]&&(r+="!(f&&f.prototype===j)&&"),r+="g.call(j,h)){w=j[h];"+e.g+"}"}if(e.b||e.h)r+="}";return r+=e.c+";return r",Function("e,g,i,n,l,q,t,v","return function("+t+"){"+r+"}")(f,dt,v,Vt,St,mt,Dt,yt)}function c(e){return"\\"+$t[e]}function h(e){return Zt
|
;if(!e.e||e.l)r+="if(",e.e||(r+="!(s&&h=='prototype')"),!e.e&&e.l&&(r+="&&"),e.l&&(r+="g.call(j,h)"),r+="){";r+="w=j[h];"+e.g+";";if(!e.e||e.l)r+="}"}r+="}";if(e.e){r+="var f=j.constructor;";for(i=0;7>i;i++)r+="h='"+e.j[i]+"';if(","constructor"==e.j[i]&&(r+="!(f&&f.prototype===j)&&"),r+="g.call(j,h)){w=j[h];"+e.g+"}"}if(e.b||e.h)r+="}";return r+=e.c+";return r",Function("e,g,i,n,l,q,t,v","return function("+t+"){"+r+"}")(f,dt,v,$t,xt,mt,Pt,yt)}function c(e){return"\\"+Jt[e]}function h(e){return en
|
||||||
[e]}function p(){}function d(e){return en[e]}function v(e){return yt.call(e)==Ct}function m(e){var t=i;if(!e||"object"!=typeof e||v(e))return t;var n=e.constructor;return(!Rt||"function"==typeof e.toString||"string"!=typeof (e+""))&&(!S(n)||n instanceof n)?Ht?(Gt(e,function(e,n,r){return t=!dt.call(r,n),i}),t===i):(Gt(e,function(e,n){t=n}),t===i||dt.call(e,t)):t}function g(e){var t=[];return Yt(e,function(e,n){t.push(n)}),t}function y(e,t,n,s,o){if(e==r)return e;n&&(t=i);if(n=Vt[typeof e]){var u=
|
[e]}function p(){}function d(e){return tn[e]}function v(e){return yt.call(e)==kt}function m(e){var t=i;if(!e||"object"!=typeof e||v(e))return t;var n=e.constructor;return(!Ut||"function"==typeof e.toString||"string"!=typeof (e+""))&&(!S(n)||n instanceof n)?Bt?(Yt(e,function(e,n,r){return t=!dt.call(r,n),i}),t===i):(Yt(e,function(e,n){t=n}),t===i||dt.call(e,t)):t}function g(e){var t=[];return Zt(e,function(e,n){t.push(n)}),t}function y(e,t,n,s,o){if(e==r)return e;n&&(t=i);if(n=$t[typeof e]){var u=
|
||||||
yt.call(e);if(!Xt[u]||Ft&&v(e))return e;var a=u==kt,n=a||(u==Mt?sn(e):n)}if(!n||!t)return n?a?gt.call(e):nn({},e):e;n=e.constructor;switch(u){case Lt:case At:return new n(+e);case Ot:case Dt:return new n(e);case _t:return n(e.source,rt.exec(e))}s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o[u];var f=a?n(e.length):{};return s.push(e),o.push(f),(a?un:Yt)(e,function(e,n){f[n]=y(e,t,r,s,o)}),f}function b(e){var t=[];return Gt(e,function(e,n){S(e)&&t.push(n)}),t.sort()}function w(e){var t=
|
yt.call(e);if(!Vt[u]||It&&v(e))return e;var a=u==Lt,n=a||(u==_t?on(e):n)}if(!n||!t)return n?a?gt.call(e):rn({},e):e;n=e.constructor;switch(u){case At:case Ot:return new n(+e);case Mt:case Pt:return new n(e);case Dt:return n(e.source,rt.exec(e))}s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o[u];var f=a?n(e.length):{};return s.push(e),o.push(f),(a?an:Zt)(e,function(e,n){f[n]=y(e,t,r,s,o)}),f}function b(e){var t=[];return Yt(e,function(e,n){S(e)&&t.push(n)}),t.sort()}function w(e){var t=
|
||||||
{};return Yt(e,function(e,n){t[e]=n}),t}function E(e,t,s,o){if(e===t)return 0!==e||1/e==1/t;if(e==r||t==r)return e===t;var u=yt.call(e);if(u!=yt.call(t))return i;switch(u){case Lt:case At:return+e==+t;case Ot:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case _t:case Dt:return e==t+""}var a=u==kt||u==Ct;if(Ft&&!a&&(a=v(e))&&!v(t))return i;if(!a){if(e.__wrapped__||t.__wrapped__)return E(e.__wrapped__||e,t.__wrapped__||t);if(u!=Mt||Rt&&("function"!=typeof e.toString&&"string"==typeof (e+"")||"function"!=typeof
|
{};return Zt(e,function(e,n){t[e]=n}),t}function E(e,t,s,o){if(e===t)return 0!==e||1/e==1/t;if(e==r||t==r)return e===t;var u=yt.call(e);if(u!=yt.call(t))return i;switch(u){case At:case Ot:return+e==+t;case Mt:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case Dt:case Pt:return e==t+""}var a=u==Lt||u==kt;if(It&&!a&&(a=v(e))&&!v(t))return i;if(!a){if(e.__wrapped__||t.__wrapped__)return E(e.__wrapped__||e,t.__wrapped__||t);if(u!=_t||Ut&&("function"!=typeof e.toString&&"string"==typeof (e+"")||"function"!=typeof
|
||||||
t.toString&&"string"==typeof (t+"")))return i;var u=e.constructor,f=t.constructor;if(u!=f&&(!S(u)||!(u instanceof u&&S(f)&&f instanceof f)))return i}s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o[u]==t;var u=-1,f=n,l=0;s.push(e),o.push(t);if(a){l=e.length;if(f=l==t.length)for(;l--&&(f=E(e[l],t[l],s,o)););return f}for(var c in e)if(dt.call(e,c)&&(l++,!dt.call(t,c)||!E(e[c],t[c],s,o)))return i;for(c in t)if(dt.call(t,c)&&!(l--))return i;if(Pt)for(;7>++u;)if(c=ft[u],dt.call(e,c)&&(!dt.call
|
t.toString&&"string"==typeof (t+"")))return i;var u=e.constructor,f=t.constructor;if(u!=f&&(!S(u)||!(u instanceof u&&S(f)&&f instanceof f)))return i}s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o[u]==t;var u=-1,f=n,l=0;s.push(e),o.push(t);if(a){l=e.length;if(f=l==t.length)for(;l--&&(f=E(e[l],t[l],s,o)););return f}for(var c in e)if(dt.call(e,c)&&(l++,!dt.call(t,c)||!E(e[c],t[c],s,o)))return i;for(c in t)if(dt.call(t,c)&&!(l--))return i;if(Ht)for(;7>++u;)if(c=ft[u],dt.call(e,c)&&(!dt.call
|
||||||
(t,c)||!E(e[c],t[c],s,o)))return i;return n}function S(e){return"function"==typeof e}function x(e,t,n){var i=arguments,s=0,o=2,u=i[3],a=i[4];n!==K&&(u=[],a=[],o=i.length);for(;++s<o;)Yt(i[s],function(t,n){var i,s,o;if(t&&((s=rn(t))||sn(t))){for(var f=u.length;f--;)if(i=u[f]==t)break;i?e[n]=a[f]:(u.push(t),a.push(o=(o=e[n],s)?rn(o)?o:[]:sn(o)?o:{}),e[n]=x(o,t,K,u,a))}else t!=r&&(e[n]=t)});return e}function T(e){var t=[];return Yt(e,function(e){t.push(e)}),t}function N(e,t){return"number"==typeof (
|
(t,c)||!E(e[c],t[c],s,o)))return i;return n}function S(e){return"function"==typeof e}function x(e,t,n){var i=arguments,s=0,o=2,u=i[3],a=i[4];n!==K&&(u=[],a=[],o=i.length);for(;++s<o;)Zt(i[s],function(t,n){var i,s,o;if(t&&((s=sn(t))||on(t))){for(var f=u.length;f--;)if(i=u[f]==t)break;i?e[n]=a[f]:(u.push(t),a.push(o=(o=e[n],s)?sn(o)?o:[]:on(o)?o:{}),e[n]=x(o,t,K,u,a))}else t!=r&&(e[n]=t)});return e}function T(e){var t=[];return Zt(e,function(e){t.push(e)}),t}function N(e,t){return"number"==typeof (
|
||||||
e?e.length:0)?-1<(yt.call(e)==Dt?e.indexOf(t):j(e,t)):P(e,function(e){return e===t})}function C(e,t,r){var i=n,t=f(t,r);return un(e,function(e,n,r){return i=t(e,n,r)}),!!i}function k(e,t,n){var r=[],t=f(t,n);return un(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}function L(e,t,r){var i,t=f(t,r);return P(e,function(e,r,s){return t(e,r,s)&&(i=e,n)}),i}function A(e,t,n){var r=-1,i=e?e.length:0,s=Array("number"==typeof i?i:0),t=f(t,n);if(rn(e))for(;++r<i;)s[r]=t(e[r],r,e);else un(e,function(e,n,i){s[++r
|
e?e.length:0)?-1<(yt.call(e)==Pt?e.indexOf(t):j(e,t)):P(e,function(e){return e===t})}function C(e,t,r){var i=n,t=f(t,r);return an(e,function(e,n,r){return i=!!t(e,n,r)}),i}function k(e,t,n){var r=[],t=f(t,n);return an(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}function L(e,t,r){var i,t=f(t,r);return P(e,function(e,r,s){return t(e,r,s)&&(i=e,n)}),i}function A(e,t,n){var r=-1,i=e?e.length:0,s=Array("number"==typeof i?i:0),t=f(t,n);if(sn(e))for(;++r<i;)s[r]=t(e[r],r,e);else an(e,function(e,n,i){s[++r
|
||||||
]=t(e,n,i)});return s}function O(e,t,n){var r=-Infinity,i=-1,s=e?e.length:0,o=r;if(t||"number"!=typeof s)t=f(t,n),un(e,function(e,n,i){n=t(e,n,i),n>r&&(r=n,o=e)});else for(;++i<s;)e[i]>o&&(o=e[i]);return o}function M(e,t){var n=[];return un(e,function(e){n.push(e[t])}),n}function _(e,t,n,r){var s=3>arguments.length,t=f(t,r);return un(e,function(e,r,o){n=s?(s=i,e):t(n,e,r,o)}),n}function D(e,t,n,r){var s=e,o=e?e.length:0,u=3>arguments.length;if("number"!=typeof o)var a=on(e),o=a.length;else qt&&yt
|
]=t(e,n,i)});return s}function O(e,t,n){var r=-Infinity,i=-1,s=e?e.length:0,o=r;if(t||"number"!=typeof s)t=f(t,n),an(e,function(e,n,i){n=t(e,n,i),n>r&&(r=n,o=e)});else for(;++i<s;)e[i]>o&&(o=e[i]);return o}function M(e,t){var n=[];return an(e,function(e){n.push(e[t])}),n}function _(e,t,n,r){var s=3>arguments.length,t=f(t,r);return an(e,function(e,r,o){n=s?(s=i,e):t(n,e,r,o)}),n}function D(e,t,n,r){var s=e,o=e?e.length:0,u=3>arguments.length;if("number"!=typeof o)var a=un(e),o=a.length;else Rt&&yt
|
||||||
.call(e)==Dt&&(s=e.split(""));return un(e,function(e,f,l){f=a?a[--o]:--o,n=u?(u=i,s[f]):t.call(r,n,s[f],f,l)}),n}function P(e,t,n){var r,t=f(t,n);return un(e,function(e,n,i){return!(r=t(e,n,i))}),!!r}function H(e,t,n){if(e)return t==r||n?e[0]:gt.call(e,0,t)}function B(e,t){for(var n=-1,r=e?e.length:0,i=[];++n<r;){var s=e[n];rn(s)?vt.apply(i,t?s:B(s)):i.push(s)}return i}function j(e,t,n){var r=-1,i=e?e.length:0;if("number"==typeof n)r=(0>n?xt(0,i+n):n||0)-1;else if(n)return r=I(e,t),e[r]===t?r:-1;
|
.call(e)==Pt&&(s=e.split(""));return an(e,function(e,f,l){f=a?a[--o]:--o,n=u?(u=i,s[f]):t.call(r,n,s[f],f,l)}),n}function P(e,t,n){var r,t=f(t,n);return an(e,function(e,n,i){return!(r=t(e,n,i))}),!!r}function H(e,t,n){if(e)return t==r||n?e[0]:gt.call(e,0,t)}function B(e,t){for(var n=-1,r=e?e.length:0,i=[];++n<r;){var s=e[n];sn(s)?vt.apply(i,t?s:B(s)):i.push(s)}return i}function j(e,t,n){var r=-1,i=e?e.length:0;if("number"==typeof n)r=(0>n?Tt(0,i+n):n||0)-1;else if(n)return r=I(e,t),e[r]===t?r:-1;
|
||||||
for(;++r<i;)if(e[r]===t)return r;return-1}function F(e,t,n){return e?gt.call(e,t==r||n?1:t):[]}function I(e,t,n,r){for(var i=0,s=e?e.length:i,n=n?f(n,r):U,t=n(t);i<s;)r=i+s>>>1,n(e[r])<t?i=r+1:s=r;return i}function q(e,t,n,r){var s=-1,o=e?e.length:0,u=[],a=[];"function"==typeof t&&(r=n,n=t,t=i);for(n=f(n,r);++s<o;)if(r=n(e[s],s,e),t?!s||a[a.length-1]!==r:0>j(a,r))a.push(r),u.push(e[s]);return u}function R(e,t){return zt||bt&&2<arguments.length?bt.call.apply(bt,arguments):a(e,t,gt.call(arguments,2
|
for(;++r<i;)if(e[r]===t)return r;return-1}function F(e,t,n){return e?gt.call(e,t==r||n?1:t):[]}function I(e,t,n,r){for(var i=0,s=e?e.length:i,n=n?f(n,r):U,t=n(t);i<s;)r=i+s>>>1,n(e[r])<t?i=r+1:s=r;return i}function q(e,t,n,r){var s=-1,o=e?e.length:0,u=[],a=u;"function"==typeof t&&(r=n,n=t,t=i),n&&(a=[],n=f(n,r));for(;++s<o;){var r=e[s],l=n?n(r,s,e):r;if(t?!s||a[a.length-1]!==l:0>j(a,l))n&&a.push(l),u.push(r)}return u}function R(e,t){return Wt||bt&&2<arguments.length?bt.call.apply(bt,arguments):a(
|
||||||
))}function U(e){return e}function z(e){un(b(e),function(t){var r=s[t]=e[t];s.prototype[t]=function(){var e=[this.__wrapped__];return vt.apply(e,arguments),e=r.apply(s,e),this.__chain__&&(e=new s(e),e.__chain__=n),e}})}var n=!0,r=null,i=!1,W="object"==typeof exports&&exports,X="object"==typeof global&&global;X.global===X&&(e=X);var V=[],$={},J=0,K={},Q=30,G=e._,Y=/[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,Z=/&(?:amp|lt|gt|quot|#x27);/g,et=/\b__p\+='';/g,tt=/\b(__p\+=)''\+/g
|
e,t,gt.call(arguments,2))}function U(e){return e}function z(e){an(b(e),function(t){var r=s[t]=e[t];s.prototype[t]=function(){var e=[this.__wrapped__];return vt.apply(e,arguments),e=r.apply(s,e),this.__chain__&&(e=new s(e),e.__chain__=n),e}})}var n=!0,r=null,i=!1,W="object"==typeof exports&&exports,X="object"==typeof global&&global;X.global===X&&(e=X);var V=[],$={},J=0,K={},Q=30,G=e._,Y=/[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,Z=/&(?:amp|lt|gt|quot|#x27);/g,et=/\b__p\+='';/g
|
||||||
,nt=/(__e\(.*?\)|\b__t\))\+'';/g,rt=/\w*$/,it=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,st=RegExp("^"+($.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),ot=/($^)/,ut=/[&<>"']/g,at=/['\n\r\t\u2028\u2029\\]/g,ft="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),lt=Math.ceil,ct=V.concat,ht=Math.floor,pt=st.test(pt=Object.getPrototypeOf)&&pt,dt=$.hasOwnProperty,vt=V.push,mt=$.propertyIsEnumerable,gt=
|
,tt=/\b(__p\+=)''\+/g,nt=/(__e\(.*?\)|\b__t\))\+'';/g,rt=/\w*$/,it=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,st=RegExp("^"+($.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),ot=/($^)/,ut=/[&<>"']/g,at=/['\n\r\t\u2028\u2029\\]/g,ft="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),lt=Math.ceil,ct=V.concat,ht=Math.floor,pt=st.test(pt=Object.getPrototypeOf)&&pt,dt=$.hasOwnProperty,vt=V.push,mt=$.propertyIsEnumerable
|
||||||
V.slice,yt=$.toString,bt=st.test(bt=gt.bind)&&bt,wt=st.test(wt=Array.isArray)&&wt,Et=e.isFinite,St=st.test(St=Object.keys)&&St,xt=Math.max,Tt=Math.min,Nt=Math.random,Ct="[object Arguments]",kt="[object Array]",Lt="[object Boolean]",At="[object Date]",Ot="[object Number]",Mt="[object Object]",_t="[object RegExp]",Dt="[object String]",Pt,Ht,Bt=(Bt={0:1,length:1},V.splice.call(Bt,0,1),Bt[0]),jt=n;(function(){function e(){this.x=1}var t=[];e.prototype={valueOf:1,y:1};for(var n in new e)t.push(n);for(
|
,gt=V.slice,yt=$.toString,bt=st.test(bt=gt.bind)&&bt,wt=st.test(wt=Array.isArray)&&wt,Et=e.isFinite,St=e.isNaN,xt=st.test(xt=Object.keys)&&xt,Tt=Math.max,Nt=Math.min,Ct=Math.random,kt="[object Arguments]",Lt="[object Array]",At="[object Boolean]",Ot="[object Date]",Mt="[object Number]",_t="[object Object]",Dt="[object RegExp]",Pt="[object String]",Ht,Bt,jt=(jt={0:1,length:1},V.splice.call(jt,0,1),jt[0]),Ft=n;(function(){function e(){this.x=1}var t=[];e.prototype={valueOf:1,y:1};for(var n in new e
|
||||||
n in arguments)jt=!n;Pt=!/valueOf/.test(t),Ht="x"!=t[0]})(1);var Ft=!v(arguments),It="x"!=gt.call("x")[0],qt="xx"!="x"[0]+Object("x")[0];try{var Rt=("[object Object]",yt.call(e.document||0)==Mt)}catch(Ut){}var zt=bt&&/\n|Opera/.test(bt+yt.call(e.opera)),Wt=St&&/^.+$|true/.test(St+!!e.attachEvent),Xt={};Xt[Ct]=Xt["[object Function]"]=i,Xt[kt]=Xt[Lt]=Xt[At]=Xt[Ot]=Xt[Mt]=Xt[_t]=Xt[Dt]=n;var Vt={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i},$t={"\\":"\\","'":"'","\n":"n","\r":"r"
|
)t.push(n);for(n in arguments)Ft=!n;Ht=!/valueOf/.test(t),Bt="x"!=t[0]})(1);var It=!v(arguments),qt="x"!=gt.call("x")[0],Rt="xx"!="x"[0]+Object("x")[0];try{var Ut=("[object Object]",yt.call(e.document||0)==_t)}catch(zt){}var Wt=bt&&/\n|Opera/.test(bt+yt.call(e.opera)),Xt=xt&&/^.+$|true/.test(xt+!!e.attachEvent),Vt={};Vt[kt]=Vt["[object Function]"]=i,Vt[Lt]=Vt[At]=Vt[Ot]=Vt[Mt]=Vt[_t]=Vt[Dt]=Vt[Pt]=n;var $t={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i},Jt={"\\":"\\","'":"'","\n"
|
||||||
," ":"t","\u2028":"u2028","\u2029":"u2029"};s.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""};var Jt={a:"d,c,u",k:"c=e(c,u)",b:"if(c(w,h,d)===false)return r",g:"if(c(w,h,d)===false)return r"},Kt={l:i,a:"m",k:"for(var a=1,b=arguments.length;a<b;a++){if(j=arguments[a]){",g:"r[h]=w",c:"}}"},Qt={b:r};Ft&&(v=function(e){return e?dt.call(e,"callee"):i});var Gt=l(Jt,Qt,{l:i}),Yt=l(Jt,Qt),Zt={"&":"&","<":"<",">":">",'"':"""
|
:"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};s.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""};var Kt={a:"d,c,u",k:"c=e(c,u)",b:"if(c(w,h,d)===false)return r",g:"if(c(w,h,d)===false)return r"},Qt={l:i,a:"m",k:"for(var a=1,b=arguments.length;a<b;a++){if(j=arguments[a]){",g:"r[h]=w",c:"}}"},Gt={b:r};It&&(v=function(e){return e?dt.call(e,"callee"):i});var Yt=l(Kt,Gt,{l:i}),Zt=l(Kt,Gt),en={"&":"&","<":"<",">":">"
|
||||||
,"'":"'"},en=w(Zt),tn=l(Kt,{g:"if(r[h]==null)"+Kt.g}),nn=l(Kt),rn=wt||function(e){return yt.call(e)==kt};S(/x/)&&(S=function(e){return"[object Function]"==yt.call(e)});var sn=pt?function(e){if(!e||"object"!=typeof e)return i;var t=e.valueOf,n="function"==typeof t&&(n=pt(t))&&pt(n);return n?e==n||pt(e)==n&&!v(e):m(e)}:m,on=St?function(e){var t=typeof e;return"function"==t&&mt.call(e,"prototype")?g(e):e&&Vt[t]?St(e):[]}:g,un=l(Jt);s.VERSION="0.9.0",s.after=function(e,t){return 1>e?t():function(
|
,'"':""","'":"'"},tn=w(en),nn=l(Qt,{g:"if(r[h]==null)"+Qt.g}),rn=l(Qt),sn=wt||function(e){return yt.call(e)==Lt};S(/x/)&&(S=function(e){return"[object Function]"==yt.call(e)});var on=pt?function(e){if(!e||"object"!=typeof e)return i;var t=e.valueOf,n="function"==typeof t&&(n=pt(t))&&pt(n);return n?e==n||pt(e)==n&&!v(e):m(e)}:m,un=xt?function(e){var t=typeof e;return"function"==t&&mt.call(e,"prototype")?g(e):e&&$t[t]?xt(e):[]}:g,an=l(Kt);s.VERSION="0.9.1",s.after=function(e,t){return 1>e?
|
||||||
){if(1>--e)return t.apply(this,arguments)}},s.bind=R,s.bindAll=function(e){for(var t=arguments,n=1<t.length?0:(t=b(e),-1),r=t.length;++n<r;){var i=t[n];e[i]=R(e[i],e)}return e},s.chain=function(e){return e=new s(e),e.__chain__=n,e},s.clone=y,s.compact=function(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r},s.compose=function(){var e=arguments;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},s.contains=N,s.countBy=function(e,
|
t():function(){if(1>--e)return t.apply(this,arguments)}},s.bind=R,s.bindAll=function(e){for(var t=arguments,n=1<t.length?0:(t=b(e),-1),r=t.length;++n<r;){var i=t[n];e[i]=R(e[i],e)}return e},s.chain=function(e){return e=new s(e),e.__chain__=n,e},s.clone=y,s.compact=function(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r},s.compose=function(){var e=arguments;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},s.contains=N,s.countBy=
|
||||||
t,n){var r={},t=f(t,n);return un(e,function(e,n,i){n=t(e,n,i),dt.call(r,n)?r[n]++:r[n]=1}),r},s.debounce=function(e,t,n){function i(){a=r,n||(o=e.apply(u,s))}var s,o,u,a;return function(){var r=n&&!a;return s=arguments,u=this,clearTimeout(a),a=setTimeout(i,t),r&&(o=e.apply(u,s)),o}},s.defaults=tn,s.defer=function(e){var n=gt.call(arguments,1);return setTimeout(function(){e.apply(t,n)},1)},s.delay=function(e,n){var r=gt.call(arguments,2);return setTimeout(function(){e.apply(t,r)},n)},s.difference=
|
function(e,t,n){var r={},t=f(t,n);return an(e,function(e,n,i){n=t(e,n,i),dt.call(r,n)?r[n]++:r[n]=1}),r},s.debounce=function(e,t,n){function i(){a=r,n||(o=e.apply(u,s))}var s,o,u,a;return function(){var r=n&&!a;return s=arguments,u=this,clearTimeout(a),a=setTimeout(i,t),r&&(o=e.apply(u,s)),o}},s.defaults=nn,s.defer=function(e){var n=gt.call(arguments,1);return setTimeout(function(){e.apply(t,n)},1)},s.delay=function(e,n){var r=gt.call(arguments,2);return setTimeout(function(){e.apply(t,r)},n)},s.
|
||||||
function(e){for(var t=-1,n=e?e.length:0,r=ct.apply(V,arguments),r=o(r,n),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},s.escape=function(e){return e==r?"":(e+"").replace(ut,h)},s.every=C,s.extend=nn,s.filter=k,s.find=L,s.first=H,s.flatten=B,s.forEach=un,s.forIn=Gt,s.forOwn=Yt,s.functions=b,s.groupBy=function(e,t,n){var r={},t=f(t,n);return un(e,function(e,n,i){n=t(e,n,i),(dt.call(r,n)?r[n]:r[n]=[]).push(e)}),r},s.has=function(e,t){return e?dt.call(e,t):i},s.identity=U,s.indexOf=j,s.initial=function(
|
difference=function(e){for(var t=-1,n=e?e.length:0,r=ct.apply(V,arguments),r=o(r,n),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},s.escape=function(e){return e==r?"":(e+"").replace(ut,h)},s.every=C,s.extend=rn,s.filter=k,s.find=L,s.first=H,s.flatten=B,s.forEach=an,s.forIn=Yt,s.forOwn=Zt,s.functions=b,s.groupBy=function(e,t,n){var r={},t=f(t,n);return an(e,function(e,n,i){n=t(e,n,i),(dt.call(r,n)?r[n]:r[n]=[]).push(e)}),r},s.has=function(e,t){return e?dt.call(e,t):i},s.identity=U,s.indexOf=j,s
|
||||||
e,t,n){return e?gt.call(e,0,-(t==r||n?1:t)):[]},s.intersection=function(e){var t=arguments,n=t.length,r={},i=[];return un(e,function(e){if(0>j(i,e)){for(var s=n;--s;)if(!(r[s]||(r[s]=o(t[s])))(e))return;i.push(e)}}),i},s.invert=w,s.invoke=function(e,t){var n=gt.call(arguments,2),r="function"==typeof t,i=[];return un(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},s.isArguments=v,s.isArray=rn,s.isBoolean=function(e){return e===n||e===i||yt.call(e)==Lt},s.isDate=function(e){return yt.call(e)==At},
|
.initial=function(e,t,n){return e?gt.call(e,0,-(t==r||n?1:t)):[]},s.intersection=function(e){var t=arguments,n=t.length,r={},i=[];return an(e,function(e){if(0>j(i,e)){for(var s=n;--s;)if(!(r[s]||(r[s]=o(t[s])))(e))return;i.push(e)}}),i},s.invert=w,s.invoke=function(e,t){var n=gt.call(arguments,2),r="function"==typeof t,i=[];return an(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},s.isArguments=v,s.isArray=sn,s.isBoolean=function(e){return e===n||e===i||yt.call(e)==At},s.isDate=function(e){return yt
|
||||||
s.isElement=function(e){return e?1===e.nodeType:i},s.isEmpty=function(e){var t=n;if(!e)return t;var r=yt.call(e),s=e.length;return r==kt||r==Dt||r==Ct||Ft&&v(e)||r==Mt&&"number"==typeof s&&S(e.splice)?!s:(Yt(e,function(){return t=i}),t)},s.isEqual=E,s.isFinite=function(e){return Et(e?+e:parseFloat(e))},s.isFunction=S,s.isNaN=function(e){return yt.call(e)==Ot&&e!=+e},s.isNull=function(e){return e===r},s.isNumber=function(e){return yt.call(e)==Ot},s.isObject=function(e){return e?Vt[typeof e]:i},s.isPlainObject=
|
.call(e)==Ot},s.isElement=function(e){return e?1===e.nodeType:i},s.isEmpty=function(e){var t=n;if(!e)return t;var r=yt.call(e),s=e.length;return r==Lt||r==Pt||r==kt||It&&v(e)||r==_t&&"number"==typeof s&&S(e.splice)?!s:(Zt(e,function(){return t=i}),t)},s.isEqual=E,s.isFinite=function(e){return Et(e)&&!St(parseFloat(e))},s.isFunction=S,s.isNaN=function(e){return yt.call(e)==Mt&&e!=+e},s.isNull=function(e){return e===r},s.isNumber=function(e){return yt.call(e)==Mt},s.isObject=function(e){return e?$t
|
||||||
sn,s.isRegExp=function(e){return yt.call(e)==_t},s.isString=function(e){return yt.call(e)==Dt},s.isUndefined=function(e){return e===t},s.keys=on,s.last=function(e,t,n){if(e){var i=e.length;return t==r||n?e[i-1]:gt.call(e,-t||i)}},s.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?xt(0,r+n):Tt(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},s.lateBind=function(e,t){return a(t,e,gt.call(arguments,2))},s.map=A,s.max=O,s.memoize=function(e,t){var n={};return function(){var r=
|
[typeof e]:i},s.isPlainObject=on,s.isRegExp=function(e){return yt.call(e)==Dt},s.isString=function(e){return yt.call(e)==Pt},s.isUndefined=function(e){return e===t},s.keys=un,s.last=function(e,t,n){if(e){var i=e.length;return t==r||n?e[i-1]:gt.call(e,-t||i)}},s.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?Tt(0,r+n):Nt(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},s.lateBind=function(e,t){return a(t,e,gt.call(arguments,2))},s.map=A,s.max=O,s.memoize=function(e,t)
|
||||||
t?t.apply(this,arguments):arguments[0];return dt.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},s.merge=x,s.min=function(e,t,n){var r=Infinity,i=-1,s=e?e.length:0,o=r;if(t||"number"!=typeof s)t=f(t,n),un(e,function(e,n,i){n=t(e,n,i),n<r&&(r=n,o=e)});else for(;++i<s;)e[i]<o&&(o=e[i]);return o},s.mixin=z,s.noConflict=function(){return e._=G,this},s.object=function(e,t){for(var n=-1,r=e?e.length:0,i={};++n<r;){var s=e[n];t?i[s]=t[n]:i[s[0]]=s[1]}return i},s.omit=function(e,t,n){var r="function"==typeof
|
{var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return dt.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},s.merge=x,s.min=function(e,t,n){var r=Infinity,i=-1,s=e?e.length:0,o=r;if(t||"number"!=typeof s)t=f(t,n),an(e,function(e,n,i){n=t(e,n,i),n<r&&(r=n,o=e)});else for(;++i<s;)e[i]<o&&(o=e[i]);return o},s.mixin=z,s.noConflict=function(){return e._=G,this},s.object=function(e,t){for(var n=-1,r=e?e.length:0,i={};++n<r;){var s=e[n];t?i[s]=t[n]:i[s[0]]=s[1]}return i},s.omit=function(
|
||||||
t,i={};if(r)t=f(t,n);else var s=ct.apply(V,arguments);return Gt(e,function(e,n,o){if(r?!t(e,n,o):0>j(s,n,1))i[n]=e}),i},s.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e.apply(this,arguments),e=r,t)}},s.pairs=function(e){var t=[];return Yt(e,function(e,n){t.push([n,e])}),t},s.partial=function(e){return a(e,gt.call(arguments,1))},s.pick=function(e,t,n){var r={};if("function"!=typeof t)for(var i=0,s=ct.apply(V,arguments),o=s.length;++i<o;){var u=s[i];u in e&&(r[u]=e[u])}else t=f(t,
|
e,t,n){var r="function"==typeof t,i={};if(r)t=f(t,n);else var s=ct.apply(V,arguments);return Yt(e,function(e,n,o){if(r?!t(e,n,o):0>j(s,n,1))i[n]=e}),i},s.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e.apply(this,arguments),e=r,t)}},s.pairs=function(e){var t=[];return Zt(e,function(e,n){t.push([n,e])}),t},s.partial=function(e){return a(e,gt.call(arguments,1))},s.pick=function(e,t,n){var r={};if("function"!=typeof t)for(var i=0,s=ct.apply(V,arguments),o=s.length;++i<o;){var u=s[i]
|
||||||
n),Gt(e,function(e,n,i){t(e,n,i)&&(r[n]=e)});return r},s.pluck=M,s.random=function(e,t){return e==r&&t==r&&(t=1),e=+e||0,t==r&&(t=e,e=0),e+ht(Nt()*((+t||0)-e+1))},s.range=function(e,t,n){e=+e||0,n=+n||1,t==r&&(t=e,e=0);for(var i=-1,t=xt(0,lt((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},s.reduce=_,s.reduceRight=D,s.reject=function(e,t,n){return t=f(t,n),k(e,function(e,n,r){return!t(e,n,r)})},s.rest=F,s.result=function(e,t){var n=e?e[t]:r;return S(n)?e[t]():n},s.shuffle=function(e){var t=-1,n=
|
;u in e&&(r[u]=e[u])}else t=f(t,n),Yt(e,function(e,n,i){t(e,n,i)&&(r[n]=e)});return r},s.pluck=M,s.random=function(e,t){return e==r&&t==r&&(t=1),e=+e||0,t==r&&(t=e,e=0),e+ht(Ct()*((+t||0)-e+1))},s.range=function(e,t,n){e=+e||0,n=+n||1,t==r&&(t=e,e=0);for(var i=-1,t=Tt(0,lt((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},s.reduce=_,s.reduceRight=D,s.reject=function(e,t,n){return t=f(t,n),k(e,function(e,n,r){return!t(e,n,r)})},s.rest=F,s.result=function(e,t){var n=e?e[t]:r;return S(n)?e[t]():n},s
|
||||||
Array(e?e.length:0);return un(e,function(e){var r=ht(Nt()*(++t+1));n[t]=n[r],n[r]=e}),n},s.size=function(e){var t=e?e.length:0;return"number"==typeof t?t:on(e).length},s.some=P,s.sortBy=function(e,t,n){var r=[],t=f(t,n);un(e,function(e,n,i){r.push({a:t(e,n,i),b:n,c:e})}),e=r.length;for(r.sort(u);e--;)r[e]=r[e].c;return r},s.sortedIndex=I,s.tap=function(e,t){return t(e),e},s.template=function(e,t,n){e||(e=""),n||(n={});var r,i,o=0,u=s.templateSettings,a="__p += '",f=n.variable||u.variable,l=f;e.replace
|
.shuffle=function(e){var t=-1,n=Array(e?e.length:0);return an(e,function(e){var r=ht(Ct()*(++t+1));n[t]=n[r],n[r]=e}),n},s.size=function(e){var t=e?e.length:0;return"number"==typeof t?t:un(e).length},s.some=P,s.sortBy=function(e,t,n){var r=[],t=f(t,n);an(e,function(e,n,i){r.push({a:t(e,n,i),b:n,c:e})}),e=r.length;for(r.sort(u);e--;)r[e]=r[e].c;return r},s.sortedIndex=I,s.tap=function(e,t){return t(e),e},s.template=function(e,t,n){e||(e=""),n||(n={});var r,i,o=0,u=s.templateSettings,a="__p += '",f=
|
||||||
(RegExp((n.escape||u.escape||ot).source+"|"+(n.interpolate||u.interpolate||ot).source+"|"+(n.evaluate||u.evaluate||ot).source+"|$","g"),function(t,n,i,s,u){a+=e.slice(o,u).replace(at,c),a+=n?"'+__e("+n+")+'":s?"';"+s+";__p+='":i?"'+((__t=("+i+"))==null?'':__t)+'":"",r||(r=s||Y.test(n||i)),o=u+t.length}),a+="';",l||(f="obj",r?a="with("+f+"){"+a+"}":(n=RegExp("(\\(\\s*)"+f+"\\."+f+"\\b","g"),a=a.replace(it,"$&"+f+".").replace(n,"$1__d"))),a=(r?a.replace(et,""):a).replace(tt,"$1").replace(nt,"$1;"),
|
n.variable||u.variable,l=f;e.replace(RegExp((n.escape||u.escape||ot).source+"|"+(n.interpolate||u.interpolate||ot).source+"|"+(n.evaluate||u.evaluate||ot).source+"|$","g"),function(t,n,i,s,u){a+=e.slice(o,u).replace(at,c),a+=n?"'+__e("+n+")+'":s?"';"+s+";__p+='":i?"'+((__t=("+i+"))==null?'':__t)+'":"",r||(r=s||Y.test(n||i)),o=u+t.length}),a+="';",l||(f="obj",r?a="with("+f+"){"+a+"}":(n=RegExp("(\\(\\s*)"+f+"\\."+f+"\\b","g"),a=a.replace(it,"$&"+f+".").replace(n,"$1__d"))),a=(r?a.replace(et,""):a)
|
||||||
a="function("+f+"){"+(l?"":f+"||("+f+"={});")+"var __t,__p='',__e=_.escape"+(r?",__j=[].join;function print(){__p+=__j.call(arguments,'')}":(l?"":",__d="+f+"."+f+"||"+f)+";")+a+"return __p}";try{i=Function("_","return "+a)(s)}catch(h){throw h.source=a,h}return t?i(t):(i.source=a,i)},s.throttle=function(e,t){function n(){a=new Date,u=r,s=e.apply(o,i)}var i,s,o,u,a=0;return function(){var r=new Date,f=t-(r-a);return i=arguments,o=this,0>=f?(clearTimeout(u),a=r,s=e.apply(o,i)):u||(u=setTimeout
|
.replace(tt,"$1").replace(nt,"$1;"),a="function("+f+"){"+(l?"":f+"||("+f+"={});")+"var __t,__p='',__e=_.escape"+(r?",__j=[].join;function print(){__p+=__j.call(arguments,'')}":(l?"":",__d="+f+"."+f+"||"+f)+";")+a+"return __p}";try{i=Function("_","return "+a)(s)}catch(h){throw h.source=a,h}return t?i(t):(i.source=a,i)},s.throttle=function(e,t){function n(){a=new Date,u=r,s=e.apply(o,i)}var i,s,o,u,a=0;return function(){var r=new Date,f=t-(r-a);return i=arguments,o=this,0>=f?(clearTimeout
|
||||||
(n,f)),s}},s.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++r<e;)i[r]=t.call(n,r);return i},s.toArray=function(e){return e&&"number"==typeof e.length?(It?yt.call(e)==Dt:"string"==typeof e)?e.split(""):gt.call(e):T(e)},s.unescape=function(e){return e==r?"":(e+"").replace(Z,d)},s.union=function(){for(var e=-1,t=ct.apply(V,arguments),n=t.length,r=[];++e<n;){var i=t[e];0>j(r,i)&&r.push(i)}return r},s.uniq=q,s.uniqueId=function(e){var t=J++;return e?e+t:t},s.values=T,s.where=function(e,t){var n=
|
(u),a=r,s=e.apply(o,i)):u||(u=setTimeout(n,f)),s}},s.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++r<e;)i[r]=t.call(n,r);return i},s.toArray=function(e){return e&&"number"==typeof e.length?(qt?yt.call(e)==Pt:"string"==typeof e)?e.split(""):gt.call(e):T(e)},s.unescape=function(e){return e==r?"":(e+"").replace(Z,d)},s.union=function(){return q(ct.apply(V,arguments))},s.uniq=q,s.uniqueId=function(e){var t=J++;return e?e+t:t},s.values=T,s.where=function(e,t){var n=[];return Yt(t,function(e,
|
||||||
[];return Gt(t,function(e,t){n.push(t)}),k(e,function(e){for(var r=n.length;r--;){var i=e[n[r]]===t[n[r]];if(!i)break}return!!i})},s.without=function(e){for(var t=-1,n=e?e.length:0,r=o(arguments,1,20),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},s.wrap=function(e,t){return function(){var n=[e];return vt.apply(n,arguments),t.apply(this,n)}},s.zip=function(e){for(var t=-1,n=e?O(M(arguments,"length")):0,r=Array(n);++t<n;)r[t]=M(arguments,t);return r},s.all=C,s.any=P,s.collect=A,s.detect=L,s.drop=
|
t){n.push(t)}),k(e,function(e){for(var r=n.length;r--;){var i=e[n[r]]===t[n[r]];if(!i)break}return!!i})},s.without=function(e){for(var t=-1,n=e?e.length:0,r=o(arguments,1,20),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},s.wrap=function(e,t){return function(){var n=[e];return vt.apply(n,arguments),t.apply(this,n)}},s.zip=function(e){for(var t=-1,n=e?O(M(arguments,"length")):0,r=Array(n);++t<n;)r[t]=M(arguments,t);return r},s.all=C,s.any=P,s.collect=A,s.detect=L,s.drop=F,s.each=an,s.foldl=_,s.
|
||||||
F,s.each=un,s.foldl=_,s.foldr=D,s.head=H,s.include=N,s.inject=_,s.methods=b,s.select=k,s.tail=F,s.take=H,s.unique=q,z(s),s.prototype.chain=function(){return this.__chain__=n,this},s.prototype.value=function(){return this.__wrapped__},un("pop push reverse shift sort splice unshift".split(" "),function(e){var t=V[e];s.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),Bt&&e.length===0&&delete e[0],this.__chain__&&(e=new s(e),e.__chain__=n),e}}),un(["concat","join","slice"],function(
|
foldr=D,s.head=H,s.include=N,s.inject=_,s.methods=b,s.select=k,s.tail=F,s.take=H,s.unique=q,z(s),s.prototype.chain=function(){return this.__chain__=n,this},s.prototype.value=function(){return this.__wrapped__},an("pop push reverse shift sort splice unshift".split(" "),function(e){var t=V[e];s.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),jt&&e.length===0&&delete e[0],this.__chain__&&(e=new s(e),e.__chain__=n),e}}),an(["concat","join","slice"],function(e){var t=V[e];s.
|
||||||
e){var t=V[e];s.prototype[e]=function(){var e=t.apply(this.__wrapped__,arguments);return this.__chain__&&(e=new s(e),e.__chain__=n),e}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(e._=s,define(function(){return s})):W?"object"==typeof module&&module&&module.exports==W?(module.exports=s)._=s:W._=s:e._=s})(this);
|
prototype[e]=function(){var e=t.apply(this.__wrapped__,arguments);return this.__chain__&&(e=new s(e),e.__chain__=n),e}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(e._=s,define(function(){return s})):W?"object"==typeof module&&module&&module.exports==W?(module.exports=s)._=s:W._=s:e._=s})(this);
|
||||||
53
lodash.underscore.min.js
vendored
53
lodash.underscore.min.js
vendored
@@ -1,31 +1,30 @@
|
|||||||
/*!
|
/*!
|
||||||
Lo-Dash 0.9.0 lodash.com/license
|
Lo-Dash 0.9.1 lodash.com/license
|
||||||
Underscore.js 1.4.2 underscorejs.org/LICENSE
|
Underscore.js 1.4.2 underscorejs.org/LICENSE
|
||||||
*/
|
*/
|
||||||
;(function(e,t){function s(e,t,n){var r;if(!e)return e;var t=p(t,n),i=e.length,n=-1;if("number"==typeof i)for(;++n<i&&(r=e[n],t(r,n,e)!==J););else for(n in e)if(it.call(e,n)&&(r=e[n],t(r,n,e)===J))break;return e}function o(e){var t,n,r=e;if(!e)return e;for(var i=1,s=arguments.length;i<s;i++)if(r=arguments[i])for(t in r)n=r[t],e[t]=n;return e}function u(e){var t,n,i=e;if(!e)return e;for(var s=1,o=arguments.length;s<o;s++)if(i=arguments[s])for(t in i)n=i[t],e[t]==r&&(e[t]=n);return e}function a(e,t)
|
;(function(e,t){function s(e,t,n){var r;if(!e)return e;var t=p(t,n),i=e.length,n=-1;if("number"==typeof i){for(;++n<i;)if(r=e[n],t(r,n,e)===J)return e}else for(n in e)if(it.call(e,n)&&(r=e[n],t(r,n,e)===J))return e}function o(e){var t,n,r=e;if(!e)return e;for(var i=1,s=arguments.length;i<s;i++)if(r=arguments[i])for(t in r)n=r[t],e[t]=n;return e}function u(e){var t,n,i=e;if(!e)return e;for(var s=1,o=arguments.length;s<o;s++)if(i=arguments[s])for(t in i)n=i[t],e[t]==r&&(e[t]=n);return e}function a(e
|
||||||
{var n,r;if(e)for(n in t=p(t),e)if(it.call(e,n)&&(r=e[n],t(r,n,e)===J))break}function f(e,t){var n,r;if(e)for(n in t=p(t),e)if(r=e[n],t(r,n,e)===J)break}function l(e){if(e&&e.__wrapped__)return e;if(!(this instanceof l))return new l(e);this.__wrapped__=e}function c(e,n){var r=e.b,i=n.b,e=e.a,n=n.a;if(e!==n){if(e>n||e===t)return 1;if(e<n||n===t)return-1}return r<i?-1:1}function h(e,t,n){function r(){var i=arguments,s=t;return n.length&&(i=i.length?n.concat(ot.call(i)):n),this instanceof r?(m.prototype=
|
,t){var n,r;if(e)for(n in t=p(t),e)if(it.call(e,n)&&(r=e[n],t(r,n,e)===J))break}function f(e,t){var n,r;if(e)for(n in t=p(t),e)if(r=e[n],t(r,n,e)===J)break}function l(e){if(e&&e.__wrapped__)return e;if(!(this instanceof l))return new l(e);this.__wrapped__=e}function c(e,n){var r=e.b,i=n.b,e=e.a,n=n.a;if(e!==n){if(e>n||e===t)return 1;if(e<n||n===t)return-1}return r<i?-1:1}function h(e,t,n){function r(){var i=arguments,s=t;return n.length&&(i=i.length?n.concat(ot.call(i)):n),this instanceof r?(m.prototype=
|
||||||
e.prototype,s=new m,(i=e.apply(s,i))&&Tt[typeof i]?i:s):e.apply(s,i)}return r}function p(e,n){return e?"function"!=typeof e?function(t){return t[e]}:n!==t?function(t,r,i){return e.call(n,t,r,i)}:e:U}function d(e){return"\\"+Nt[e]}function v(e){return Ct[e]}function m(){}function g(e){return kt[e]}function y(e){var t=[];return a(e,function(e,n){t.push(n)}),t}function b(e){var t=[];return f(e,function(e,n){S(e)&&t.push(n)}),t.sort()}function w(e){var t={};return a(e,function(e,n){t[e]=n}),t}function E
|
e.prototype,s=new m,(i=e.apply(s,i))&&Nt[typeof i]?i:s):e.apply(s,i)}return r}function p(e,n){return e?"function"!=typeof e?function(t){return t[e]}:n!==t?function(t,r,i){return e.call(n,t,r,i)}:e:U}function d(e){return"\\"+Ct[e]}function v(e){return kt[e]}function m(){}function g(e){return Lt[e]}function y(e){var t=[];return a(e,function(e,n){t.push(n)}),t}function b(e){var t=[];return f(e,function(e,n){S(e)&&t.push(n)}),t.sort()}function w(e){var t={};return a(e,function(e,n){t[e]=n}),t}function E
|
||||||
(e,t,s,o){if(e===t)return 0!==e||1/e==1/t;if(e==r||t==r)return e===t;var u=ut.call(e);if(u!=ut.call(t))return i;switch(u){case mt:case gt:return+e==+t;case yt:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case wt:case Et:return e==t+""}var a=u==vt;if(!a){if(e.__wrapped__||t.__wrapped__)return E(e.__wrapped__||e,t.__wrapped__||t);if(u!=bt)return i;var u=e.constructor,f=t.constructor;if(u!=f&&(!S(u)||!(u instanceof u&&S(f)&&f instanceof f)))return i}s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o
|
(e,t,s,o){if(e===t)return 0!==e||1/e==1/t;if(e==r||t==r)return e===t;var u=ut.call(e);if(u!=ut.call(t))return i;switch(u){case gt:case yt:return+e==+t;case bt:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case Et:case St:return e==t+""}var a=u==mt;if(!a){if(e.__wrapped__||t.__wrapped__)return E(e.__wrapped__||e,t.__wrapped__||t);if(u!=wt)return i;var u=e.constructor,f=t.constructor;if(u!=f&&(!S(u)||!(u instanceof u&&S(f)&&f instanceof f)))return i}s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o
|
||||||
[u]==t;u=n,f=0,s.push(e),o.push(t);if(a){f=e.length;if(u=f==t.length)for(;f--&&(u=E(e[f],t[f],s,o)););return u}for(var l in e)if(it.call(e,l)&&(f++,!it.call(t,l)||!E(e[l],t[l],s,o)))return i;for(l in t)if(it.call(t,l)&&!(f--))return i;return n}function S(e){return"function"==typeof e}function x(e){return ut.call(e)==Et}function T(e){var t=[];return a(e,function(e){t.push(e)}),t}function N(e,t){return"number"==typeof (e?e.length:0)?-1<j(e,t):P(e,function(e){return e===t})}function C(e,t,r){var i=n
|
[u]==t;u=n,f=0,s.push(e),o.push(t);if(a){f=e.length;if(u=f==t.length)for(;f--&&(u=E(e[f],t[f],s,o)););return u}for(var l in e)if(it.call(e,l)&&(f++,!it.call(t,l)||!E(e[l],t[l],s,o)))return i;for(l in t)if(it.call(t,l)&&!(f--))return i;return n}function S(e){return"function"==typeof e}function x(e){return ut.call(e)==St}function T(e){var t=[];return a(e,function(e){t.push(e)}),t}function N(e,t){return"number"==typeof (e?e.length:0)?-1<j(e,t):P(e,function(e){return e===t})}function C(e,t,r){var i=n
|
||||||
,t=p(t,r);return s(e,function(e,n,r){return!(i=t(e,n,r))&&J}),!!i}function k(e,t,n){var r=[],t=p(t,n);return s(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}function L(e,t,r){var i,t=p(t,r);return P(e,function(e,r,s){return t(e,r,s)&&(i=e,n)}),i}function A(e,t,n){var r=-1,i=e?e.length:0,o=Array("number"==typeof i?i:0),t=p(t,n);if(Lt(e))for(;++r<i;)o[r]=t(e[r],r,e);else s(e,function(e,n,i){o[++r]=t(e,n,i)});return o}function O(e,t,n){var r=-Infinity,i=-1,o=e?e.length:0,u=r;if(t||"number"!=typeof o)t=p
|
,t=p(t,r);return s(e,function(e,n,r){return!(i=!!t(e,n,r))&&J}),i}function k(e,t,n){var r=[],t=p(t,n);return s(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}function L(e,t,r){var i,t=p(t,r);return P(e,function(e,r,s){return t(e,r,s)&&(i=e,n)}),i}function A(e,t,n){var r=-1,i=e?e.length:0,o=Array("number"==typeof i?i:0),t=p(t,n);if(At(e))for(;++r<i;)o[r]=t(e[r],r,e);else s(e,function(e,n,i){o[++r]=t(e,n,i)});return o}function O(e,t,n){var r=-Infinity,i=-1,o=e?e.length:0,u=r;if(t||"number"!=typeof o)t=p
|
||||||
(t,n),s(e,function(e,n,i){n=t(e,n,i),n>r&&(r=n,u=e)});else for(;++i<o;)e[i]>u&&(u=e[i]);return u}function M(e,t){var n=[];return s(e,function(e){n.push(e[t])}),n}function _(e,t,n,r){var o=3>arguments.length,t=p(t,r);return s(e,function(e,r,s){n=o?(o=i,e):t(n,e,r,s)}),n}function D(e,t,n,r){var o=e?e.length:0,u=3>arguments.length;if("number"!=typeof o)var a=At(e),o=a.length;return s(e,function(s,f,l){f=a?a[--o]:--o,n=u?(u=i,e[f]):t.call(r,n,e[f],f,l)}),n}function P(e,t,n){var r,t=p(t,n);return s(e,
|
(t,n),s(e,function(e,n,i){n=t(e,n,i),n>r&&(r=n,u=e)});else for(;++i<o;)e[i]>u&&(u=e[i]);return u}function M(e,t){var n=[];return s(e,function(e){n.push(e[t])}),n}function _(e,t,n,r){var o=3>arguments.length,t=p(t,r);return s(e,function(e,r,s){n=o?(o=i,e):t(n,e,r,s)}),n}function D(e,t,n,r){var o=e?e.length:0,u=3>arguments.length;if("number"!=typeof o)var a=Ot(e),o=a.length;return s(e,function(s,f,l){f=a?a[--o]:--o,n=u?(u=i,e[f]):t.call(r,n,e[f],f,l)}),n}function P(e,t,n){var r,t=p(t,n);return s(e,
|
||||||
function(e,n,i){return(r=t(e,n,i))&&J}),!!r}function H(e,t,n){if(e)return t==r||n?e[0]:ot.call(e,0,t)}function B(e,t){for(var n=-1,r=e?e.length:0,i=[];++n<r;){var s=e[n];Lt(s)?st.apply(i,t?s:B(s)):i.push(s)}return i}function j(e,t,n){var r=-1,i=e?e.length:0;if("number"==typeof n)r=(0>n?ht(0,i+n):n||0)-1;else if(n)return r=I(e,t),e[r]===t?r:-1;for(;++r<i;)if(e[r]===t)return r;return-1}function F(e,t,n){return e?ot.call(e,t==r||n?1:t):[]}function I(e,t,n,r){for(var i=0,s=e?e.length:i,n=n?p(n,r):U,t=
|
function(e,n,i){return(r=t(e,n,i))&&J}),!!r}function H(e,t,n){if(e)return t==r||n?e[0]:ot.call(e,0,t)}function B(e,t){for(var n=-1,r=e?e.length:0,i=[];++n<r;){var s=e[n];At(s)?st.apply(i,t?s:B(s)):i.push(s)}return i}function j(e,t,n){var r=-1,i=e?e.length:0;if("number"==typeof n)r=(0>n?pt(0,i+n):n||0)-1;else if(n)return r=I(e,t),e[r]===t?r:-1;for(;++r<i;)if(e[r]===t)return r;return-1}function F(e,t,n){return e?ot.call(e,t==r||n?1:t):[]}function I(e,t,n,r){for(var i=0,s=e?e.length:i,n=n?p(n,r):U,t=
|
||||||
n(t);i<s;)r=i+s>>>1,n(e[r])<t?i=r+1:s=r;return i}function q(e,t,n,r){for(var i=-1,s=e?e.length:0,o=[],u=[],n=p(n,r);++i<s;)if(r=n(e[i],i,e),t?!i||u[u.length-1]!==r:0>j(u,r))u.push(r),o.push(e[i]);return o}function R(e,t){return xt||at&&2<arguments.length?at.call.apply(at,arguments):h(e,t,ot.call(arguments,2))}function U(e){return e}function z(e){s(b(e),function(t){var r=l[t]=e[t];l.prototype[t]=function(){var e=[this.__wrapped__];return st.apply(e,arguments),e=r.apply(l,e),this.__chain__&&(e=new
|
n(t);i<s;)r=i+s>>>1,n(e[r])<t?i=r+1:s=r;return i}function q(e,t,n,r){var i=-1,s=e?e.length:0,o=[],u=o;n&&(u=[],n=p(n,r));for(;++i<s;){var r=e[i],a=n?n(r,i,e):r;if(t?!i||u[u.length-1]!==a:0>j(u,a))n&&u.push(a),o.push(r)}return o}function R(e,t){return Tt||at&&2<arguments.length?at.call.apply(at,arguments):h(e,t,ot.call(arguments,2))}function U(e){return e}function z(e){s(b(e),function(t){var r=l[t]=e[t];l.prototype[t]=function(){var e=[this.__wrapped__];return st.apply(e,arguments),e=r.apply(l,e),
|
||||||
l(e),e.__chain__=n),e}})}var n=!0,r=null,i=!1,W="object"==typeof exports&&exports,X="object"==typeof global&&global;X.global===X&&(e=X);var V=[],X={},$=0,J={},K=e._,Q=/&(?:amp|lt|gt|quot|#x27);/g,G=RegExp("^"+(X.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Y=/($^)/,Z=/[&<>"']/g,et=/['\n\r\t\u2028\u2029\\]/g,tt=Math.ceil,nt=V.concat,rt=Math.floor,it=X.hasOwnProperty,st=V.push,ot=V.slice,ut=X.toString,at=G.test(at=ot.bind)&&at,ft=G.test(ft=Array.isArray
|
this.__chain__&&(e=new l(e),e.__chain__=n),e}})}var n=!0,r=null,i=!1,W="object"==typeof exports&&exports,X="object"==typeof global&&global;X.global===X&&(e=X);var V=[],X={},$=0,J={},K=e._,Q=/&(?:amp|lt|gt|quot|#x27);/g,G=RegExp("^"+(X.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Y=/($^)/,Z=/[&<>"']/g,et=/['\n\r\t\u2028\u2029\\]/g,tt=Math.ceil,nt=V.concat,rt=Math.floor,it=X.hasOwnProperty,st=V.push,ot=V.slice,ut=X.toString,at=G.test(at=ot.bind)&&
|
||||||
)&&ft,lt=e.isFinite,ct=G.test(ct=Object.keys)&&ct,ht=Math.max,pt=Math.min,dt=Math.random,vt="[object Array]",mt="[object Boolean]",gt="[object Date]",yt="[object Number]",bt="[object Object]",wt="[object RegExp]",Et="[object String]",St=(St={0:1,length:1},V.splice.call(St,0,1),St[0]),xt=at&&/\n|Opera/.test(at+ut.call(e.opera)),Tt={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i},Nt={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};l.templateSettings=
|
at,ft=G.test(ft=Array.isArray)&&ft,lt=e.isFinite,ct=e.isNaN,ht=G.test(ht=Object.keys)&&ht,pt=Math.max,dt=Math.min,vt=Math.random,mt="[object Array]",gt="[object Boolean]",yt="[object Date]",bt="[object Number]",wt="[object Object]",Et="[object RegExp]",St="[object String]",xt=(xt={0:1,length:1},V.splice.call(xt,0,1),xt[0]),Tt=at&&/\n|Opera/.test(at+ut.call(e.opera)),Nt={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i},Ct={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028"
|
||||||
{escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},l.isArguments=function(e){return"[object Arguments]"==ut.call(e)},l.isArguments(arguments)||(l.isArguments=function(e){return e?it.call(e,"callee"):i});var Ct={"&":"&","<":"<",">":">",'"':""","'":"'"},kt=w(Ct),Lt=ft||function(e){return ut.call(e)==vt};S(/x/)&&(S=function(e){return"[object Function]"==ut.call(e)});var At=ct?function(e){return e&&Tt[typeof e]?ct(e):[]}:y;l.VERSION="0.9.0"
|
,"\u2029":"u2029"};l.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},l.isArguments=function(e){return"[object Arguments]"==ut.call(e)},l.isArguments(arguments)||(l.isArguments=function(e){return e?it.call(e,"callee"):i});var kt={"&":"&","<":"<",">":">",'"':""","'":"'"},Lt=w(kt),At=ft||function(e){return ut.call(e)==mt};S(/x/)&&(S=function(e){return"[object Function]"==ut.call(e)});var Ot=ht?function(e){return e&&
|
||||||
,l.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},l.bind=R,l.bindAll=function(e){for(var t=arguments,n=1<t.length?0:(t=b(e),-1),r=t.length;++n<r;){var i=t[n];e[i]=R(e[i],e)}return e},l.chain=function(e){return e=new l(e),e.__chain__=n,e},l.clone=function(e){return e&&Tt[typeof e]?Lt(e)?ot.call(e):o({},e):e},l.compact=function(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r},l.compose=function(){var e=arguments;return function()
|
Nt[typeof e]?ht(e):[]}:y;l.VERSION="0.9.1",l.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},l.bind=R,l.bindAll=function(e){for(var t=arguments,n=1<t.length?0:(t=b(e),-1),r=t.length;++n<r;){var i=t[n];e[i]=R(e[i],e)}return e},l.chain=function(e){return e=new l(e),e.__chain__=n,e},l.clone=function(e){return e&&Nt[typeof e]?At(e)?ot.call(e):o({},e):e},l.compact=function(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r},l.compose=function(
|
||||||
{for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},l.contains=N,l.countBy=function(e,t,n){var r={},t=p(t,n);return s(e,function(e,n,i){n=t(e,n,i),it.call(r,n)?r[n]++:r[n]=1}),r},l.debounce=function(e,t,n){function i(){a=r,n||(o=e.apply(u,s))}var s,o,u,a;return function(){var r=n&&!a;return s=arguments,u=this,clearTimeout(a),a=setTimeout(i,t),r&&(o=e.apply(u,s)),o}},l.defaults=u,l.defer=function(e){var n=ot.call(arguments,1);return setTimeout(function(){e.apply(t,n)},1)},l.delay=
|
){var e=arguments;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},l.contains=N,l.countBy=function(e,t,n){var r={},t=p(t,n);return s(e,function(e,n,i){n=t(e,n,i),it.call(r,n)?r[n]++:r[n]=1}),r},l.debounce=function(e,t,n){function i(){a=r,n||(o=e.apply(u,s))}var s,o,u,a;return function(){var r=n&&!a;return s=arguments,u=this,clearTimeout(a),a=setTimeout(i,t),r&&(o=e.apply(u,s)),o}},l.defaults=u,l.defer=function(e){var n=ot.call(arguments,1);return setTimeout
|
||||||
function(e,n){var r=ot.call(arguments,2);return setTimeout(function(){e.apply(t,r)},n)},l.difference=function(e){for(var t=-1,n=e.length,r=nt.apply(V,arguments),i=[];++t<n;){var s=e[t];0>j(r,s,n)&&i.push(s)}return i},l.escape=function(e){return e==r?"":(e+"").replace(Z,v)},l.every=C,l.extend=o,l.filter=k,l.find=L,l.first=H,l.flatten=B,l.forEach=s,l.functions=b,l.groupBy=function(e,t,n){var r={},t=p(t,n);return s(e,function(e,n,i){n=t(e,n,i),(it.call(r,n)?r[n]:r[n]=[]).push(e)}),r},l.has=function(
|
(function(){e.apply(t,n)},1)},l.delay=function(e,n){var r=ot.call(arguments,2);return setTimeout(function(){e.apply(t,r)},n)},l.difference=function(e){for(var t=-1,n=e.length,r=nt.apply(V,arguments),i=[];++t<n;){var s=e[t];0>j(r,s,n)&&i.push(s)}return i},l.escape=function(e){return e==r?"":(e+"").replace(Z,v)},l.every=C,l.extend=o,l.filter=k,l.find=L,l.first=H,l.flatten=B,l.forEach=s,l.functions=b,l.groupBy=function(e,t,n){var r={},t=p(t,n);return s(e,function(e,n,i){n=t(e,n,i),(it.call(r,n)?r[n]
|
||||||
e,t){return e?it.call(e,t):i},l.identity=U,l.indexOf=j,l.initial=function(e,t,n){return e?ot.call(e,0,-(t==r||n?1:t)):[]},l.intersection=function(e){var t=arguments,n=t.length,r=[];return s(e,function(e){if(0>j(r,e)){for(var i=n;--i;)if(0>j(t[i],e))return;r.push(e)}}),r},l.invert=w,l.invoke=function(e,t){var n=ot.call(arguments,2),r="function"==typeof t,i=[];return s(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},l.isArray=Lt,l.isBoolean=function(e){return e===n||e===i||ut.call(e)==mt},l.isDate=
|
:r[n]=[]).push(e)}),r},l.has=function(e,t){return e?it.call(e,t):i},l.identity=U,l.indexOf=j,l.initial=function(e,t,n){return e?ot.call(e,0,-(t==r||n?1:t)):[]},l.intersection=function(e){var t=arguments,n=t.length,r=[];return s(e,function(e){if(0>j(r,e)){for(var i=n;--i;)if(0>j(t[i],e))return;r.push(e)}}),r},l.invert=w,l.invoke=function(e,t){var n=ot.call(arguments,2),r="function"==typeof t,i=[];return s(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},l.isArray=At,l.isBoolean=function(e){return e===
|
||||||
function(e){return ut.call(e)==gt},l.isElement=function(e){return e?1===e.nodeType:i},l.isEmpty=function(e){if(!e)return n;if(Lt(e)||x(e))return!e.length;for(var t in e)if(it.call(e,t))return i;return n},l.isEqual=E,l.isFinite=function(e){return lt(e?+e:parseFloat(e))},l.isFunction=S,l.isNaN=function(e){return ut.call(e)==yt&&e!=+e},l.isNull=function(e){return e===r},l.isNumber=function(e){return ut.call(e)==yt},l.isObject=function(e){return e?Tt[typeof e]:i},l.isRegExp=function(e){return ut.call
|
n||e===i||ut.call(e)==gt},l.isDate=function(e){return ut.call(e)==yt},l.isElement=function(e){return e?1===e.nodeType:i},l.isEmpty=function(e){if(!e)return n;if(At(e)||x(e))return!e.length;for(var t in e)if(it.call(e,t))return i;return n},l.isEqual=E,l.isFinite=function(e){return lt(e)&&!ct(parseFloat(e))},l.isFunction=S,l.isNaN=function(e){return ut.call(e)==bt&&e!=+e},l.isNull=function(e){return e===r},l.isNumber=function(e){return ut.call(e)==bt},l.isObject=function(e){return e?Nt[typeof e]:i}
|
||||||
(e)==wt},l.isString=x,l.isUndefined=function(e){return e===t},l.keys=At,l.last=function(e,t,n){if(e){var i=e.length;return t==r||n?e[i-1]:ot.call(e,-t||i)}},l.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?ht(0,r+n):pt(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},l.map=A,l.max=O,l.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return it.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},l.min=function(e,t,n){var r=Infinity
|
,l.isRegExp=function(e){return ut.call(e)==Et},l.isString=x,l.isUndefined=function(e){return e===t},l.keys=Ot,l.last=function(e,t,n){if(e){var i=e.length;return t==r||n?e[i-1]:ot.call(e,-t||i)}},l.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?pt(0,r+n):dt(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},l.map=A,l.max=O,l.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return it.call(n,r)?n[r]:n[r]=e.apply(this,arguments)
|
||||||
,i=-1,o=e?e.length:0,u=r;if(t||"number"!=typeof o)t=p(t,n),s(e,function(e,n,i){n=t(e,n,i),n<r&&(r=n,u=e)});else for(;++i<o;)e[i]<u&&(u=e[i]);return u},l.mixin=z,l.noConflict=function(){return e._=K,this},l.object=function(e,t){for(var n=-1,r=e?e.length:0,i={};++n<r;){var s=e[n];t?i[s]=t[n]:i[s[0]]=s[1]}return i},l.omit=function(e){var t=nt.apply(V,arguments),n={};return f(e,function(e,r){0>j(t,r,1)&&(n[r]=e)}),n},l.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e.apply(this,arguments
|
}},l.min=function(e,t,n){var r=Infinity,i=-1,o=e?e.length:0,u=r;if(t||"number"!=typeof o)t=p(t,n),s(e,function(e,n,i){n=t(e,n,i),n<r&&(r=n,u=e)});else for(;++i<o;)e[i]<u&&(u=e[i]);return u},l.mixin=z,l.noConflict=function(){return e._=K,this},l.object=function(e,t){for(var n=-1,r=e?e.length:0,i={};++n<r;){var s=e[n];t?i[s]=t[n]:i[s[0]]=s[1]}return i},l.omit=function(e){var t=nt.apply(V,arguments),n={};return f(e,function(e,r){0>j(t,r,1)&&(n[r]=e)}),n},l.once=function(e){var t,s=i;return function(
|
||||||
),e=r,t)}},l.pairs=function(e){var t=[];return a(e,function(e,n){t.push([n,e])}),t},l.pick=function(e){for(var t=0,n=nt.apply(V,arguments),r=n.length,i={};++t<r;){var s=n[t];s in e&&(i[s]=e[s])}return i},l.pluck=M,l.random=function(e,t){return e==r&&t==r&&(t=1),e=+e||0,t==r&&(t=e,e=0),e+rt(dt()*((+t||0)-e+1))},l.range=function(e,t,n){e=+e||0,n=+n||1,t==r&&(t=e,e=0);for(var i=-1,t=ht(0,tt((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},l.reduce=_,l.reduceRight=D,l.reject=function(e,t,n){return t=
|
){return s?t:(s=n,t=e.apply(this,arguments),e=r,t)}},l.pairs=function(e){var t=[];return a(e,function(e,n){t.push([n,e])}),t},l.pick=function(e){for(var t=0,n=nt.apply(V,arguments),r=n.length,i={};++t<r;){var s=n[t];s in e&&(i[s]=e[s])}return i},l.pluck=M,l.random=function(e,t){return e==r&&t==r&&(t=1),e=+e||0,t==r&&(t=e,e=0),e+rt(vt()*((+t||0)-e+1))},l.range=function(e,t,n){e=+e||0,n=+n||1,t==r&&(t=e,e=0);for(var i=-1,t=pt(0,tt((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},l.reduce=_,l.reduceRight=
|
||||||
p(t,n),k(e,function(e,n,r){return!t(e,n,r)})},l.rest=F,l.result=function(e,t){var n=e?e[t]:r;return S(n)?e[t]():n},l.shuffle=function(e){var t=-1,n=Array(e?e.length:0);return s(e,function(e){var r=rt(dt()*(++t+1));n[t]=n[r],n[r]=e}),n},l.size=function(e){var t=e?e.length:0;return"number"==typeof t?t:At(e).length},l.some=P,l.sortBy=function(e,t,n){var r=[],t=p(t,n);s(e,function(e,n,i){r.push({a:t(e,n,i),b:n,c:e})}),e=r.length;for(r.sort(c);e--;)r[e]=r[e].c;return r},l.sortedIndex=I,l.tap=function(
|
D,l.reject=function(e,t,n){return t=p(t,n),k(e,function(e,n,r){return!t(e,n,r)})},l.rest=F,l.result=function(e,t){var n=e?e[t]:r;return S(n)?e[t]():n},l.shuffle=function(e){var t=-1,n=Array(e?e.length:0);return s(e,function(e){var r=rt(vt()*(++t+1));n[t]=n[r],n[r]=e}),n},l.size=function(e){var t=e?e.length:0;return"number"==typeof t?t:Ot(e).length},l.some=P,l.sortBy=function(e,t,n){var r=[],t=p(t,n);s(e,function(e,n,i){r.push({a:t(e,n,i),b:n,c:e})}),e=r.length;for(r.sort(c);e--;)r[e]=r[e].c;return r
|
||||||
e,t){return t(e),e},l.template=function(e,t,n){e||(e="");var n=u({},n,l.templateSettings),r=0,i="__p += '",s=n.variable;e.replace(RegExp((n.escape||Y).source+"|"+(n.interpolate||Y).source+"|"+(n.evaluate||Y).source+"|$","g"),function(t,n,s,o,u){i+=e.slice(r,u).replace(et,d),i+=n?"'+_['escape']("+n+")+'":o?"';"+o+";__p+='":s?"'+((__t=("+s+"))==null?'':__t)+'":"",r=u+t.length}),i+="';",s||(s="obj",i="with("+s+"||{}){"+i+"}"),i="function("+s+"){var __t,__p='',__j=[].join;function print(){__p+=__j.call(arguments,'')}"+
|
},l.sortedIndex=I,l.tap=function(e,t){return t(e),e},l.template=function(e,t,n){e||(e="");var n=u({},n,l.templateSettings),r=0,i="__p += '",s=n.variable;e.replace(RegExp((n.escape||Y).source+"|"+(n.interpolate||Y).source+"|"+(n.evaluate||Y).source+"|$","g"),function(t,n,s,o,u){i+=e.slice(r,u).replace(et,d),i+=n?"'+_['escape']("+n+")+'":o?"';"+o+";__p+='":s?"'+((__t=("+s+"))==null?'':__t)+'":"",r=u+t.length}),i+="';",s||(s="obj",i="with("+s+"||{}){"+i+"}"),i="function("+s+"){var __t,__p='',__j=[].join;function print(){__p+=__j.call(arguments,'')}"+
|
||||||
i+"return __p}";try{var o=Function("_","return "+i)(l)}catch(a){throw a.source=i,a}return t?o(t):(o.source=i,o)},l.throttle=function(e,t){function n(){a=new Date,u=r,s=e.apply(o,i)}var i,s,o,u,a=0;return function(){var r=new Date,f=t-(r-a);return i=arguments,o=this,0>=f?(clearTimeout(u),a=r,s=e.apply(o,i)):u||(u=setTimeout(n,f)),s}},l.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++r<e;)i[r]=t.call(n,r);return i},l.toArray=function(e){return e&&"number"==typeof e.length?"string"==typeof e?
|
i+"return __p}";try{var o=Function("_","return "+i)(l)}catch(a){throw a.source=i,a}return t?o(t):(o.source=i,o)},l.throttle=function(e,t){function n(){a=new Date,u=r,s=e.apply(o,i)}var i,s,o,u,a=0;return function(){var r=new Date,f=t-(r-a);return i=arguments,o=this,0>=f?(clearTimeout(u),a=r,s=e.apply(o,i)):u||(u=setTimeout(n,f)),s}},l.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++r<e;)i[r]=t.call(n,r);return i},l.toArray=function(e){return e&&"number"==typeof e.length?"string"==typeof e?
|
||||||
e.split(""):ot.call(e):T(e)},l.unescape=function(e){return e==r?"":(e+"").replace(Q,g)},l.union=function(){for(var e=-1,t=nt.apply(V,arguments),n=t.length,r=[];++e<n;){var i=t[e];0>j(r,i)&&r.push(i)}return r},l.uniq=q,l.uniqueId=function(e){var t=$++;return e?e+t:t},l.values=T,l.where=function(e,t){var n=[];return f(t,function(e,t){n.push(t)}),k(e,function(e){for(var r=n.length;r--;){var i=e[n[r]]===t[n[r]];if(!i)break}return!!i})},l.without=function(e){for(var t=-1,n=e.length,r=[];++t<n;){var i=
|
e.split(""):ot.call(e):T(e)},l.unescape=function(e){return e==r?"":(e+"").replace(Q,g)},l.union=function(){return q(nt.apply(V,arguments))},l.uniq=q,l.uniqueId=function(e){var t=$++;return e?e+t:t},l.values=T,l.where=function(e,t){var n=[];return f(t,function(e,t){n.push(t)}),k(e,function(e){for(var r=n.length;r--;){var i=e[n[r]]===t[n[r]];if(!i)break}return!!i})},l.without=function(e){for(var t=-1,n=e.length,r=[];++t<n;){var i=e[t];0>j(arguments,i,1)&&r.push(i)}return r},l.wrap=function(e,t){return function(
|
||||||
e[t];0>j(arguments,i,1)&&r.push(i)}return r},l.wrap=function(e,t){return function(){var n=[e];return st.apply(n,arguments),t.apply(this,n)}},l.zip=function(e){for(var t=-1,n=e?O(M(arguments,"length")):0,r=Array(n);++t<n;)r[t]=M(arguments,t);return r},l.all=C,l.any=P,l.collect=A,l.detect=L,l.drop=F,l.each=s,l.foldl=_,l.foldr=D,l.head=H,l.include=N,l.inject=_,l.methods=b,l.select=k,l.tail=F,l.take=H,l.unique=q,z(l),l.prototype.chain=function(){return this.__chain__=n,this},l.prototype.value=function(
|
){var n=[e];return st.apply(n,arguments),t.apply(this,n)}},l.zip=function(e){for(var t=-1,n=e?O(M(arguments,"length")):0,r=Array(n);++t<n;)r[t]=M(arguments,t);return r},l.all=C,l.any=P,l.collect=A,l.detect=L,l.drop=F,l.each=s,l.foldl=_,l.foldr=D,l.head=H,l.include=N,l.inject=_,l.methods=b,l.select=k,l.tail=F,l.take=H,l.unique=q,z(l),l.prototype.chain=function(){return this.__chain__=n,this},l.prototype.value=function(){return this.__wrapped__},s("pop push reverse shift sort splice unshift".split(" "
|
||||||
){return this.__wrapped__},s("pop push reverse shift sort splice unshift".split(" "),function(e){var t=V[e];l.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),St&&e.length===0&&delete e[0],this.__chain__&&(e=new l(e),e.__chain__=n),e}}),s(["concat","join","slice"],function(e){var t=V[e];l.prototype[e]=function(){var e=t.apply(this.__wrapped__,arguments);return this.__chain__&&(e=new l(e),e.__chain__=n),e}}),W?"object"==typeof module&&module&&module.exports==W?(module.exports=
|
),function(e){var t=V[e];l.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),xt&&e.length===0&&delete e[0],this.__chain__&&(e=new l(e),e.__chain__=n),e}}),s(["concat","join","slice"],function(e){var t=V[e];l.prototype[e]=function(){var e=t.apply(this.__wrapped__,arguments);return this.__chain__&&(e=new l(e),e.__chain__=n),e}}),W?"object"==typeof module&&module&&module.exports==W?(module.exports=l)._=l:W._=l:e._=l})(this);
|
||||||
l)._=l:W._=l:e._=l})(this);
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash",
|
"name": "lodash",
|
||||||
"version": "0.9.0",
|
"version": "0.9.1",
|
||||||
"description": "A drop-in replacement for Underscore.js delivering performance, bug fixes, and additional features.",
|
"description": "A drop-in replacement for Underscore.js delivering performance, bug fixes, and additional features.",
|
||||||
"homepage": "http://lodash.com",
|
"homepage": "http://lodash.com",
|
||||||
"main": "./lodash",
|
"main": "./lodash",
|
||||||
|
|||||||
@@ -632,21 +632,23 @@
|
|||||||
vm.runInContext(source, context);
|
vm.runInContext(source, context);
|
||||||
var lodash = context._;
|
var lodash = context._;
|
||||||
|
|
||||||
lodash.each(array, function(value) {
|
var object = { 'fn': lodash.bind(function(foo) { return foo + this.bar; }, { 'bar': 1 }, 1) };
|
||||||
last = value;
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
var object = { 'fn': lodash.bind(function(x) { return this.x + x; }, { 'x': 1 }, 1) };
|
|
||||||
equal(object.fn(), 2, '_.bind: ' + basename);
|
equal(object.fn(), 2, '_.bind: ' + basename);
|
||||||
|
|
||||||
ok(lodash.clone(array, true)[0] === array[0], '_.clone: ' + basename);
|
ok(lodash.clone(array, true)[0] === array[0], '_.clone should be shallow: ' + basename);
|
||||||
equal(last.value, 2, '_.each: ' + basename);
|
|
||||||
equal(lodash.every([true, false, true]), false, '_.every: ' + basename);
|
equal(lodash.every([true, false, true]), false, '_.every: ' + basename);
|
||||||
|
|
||||||
object = { 'length': 0, 'splice': Array.prototype.splice };
|
object = { 'length': 0, 'splice': Array.prototype.splice };
|
||||||
equal(lodash.isEmpty(object), false, '_.isEmpty: ' + basename);
|
equal(lodash.isEmpty(object), false, '_.isEmpty: ' + basename);
|
||||||
|
|
||||||
|
var actual = lodash.forEach(array, function(value) {
|
||||||
|
last = value;
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
equal(last.value, 2, '_.forEach should not exit early: ' + basename);
|
||||||
|
equal(actual, undefined, '_.forEach should return undefined: ' + basename);
|
||||||
|
|
||||||
// avoid issues comparing objects with `deepEqual`
|
// avoid issues comparing objects with `deepEqual`
|
||||||
object = { 'a': 1, 'b': 2, 'c': 3 };
|
object = { 'a': 1, 'b': 2, 'c': 3 };
|
||||||
var actual = lodash.omit(object, function(value) { return value == 3; });
|
var actual = lodash.omit(object, function(value) { return value == 3; });
|
||||||
|
|||||||
70
test/test.js
70
test/test.js
@@ -295,17 +295,17 @@
|
|||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
asyncTest('subsequent debounced calls return the last `func` result', function() {
|
asyncTest('subsequent debounced calls return the last `func` result', function() {
|
||||||
var debounced = _.debounce(function(value) { return value; }, 100);
|
var debounced = _.debounce(function(value) { return value; }, 90);
|
||||||
debounced('x');
|
debounced('x');
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
equal(debounced('y'), 'x');
|
equal(debounced('y'), 'x');
|
||||||
QUnit.start();
|
QUnit.start();
|
||||||
}, 220);
|
}, 120);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('subsequent "immediate" debounced calls return the last `func` result', function() {
|
test('subsequent "immediate" debounced calls return the last `func` result', function() {
|
||||||
var debounced = _.debounce(function(value) { return value; }, 100, true),
|
var debounced = _.debounce(function(value) { return value; }, 90, true),
|
||||||
result = [debounced('x'), debounced('y')];
|
result = [debounced('x'), debounced('y')];
|
||||||
|
|
||||||
deepEqual(result, ['x', 'x']);
|
deepEqual(result, ['x', 'x']);
|
||||||
@@ -348,6 +348,16 @@
|
|||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
QUnit.module('lodash.every');
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
test('should return `false` as soon as the `callback` result is falsey', function() {
|
||||||
|
equal(_.every([true, null, true], _.identity), false);
|
||||||
|
});
|
||||||
|
}());
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
QUnit.module('lodash.extend');
|
QUnit.module('lodash.extend');
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
@@ -764,6 +774,27 @@
|
|||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
QUnit.module('lodash.isFinite');
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
test('should return `false` for non-numeric values', function() {
|
||||||
|
equal(_.isFinite(null), false);
|
||||||
|
equal(_.isFinite([]), false);
|
||||||
|
equal(_.isFinite(true), false);
|
||||||
|
equal(_.isFinite(''), false);
|
||||||
|
equal(_.isFinite(' '), false);
|
||||||
|
equal(_.isFinite('2px'), false);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('should return `true` for numeric string values', function() {
|
||||||
|
equal(_.isFinite('2'), true);
|
||||||
|
equal(_.isFinite('0'), true);
|
||||||
|
equal(_.isFinite('08'), true);
|
||||||
|
});
|
||||||
|
}());
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
QUnit.module('lodash.isObject');
|
QUnit.module('lodash.isObject');
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
@@ -1393,6 +1424,17 @@
|
|||||||
});
|
});
|
||||||
}(1, 2, 3));
|
}(1, 2, 3));
|
||||||
|
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
QUnit.module('lodash.some');
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
test('should return `true` as soon as the `callback` result is truthy', function() {
|
||||||
|
equal(_.some([null, true, null], _.identity), true);
|
||||||
|
});
|
||||||
|
}());
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
QUnit.module('lodash.sortBy');
|
QUnit.module('lodash.sortBy');
|
||||||
@@ -1584,7 +1626,7 @@
|
|||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
test('subsequent calls should return the result of the first call', function() {
|
test('subsequent calls should return the result of the first call', function() {
|
||||||
var throttled = _.throttle(function(value) { return value; }, 100),
|
var throttled = _.throttle(function(value) { return value; }, 90),
|
||||||
result = [throttled('x'), throttled('y')];
|
result = [throttled('x'), throttled('y')];
|
||||||
|
|
||||||
deepEqual(result, ['x', 'x']);
|
deepEqual(result, ['x', 'x']);
|
||||||
@@ -1592,9 +1634,9 @@
|
|||||||
|
|
||||||
test('supports calls in a loop', function() {
|
test('supports calls in a loop', function() {
|
||||||
var counter = 0,
|
var counter = 0,
|
||||||
throttled = _.throttle(function() { counter++; }, 100),
|
throttled = _.throttle(function() { counter++; }, 90),
|
||||||
start = new Date,
|
start = new Date,
|
||||||
limit = 220;
|
limit = 180;
|
||||||
|
|
||||||
while ((new Date - start) < limit) {
|
while ((new Date - start) < limit) {
|
||||||
throttled();
|
throttled();
|
||||||
@@ -1609,12 +1651,12 @@
|
|||||||
if (counter < 4) {
|
if (counter < 4) {
|
||||||
throttled();
|
throttled();
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 90);
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
ok(counter > 1);
|
ok(counter > 1);
|
||||||
QUnit.start();
|
QUnit.start();
|
||||||
}, 220);
|
}, 180);
|
||||||
|
|
||||||
throttled();
|
throttled();
|
||||||
});
|
});
|
||||||
@@ -1625,12 +1667,12 @@
|
|||||||
|
|
||||||
var throttled = _.throttle(function() {
|
var throttled = _.throttle(function() {
|
||||||
times.push(new Date - now);
|
times.push(new Date - now);
|
||||||
}, 20);
|
}, 32);
|
||||||
|
|
||||||
setTimeout(throttled, 20);
|
setTimeout(throttled, 32);
|
||||||
setTimeout(throttled, 20);
|
setTimeout(throttled, 32);
|
||||||
setTimeout(throttled, 40);
|
setTimeout(throttled, 64);
|
||||||
setTimeout(throttled, 40);
|
setTimeout(throttled, 64);
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
var actual = _.every(times, function(value, index) {
|
var actual = _.every(times, function(value, index) {
|
||||||
@@ -1641,7 +1683,7 @@
|
|||||||
|
|
||||||
ok(actual);
|
ok(actual);
|
||||||
QUnit.start();
|
QUnit.start();
|
||||||
}, 120);
|
}, 260);
|
||||||
});
|
});
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user