mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 07:17:50 +00:00
Bump to v0.5.0-rc.1.
Former-commit-id: f5a29fd34de5aced3287413f40a0a36226465c84
This commit is contained in:
119
README.md
119
README.md
@@ -1,4 +1,4 @@
|
||||
# Lo-Dash <sup>v0.4.2</sup>
|
||||
# Lo-Dash <sup>v0.5.0-rc.1</sup>
|
||||
|
||||
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), that delivers [performance improvements](http://lodash.com/benchmarks), [bug fixes](https://github.com/bestiejs/lodash#closed-underscorejs-issues), and [additional features](https://github.com/bestiejs/lodash#features).
|
||||
|
||||
@@ -6,8 +6,8 @@ Lo-Dash’s performance is gained by avoiding slower native methods, instead opt
|
||||
|
||||
## Download
|
||||
|
||||
* [Development source](https://raw.github.com/bestiejs/lodash/v0.4.2/lodash.js)
|
||||
* [Production source](https://raw.github.com/bestiejs/lodash/v0.4.2/lodash.min.js)
|
||||
* [Development source](https://raw.github.com/bestiejs/lodash/v0.5.0-rc.1/lodash.js)
|
||||
* [Production source](https://raw.github.com/bestiejs/lodash/v0.5.0-rc.1/lodash.min.js)
|
||||
* CDN copies of ≤ [v0.4.2](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/0.4.2/lodash.min.js) are available on [cdnjs](http://cdnjs.com/) thanks to [CloudFlare](http://www.cloudflare.com/)
|
||||
* For optimal performance, [create a custom build](https://github.com/bestiejs/lodash#custom-builds) with only the features you need
|
||||
|
||||
@@ -32,20 +32,26 @@ For more information check out these screencasts over Lo-Dash:
|
||||
|
||||
* AMD loader support ([RequireJS](http://requirejs.org/), [curl.js](https://github.com/cujojs/curl), etc.)
|
||||
* [_.bind](http://lodash.com/docs#bind) supports *"lazy"* binding
|
||||
* [_.clone](https://github.com/bestiejs/lodash/tree/master/doc#_clonevalue-deep--guard-thorough) supports *"deep"* cloning
|
||||
* [_.countBy](https://github.com/bestiejs/lodash/tree/master/doc#_countbycollection-callback--thisarg) as a compainion function for [_.groupBy](http://lodash.com/docs#groupBy) and [_.sortBy](http://lodash.com/docs#sortBy)
|
||||
* [_.debounce](http://lodash.com/docs#debounce)’ed functions match [_.throttle](http://lodash.com/docs#throttle)’ed functions’ return value behavior
|
||||
* [_.forEach](http://lodash.com/docs#forEach) is chainable
|
||||
* [_.drop](https://github.com/bestiejs/lodash/tree/master/doc#_dropobject--prop1-prop2-) for the inverse functionality of [_.pick](http://lodash.com/docs#pick)
|
||||
* [_.forEach](http://lodash.com/docs#forEach) is chainable and supports exiting iteration early
|
||||
* [_.forIn](http://lodash.com/docs#forIn) for iterating over an object’s own and inherited properties
|
||||
* [_.forOwn](http://lodash.com/docs#forOwn) for iterating over an object’s own properties
|
||||
* [_.groupBy](http://lodash.com/docs#groupBy), [_.sortedIndex](http://lodash.com/docs#sortedIndex), and [_.uniq](http://lodash.com/docs#uniq) accept a `thisArg` argument
|
||||
* [_.indexOf](http://lodash.com/docs#indexOf) and [_.lastIndexOf](http://lodash.com/docs#lastIndexOf) accept a `fromIndex` argument
|
||||
* [_.partial](http://lodash.com/docs#partial) for more functional fun
|
||||
* [_.merge](https://github.com/bestiejs/lodash/tree/master/doc#_mergeobject--source1-source2--indicator) for a *"deep"* [_.extend](http://lodash.com/docs#extend)
|
||||
* [_.partial](http://lodash.com/docs#partial) for partial application without `this` binding
|
||||
* [_.template](http://lodash.com/docs#template) utilizes [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) for easier debugging
|
||||
* [_.where](https://github.com/bestiejs/lodash/tree/master/doc#_wherecollection-properties) for filtering collections by contained properties
|
||||
* [_.zipObject](http://lodash.com/docs#zipObject) for composing objects
|
||||
* [_.contains](http://lodash.com/docs#contains), [_.size](http://lodash.com/docs#size), [_.toArray](http://lodash.com/docs#toArray),
|
||||
[and more…](http://lodash.com/docs "_.every, _.filter, _.find, _.forEach, _.groupBy, _.invoke, _.map, _.pluck, _.reduce, _.reduceRight, _.reject, _.some, _sortBy") accept strings
|
||||
|
||||
## Support
|
||||
|
||||
Lo-Dash has been tested in at least Chrome 5-20, Firefox 1.5-13, IE 6-9, Opera 9.25-12, Safari 3.0.4-5.1.7, Node.js 0.4.8-0.8.2, Narwhal 0.3.2, RingoJS 0.8, and Rhino 1.7RC3.
|
||||
Lo-Dash has been tested in at least Chrome 5-20, Firefox 1.5-13, IE 6-9, Opera 9.25-12.01, Safari 3.0.4-6, Node.js 0.4.8-0.8.2, Narwhal 0.3.2, RingoJS 0.8, and Rhino 1.7RC3.
|
||||
|
||||
## Custom builds
|
||||
|
||||
@@ -55,6 +61,11 @@ We handle all the method dependency and alias mapping for you.
|
||||
* Backbone builds, containing all methods required by Backbone, may be created using the `backbone` modifier argument.
|
||||
~~~ bash
|
||||
lodash backbone
|
||||
~~~
|
||||
|
||||
* CSP builds, supporting default Content Security Policy restrictions, may be created using the `csp` modifier argument.
|
||||
~~~ bash
|
||||
lodash csp
|
||||
~~~
|
||||
|
||||
* Legacy builds, tailored for older browsers without [ES5 support](http://es5.github.com/), may be created using the `legacy` modifier argument.
|
||||
@@ -70,6 +81,11 @@ lodash mobile
|
||||
* Strict builds, with `_.bindAll`, `_.defaults`, and `_.extend` in [strict mode](http://es5.github.com/#C), may be created using the `strict` modifier argument.
|
||||
~~~ bash
|
||||
lodash strict
|
||||
~~~
|
||||
|
||||
* Underscore builds, containing only methods included in Underscore, may be created using the `underscore` modifier argument.
|
||||
~~~ bash
|
||||
lodash underscore
|
||||
~~~
|
||||
|
||||
Custom builds may be created in three ways:
|
||||
@@ -93,11 +109,11 @@ lodash include=each,filter,map
|
||||
lodash include="each, filter, map"
|
||||
~~~
|
||||
|
||||
All arguments, except `exclude` with `include` and `legacy` with `mobile`, may be combined.
|
||||
All arguments, except `backbone` with `underscore`, `exclude` with `include`, and `legacy` with `csp`/`mobile`, may be combined.
|
||||
|
||||
~~~ bash
|
||||
lodash backbone legacy category=utilities exclude=first,last
|
||||
lodash backbone mobile strict category=functions include=pick,uniq
|
||||
lodash underscore mobile strict category=functions include=pick,uniq
|
||||
~~~
|
||||
|
||||
The `lodash` command-line utility is available when Lo-Dash is installed as a global package (i.e. `npm install -g lodash`).
|
||||
@@ -152,29 +168,33 @@ require({
|
||||
|
||||
## Closed Underscore.js issues <sup>(20+)</sup>
|
||||
|
||||
* Allow iteration of objects with a `length` property [[#148](https://github.com/documentcloud/underscore/issues/148), [#154](https://github.com/documentcloud/underscore/issues/154), [#252](https://github.com/documentcloud/underscore/issues/252), [#448](https://github.com/documentcloud/underscore/issues/448), [#659](https://github.com/documentcloud/underscore/issues/659), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L364-370)]
|
||||
* Ensure array-like objects with invalid `length` properties are treated like regular objects [[test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L315-321), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L665-679), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L921-924)]
|
||||
* Ensure *"Arrays"* methods allow falsey `array` arguments [[test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L989-1028)]
|
||||
* 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.4.2/test/test.js#L148-157), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L323-341), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L681-698), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L926-929)]
|
||||
* Ensure templates compiled with errors are inspectable [[#666](https://github.com/documentcloud/underscore/issues/666), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L795-802)]
|
||||
* 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.4.2/test/test.js#L224-236), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L375-400), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L496-507), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L515-517), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L535-555), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L725-727)]
|
||||
* Allow iteration of objects with a `length` property [[#148](https://github.com/documentcloud/underscore/issues/148), [#154](https://github.com/documentcloud/underscore/issues/154), [#252](https://github.com/documentcloud/underscore/issues/252), [#448](https://github.com/documentcloud/underscore/issues/448), [#659](https://github.com/documentcloud/underscore/issues/659), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L540-546)]
|
||||
* Ensure array-like objects with invalid `length` properties are treated like regular objects [[test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L491-497)]
|
||||
* Ensure *"Arrays"* methods allow falsey `array` arguments [[test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L1412-1450)]
|
||||
* 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.5.0-rc.1/test/test.js#L499-517)]
|
||||
* Ensure templates compiled with errors are inspectable [[#666](https://github.com/documentcloud/underscore/issues/666), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L1157-1160)]
|
||||
* 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.5.0-rc.1/test/test.js#L551-576)]
|
||||
* Handle arrays with `undefined` values correctly in IE < 9 [[#601](https://github.com/documentcloud/underscore/issues/601)]
|
||||
* Methods should work on pages with incorrectly shimmed native methods [[#7](https://github.com/documentcloud/underscore/issues/7), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L96-102)]
|
||||
* Register as an AMD module, but still export to global [[#431](https://github.com/documentcloud/underscore/pull/431), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L80-94)]
|
||||
* `_(…)` should return passed wrapper instances [[test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L114-117)]
|
||||
* `_.contains` should work with strings [[#667](https://github.com/documentcloud/underscore/pull/667), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L148-157)]
|
||||
* `_.escape` should return an empty string when passed `null` or `undefined` [[#407](https://github.com/documentcloud/underscore/issues/427), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L205-208)]
|
||||
* `_.forEach` should be chainable [[#142](https://github.com/documentcloud/underscore/issues/142), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L310-313)]
|
||||
* `_.groupBy` should add values to own, not inherited, properties [[test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L415-422)]
|
||||
* `_isNaN(new Number(NaN))` should return `true` [[test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L525-527)]
|
||||
* `_.reduceRight` should pass correct callback arguments when iterating objects [[test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L649-663)]
|
||||
* `_.size` should return the `length` of string values [[test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L708-710)]
|
||||
* `_.size` shouldn't error on falsey values [[#650](https://github.com/documentcloud/underscore/pull/650), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L712-719)]
|
||||
* `_.size` should work with `arguments` objects cross-browser [[#653](https://github.com/documentcloud/underscore/issues/653), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L721-723)]
|
||||
* `_.sortedIndex` should support arrays with high `length` values [[test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L765-774)]
|
||||
* `_.template` should not augment the `options` object [[test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L789-793)]
|
||||
* `_.throttle` should work when called in a loop [[#502](https://github.com/documentcloud/underscore/issues/502), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L872-882)]
|
||||
* `_.zipObject` should accept less than two arguments [[test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L951-953)]
|
||||
* Methods should work on pages with incorrectly shimmed native methods [[#7](https://github.com/documentcloud/underscore/issues/7), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L117-123)]
|
||||
* Register as an AMD module, but still export to global [[#431](https://github.com/documentcloud/underscore/pull/431), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L101-115)]
|
||||
* `_(…)` should return passed wrapper instances [[test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L135-138)]
|
||||
* `_.clone` should allow `deep` cloning [[#595](https://github.com/documentcloud/underscore/pull/595), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L197-212)]
|
||||
* `_.contains` should work with strings [[#667](https://github.com/documentcloud/underscore/pull/667), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L267-276)]
|
||||
* `_.escape` should return an empty string when passed `null` or `undefined` [[#407](https://github.com/documentcloud/underscore/issues/427), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L367-370)]
|
||||
* `_.extend` should recursively extend objects [[#379](https://github.com/documentcloud/underscore/pull/379), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L851-873)]
|
||||
* `_.forEach` should be chainable [[#142](https://github.com/documentcloud/underscore/issues/142), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L486-489)]
|
||||
* `_.forEach` should exit iteration early [[#211](https://github.com/documentcloud/underscore/issues/211), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L578-597)]
|
||||
* `_.groupBy` should add values to own, not inherited, properties [[test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L612-619)]
|
||||
* `_.isNaN(new Number(NaN))` should return `true` [[test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L774-776)]
|
||||
* `_.keys` and `_.size` should work with `arguments` objects cross-browser [[#396](https://github.com/documentcloud/underscore/issues/396), [#653](https://github.com/documentcloud/underscore/issues/653), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L786-788), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L1083-1085)]
|
||||
* `_.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.5.0-rc.1/test/test.js#L996-999)]
|
||||
* `_.reduceRight` should pass correct callback arguments when iterating objects [[test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L1007-1021)]
|
||||
* `_.size` should return the `length` of string values [[test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L1066-1068)]
|
||||
* `_.size` shouldn't error on falsey values [[#650](https://github.com/documentcloud/underscore/pull/650), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L1070-1077)]
|
||||
* `_.sortedIndex` should support arrays with high `length` values [[test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L1127-1136)]
|
||||
* `_.template` should not augment the `options` object [[test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L1151-1155)]
|
||||
* `_.throttle` should work when called in a loop [[#502](https://github.com/documentcloud/underscore/issues/502), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L1247-1257)]
|
||||
* `_.zipObject` should accept less than two arguments [[test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L1374-1376)]
|
||||
|
||||
## Optimized methods <sup>(50+)</sup>
|
||||
|
||||
@@ -202,7 +222,6 @@ require({
|
||||
* `_.isArguments`
|
||||
* `_.isDate`
|
||||
* `_.isEmpty`
|
||||
* `_.isEqual`
|
||||
* `_.isFinite`
|
||||
* `_.isFunction`
|
||||
* `_.isObject`
|
||||
@@ -239,33 +258,19 @@ require({
|
||||
|
||||
## Release Notes
|
||||
|
||||
### <sup>v0.4.2</sup>
|
||||
### <sup>v0.5.0-rc.1</sup>
|
||||
|
||||
* Added `strict` build
|
||||
* Ensured `_.bindAll`, `_.defaults`, and `_.extend` avoid strict mode errors when attempting to augment read-only properties
|
||||
* Optimized the iteration of large arrays in `_.difference`, `_.intersection`, and `_.without`
|
||||
* Fixed build bugs related to removing variables
|
||||
|
||||
### <sup>v0.4.1</sup>
|
||||
|
||||
* Fixed `_.template` regression
|
||||
* Optimized build process to detect and remove more unused variables
|
||||
|
||||
### <sup>v0.4.0</sup>
|
||||
|
||||
* Added `bin` and `scripts` entries to package.json
|
||||
* Added `legacy` build option
|
||||
* Added cross-browser support for passing strings to *"Collections"* methods
|
||||
* Added `_.zipObject`
|
||||
* Leveraged `_.indexOf`'s `fromIndex` in `_.difference` and `_.without`
|
||||
* Optimized compiled templates
|
||||
* Optimized inlining the `iteratorTemplate` for builds
|
||||
* Optimized object iteration for *"Collections"* methods
|
||||
* Optimized partially applied `_.bind` in V8
|
||||
* Made compiled templates more debuggable
|
||||
* Made `_.size` work with falsey values and consistent cross-browser with `arguments` objects
|
||||
* Moved `_.groupBy` and `_.sortBy` back to the *"Collections"* category
|
||||
* Removed `arguments` object from `_.range`
|
||||
* Added `_.countBy`, `_.drop`, `_.merge`, and `_.where`
|
||||
* Added `csp` *(Content Security Policy)* and `underscore` build options
|
||||
* Added `deep` cloning support to `_.clone`
|
||||
* Added support for exiting `_.forEach`, `_.forIn`, and `_.forOwn` early by returning `false` in the `callback`
|
||||
* Ensured development build works with IE conditional compilation enabled
|
||||
* Ensured `_.clone` doesn't clone functions, DOM nodes, `arguments` objects, and objects created by constructors other than `Object`
|
||||
* Ensured `_.filter`’s `callback` can't modify result values
|
||||
* Ensured `_.isEmpty`, `_.isEquals`, and `_.size` support `arguments` objects
|
||||
* Ensured `_.isEqual` doesn't inspect DOM nodes, works with objects from other documents, and calls custom `isEqual` methods before checking strict equality
|
||||
* Ensured `reEvaluateDelimiter` is assigned when `_.templateSettings.evaluate` is undefined
|
||||
* Made `_.range` coerce arguments to numbers
|
||||
|
||||
The full changelog is available [here](https://github.com/bestiejs/lodash/wiki/Changelog).
|
||||
|
||||
|
||||
206
doc/README.md
206
doc/README.md
@@ -1,4 +1,4 @@
|
||||
# Lo-Dash <sup>v0.5.0rc1</sup>
|
||||
# Lo-Dash <sup>v0.5.0-rc.1</sup>
|
||||
|
||||
<!-- div -->
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_value"></a>`_(value)`
|
||||
<a href="#_value">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L244 "View in source") [Ⓣ][1]
|
||||
<a href="#_value">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L249 "View in source") [Ⓣ][1]
|
||||
|
||||
The `lodash` function.
|
||||
|
||||
@@ -152,7 +152,7 @@ The `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <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#L4003 "View in source") [Ⓣ][1]
|
||||
|
||||
*(String)*: The semantic version number.
|
||||
|
||||
@@ -164,7 +164,7 @@ The `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_aftern-func"></a>`_.after(n, func)`
|
||||
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3089 "View in source") [Ⓣ][1]
|
||||
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3107 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new function that is restricted to executing only after it is called `n` times.
|
||||
|
||||
@@ -192,7 +192,7 @@ _.forEach(notes, function(note) {
|
||||
<!-- div -->
|
||||
|
||||
### <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#L3143 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindfunc--thisarg-arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3161 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new function that, when called, invokes `func` with the `this` binding of `thisArg` and prepends any additional `bind` arguments to those passed to the bound function. Lazy defined methods may be bound by passing the object they are bound to as `func` and the method name as `thisArg`.
|
||||
|
||||
@@ -243,7 +243,7 @@ func();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindallobject--methodname1-methodname2-"></a>`_.bindAll(object [, methodName1, methodName2, ...])`
|
||||
<a href="#_bindallobject--methodname1-methodname2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3213 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindallobject--methodname1-methodname2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3231 "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.
|
||||
|
||||
@@ -274,7 +274,7 @@ jQuery('#lodash_button').on('click', buttonView.onClick);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_chainvalue"></a>`_.chain(value)`
|
||||
<a href="#_chainvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3906 "View in source") [Ⓣ][1]
|
||||
<a href="#_chainvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3928 "View in source") [Ⓣ][1]
|
||||
|
||||
Wraps the value in a `lodash` wrapper object.
|
||||
|
||||
@@ -308,7 +308,7 @@ var youngest = _.chain(stooges)
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_clonevalue-deep--guard-thorough"></a>`_.clone(value, deep [, guard], thorough)`
|
||||
<a href="#_clonevalue-deep--guard-thorough">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L895 "View in source") [Ⓣ][1]
|
||||
<a href="#_clonevalue-deep--guard-thorough">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L897 "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. If a value has a `clone` method it will be used to perform the clone. Functions, DOM nodes, `arguments` objects, and objects created by constructors other than `Object` are **not** cloned unless they have a custom `clone` method.
|
||||
|
||||
@@ -349,7 +349,7 @@ shallow[0] === stooges[0];
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_compactarray"></a>`_.compact(array)`
|
||||
<a href="#_compactarray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2330 "View in source") [Ⓣ][1]
|
||||
<a href="#_compactarray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2348 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new array with all falsey values of `array` removed. The values `false`, `null`, `0`, `""`, `undefined` and `NaN` are all falsey.
|
||||
|
||||
@@ -373,7 +373,7 @@ _.compact([0, 1, false, 2, '', 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_composefunc1-func2-"></a>`_.compose([func1, func2, ...])`
|
||||
<a href="#_composefunc1-func2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3249 "View in source") [Ⓣ][1]
|
||||
<a href="#_composefunc1-func2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3267 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new function that is the composition of the passed functions, where each function consumes the return value of the function that follows. In math terms, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`.
|
||||
|
||||
@@ -400,7 +400,7 @@ welcome('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_containscollection-target"></a>`_.contains(collection, target)`
|
||||
<a href="#_containscollection-target">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1758 "View in source") [Ⓣ][1]
|
||||
<a href="#_containscollection-target">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1777 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a given `target` element is present in a `collection` using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -431,7 +431,7 @@ _.contains('curly', 'ur');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_countbycollection-callback--thisarg"></a>`_.countBy(collection, callback [, thisArg])`
|
||||
<a href="#_countbycollection-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1794 "View in source") [Ⓣ][1]
|
||||
<a href="#_countbycollection-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1813 "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 `3` arguments; *(value, index|key, collection)*. The `callback` argument may also be the name of a property to count by *(e.g. 'length')*.
|
||||
|
||||
@@ -463,7 +463,7 @@ _.countBy(['one', 'two', 'three'], 'length');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_debouncefunc-wait-immediate"></a>`_.debounce(func, wait, immediate)`
|
||||
<a href="#_debouncefunc-wait-immediate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3282 "View in source") [Ⓣ][1]
|
||||
<a href="#_debouncefunc-wait-immediate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3300 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new function that will delay the execution of `func` until after `wait` milliseconds have elapsed since the last time it was invoked. Pass `true` for `immediate` to cause debounce to invoke `func` on the leading, instead of the trailing, edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call.
|
||||
|
||||
@@ -489,7 +489,7 @@ jQuery(window).on('resize', lazyLayout);
|
||||
<!-- div -->
|
||||
|
||||
### <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#L996 "View in source") [Ⓣ][1]
|
||||
<a href="#_defaultsobject--default1-default2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L998 "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.
|
||||
|
||||
@@ -515,7 +515,7 @@ _.defaults(iceCream, { 'flavor': 'vanilla', 'sprinkles': 'rainbow' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_deferfunc--arg1-arg2-"></a>`_.defer(func [, arg1, arg2, ...])`
|
||||
<a href="#_deferfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3347 "View in source") [Ⓣ][1]
|
||||
<a href="#_deferfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3365 "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.
|
||||
|
||||
@@ -540,7 +540,7 @@ _.defer(function() { alert('deferred'); });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_delayfunc-wait--arg1-arg2-"></a>`_.delay(func, wait [, arg1, arg2, ...])`
|
||||
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3327 "View in source") [Ⓣ][1]
|
||||
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3345 "View in source") [Ⓣ][1]
|
||||
|
||||
Executes the `func` function after `wait` milliseconds. Additional arguments will be passed to `func` when it is invoked.
|
||||
|
||||
@@ -567,7 +567,7 @@ _.delay(log, 1000, 'logged later');
|
||||
<!-- div -->
|
||||
|
||||
### <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#L2362 "View in source") [Ⓣ][1]
|
||||
<a href="#_differencearray--array1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2380 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new array of `array` elements not present in the other arrays using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -592,7 +592,7 @@ _.difference([1, 2, 3, 4, 5], [5, 2, 10]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_dropobject--prop1-prop2-"></a>`_.drop(object [, prop1, prop2, ...])`
|
||||
<a href="#_dropobject--prop1-prop2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1016 "View in source") [Ⓣ][1]
|
||||
<a href="#_dropobject--prop1-prop2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1018 "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.
|
||||
|
||||
@@ -617,7 +617,7 @@ _.drop({ 'name': 'moe', 'age': 40, 'userid': 'moe1' }, 'userid');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_escapestring"></a>`_.escape(string)`
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3541 "View in source") [Ⓣ][1]
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3559 "View in source") [Ⓣ][1]
|
||||
|
||||
Escapes a string for inclusion in HTML, replacing `&`, `<`, `"`, and `'` characters.
|
||||
|
||||
@@ -641,7 +641,7 @@ _.escape('Moe, Larry & Curly');
|
||||
<!-- div -->
|
||||
|
||||
### <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#L1814 "View in source") [Ⓣ][1]
|
||||
<a href="#_everycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1833 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if the `callback` returns a truthy value for **all** elements of a `collection`. The `callback` is bound to `thisArg` and invoked with `3` arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -667,7 +667,7 @@ _.every([true, 1, null, 'yes'], Boolean);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_extendobject--source1-source2-"></a>`_.extend(object [, source1, source2, ...])`
|
||||
<a href="#_extendobject--source1-source2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1040 "View in source") [Ⓣ][1]
|
||||
<a href="#_extendobject--source1-source2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1042 "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.
|
||||
|
||||
@@ -692,7 +692,7 @@ _.extend({ 'name': 'moe' }, { 'age': 40 });
|
||||
<!-- div -->
|
||||
|
||||
### <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#L1834 "View in source") [Ⓣ][1]
|
||||
<a href="#_filtercollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1853 "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 `3` arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -718,7 +718,7 @@ var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; })
|
||||
<!-- div -->
|
||||
|
||||
### <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#L1855 "View in source") [Ⓣ][1]
|
||||
<a href="#_findcollection-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1874 "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 `3` arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -744,7 +744,7 @@ var even = _.find([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_firstarray--n-guard"></a>`_.first(array [, n, guard])`
|
||||
<a href="#_firstarray--n-guard">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2399 "View in source") [Ⓣ][1]
|
||||
<a href="#_firstarray--n-guard">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2417 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the first element of the `array`. Pass `n` to return the first `n` elements of the `array`.
|
||||
|
||||
@@ -770,7 +770,7 @@ _.first([5, 4, 3, 2, 1]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_flattenarray-shallow"></a>`_.flatten(array, shallow)`
|
||||
<a href="#_flattenarray-shallow">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2423 "View in source") [Ⓣ][1]
|
||||
<a href="#_flattenarray-shallow">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2441 "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.
|
||||
|
||||
@@ -798,7 +798,7 @@ _.flatten([1, [2], [3, [[4]]]], true);
|
||||
<!-- div -->
|
||||
|
||||
### <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#L1882 "View in source") [Ⓣ][1]
|
||||
<a href="#_foreachcollection-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1901 "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 `3` arguments; *(value, index|key, collection)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -827,7 +827,7 @@ _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, alert);
|
||||
<!-- div -->
|
||||
|
||||
### <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#L1070 "View in source") [Ⓣ][1]
|
||||
<a href="#_forinobject-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1072 "View in source") [Ⓣ][1]
|
||||
|
||||
Iterates over `object`'s own and inherited enumerable properties, executing the `callback` for each property. The `callback` is bound to `thisArg` and invoked with `3` arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -863,7 +863,7 @@ _.forIn(new Dog('Dagny'), function(value, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <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#L1094 "View in source") [Ⓣ][1]
|
||||
<a href="#_forownobject-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1096 "View in source") [Ⓣ][1]
|
||||
|
||||
Iterates over `object`'s own enumerable properties, executing the `callback` for each property. The `callback` is bound to `thisArg` and invoked with `3` arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -891,7 +891,7 @@ _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_functionsobject"></a>`_.functions(object)`
|
||||
<a href="#_functionsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1111 "View in source") [Ⓣ][1]
|
||||
<a href="#_functionsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1113 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a sorted array of all enumerable properties, own and inherited, of `object` that have function values.
|
||||
|
||||
@@ -915,7 +915,7 @@ _.functions(_);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_groupbycollection-callback--thisarg"></a>`_.groupBy(collection, callback [, thisArg])`
|
||||
<a href="#_groupbycollection-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1910 "View in source") [Ⓣ][1]
|
||||
<a href="#_groupbycollection-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1929 "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 `3` arguments; *(value, index|key, collection)*. The `callback` argument may also be the name of a property to count by *(e.g. 'length')*.
|
||||
|
||||
@@ -947,7 +947,7 @@ _.groupBy(['one', 'two', 'three'], 'length');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_hasobject-property"></a>`_.has(object, property)`
|
||||
<a href="#_hasobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1134 "View in source") [Ⓣ][1]
|
||||
<a href="#_hasobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1136 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if the specified object `property` exists and is a direct property, instead of an inherited property.
|
||||
|
||||
@@ -972,9 +972,9 @@ _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_identityvalue"></a>`_.identity(value)`
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3560 "View in source") [Ⓣ][1]
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3579 "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.
|
||||
|
||||
#### Arguments
|
||||
1. `value` *(Mixed)*: Any value.
|
||||
@@ -997,7 +997,7 @@ moe === _.identity(moe);
|
||||
<!-- div -->
|
||||
|
||||
### <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#L2467 "View in source") [Ⓣ][1]
|
||||
<a href="#_indexofarray-value--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2485 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the index at which the first occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `isSorted` will run a faster binary search.
|
||||
|
||||
@@ -1029,7 +1029,7 @@ _.indexOf([1, 1, 2, 2, 3, 3], 2, true);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_initialarray--n-guard"></a>`_.initial(array [, n, guard])`
|
||||
<a href="#_initialarray--n-guard">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2507 "View in source") [Ⓣ][1]
|
||||
<a href="#_initialarray--n-guard">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2525 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets all but the last element of `array`. Pass `n` to exclude the last `n` elements from the result.
|
||||
|
||||
@@ -1055,7 +1055,7 @@ _.initial([3, 2, 1]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_intersectionarray1-array2-"></a>`_.intersection([array1, array2, ...])`
|
||||
<a href="#_intersectionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2528 "View in source") [Ⓣ][1]
|
||||
<a href="#_intersectionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2546 "View in source") [Ⓣ][1]
|
||||
|
||||
Computes the intersection of all the passed-in arrays.
|
||||
|
||||
@@ -1079,7 +1079,7 @@ _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
<!-- div -->
|
||||
|
||||
### <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#L1938 "View in source") [Ⓣ][1]
|
||||
<a href="#_invokecollection-methodname--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1957 "View in source") [Ⓣ][1]
|
||||
|
||||
Invokes the method named by `methodName` on each element in the `collection`. Additional arguments will be passed to each invoked method. If `methodName` is a function it will be invoked for, and `this` bound to, each element in the `collection`.
|
||||
|
||||
@@ -1108,7 +1108,7 @@ _.invoke([123, 456], String.prototype.split, '');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isargumentsvalue"></a>`_.isArguments(value)`
|
||||
<a href="#_isargumentsvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1154 "View in source") [Ⓣ][1]
|
||||
<a href="#_isargumentsvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1156 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is an `arguments` object.
|
||||
|
||||
@@ -1135,7 +1135,7 @@ _.isArguments([1, 2, 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isarrayvalue"></a>`_.isArray(value)`
|
||||
<a href="#_isarrayvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1180 "View in source") [Ⓣ][1]
|
||||
<a href="#_isarrayvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1182 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is an array.
|
||||
|
||||
@@ -1162,7 +1162,7 @@ _.isArray([1, 2, 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isbooleanvalue"></a>`_.isBoolean(value)`
|
||||
<a href="#_isbooleanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1197 "View in source") [Ⓣ][1]
|
||||
<a href="#_isbooleanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1199 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a boolean *(`true` or `false`)* value.
|
||||
|
||||
@@ -1186,7 +1186,7 @@ _.isBoolean(null);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isdatevalue"></a>`_.isDate(value)`
|
||||
<a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1214 "View in source") [Ⓣ][1]
|
||||
<a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1216 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a date.
|
||||
|
||||
@@ -1210,7 +1210,7 @@ _.isDate(new Date);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_iselementvalue"></a>`_.isElement(value)`
|
||||
<a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1231 "View in source") [Ⓣ][1]
|
||||
<a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1233 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a DOM element.
|
||||
|
||||
@@ -1234,7 +1234,7 @@ _.isElement(document.body);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isemptyvalue"></a>`_.isEmpty(value)`
|
||||
<a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1256 "View in source") [Ⓣ][1]
|
||||
<a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1258 "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".
|
||||
|
||||
@@ -1264,7 +1264,7 @@ _.isEmpty('');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isequala-b-thorough"></a>`_.isEqual(a, b, thorough)`
|
||||
<a href="#_isequala-b-thorough">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1294 "View in source") [Ⓣ][1]
|
||||
<a href="#_isequala-b-thorough">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1296 "View in source") [Ⓣ][1]
|
||||
|
||||
Performs a deep comparison between two values to determine if they are equivalent to each other. If a value has an `isEqual` method it will be used to perform the comparison.
|
||||
|
||||
@@ -1296,9 +1296,9 @@ _.isEqual(moe, clone);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isfinitevalue"></a>`_.isFinite(value)`
|
||||
<a href="#_isfinitevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1466 "View in source") [Ⓣ][1]
|
||||
<a href="#_isfinitevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1469 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a finite number. Note: This is not the same as native `isFinite`, which will return true for booleans and other values. See http://es5.github.com/#x15.1.2.5.
|
||||
Checks if `value` is a finite number. Note: This is not the same as native `isFinite`, which will return true for booleans and other values. See http://es5.github.com/#x15.1.2.5.
|
||||
|
||||
#### Arguments
|
||||
1. `value` *(Mixed)*: The value to check.
|
||||
@@ -1326,7 +1326,7 @@ _.isFinite(Infinity);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isfunctionvalue"></a>`_.isFunction(value)`
|
||||
<a href="#_isfunctionvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1483 "View in source") [Ⓣ][1]
|
||||
<a href="#_isfunctionvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1486 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a function.
|
||||
|
||||
@@ -1350,9 +1350,9 @@ _.isFunction(''.concat);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnanvalue"></a>`_.isNaN(value)`
|
||||
<a href="#_isnanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1535 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1539 "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.
|
||||
|
||||
#### Arguments
|
||||
1. `value` *(Mixed)*: The value to check.
|
||||
@@ -1383,7 +1383,7 @@ _.isNaN(undefined);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnullvalue"></a>`_.isNull(value)`
|
||||
<a href="#_isnullvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1558 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnullvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1562 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is `null`.
|
||||
|
||||
@@ -1410,7 +1410,7 @@ _.isNull(undefined);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnumbervalue"></a>`_.isNumber(value)`
|
||||
<a href="#_isnumbervalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1575 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnumbervalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1579 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a number.
|
||||
|
||||
@@ -1434,7 +1434,7 @@ _.isNumber(8.4 * 5;
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isobjectvalue"></a>`_.isObject(value)`
|
||||
<a href="#_isobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1504 "View in source") [Ⓣ][1]
|
||||
<a href="#_isobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1507 "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('')`)*
|
||||
|
||||
@@ -1461,7 +1461,7 @@ _.isObject(1);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isregexpvalue"></a>`_.isRegExp(value)`
|
||||
<a href="#_isregexpvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1592 "View in source") [Ⓣ][1]
|
||||
<a href="#_isregexpvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1596 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a regular expression.
|
||||
|
||||
@@ -1485,7 +1485,7 @@ _.isRegExp(/moe/);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isstringvalue"></a>`_.isString(value)`
|
||||
<a href="#_isstringvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1609 "View in source") [Ⓣ][1]
|
||||
<a href="#_isstringvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1613 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a string.
|
||||
|
||||
@@ -1509,7 +1509,7 @@ _.isString('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isundefinedvalue"></a>`_.isUndefined(value)`
|
||||
<a href="#_isundefinedvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1627 "View in source") [Ⓣ][1]
|
||||
<a href="#_isundefinedvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1631 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is `undefined`.
|
||||
|
||||
@@ -1533,7 +1533,7 @@ _.isUndefined(void 0);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_keysobject"></a>`_.keys(object)`
|
||||
<a href="#_keysobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1644 "View in source") [Ⓣ][1]
|
||||
<a href="#_keysobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1663 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array composed of the own enumerable property names of `object`.
|
||||
|
||||
@@ -1557,7 +1557,7 @@ _.keys({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_lastarray--n-guard"></a>`_.last(array [, n, guard])`
|
||||
<a href="#_lastarray--n-guard">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2569 "View in source") [Ⓣ][1]
|
||||
<a href="#_lastarray--n-guard">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2587 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the last element of the `array`. Pass `n` to return the lasy `n` elementsvof the `array`.
|
||||
|
||||
@@ -1583,7 +1583,7 @@ _.last([3, 2, 1]);
|
||||
<!-- div -->
|
||||
|
||||
### <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#L2595 "View in source") [Ⓣ][1]
|
||||
<a href="#_lastindexofarray-value--fromindexarraylength-1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2613 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the index at which the last occurrence of `value` is found using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -1612,7 +1612,7 @@ _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3);
|
||||
<!-- div -->
|
||||
|
||||
### <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#L1974 "View in source") [Ⓣ][1]
|
||||
<a href="#_mapcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1993 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new array of values by running each element in the `collection` through a `callback`. The `callback` is bound to `thisArg` and invoked with `3` arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1641,7 +1641,7 @@ _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_maxarray--callback-thisarg"></a>`_.max(array [, callback, thisArg])`
|
||||
<a href="#_maxarray--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2635 "View in source") [Ⓣ][1]
|
||||
<a href="#_maxarray--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2653 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the maximum value of an `array`. If `callback` is passed, it will be executed for each value in the `array` to generate the criterion by which the value is ranked. The `callback` is bound to `thisArg` and invoked with `3` arguments; *(value, index, array)*.
|
||||
|
||||
@@ -1673,7 +1673,7 @@ _.max(stooges, function(stooge) { return stooge.age; });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_memoizefunc--resolver"></a>`_.memoize(func [, resolver])`
|
||||
<a href="#_memoizefunc--resolver">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3370 "View in source") [Ⓣ][1]
|
||||
<a href="#_memoizefunc--resolver">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3388 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new function that memoizes the result of `func`. If `resolver` is passed, it will be used to determine the cache key for storing the result based on the arguments passed to the memoized function. By default, the first argument passed to the memoized function is used as the cache key.
|
||||
|
||||
@@ -1699,7 +1699,7 @@ var fibonacci = _.memoize(function(n) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mergeobject--source1-source2--indicator"></a>`_.merge(object [, source1, source2, ..., indicator])`
|
||||
<a href="#_mergeobject--source1-source2--indicator">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2006 "View in source") [Ⓣ][1]
|
||||
<a href="#_mergeobject--source1-source2--indicator">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2025 "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.
|
||||
|
||||
@@ -1735,7 +1735,7 @@ _.merge(stooges, ages);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_minarray--callback-thisarg"></a>`_.min(array [, callback, thisArg])`
|
||||
<a href="#_minarray--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2685 "View in source") [Ⓣ][1]
|
||||
<a href="#_minarray--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2703 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the minimum value of an `array`. If `callback` is passed, it will be executed for each value in the `array` to generate the criterion by which the value is ranked. The `callback` is bound to `thisArg` and invoked with `3` arguments; *(value, index, array)*.
|
||||
|
||||
@@ -1761,7 +1761,7 @@ _.min([10, 5, 100, 2, 1000]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mixinobject"></a>`_.mixin(object)`
|
||||
<a href="#_mixinobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3586 "View in source") [Ⓣ][1]
|
||||
<a href="#_mixinobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3605 "View in source") [Ⓣ][1]
|
||||
|
||||
Adds functions properties of `object` to the `lodash` function and chainable wrapper.
|
||||
|
||||
@@ -1791,7 +1791,7 @@ _('curly').capitalize();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_noconflict"></a>`_.noConflict()`
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3617 "View in source") [Ⓣ][1]
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3636 "View in source") [Ⓣ][1]
|
||||
|
||||
Reverts the '_' variable to its previous value and returns a reference to the `lodash` function.
|
||||
|
||||
@@ -1811,7 +1811,7 @@ var lodash = _.noConflict();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_oncefunc"></a>`_.once(func)`
|
||||
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3396 "View in source") [Ⓣ][1]
|
||||
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3414 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new function that is restricted to one execution. Repeat calls to the function will return the value of the first call.
|
||||
|
||||
@@ -1837,7 +1837,7 @@ initialize();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_partialfunc--arg1-arg2-"></a>`_.partial(func [, arg1, arg2, ...])`
|
||||
<a href="#_partialfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3428 "View in source") [Ⓣ][1]
|
||||
<a href="#_partialfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3446 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new function that, when called, invokes `func` with any additional `partial` arguments prepended to those passed to the new function. This method is similar `bind`, except it does **not** alter the `this` binding.
|
||||
|
||||
@@ -1864,7 +1864,7 @@ hi('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pickobject--prop1-prop2-"></a>`_.pick(object [, prop1, prop2, ...])`
|
||||
<a href="#_pickobject--prop1-prop2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1667 "View in source") [Ⓣ][1]
|
||||
<a href="#_pickobject--prop1-prop2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1686 "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.
|
||||
|
||||
@@ -1889,7 +1889,7 @@ _.pick({ 'name': 'moe', 'age': 40, 'userid': 'moe1' }, 'name', 'age');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pluckcollection-property"></a>`_.pluck(collection, property)`
|
||||
<a href="#_pluckcollection-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2055 "View in source") [Ⓣ][1]
|
||||
<a href="#_pluckcollection-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2073 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the value of a specified property from all elements in the `collection`.
|
||||
|
||||
@@ -1920,7 +1920,7 @@ _.pluck(stooges, 'name');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_rangestart0-end--step1"></a>`_.range([start=0], end [, step=1])`
|
||||
<a href="#_rangestart0-end--step1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2746 "View in source") [Ⓣ][1]
|
||||
<a href="#_rangestart0-end--step1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2764 "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.
|
||||
|
||||
@@ -1958,7 +1958,7 @@ _.range(0);
|
||||
<!-- div -->
|
||||
|
||||
### <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#L2083 "View in source") [Ⓣ][1]
|
||||
<a href="#_reducecollection-callback--accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2101 "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)*.
|
||||
|
||||
@@ -1985,7 +1985,7 @@ var sum = _.reduce([1, 2, 3], function(memo, num) { return memo + num; });
|
||||
<!-- div -->
|
||||
|
||||
### <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#L2120 "View in source") [Ⓣ][1]
|
||||
<a href="#_reducerightcollection-callback--accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2138 "View in source") [Ⓣ][1]
|
||||
|
||||
The right-associative version of `_.reduce`.
|
||||
|
||||
@@ -2013,7 +2013,7 @@ var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []);
|
||||
<!-- div -->
|
||||
|
||||
### <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#L2175 "View in source") [Ⓣ][1]
|
||||
<a href="#_rejectcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2193 "View in source") [Ⓣ][1]
|
||||
|
||||
The opposite of `_.filter`, this method returns the values of a `collection` that `callback` does **not** return truthy for.
|
||||
|
||||
@@ -2039,7 +2039,7 @@ var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_restarray--n-guard"></a>`_.rest(array [, n, guard])`
|
||||
<a href="#_restarray--n-guard">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2785 "View in source") [Ⓣ][1]
|
||||
<a href="#_restarray--n-guard">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2803 "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.
|
||||
|
||||
@@ -2065,7 +2065,7 @@ _.rest([3, 2, 1]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_resultobject-property"></a>`_.result(object, property)`
|
||||
<a href="#_resultobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3649 "View in source") [Ⓣ][1]
|
||||
<a href="#_resultobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3668 "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.
|
||||
|
||||
@@ -2100,7 +2100,7 @@ _.result(object, 'stuff');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_shufflearray"></a>`_.shuffle(array)`
|
||||
<a href="#_shufflearray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2806 "View in source") [Ⓣ][1]
|
||||
<a href="#_shufflearray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2824 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new array of shuffled `array` values, using a version of the Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle.
|
||||
|
||||
@@ -2124,7 +2124,7 @@ _.shuffle([1, 2, 3, 4, 5, 6]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sizevalue"></a>`_.size(value)`
|
||||
<a href="#_sizevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1706 "View in source") [Ⓣ][1]
|
||||
<a href="#_sizevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1725 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the size of `value` by returning `value.length` if `value` is an array, string, or `arguments` object. If `value` is an object, size is determined by returning the number of own enumerable properties it has.
|
||||
|
||||
@@ -2154,7 +2154,7 @@ _.size('curly');
|
||||
<!-- div -->
|
||||
|
||||
### <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#L2198 "View in source") [Ⓣ][1]
|
||||
<a href="#_somecollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2216 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if the `callback` returns a truthy value for **any** element of a `collection`. The function returns as soon as it finds passing value, and does not iterate over the entire `collection`. The `callback` is bound to `thisArg` and invoked with `3` arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -2180,7 +2180,7 @@ _.some([null, 0, 'yes', false]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sortbycollection-callback--thisarg"></a>`_.sortBy(collection, callback [, thisArg])`
|
||||
<a href="#_sortbycollection-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2228 "View in source") [Ⓣ][1]
|
||||
<a href="#_sortbycollection-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2246 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new sorted array, 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 `3` arguments; *(value, index|key, collection)*. The `callback` argument may also be the name of a property to sort by *(e.g. 'length')*.
|
||||
|
||||
@@ -2212,7 +2212,7 @@ _.sortBy(['larry', 'brendan', 'moe'], 'length');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sortedindexarray-value--callbackidentity-thisarg"></a>`_.sortedIndex(array, value [, callback=identity, thisArg])`
|
||||
<a href="#_sortedindexarray-value--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2858 "View in source") [Ⓣ][1]
|
||||
<a href="#_sortedindexarray-value--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2876 "View in source") [Ⓣ][1]
|
||||
|
||||
Uses a binary search to determine the smallest index at which the `value` should be inserted into `array` in order to maintain the sort order of the sorted `array`. If `callback` is passed, it will be executed for `value` and each element in `array` to compute their sort ranking. The `callback` is bound to `thisArg` and invoked with `1` argument; *(value)*.
|
||||
|
||||
@@ -2253,7 +2253,7 @@ _.sortedIndex(['twenty', 'thirty', 'fourty'], 'thirty-five', function(word) {
|
||||
<!-- div -->
|
||||
|
||||
### <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#L3955 "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.
|
||||
|
||||
@@ -2283,9 +2283,9 @@ _.chain([1,2,3,200])
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatetext-data-options"></a>`_.template(text, data, options)`
|
||||
<a href="#_templatetext-data-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3709 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatetext-data-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3731 "View in source") [Ⓣ][1]
|
||||
|
||||
A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code.
|
||||
A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code. Note: For Chrome extensions use the `lodash csp` build and see http://code.google.com/chrome/extensions/trunk/sandboxingEval.html
|
||||
|
||||
#### Arguments
|
||||
1. `text` *(String)*: The template text.
|
||||
@@ -2342,7 +2342,7 @@ _.template('<%= data.hasWith %>', { 'hasWith': 'no' }, { 'variable': 'data' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_throttlefunc-wait"></a>`_.throttle(func, wait)`
|
||||
<a href="#_throttlefunc-wait">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3464 "View in source") [Ⓣ][1]
|
||||
<a href="#_throttlefunc-wait">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3482 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. If the throttled function is invoked more than once 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.
|
||||
|
||||
@@ -2367,7 +2367,7 @@ jQuery(window).on('scroll', throttled);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_timesn-callback--thisarg"></a>`_.times(n, callback [, thisArg])`
|
||||
<a href="#_timesn-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3849 "View in source") [Ⓣ][1]
|
||||
<a href="#_timesn-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3871 "View in source") [Ⓣ][1]
|
||||
|
||||
Executes the `callback` function `n` times. The `callback` is bound to `thisArg` and invoked with `1` argument; *(index)*.
|
||||
|
||||
@@ -2393,7 +2393,7 @@ _.times(3, function() { this.grantWish(); }, genie);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_toarraycollection"></a>`_.toArray(collection)`
|
||||
<a href="#_toarraycollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2263 "View in source") [Ⓣ][1]
|
||||
<a href="#_toarraycollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2281 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the `collection`, into an array. Useful for converting the `arguments` object.
|
||||
|
||||
@@ -2417,7 +2417,7 @@ Converts the `collection`, into an array. Useful for converting the `arguments`
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_unionarray1-array2-"></a>`_.union([array1, array2, ...])`
|
||||
<a href="#_unionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2898 "View in source") [Ⓣ][1]
|
||||
<a href="#_unionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2916 "View in source") [Ⓣ][1]
|
||||
|
||||
Computes the union of the passed-in arrays.
|
||||
|
||||
@@ -2441,7 +2441,7 @@ _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
<!-- div -->
|
||||
|
||||
### <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#L2942 "View in source") [Ⓣ][1]
|
||||
<a href="#_uniqarray--issortedfalse-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2960 "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 `3` arguments; *(value, index, array)*.
|
||||
|
||||
@@ -2477,7 +2477,7 @@ _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return this.floor(num); }, Math);
|
||||
<!-- div -->
|
||||
|
||||
### <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#L3898 "View in source") [Ⓣ][1]
|
||||
|
||||
Generates a unique id. If `prefix` is passed, the id will be appended to it.
|
||||
|
||||
@@ -2501,7 +2501,7 @@ _.uniqueId('contact_');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_valuesobject"></a>`_.values(object)`
|
||||
<a href="#_valuesobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1728 "View in source") [Ⓣ][1]
|
||||
<a href="#_valuesobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1747 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array composed of the own enumerable property values of `object`.
|
||||
|
||||
@@ -2525,7 +2525,7 @@ _.values({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_wherecollection-properties"></a>`_.where(collection, properties)`
|
||||
<a href="#_wherecollection-properties">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2300 "View in source") [Ⓣ][1]
|
||||
<a href="#_wherecollection-properties">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2318 "View in source") [Ⓣ][1]
|
||||
|
||||
Examines each element in a `collection`, returning an array of all elements that contain the given `properties`.
|
||||
|
||||
@@ -2556,7 +2556,7 @@ _.where(stooges, { 'age': 40 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_withoutarray--value1-value2-"></a>`_.without(array [, value1, value2, ...])`
|
||||
<a href="#_withoutarray--value1-value2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2991 "View in source") [Ⓣ][1]
|
||||
<a href="#_withoutarray--value1-value2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3009 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new array with all occurrences of the passed values removed using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -2581,7 +2581,7 @@ _.without([1, 2, 1, 0, 3, 1, 4], 0, 1);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_wrapvalue-wrapper"></a>`_.wrap(value, wrapper)`
|
||||
<a href="#_wrapvalue-wrapper">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3515 "View in source") [Ⓣ][1]
|
||||
<a href="#_wrapvalue-wrapper">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3533 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a new 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.
|
||||
|
||||
@@ -2610,7 +2610,7 @@ hello();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_ziparray1-array2-"></a>`_.zip([array1, array2, ...])`
|
||||
<a href="#_ziparray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3024 "View in source") [Ⓣ][1]
|
||||
<a href="#_ziparray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3042 "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.
|
||||
|
||||
@@ -2634,7 +2634,7 @@ _.zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_zipobjectkeys"></a>`_.zipObject(keys)`
|
||||
<a href="#_zipobjectkeys">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3053 "View in source") [Ⓣ][1]
|
||||
<a href="#_zipobjectkeys">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3071 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed from an array of `keys` and an array of `values`.
|
||||
|
||||
@@ -2665,7 +2665,7 @@ _.zipObject(['moe', 'larry', 'curly'], [30, 40, 50]);
|
||||
<!-- div -->
|
||||
|
||||
### <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#L3973 "View in source") [Ⓣ][1]
|
||||
|
||||
Enables method chaining on the wrapper object.
|
||||
|
||||
@@ -2686,7 +2686,7 @@ _([1, 2, 3]).value();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_prototypevalue"></a>`_.prototype.value()`
|
||||
<a href="#_prototypevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3968 "View in source") [Ⓣ][1]
|
||||
<a href="#_prototypevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3990 "View in source") [Ⓣ][1]
|
||||
|
||||
Extracts the wrapped value.
|
||||
|
||||
@@ -2714,7 +2714,7 @@ _([1, 2, 3]).value();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatesettings"></a>`_.templateSettings`
|
||||
<a href="#_templatesettings">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L273 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatesettings">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L278 "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.
|
||||
|
||||
@@ -2726,7 +2726,7 @@ _([1, 2, 3]).value();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatesettingsescape"></a>`_.templateSettings.escape`
|
||||
<a href="#_templatesettingsescape">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L282 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatesettingsescape">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L287 "View in source") [Ⓣ][1]
|
||||
|
||||
*(RegExp)*: Used to detect `data` property values to be HTML-escaped.
|
||||
|
||||
@@ -2738,7 +2738,7 @@ _([1, 2, 3]).value();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatesettingsevaluate"></a>`_.templateSettings.evaluate`
|
||||
<a href="#_templatesettingsevaluate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L291 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatesettingsevaluate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L296 "View in source") [Ⓣ][1]
|
||||
|
||||
*(RegExp)*: Used to detect code to be evaluated.
|
||||
|
||||
@@ -2750,7 +2750,7 @@ _([1, 2, 3]).value();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatesettingsinterpolate"></a>`_.templateSettings.interpolate`
|
||||
<a href="#_templatesettingsinterpolate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L300 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatesettingsinterpolate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L305 "View in source") [Ⓣ][1]
|
||||
|
||||
*(RegExp)*: Used to detect `data` property values to inject.
|
||||
|
||||
@@ -2762,7 +2762,7 @@ _([1, 2, 3]).value();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatesettingsvariable"></a>`_.templateSettings.variable`
|
||||
<a href="#_templatesettingsvariable">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L309 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatesettingsvariable">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L314 "View in source") [Ⓣ][1]
|
||||
|
||||
*(String)*: Used to reference the data object in the template text.
|
||||
|
||||
@@ -2777,4 +2777,4 @@ _([1, 2, 3]).value();
|
||||
<!-- /div -->
|
||||
|
||||
|
||||
[1]: #toc "Jump back to the TOC."
|
||||
[1]: #_ "Jump back to the TOC."
|
||||
@@ -21,7 +21,7 @@
|
||||
// generate Markdown
|
||||
$markdown = docdown(array(
|
||||
'path' => '../' . $file,
|
||||
'title' => 'Lo-Dash <sup>v0.4.2</sup>',
|
||||
'title' => 'Lo-Dash <sup>v0.5.0-rc.1</sup>',
|
||||
'url' => 'https://github.com/bestiejs/lodash/blob/master/lodash.js'
|
||||
));
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Lo-Dash v0.4.2 <http://lodash.com>
|
||||
* Lo-Dash v0.5.0-rc.1 <http://lodash.com>
|
||||
* Copyright 2012 John-David Dalton <http://allyoucanleet.com/>
|
||||
* Based on Underscore.js 1.3.3, copyright 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
|
||||
* <http://documentcloud.github.com/underscore>
|
||||
@@ -4000,7 +4000,7 @@
|
||||
* @memberOf _
|
||||
* @type String
|
||||
*/
|
||||
lodash.VERSION = '0.4.2';
|
||||
lodash.VERSION = '0.5.0-rc.1';
|
||||
|
||||
// assign static methods
|
||||
lodash.after = after;
|
||||
|
||||
71
lodash.min.js
vendored
71
lodash.min.js
vendored
@@ -1,39 +1,40 @@
|
||||
/*!
|
||||
Lo-Dash 0.4.2 lodash.com/license
|
||||
Lo-Dash 0.5.0-rc.1 lodash.com/license
|
||||
Underscore.js 1.3.3 github.com/documentcloud/underscore/blob/master/LICENSE
|
||||
*/
|
||||
;(function(e,t){"use strict";function s(e){return new o(e)}function o(e){if(e&&e._wrapped)return e;this._wrapped=e}function u(e,t,n){t||(t=0);var r=e.length,i=r-t>=(n||30),s=i?{}:e;if(i)for(var o=t-1;++o<r;)n=e[o]+"",(st.call(s,n)?s[n]:s[n]=[]).push(e[o]);return function(e){if(i){var n=e+"";return st.call(s,n)&&-1<N(s[n],e)}return-1<N(s,e,t)}}function a(){for(var e,t,n,s=-1,o=arguments.length,u={e:"",f:"",j:"",p:"",c:{d:""},m:{d:""}};++s<o;)for(t in e=arguments[s],e)n=(n=e[t])==r?"":n,/d|i/.test(t
|
||||
)?("string"==typeof n&&(n={b:n,l:n}),u.c[t]=n.b,u.m[t]=n.l):u[t]=n;e=u.a,t=/^[^,]+/.exec(e)[0],u.g=t,u.h=Nt,u.k=_t,u.o=tt,u.q=u.q!==i,u.r=u.r!==i,"n"in u||(u.n=Lt),u.f||(u.f="if(!"+t+")return R");if("h"!=t||!u.c.i)u.c=r;t="",u.r&&(t+="'use strict';"),t+="var r,Y,y="+u.g+",R",u.j&&(t+="="+u.j),t+=";"+u.f+";"+u.p+";",u.c&&(t+="var B=y.length;r=-1;",u.m&&(t+="if(B===B>>>0){"),u.n&&(t+="if(X.call(y)==U){y=y.split('')}"),t+=u.c.d+";while(++r<B){Y=y[r];"+u.c.i+"}",u.m&&(t+="}"));if(u.m){u.c&&(t+="else{"
|
||||
),u.h||(t+="var S=typeof y=='function'&&N.call(y,'prototype');"),u.k&&u.q?t+="var H=-1,I=D(y),B=I.length;"+u.m.d+";while(++H<B){r=I[H];if(!(S&&r=='prototype')){Y=y[r];"+u.m.i+"}}":(t+=u.m.d+";for(r in y){",u.h?(u.q&&(t+="if(p.call(y,r)){"),t+="Y=y[r];"+u.m.i+";",u.q&&(t+="}")):(t+="if(!(S&&r=='prototype')",u.q&&(t+="&&p.call(y,r)"),t+="){Y=y[r];"+u.m.i+"}"),t+="}");if(u.h){t+="var k=y.constructor;";for(n=0;7>n;n++)t+="r='"+u.o[n]+"';if(","constructor"==u.o[n]&&(t+="!(k&&k.prototype===y)&&"),t+="p.call(y,r)){Y=y[r];"+
|
||||
u.m.i+"}"}u.c&&(t+="}")}return t+=u.e+";return R",Function("c,d,e,i,j,m,n,p,q,s,v,u,x,A,G,D,N,T,U,X","var g=function("+e+"){"+t+"};return g")(Dt,F,O,f,it,Qt,yt,st,M,N,w,Zt,p,d,Bt,pt,ut,at,St,ft)}function f(e,n){return e=e.a,n=n.a,e===t?1:n===t?-1:e<n?-1:e>n?1:0}function l(e,t){return rt[t]}function c(e){return"\\"+jt[e]}function h(e){return Ht[e]}function p(e){var t=i;if(!e||"object"!=typeof e)return t;var n=e.constructor;return(!At||"function"==typeof e.toString||"string"!=typeof (e+""))&&(ft.call
|
||||
(n)!=yt||n instanceof n)&&(Qt(e,function(e,n){t=n}),t=t===i||st.call(e,t)),t}function d(e,t){return function(n,r,i){return e.call(t,n,r,i)}}function v(){}function m(e,t){if(X.test(t))return"<e%-"+t+"%>";var n=rt.length;return rt[n]="'+__e("+t+")+'",nt+n}function g(e,t,n,r){return e=rt.length,t?rt[e]="'+__e("+t+")+'":r?rt[e]="';"+r+";__p+='":n&&(rt[e]="'+((__t=("+n+"))==null?'':__t)+'"),nt+e}function y(e,t){if(X.test(t))return"<e%="+t+"%>";var n=rt.length;return rt[n]="'+((__t=("+t+"))==null?'':__t)+'"
|
||||
,nt+n}function b(e,t,s,o,u){if(e==r)return e;var a="object"==typeof e;o||(o=[]),s&&(t=i),u==r&&(u=!(!I.clone&&!R.clone&&!U.clone));if((a||u)&&e.clone&&ft.call(e.clone)==yt)return e.clone(t);if(a){var f=ft.call(e);if(!Pt[f]||Ct&&w(e))return e;var l=f==vt,a=l||(f==wt?p(e):a)}if(!a||!t)return a?l?at.call(e):Kt({},e):e;s=e.constructor;switch(f){case mt:return new s(e==n);case gt:return new s(+e);case bt:case St:return new s(e);case Et:return s(e.source,K.exec(e))}for(f=o.length;f--;)if(o[f].value==e)
|
||||
return o[f].clone;var f=e.length,c=l?s(f):{};o.push({clone:c,value:e});if(l)for(l=-1;++l<f;)c[l]=b(e[l],t,r,o,u);else Gt(e,function(e,n){c[n]=b(e,t,r,o,u)});return c}function w(e){return ft.call(e)==dt}function E(e,t,s,o){s||(s=[]);if(e==r||t==r)return e===t;o==r&&(o=!(!I.isEqual&&!R.isEqual&&!U.isEqual));if(Bt[typeof e]||Bt[typeof t]||o){e._chain&&(e=e._wrapped),t._chain&&(t=t._wrapped);if(e.isEqual&&ft.call(e.isEqual)==yt)return e.isEqual(t);if(t.isEqual&&ft.call(t.isEqual)==yt)return t.isEqual
|
||||
(e)}if(e===t)return 0!==e||1/e==1/t;var u=ft.call(e);if(u!=ft.call(t))return i;switch(u){case mt:case gt: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=Dt[u];if(Ct&&!a&&(a=w(e))&&!w(t)||!a&&(u!=wt||At&&("function"!=typeof e.toString&&"string"==typeof (e+"")||"function"!=typeof t.toString&&"string"==typeof (t+""))))return i;for(u=s.length;u--;)if(s[u]==e)return n;var u=-1,f=n,l=0;s.push(e);if(a){l=e.length;if(f=l==t.length)for(;l--&&(f=E(e[l],t[l],
|
||||
s,o)););return f}a=e.constructor,f=t.constructor;if(a==f||ft.call(a)==yt&&a instanceof a&&ft.call(f)==yt&&f instanceof f){for(var c in e)if(st.call(e,c)&&(l++,!st.call(t,c)||!E(e[c],t[c],s,o)))return i;for(c in t)if(st.call(t,c)&&!(l--))return i;if(Nt)for(;7>++u;)if(c=tt[u],st.call(e,c)&&(!st.call(t,c)||!E(e[c],t[c],s,o)))return i;return n}return i}function S(e,t,n,r){if(!e)return n;var i=e.length,s=3>arguments.length;r&&(t=d(t,r));if(i===i>>>0){var o=Lt&&ft.call(e)==St?e.split(""):e;for(i&&s&&(n=
|
||||
o[--i]);i--;)n=t(n,o[i],i,e);return n}o=tn(e);for((i=o.length)&&s&&(n=e[o[--i]]);i--;)s=o[i],n=t(n,e[s],s,e);return n}function x(e,t,n){if(e)return t==r||n?e[0]:at.call(e,0,t)}function T(e,t){var n=[];if(!e)return n;for(var r,i=-1,s=e.length;++i<s;)r=e[i],Zt(r)?ot.apply(n,t?r:T(r)):n.push(r);return n}function N(e,t,n){if(!e)return-1;var r=-1,i=e.length;if(n){if("number"!=typeof n)return r=L(e,t),e[r]===t?r:-1;r=(0>n?Math.max(0,i+n):n)-1}for(;++r<i;)if(e[r]===t)return r;return-1}function C(e,t,n){
|
||||
var r=-Infinity,i=r;if(!e)return i;var s=-1,o=e.length;if(!t){for(;++s<o;)e[s]>i&&(i=e[s]);return i}for(n&&(t=d(t,n));++s<o;)n=t(e[s],s,e),n>r&&(r=n,i=e[s]);return i}function k(e,t,n){return e?at.call(e,t==r||n?1:t):[]}function L(e,t,n,r){if(!e)return 0;var i=0,s=e.length;if(n){r&&(n=O(n,r));for(t=n(t);i<s;)r=i+s>>>1,n(e[r])<t?i=r+1:s=r}else for(;i<s;)r=i+s>>>1,e[r]<t?i=r+1:s=r;return i}function A(e,t,n,r){var s=[];if(!e)return s;var o=-1,u=e.length,a=[];"function"==typeof t&&(r=n,n=t,t=i);for(n?
|
||||
r&&(n=d(n,r)):n=M;++o<u;)if(r=n(e[o],o,e),t?!o||a[a.length-1]!==r:0>N(a,r))a.push(r),s.push(e[o]);return s}function O(e,t){function n(){var o=arguments,u=t;return i||(e=t[r]),s.length&&(o=o.length?it.apply(s,o):s),this instanceof n?(v.prototype=e.prototype,u=new v,(o=e.apply(u,o))&&Bt[typeof o]?o:u):e.apply(u,o)}var r,i=ft.call(e)==yt;if(i){if(Mt||lt&&2<arguments.length)return lt.call.apply(lt,arguments)}else r=t,t=e;var s=at.call(arguments,2);return n}function M(e){return e}function _(e){fn(Yt(e
|
||||
),function(t){var r=s[t]=e[t];o.prototype[t]=function(){var e=[this._wrapped];return arguments.length&&ot.apply(e,arguments),e=r.apply(s,e),this._chain&&(e=new o(e),e._chain=n),e}})}var n=!0,r=null,i=!1,D,P,H,B,j="object"==typeof exports&&exports&&("object"==typeof global&&global&&global==global.global&&(e=global),exports),F=Array.prototype,I=Boolean.prototype,q=Object.prototype,R=Number.prototype,U=String.prototype,z=0,W=e._,X=/[-+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/
|
||||
,V=/\b__p\+='';/g,$=/\b(__p\+=)''\+/g,J=/(__e\(.*?\)|\b__t\))\+'';/g,K=/\w*$/,Q=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,G=RegExp("^"+(q.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Y=/__token__(\d+)/g,Z=/[&<"']/g,et=/['\n\r\t\u2028\u2029\\]/g,tt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),nt="__token__",rt=[],it=F.concat,st=q.hasOwnProperty,ot=F.push,ut=q.propertyIsEnumerable,at=F.slice
|
||||
,ft=q.toString,lt=G.test(lt=at.bind)&<,ct=G.test(ct=Array.isArray)&&ct,ht=e.isFinite,pt=G.test(pt=Object.keys)&&pt,dt="[object Arguments]",vt="[object Array]",mt="[object Boolean]",gt="[object Date]",yt="[object Function]",bt="[object Number]",wt="[object Object]",Et="[object RegExp]",St="[object String]",xt=e.clearTimeout,Tt=e.setTimeout,Nt=!ut.call({valueOf:0},"valueOf"),Ct=!w(arguments),kt="x"!=at.call("x")[0],Lt="xx"!="x"[0]+Object("x")[0];try{var At=("[object Object]",ft.call(e.document||0
|
||||
)==wt)}catch(Ot){}var Mt=lt&&/\n|Opera/.test(lt+ft.call(e.opera)),_t=pt&&/^.+$|true/.test(pt+!!e.attachEvent),Dt={"[object Arguments]":n,"[object Array]":n,"[object Boolean]":i,"[object Date]":i,"[object Function]":i,"[object Number]":i,"[object Object]":i,"[object RegExp]":i,"[object String]":n},Pt={"[object Arguments]":i,"[object Array]":n,"[object Boolean]":n,"[object Date]":n,"[object Function]":i,"[object Number]":n,"[object Object]":n,"[object RegExp]":n,"[object String]":n},Ht={"&":"&"
|
||||
,"<":"<",'"':""","'":"'"},Bt={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i,unknown:n},jt={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};s.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:"obj"};var Ft={a:"h,f,W",j:"h",p:"if(!f){f=q}else if(W)f=A(f,W)",i:"f(Y,r,h)"},It={j:"{}",p:"var K;if(typeof f!='function'){var Z=f;f=function(Y){return Y[Z]}}else if(W)f=A(f,W)",i:"K=f(Y,r,h);(p.call(R,K)?R[K]++:R[K]=1)"
|
||||
},qt={j:"true",i:"if(!f(Y,r,h))return!R"},Rt={q:i,r:i,a:"F",j:"F",p:"for(var z=1,B=arguments.length;z<B;z++){y=arguments[z];"+(Nt?"if(y){":""),i:"R[r]=Y",e:(Nt?"}":"")+"}"},Ut={j:"[]",i:"f(Y,r,h)&&R.push(Y)"},zt={p:"if(W)f=A(f,W)"},Wt={i:{l:Ft.i}},Xt={j:"",f:"if(!h)return[]",d:{b:"R=Array(B)",l:"R="+(_t?"Array(B)":"[]")},i:{b:"R[r]=f(Y,r,h)",l:"R"+(_t?"[H]=":".push")+"(f(Y,r,h))"}},Vt=a({a:"F",f:"if(!(F&&G[typeof F]))throw TypeError()",j:"[]",i:"R.push(r)"}),$t=a(Rt,{i:"if(R[r]==null)"+Rt.i}),Jt=
|
||||
a({q:i,a:"F",j:"{}",p:"var P=j.apply(d,arguments)",i:"if(s(P,r)<0)R[r]=Y"}),Kt=a(Rt),Qt=a(Ft,zt,Wt,{q:i}),Gt=a(Ft,zt,Wt),Yt=a({q:i,a:"F",j:"[]",i:"if(X.call(Y)==n)R.push(r)",e:"R.sort()"});Ct&&(w=function(e){return!!e&&!!st.call(e,"callee")});var Zt=ct||function(e){return ft.call(e)==vt},en=a({a:"Y",j:"true",p:"if(c[X.call(Y)]"+(Ct?"||v(Y)":"")+")return!Y.length",i:{l:"return false"}}),tn=pt?function(e){return"function"==typeof e&&ut.call(e,"prototype")?Vt(e):pt(e)}:Vt,nn=a({a:"F",j:"[]",i:"R.push(Y)"
|
||||
}),rn=a({a:"h,V",j:"false",n:i,d:{b:"if(X.call(y)==U)return h.indexOf(V)>-1"},i:"if(Y===V)return true"}),sn=a(Ft,It),on=a(Ft,qt),un=a(Ft,Ut),an=a(Ft,zt,{j:"",i:"if(f(Y,r,h))return Y"}),fn=a(Ft,zt),ln=a(Ft,It,{i:"K=f(Y,r,h);(p.call(R,K)?R[K]:R[K]=[]).push(Y)"}),cn=a(Xt,{a:"h,C",p:"var b=T.call(arguments,2),w=typeof C=='function'",i:{b:"R[r]=(w?C:Y[C]).apply(Y,b)",l:"R"+(_t?"[H]=":".push")+"((w?C:Y[C]).apply(Y,b))"}}),hn=a(Ft,Xt),pn=a(Rt,{p:"var l,t;"+Rt.p,i:"if(Y&&((t=u(Y))||x(Y))){l=R[r];if(t){l=l&&u(l)?l:[]}else{l=l&&x(l)?l:{}}R[r]=g(l,Y)}else if(Y!=null){R[r]=Y}"
|
||||
}),dn=a(Xt,{a:"h,M",i:{b:"R[r]=Y[M]",l:"R"+(_t?"[H]=":".push")+"(Y[M])"}}),vn=a({a:"h,f,a,W",j:"a",p:"var E=arguments.length<3;if(W)f=A(f,W)",d:{b:"if(E)R=h[++r]"},i:{b:"R=f(R,Y,r,h)",l:"R=E?(E=false,Y):f(R,Y,r,h)"}}),mn=a(Ft,Ut,{i:"!"+Ut.i}),gn=a(Ft,qt,{j:"false",i:qt.i.replace("!","")}),yn=a(Ft,It,Xt,{i:{b:"R[r]={a:f(Y,r,h),b:Y}",l:"R"+(_t?"[H]=":".push")+"({a:f(Y,r,h),b:Y})"},e:"R.sort(i);B=R.length;while(B--){R[B]=R[B].b}"}),bn=a(Ut,{a:"h,L",p:"var J,K,O,P=[];m(L,function(Y,K){P.push(K)});var Q=P.length"
|
||||
,i:"for(J=true,O=0;O<Q;O++){K=P[O];if(!(J=Y[K]===L[K]))break}if(J)R.push(Y)"}),wn=a({q:i,r:i,a:"F",j:"F",p:"var o=arguments,B=o.length;if(B>1){for(var r=1;r<B;r++)R[o[r]]=e(R[o[r]],R);return R}",i:"if(X.call(R[r])==n)R[r]=e(R[r],R)"});s.VERSION="0.4.2",s.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},s.bind=O,s.bindAll=wn,s.chain=function(e){return e=new o(e),e._chain=n,e},s.clone=b,s.compact=function(e){var t=[];if(!e)return t;for(var n=-1,r=e.length;++n<
|
||||
r;)e[n]&&t.push(e[n]);return t},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=rn,s.countBy=sn,s.debounce=function(e,t,n){function i(){a=r,n||e.apply(u,s)}var s,o,u,a;return function(){var r=n&&!a;return s=arguments,u=this,xt(a),a=Tt(i,t),r&&(o=e.apply(u,s)),o}},s.defaults=$t,s.defer=function(e){var n=at.call(arguments,1);return Tt(function(){return e.apply(t,n)},1)},s.delay=function(e,n){var r=at.call(arguments
|
||||
,2);return Tt(function(){return e.apply(t,r)},n)},s.difference=function(e){var t=[];if(!e)return t;for(var n=-1,r=e.length,i=it.apply(t,arguments),i=u(i,r);++n<r;)i(e[n])||t.push(e[n]);return t},s.drop=Jt,s.escape=function(e){return e==r?"":(e+"").replace(Z,h)},s.every=on,s.extend=Kt,s.filter=un,s.find=an,s.first=x,s.flatten=T,s.forEach=fn,s.forIn=Qt,s.forOwn=Gt,s.functions=Yt,s.groupBy=ln,s.has=function(e,t){return st.call(e,t)},s.identity=M,s.indexOf=N,s.initial=function(e,t,n){return e?at.call
|
||||
(e,0,-(t==r||n?1:t)):[]},s.intersection=function(e){var t=[];if(!e)return t;for(var n,r=-1,i=e.length,s=at.call(arguments,1),o=[];++r<i;)n=e[r],0>N(t,n)&&on(s,function(e,t){return(o[t]||(o[t]=u(e)))(n)})&&t.push(n);return t},s.invoke=cn,s.isArguments=w,s.isArray=Zt,s.isBoolean=function(e){return e===n||e===i||ft.call(e)==mt},s.isElement=function(e){return!!e&&1==e.nodeType},s.isEmpty=en,s.isEqual=E,s.isFinite=function(e){return ht(e)&&ft.call(e)==bt},s.isNaN=function(e){return ft.call(e)==bt&&e!=+
|
||||
e},s.isNull=function(e){return e===r},s.isObject=function(e){return e&&Bt[typeof e]},s.isUndefined=function(e){return e===t},s.keys=tn,s.last=function(e,t,n){if(e){var i=e.length;return t==r||n?e[i-1]:at.call(e,-t||i)}},s.lastIndexOf=function(e,t,n){if(!e)return-1;var r=e.length;for(n&&"number"==typeof n&&(r=(0>n?Math.max(0,r+n):Math.min(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},s.map=hn,s.max=C,s.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return st
|
||||
.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},s.merge=pn,s.min=function(e,t,n){var r=Infinity,i=r;if(!e)return i;var s=-1,o=e.length;if(!t){for(;++s<o;)e[s]<i&&(i=e[s]);return i}for(n&&(t=d(t,n));++s<o;)n=t(e[s],s,e),n<r&&(r=n,i=e[s]);return i},s.mixin=_,s.noConflict=function(){return e._=W,this},s.once=function(e){var t,r=i;return function(){return r?t:(r=n,t=e.apply(this,arguments))}},s.partial=function(e){var t=at.call(arguments,1),n=t.length;return function(){var r;return r=arguments,r.length&&
|
||||
(t.length=n,ot.apply(t,r)),r=1==t.length?e.call(this,t[0]):e.apply(this,t),t.length=n,r}},s.pick=function(e){for(var t,n=0,r=it.apply(F,arguments),i=r.length,s={};++n<i;)t=r[n],t in e&&(s[t]=e[t]);return s},s.pluck=dn,s.range=function(e,t,n){e=+e||0,n=+n||1,t==r&&(t=e,e=0);for(var i=-1,t=Math.max(0,Math.ceil((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},s.reduce=vn,s.reduceRight=S,s.reject=mn,s.rest=k,s.result=function(e,t){if(!e)return r;var n=e[t];return ft.call(n)==yt?e[t]():n},s.shuffle=function(
|
||||
e){if(!e)return[];for(var t,n=-1,r=e.length,i=Array(r);++n<r;)t=Math.floor(Math.random()*(n+1)),i[n]=i[t],i[t]=e[n];return i},s.size=function(e){return e?Dt[ft.call(e)]||Ct&&w(e)?e.length:tn(e).length:0},s.some=gn,s.sortBy=yn,s.sortedIndex=L,s.tap=function(e,t){return t(e),e},s.template=function(e,t,n){n||(n={});var o,u;o=n.escape;var a=n.evaluate,f=n.interpolate,h=s.templateSettings,n=n.variable;o==r&&(o=h.escape),a==r&&(a=h.evaluate||i),f==r&&(f=h.interpolate),o&&(e=e.replace(o,m)),f&&(e=e.replace
|
||||
(f,y)),a!=D&&(D=a,B=RegExp("<e%-([\\s\\S]+?)%>|<e%=([\\s\\S]+?)%>"+(a?"|"+a.source:""),"g")),o=rt.length,e=e.replace(B,g),o=o!=rt.length,e="__p += '"+e.replace(et,c).replace(Y,l)+"';",rt.length=0,n||(n=h.variable||P||"obj",o?e="with("+n+"){"+e+"}":(n!=P&&(P=n,H=RegExp("(\\(\\s*)"+n+"\\."+n+"\\b","g")),e=e.replace(Q,"$&"+n+".").replace(H,"$1__d"))),e=(o?e.replace(V,""):e).replace($,"$1").replace(J,"$1;"),e="function("+n+"){"+n+"||("+n+"={});var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"
|
||||
;(function(e,t){"use strict";function s(e){return new o(e)}function o(e){if(e&&e._wrapped)return e;this._wrapped=e}function u(e,t,n){t||(t=0);var r=e.length,i=r-t>=(n||30),s=i?{}:e;if(i)for(var o=t-1;++o<r;)n=e[o]+"",(st.call(s,n)?s[n]:s[n]=[]).push(e[o]);return function(e){if(i){var n=e+"";return st.call(s,n)&&-1<N(s[n],e)}return-1<N(s,e,t)}}function a(){for(var e,t,n,s=-1,o=arguments.length,u={e:"",f:"",j:"",q:"",c:{d:""},m:{d:""}};++s<o;)for(t in e=arguments[s],e)n=(n=e[t])==r?"":n,/d|i/.test(t
|
||||
)?("string"==typeof n&&(n={b:n,l:n}),u.c[t]=n.b,u.m[t]=n.l):u[t]=n;e=u.a,t=/^[^,]+/.exec(e)[0],u.g=t,u.h=Nt,u.k=Pt,u.n=kt,u.p=tt,u.r=u.r!==i,u.s=u.s!==i,"o"in u||(u.o=Ot),u.f||(u.f="if(!"+t+")return t");if("b"!=t||!u.c.i)u.c=r;t="",u.s&&(t+="'use strict';"),t+="var h,z,i="+u.g+",t",u.j&&(t+="="+u.j),t+=";"+u.f+";"+u.q+";",u.c&&(t+="var k=i.length;h=-1;",u.m&&(t+="if(k===k>>>0){"),u.o&&(t+="if(y.call(i)==w){i=i.split('')}"),t+=u.c.d+";while(++h<k){z=i[h];"+u.c.i+"}",u.m&&(t+="}"));if(u.m){u.c?t+="else{"
|
||||
:u.n&&(t+="var k=i.length;h=-1;if(k&&P(i)){while(++h<k){z=i[h+=''];"+u.m.i+"}}else{"),u.h||(t+="var u=typeof i=='function'&&q.call(i,'prototype');"),u.k&&u.r?t+="var n=-1,o=l(i),k=o.length;"+u.m.d+";while(++n<k){h=o[n];if(!(u&&h=='prototype')){z=i[h];"+u.m.i+"}}":(t+=u.m.d+";for(h in i){",u.h?(u.r&&(t+="if(f.call(i,h)){"),t+="z=i[h];"+u.m.i+";",u.r&&(t+="}")):(t+="if(!(u&&h=='prototype')",u.r&&(t+="&&f.call(i,h)"),t+="){z=i[h];"+u.m.i+"}"),t+="}");if(u.h){t+="var d=i.constructor;";for(n=0;7>n;n++
|
||||
)t+="h='"+u.p[n]+"';if(","constructor"==u.p[n]&&(t+="!(d&&d.prototype===i)&&"),t+="f.call(i,h)){z=i[h];"+u.m.i+"}"}if(u.c||u.n)t+="}"}return t+=u.e+";return t",Function("E,F,G,I,c,K,e,f,g,N,P,R,T,j,W,l,q,v,w,y","var H=function("+e+"){"+t+"};return H")(Ht,F,O,f,it,Gt,yt,st,M,N,w,en,p,d,Ft,pt,ut,at,St,ft)}function f(e,n){return e=e.a,n=n.a,e===t?1:n===t?-1:e<n?-1:e>n?1:0}function l(e,t){return rt[t]}function c(e){return"\\"+It[e]}function h(e){return jt[e]}function p(e){var t=i;if(!e||"object"!=typeof
|
||||
e)return t;var n=e.constructor;return(!Mt||"function"==typeof e.toString||"string"!=typeof (e+""))&&(ft.call(n)!=yt||n instanceof n)?Ct?(Gt(e,function(n,r){return t=!st.call(e,r),i}),t===i):(Gt(e,function(e,n){t=n}),t===i||st.call(e,t)):t}function d(e,t){return function(n,r,i){return e.call(t,n,r,i)}}function v(){}function m(e,t){if(X.test(t))return"<e%-"+t+"%>";var n=rt.length;return rt[n]="'+__e("+t+")+'",nt+n}function g(e,t,n,r){return e=rt.length,t?rt[e]="'+__e("+t+")+'":r?rt[e]="';"+r+";__p+='"
|
||||
:n&&(rt[e]="'+((__t=("+n+"))==null?'':__t)+'"),nt+e}function y(e,t){if(X.test(t))return"<e%="+t+"%>";var n=rt.length;return rt[n]="'+((__t=("+t+"))==null?'':__t)+'",nt+n}function b(e,t,s,o,u){if(e==r)return e;s&&(t=i),u||(u={c:r}),u.c==r&&(u.c=!(!I.clone&&!R.clone&&!U.clone));if(((s=Ft[typeof e])||u.c)&&e.clone&&ft.call(e.clone)==yt)return u.c=r,e.clone(t);if(s){var a=ft.call(e);if(!Bt[a]||Lt&&w(e))return e;var f=a==vt,s=f||(a==wt?p(e):s)}if(!s||!t)return s?f?at.call(e):Qt({},e):e;s=e.constructor
|
||||
;switch(a){case mt:return new s(e==n);case gt:return new s(+e);case bt:case St:return new s(e);case Et:return s(e.source,K.exec(e))}o||(o=[]);for(a=o.length;a--;)if(o[a].b==e)return o[a].c;var a=e.length,l=f?s(a):{};o.push({c:l,b:e});if(f)for(f=-1;++f<a;)l[f]=b(e[f],t,r,o,u);else Yt(e,function(e,n){l[n]=b(e,t,r,o,u)});return l}function w(e){return ft.call(e)==dt}function E(e,t,s,o){if(e==r||t==r)return e===t;o||(o={value:r}),o.value==r&&(o.value=!(!I.isEqual&&!R.isEqual&&!U.isEqual));if(Ft[typeof
|
||||
e]||Ft[typeof t]||o.value){e._chain&&(e=e._wrapped),t._chain&&(t=t._wrapped);if(e.isEqual&&ft.call(e.isEqual)==yt)return o.value=r,e.isEqual(t);if(t.isEqual&&ft.call(t.isEqual)==yt)return o.value=r,t.isEqual(e)}if(e===t)return 0!==e||1/e==1/t;var u=ft.call(e);if(u!=ft.call(t))return i;switch(u){case mt:case gt: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=Ht[u];if(Lt&&!a&&(a=w(e))&&!w(t)||!a&&(u!=wt||Mt&&("function"!=typeof e.toString&&"string"==typeof
|
||||
(e+"")||"function"!=typeof t.toString&&"string"==typeof (t+""))))return i;s||(s=[]);for(u=s.length;u--;)if(s[u]==e)return n;var u=-1,f=n,l=0;s.push(e);if(a){l=e.length;if(f=l==t.length)for(;l--&&(f=E(e[l],t[l],s,o)););return f}a=e.constructor,f=t.constructor;if(a==f||ft.call(a)==yt&&a instanceof a&&ft.call(f)==yt&&f instanceof f){for(var c in e)if(st.call(e,c)&&(l++,!st.call(t,c)||!E(e[c],t[c],s,o)))return i;for(c in t)if(st.call(t,c)&&!(l--))return i;if(Nt)for(;7>++u;)if(c=tt[u],st.call(e,c)&&(!
|
||||
st.call(t,c)||!E(e[c],t[c],s,o)))return i;return n}return i}function S(e,t,n,r){if(!e)return n;var i=e.length,s=3>arguments.length;r&&(t=d(t,r));if(i===i>>>0){var o=Ot&&ft.call(e)==St?e.split(""):e;for(i&&s&&(n=o[--i]);i--;)n=t(n,o[i],i,e);return n}o=rn(e);for((i=o.length)&&s&&(n=e[o[--i]]);i--;)s=o[i],n=t(n,e[s],s,e);return n}function x(e,t,n){if(e)return t==r||n?e[0]:at.call(e,0,t)}function T(e,t){var n=[];if(!e)return n;for(var r,i=-1,s=e.length;++i<s;)r=e[i],en(r)?ot.apply(n,t?r:T(r)):n.push(
|
||||
r);return n}function N(e,t,n){if(!e)return-1;var r=-1,i=e.length;if(n){if("number"!=typeof n)return r=L(e,t),e[r]===t?r:-1;r=(0>n?Math.max(0,i+n):n)-1}for(;++r<i;)if(e[r]===t)return r;return-1}function C(e,t,n){var r=-Infinity,i=r;if(!e)return i;var s=-1,o=e.length;if(!t){for(;++s<o;)e[s]>i&&(i=e[s]);return i}for(n&&(t=d(t,n));++s<o;)n=t(e[s],s,e),n>r&&(r=n,i=e[s]);return i}function k(e,t,n){return e?at.call(e,t==r||n?1:t):[]}function L(e,t,n,r){if(!e)return 0;var i=0,s=e.length;if(n){r&&(n=O(n,r
|
||||
));for(t=n(t);i<s;)r=i+s>>>1,n(e[r])<t?i=r+1:s=r}else for(;i<s;)r=i+s>>>1,e[r]<t?i=r+1:s=r;return i}function A(e,t,n,r){var s=[];if(!e)return s;var o=-1,u=e.length,a=[];"function"==typeof t&&(r=n,n=t,t=i);for(n?r&&(n=d(n,r)):n=M;++o<u;)if(r=n(e[o],o,e),t?!o||a[a.length-1]!==r:0>N(a,r))a.push(r),s.push(e[o]);return s}function O(e,t){function n(){var o=arguments,u=t;return i||(e=t[r]),s.length&&(o=o.length?it.apply(s,o):s),this instanceof n?(v.prototype=e.prototype,u=new v,(o=e.apply(u,o))&&Ft[typeof
|
||||
o]?o:u):e.apply(u,o)}var r,i=ft.call(e)==yt;if(i){if(Dt||lt&&2<arguments.length)return lt.call.apply(lt,arguments)}else r=t,t=e;var s=at.call(arguments,2);return n}function M(e){return e}function _(e){cn(Zt(e),function(t){var r=s[t]=e[t];o.prototype[t]=function(){var e=[this._wrapped];return arguments.length&&ot.apply(e,arguments),e=r.apply(s,e),this._chain&&(e=new o(e),e._chain=n),e}})}var n=!0,r=null,i=!1,D,P,H,B,j="object"==typeof exports&&exports&&("object"==typeof global&&global&&global==global
|
||||
.global&&(e=global),exports),F=Array.prototype,I=Boolean.prototype,q=Object.prototype,R=Number.prototype,U=String.prototype,z=0,W=e._,X=/[-+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,V=/\b__p\+='';/g,$=/\b(__p\+=)''\+/g,J=/(__e\(.*?\)|\b__t\))\+'';/g,K=/\w*$/,Q=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,G=RegExp("^"+(q.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Y=/__token__(\d+)/g,Z=/[&<"']/g,et=/['\n\r\t\u2028\u2029\\]/g,
|
||||
tt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),nt="__token__",rt=[],it=F.concat,st=q.hasOwnProperty,ot=F.push,ut=q.propertyIsEnumerable,at=F.slice,ft=q.toString,lt=G.test(lt=at.bind)&<,ct=G.test(ct=Array.isArray)&&ct,ht=e.isFinite,pt=G.test(pt=Object.keys)&&pt,dt="[object Arguments]",vt="[object Array]",mt="[object Boolean]",gt="[object Date]",yt="[object Function]",bt="[object Number]",wt="[object Object]",Et="[object RegExp]",St="[object String]"
|
||||
,xt=e.clearTimeout,Tt=e.setTimeout,Nt,Ct,kt=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(n in arguments)kt=!n;Nt=4>(t+"").length,Ct="x"!=t[0]})(1);var Lt=!w(arguments),At="x"!=at.call("x")[0],Ot="xx"!="x"[0]+Object("x")[0];try{var Mt=("[object Object]",ft.call(e.document||0)==wt)}catch(_t){}var Dt=lt&&/\n|Opera/.test(lt+ft.call(e.opera)),Pt=pt&&/^.+$|true/.test(pt+!!e.attachEvent),Ht={"[object Arguments]":n,"[object Array]":n,"[object Boolean]"
|
||||
:i,"[object Date]":i,"[object Function]":i,"[object Number]":i,"[object Object]":i,"[object RegExp]":i,"[object String]":n},Bt={"[object Arguments]":i,"[object Array]":n,"[object Boolean]":n,"[object Date]":n,"[object Function]":i,"[object Number]":n,"[object Object]":n,"[object RegExp]":n,"[object String]":n},jt={"&":"&","<":"<",'"':""","'":"'"},Ft={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i,unknown:n},It={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028"
|
||||
:"u2028","\u2029":"u2029"};s.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:"obj"};var qt={a:"b,a,x",j:"b",q:"if(!a){a=g}else if(x)a=j(a,x)",i:"if(a(z,h,b)===false)return t"},Rt={j:"{}",q:"var p;if(typeof a!='function'){var gg=a;a=function(z){return z[gg]}}else if(x)a=j(a,x)",i:"p=a(z,h,b);(f.call(t,p)?t[p]++:t[p]=1)"},Ut={j:"true",i:"if(!a(z,h,b))return!t"},zt={r:i,s:i,a:"m",j:"m",q:"for(var C=1,D=arguments.length;C<D;C++){if(i=arguments[C]){"
|
||||
,i:"t[h]=z",e:"}}"},Wt={j:"[]",i:"a(z,h,b)&&t.push(z)"},Xt={q:"if(x)a=j(a,x)"},Vt={i:{l:qt.i}},$t={j:"",f:"if(!b)return[]",d:{b:"t=Array(k)",l:"t="+(Pt?"Array(k)":"[]")},i:{b:"t[h]=a(z,h,b)",l:"t"+(Pt?"[n]=":".push")+"(a(z,h,b))"}},Jt=a(zt,{i:"if(t[h]==null)"+zt.i}),Kt=a({r:i,a:"m",j:"{}",q:"var s=c.apply(F,arguments)",i:"if(N(s,h)<0)t[h]=z"}),Qt=a(zt),Gt=a(qt,Xt,Vt,{r:i}),Yt=a(qt,Xt,Vt),Zt=a({r:i,a:"m",j:"[]",i:"if(y.call(z)==e)t.push(h)",e:"t.sort()"});Lt&&(w=function(e){return!!e&&!!st.call(e,"callee"
|
||||
)});var en=ct||function(e){return ft.call(e)==vt},tn=a({a:"z",j:"true",q:"if(E[y.call(z)]"+(Lt?"||P(z)":"")+")return!z.length",i:{l:"return false"}}),nn=a({a:"m",f:"if(!(m&&W[typeof m]))throw TypeError()",j:"[]",i:"t.push(h)"}),rn=pt?function(e){return"function"==typeof e&&ut.call(e,"prototype")?nn(e):pt(e)}:nn,sn=a({a:"m",j:"[]",i:"t.push(z)"}),on=a({a:"b,ff",j:"false",o:i,d:{b:"if(y.call(i)==w)return b.indexOf(ff)>-1"},i:"if(z===ff)return true"}),un=a(qt,Rt),an=a(qt,Ut),fn=a(qt,Wt),ln=a(qt,Xt,{
|
||||
j:"",i:"if(a(z,h,b))return z"}),cn=a(qt,Xt),hn=a(qt,Rt,{i:"p=a(z,h,b);(f.call(t,p)?t[p]:t[p]=[]).push(z)"}),pn=a($t,{a:"b,U",q:"var B=v.call(arguments,2),S=typeof U=='function'",i:{b:"t[h]=(S?U:z[U]).apply(z,B)",l:"t"+(Pt?"[n]=":".push")+"((S?U:z[U]).apply(z,B))"}}),dn=a(qt,$t),vn=a(zt,{a:"m,cc,O,dd",q:"var J,L,Q,ee,bb=O==T;if(!bb)dd=[];for(var C=1,D=bb?2:arguments.length;C<D;C++){if(i=arguments[C]){",i:"if(z&&((Q=R(z))||T(z))){L=false;ee=dd.length;while(ee--){if(L=dd[ee].b==z)break}if(L){t[h]=dd[ee].c}else{J=(J=t[h])&&Q?(R(J)?J:[]):(T(J)?J:{});dd.push({c:J,b:z});t[h]=H(J,z,T,dd)}}else if(z!=null){t[h]=z}"
|
||||
}),mn=a($t,{a:"b,Z",i:{b:"t[h]=z[Z]",l:"t"+(Pt?"[n]=":".push")+"(z[Z])"}}),gn=a({a:"b,a,A,x",j:"A",q:"var V=arguments.length<3;if(x)a=j(a,x)",d:{b:"if(V)t=b[++h]"},i:{b:"t=a(t,z,h,b)",l:"t=V?(V=false,z):a(t,z,h,b)"}}),yn=a(qt,Wt,{i:"!"+Wt.i}),bn=a(qt,Ut,{j:"false",i:Ut.i.replace("!","")}),wn=a(qt,Rt,$t,{i:{b:"t[h]={a:a(z,h,b),c:z}",l:"t"+(Pt?"[n]=":".push")+"({a:a(z,h,b),c:z})"},e:"t.sort(I);k=t.length;while(k--){t[k]=t[k].c}"}),En=a(Wt,{a:"b,Y",q:"var X,p,r,s=[];K(Y,function(z,p){s.push(p)});var aa=s.length"
|
||||
,i:"for(X=true,r=0;r<aa;r++){p=s[r];if(!(X=z[p]===Y[p]))break}if(X)t.push(z)"}),Sn=a({r:i,s:i,a:"m",j:"m",q:"var M=arguments,k=M.length;if(k>1){for(var h=1;h<k;h++)t[M[h]]=G(t[M[h]],t);return t}",i:"if(y.call(t[h])==e)t[h]=G(t[h],t)"});s.VERSION="0.5.0-rc.1",s.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},s.bind=O,s.bindAll=Sn,s.chain=function(e){return e=new o(e),e._chain=n,e},s.clone=b,s.compact=function(e){var t=[];if(!e)return t;for(var n=-1,r=e.length
|
||||
;++n<r;)e[n]&&t.push(e[n]);return t},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=on,s.countBy=un,s.debounce=function(e,t,n){function i(){a=r,n||e.apply(u,s)}var s,o,u,a;return function(){var r=n&&!a;return s=arguments,u=this,xt(a),a=Tt(i,t),r&&(o=e.apply(u,s)),o}},s.defaults=Jt,s.defer=function(e){var n=at.call(arguments,1);return Tt(function(){return e.apply(t,n)},1)},s.delay=function(e,n){var r=at.call
|
||||
(arguments,2);return Tt(function(){return e.apply(t,r)},n)},s.difference=function(e){var t=[];if(!e)return t;for(var n=-1,r=e.length,i=it.apply(t,arguments),i=u(i,r);++n<r;)i(e[n])||t.push(e[n]);return t},s.drop=Kt,s.escape=function(e){return e==r?"":(e+"").replace(Z,h)},s.every=an,s.extend=Qt,s.filter=fn,s.find=ln,s.first=x,s.flatten=T,s.forEach=cn,s.forIn=Gt,s.forOwn=Yt,s.functions=Zt,s.groupBy=hn,s.has=function(e,t){return st.call(e,t)},s.identity=M,s.indexOf=N,s.initial=function(e,t,n){return e?
|
||||
at.call(e,0,-(t==r||n?1:t)):[]},s.intersection=function(e){var t=[];if(!e)return t;for(var n,r=-1,i=e.length,s=at.call(arguments,1),o=[];++r<i;)n=e[r],0>N(t,n)&&an(s,function(e,t){return(o[t]||(o[t]=u(e)))(n)})&&t.push(n);return t},s.invoke=pn,s.isArguments=w,s.isArray=en,s.isBoolean=function(e){return e===n||e===i||ft.call(e)==mt},s.isElement=function(e){return!!e&&1==e.nodeType},s.isEmpty=tn,s.isEqual=E,s.isFinite=function(e){return ht(e)&&ft.call(e)==bt},s.isNaN=function(e){return ft.call(e)==
|
||||
bt&&e!=+e},s.isNull=function(e){return e===r},s.isObject=function(e){return e&&Ft[typeof e]},s.isUndefined=function(e){return e===t},s.keys=rn,s.last=function(e,t,n){if(e){var i=e.length;return t==r||n?e[i-1]:at.call(e,-t||i)}},s.lastIndexOf=function(e,t,n){if(!e)return-1;var r=e.length;for(n&&"number"==typeof n&&(r=(0>n?Math.max(0,r+n):Math.min(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},s.map=dn,s.max=C,s.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments
|
||||
[0];return st.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},s.merge=vn,s.min=function(e,t,n){var r=Infinity,i=r;if(!e)return i;var s=-1,o=e.length;if(!t){for(;++s<o;)e[s]<i&&(i=e[s]);return i}for(n&&(t=d(t,n));++s<o;)n=t(e[s],s,e),n<r&&(r=n,i=e[s]);return i},s.mixin=_,s.noConflict=function(){return e._=W,this},s.once=function(e){var t,r=i;return function(){return r?t:(r=n,t=e.apply(this,arguments))}},s.partial=function(e){var t=at.call(arguments,1),n=t.length;return function(){var r;return r=arguments
|
||||
,r.length&&(t.length=n,ot.apply(t,r)),r=1==t.length?e.call(this,t[0]):e.apply(this,t),t.length=n,r}},s.pick=function(e){for(var t,n=0,r=it.apply(F,arguments),i=r.length,s={};++n<i;)t=r[n],t in e&&(s[t]=e[t]);return s},s.pluck=mn,s.range=function(e,t,n){e=+e||0,n=+n||1,t==r&&(t=e,e=0);for(var i=-1,t=Math.max(0,Math.ceil((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},s.reduce=gn,s.reduceRight=S,s.reject=yn,s.rest=k,s.result=function(e,t){if(!e)return r;var n=e[t];return ft.call(n)==yt?e[t]():n},
|
||||
s.shuffle=function(e){if(!e)return[];for(var t,n=-1,r=e.length,i=Array(r);++n<r;)t=Math.floor(Math.random()*(n+1)),i[n]=i[t],i[t]=e[n];return i},s.size=function(e){return e?Ht[ft.call(e)]||Lt&&w(e)?e.length:rn(e).length:0},s.some=bn,s.sortBy=wn,s.sortedIndex=L,s.tap=function(e,t){return t(e),e},s.template=function(e,t,n){n||(n={});var o,u;o=n.escape;var a=n.evaluate,f=n.interpolate,h=s.templateSettings,n=n.variable;o==r&&(o=h.escape),a==r&&(a=h.evaluate||i),f==r&&(f=h.interpolate),o&&(e=e.replace
|
||||
(o,m)),f&&(e=e.replace(f,y)),a!=D&&(D=a,B=RegExp("<e%-([\\s\\S]+?)%>|<e%=([\\s\\S]+?)%>"+(a?"|"+a.source:""),"g")),o=rt.length,e=e.replace(B,g),o=o!=rt.length,e="__p += '"+e.replace(et,c).replace(Y,l)+"';",rt.length=0,n||(n=h.variable||P||"obj",o?e="with("+n+"){"+e+"}":(n!=P&&(P=n,H=RegExp("(\\(\\s*)"+n+"\\."+n+"\\b","g")),e=e.replace(Q,"$&"+n+".").replace(H,"$1__d"))),e=(o?e.replace(V,""):e).replace($,"$1").replace(J,"$1;"),e="function("+n+"){"+n+"||("+n+"={});var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"
|
||||
:",__d="+n+"."+n+"||"+n+";")+e+"return __p}";try{u=Function("_","return "+e)(s)}catch(p){u=function(){throw p}}return t?u(t):(u.source=e,u)},s.throttle=function(e,t){function n(){a=new Date,u=r,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?(a=r,s=e.apply(o,i)):u||(u=Tt(n,f)),s}},s.times=function(e,t,n){var r=-1;if(n)for(;++r<e;)t.call(n,r);else for(;++r<e;)t(r)},s.toArray=function(e){if(!e)return[];if(e.toArray&&ft.call(e.toArray)==yt)return e
|
||||
.toArray();var t=e.length;return t===t>>>0?(kt?ft.call(e)==St:"string"==typeof e)?e.split(""):at.call(e):nn(e)},s.union=function(){for(var e=-1,t=[],n=it.apply(t,arguments),r=n.length;++e<r;)0>N(t,n[e])&&t.push(n[e]);return t},s.uniq=A,s.uniqueId=function(e){var t=z++;return e?e+t:t},s.values=nn,s.where=bn,s.without=function(e){var t=[];if(!e)return t;for(var n=-1,r=e.length,i=u(arguments,1,20);++n<r;)i(e[n])||t.push(e[n]);return t},s.wrap=function(e,t){return function(){var n=[e];return arguments
|
||||
.length&&ot.apply(n,arguments),t.apply(this,n)}},s.zip=function(e){if(!e)return[];for(var t=-1,n=C(dn(arguments,"length")),r=Array(n);++t<n;)r[t]=dn(arguments,t);return r},s.zipObject=function(e,t){if(!e)return{};var n=-1,r=e.length,i={};for(t||(t=[]);++n<r;)i[e[n]]=t[n];return i},s.all=on,s.any=gn,s.collect=hn,s.detect=an,s.each=fn,s.foldl=vn,s.foldr=S,s.head=x,s.include=rn,s.inject=vn,s.methods=Yt,s.select=un,s.tail=k,s.take=x,s.unique=A,fn({Date:gt,Function:yt,Number:bt,RegExp:Et,String:St},function(
|
||||
e,t){s["is"+t]=function(t){return ft.call(t)==e}}),o.prototype=s.prototype,_(s),o.prototype.chain=function(){return this._chain=n,this},o.prototype.value=function(){return this._wrapped},fn("pop push reverse shift sort splice unshift".split(" "),function(e){var t=F[e];o.prototype[e]=function(){var e=this._wrapped;return t.apply(e,arguments),e.length===0&&delete e[0],this._chain&&(e=new o(e),e._chain=n),e}}),fn(["concat","join","slice"],function(e){var t=F[e];o.prototype[e]=function(){var e=t.apply
|
||||
(this._wrapped,arguments);return this._chain&&(e=new o(e),e._chain=n),e}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(e._=s,define(function(){return s})):j?"object"==typeof module&&module&&module.s==j?(module.s=s)._=s:j._=s:e._=s})(this);
|
||||
.toArray();var t=e.length;return t===t>>>0?(At?ft.call(e)==St:"string"==typeof e)?e.split(""):at.call(e):sn(e)},s.union=function(){for(var e=-1,t=[],n=it.apply(t,arguments),r=n.length;++e<r;)0>N(t,n[e])&&t.push(n[e]);return t},s.uniq=A,s.uniqueId=function(e){var t=z++;return e?e+t:t},s.values=sn,s.where=En,s.without=function(e){var t=[];if(!e)return t;for(var n=-1,r=e.length,i=u(arguments,1,20);++n<r;)i(e[n])||t.push(e[n]);return t},s.wrap=function(e,t){return function(){var n=[e];return arguments
|
||||
.length&&ot.apply(n,arguments),t.apply(this,n)}},s.zip=function(e){if(!e)return[];for(var t=-1,n=C(mn(arguments,"length")),r=Array(n);++t<n;)r[t]=mn(arguments,t);return r},s.zipObject=function(e,t){if(!e)return{};var n=-1,r=e.length,i={};for(t||(t=[]);++n<r;)i[e[n]]=t[n];return i},s.all=an,s.any=bn,s.collect=dn,s.detect=ln,s.each=cn,s.foldl=gn,s.foldr=S,s.head=x,s.include=on,s.inject=gn,s.methods=Zt,s.select=fn,s.tail=k,s.take=x,s.unique=A,cn({Date:gt,Function:yt,Number:bt,RegExp:Et,String:St},function(
|
||||
e,t){s["is"+t]=function(t){return ft.call(t)==e}}),o.prototype=s.prototype,_(s),o.prototype.chain=function(){return this._chain=n,this},o.prototype.value=function(){return this._wrapped},cn("pop push reverse shift sort splice unshift".split(" "),function(e){var t=F[e];o.prototype[e]=function(){var e=this._wrapped;return t.apply(e,arguments),e.length===0&&delete e[0],this._chain&&(e=new o(e),e._chain=n),e}}),cn(["concat","join","slice"],function(e){var t=F[e];o.prototype[e]=function(){var e=t.apply
|
||||
(this._wrapped,arguments);return this._chain&&(e=new o(e),e._chain=n),e}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(e._=s,define(function(){return s})):j?"object"==typeof module&&module&&module.t==j?(module.t=s)._=s:j._=s:e._=s})(this);
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash",
|
||||
"version": "0.4.2",
|
||||
"version": "0.5.0-rc.1",
|
||||
"description": "A drop-in replacement for Underscore.js that delivers performance improvements, bug fixes, and additional features.",
|
||||
"homepage": "http://lodash.com",
|
||||
"main": "lodash",
|
||||
|
||||
Reference in New Issue
Block a user