diff --git a/README.md b/README.md index 6f9598e8a9..86b0636772 100644 --- a/README.md +++ b/README.md @@ -1,105 +1,34 @@ -# Lo-Dash v2.4.1 -A utility library delivering consistency, [customization](http://lodash.com/custom-builds), [performance](http://lodash.com/benchmarks), & [extras](http://lodash.com/#features). +# Lo-Dash v2.4.2 +A utility library delivering consistency, [customization](https://lodash.com/custom-builds), [performance](https://lodash.com/benchmarks), & [extras](https://lodash.com/#features). ## Download Check out our [wiki]([https://github.com/lodash/lodash/wiki/build-differences]) for details over the differences between builds. * Modern builds perfect for newer browsers/environments:
-[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.js) & -[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.min.js) +[Development](https://raw.github.com/lodash/lodash/2.4.2/dist/lodash.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.2/dist/lodash.min.js) * Compatibility builds for older environment support too:
-[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.compat.js) & -[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.compat.min.js) +[Development](https://raw.github.com/lodash/lodash/2.4.2/dist/lodash.compat.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.2/dist/lodash.compat.min.js) * Underscore builds to use as a drop-in replacement:
-[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.underscore.js) & -[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.underscore.min.js) +[Development](https://raw.github.com/lodash/lodash/2.4.2/dist/lodash.underscore.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.2/dist/lodash.underscore.min.js) -CDN copies are available on [cdnjs](http://cdnjs.com/libraries/lodash.js/) & [jsDelivr](http://www.jsdelivr.com/#!lodash). For smaller file sizes, create [custom builds](http://lodash.com/custom-builds) with only the features needed. +CDN copies are available on [cdnjs](http://cdnjs.com/libraries/lodash.js/) & [jsDelivr](http://www.jsdelivr.com/#!lodash). For smaller file sizes, create [custom builds](https://lodash.com/custom-builds) with only the features needed. Love modules? We’ve got you covered with [lodash-amd](https://npmjs.org/package/lodash-amd), [lodash-es6](https://github.com/lodash/lodash-es6), [lodash-node](https://npmjs.org/package/lodash-node), & [npm packages](https://npmjs.org/browse/keyword/lodash-modularized) per method. ## Dive in -There’s plenty of **[documentation](http://lodash.com/docs)**, [unit tests](http://lodash.com/tests), & [benchmarks](http://lodash.com/benchmarks).
+There’s plenty of **[documentation](https://lodash.com/docs)**, [unit tests](https://lodash.com/tests), & [benchmarks](https://lodash.com/benchmarks).
Check out DevDocs as a fast, organized, & searchable interface for our documentation. The full changelog for this release is available on our [wiki](https://github.com/lodash/lodash/wiki/Changelog).
A list of upcoming features is available on our [roadmap](https://github.com/lodash/lodash/wiki/Roadmap). -## Features *not* in Underscore - - * AMD loader support ([curl](https://github.com/cujojs/curl), [dojo](http://dojotoolkit.org/), [requirejs](http://requirejs.org/), etc.) - * [_(…)](http://lodash.com/docs#_) supports intuitive chaining - * [_.at](http://lodash.com/docs#at) for cherry-picking collection values - * [_.bindKey](http://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods - * [_.clone](http://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects - * [_.cloneDeep](http://lodash.com/docs#cloneDeep) for deep cloning arrays & objects - * [_.constant](http://lodash.com/docs#constant) & [_.property](http://lodash.com/docs#property) function generators for composing functions - * [_.contains](http://lodash.com/docs#contains) accepts a `fromIndex` - * [_.create](http://lodash.com/docs#create) for easier object inheritance - * [_.createCallback](http://lodash.com/docs#createCallback) for extending callbacks in methods & mixins - * [_.curry](http://lodash.com/docs#curry) for creating [curried](http://hughfdjackson.com/javascript/2013/07/06/why-curry-helps/) functions - * [_.debounce](http://lodash.com/docs#debounce) & [_.throttle](http://lodash.com/docs#throttle) accept additional `options` for more control - * [_.findIndex](http://lodash.com/docs#findIndex) & [_.findKey](http://lodash.com/docs#findKey) for finding indexes & keys - * [_.forEach](http://lodash.com/docs#forEach) is chainable & supports exiting early - * [_.forIn](http://lodash.com/docs#forIn) for iterating own & inherited properties - * [_.forOwn](http://lodash.com/docs#forOwn) for iterating own properties - * [_.isPlainObject](http://lodash.com/docs#isPlainObject) for checking if values are created by `Object` - * [_.mapValues](http://lodash.com/docs#mapValues) for [mapping](http://lodash.com/docs#map) values to an object - * [_.memoize](http://lodash.com/docs#memoize) exposes the `cache` of memoized functions - * [_.merge](http://lodash.com/docs#merge) for a deep [_.extend](http://lodash.com/docs#extend) - * [_.noop](http://lodash.com/docs#noop) for function placeholders - * [_.now](http://lodash.com/docs#now) as a cross-browser `Date.now` alternative - * [_.parseInt](http://lodash.com/docs#parseInt) for consistent behavior - * [_.pull](http://lodash.com/docs#pull) & [_.remove](http://lodash.com/docs#remove) for mutating arrays - * [_.random](http://lodash.com/docs#random) supports returning floating-point numbers - * [_.runInContext](http://lodash.com/docs#runInContext) for easier mocking - * [_.sortBy](http://lodash.com/docs#sortBy) supports sorting by multiple properties - * [_.support](http://lodash.com/docs#support) for flagging environment features - * [_.template](http://lodash.com/docs#template) supports [*“imports”*](http://lodash.com/docs#templateSettings_imports) options & [ES6 template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals) - * [_.transform](http://lodash.com/docs#transform) as a powerful alternative to [_.reduce](http://lodash.com/docs#reduce) for transforming objects - * [_.where](http://lodash.com/docs#where) supports deep object comparisons - * [_.xor](http://lodash.com/docs#xor) as a companion to [_.difference](http://lodash.com/docs#difference), [_.intersection](http://lodash.com/docs#intersection), & [_.union](http://lodash.com/docs#union) - * [_.zip](http://lodash.com/docs#zip) is capable of unzipping values - * [_.omit](http://lodash.com/docs#omit), [_.pick](http://lodash.com/docs#pick), & - [more](http://lodash.com/docs "_.assign, _.clone, _.cloneDeep, _.first, _.initial, _.isEqual, _.last, _.merge, _.rest") accept callbacks - * [_.contains](http://lodash.com/docs#contains), [_.toArray](http://lodash.com/docs#toArray), & - [more](http://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.forEach, _.forEachRight, _.groupBy, _.invoke, _.map, _.max, _.min, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.where") accept strings - * [_.filter](http://lodash.com/docs#filter), [_.map](http://lodash.com/docs#map), & - [more](http://lodash.com/docs "_.countBy, _.every, _.find, _.findKey, _.findLast, _.findLastIndex, _.findLastKey, _.first, _.groupBy, _.initial, _.last, _.max, _.min, _.reject, _.rest, _.some, _.sortBy, _.sortedIndex, _.uniq") support *“_.pluck”* & *“_.where”* shorthands - * [_.findLast](http://lodash.com/docs#findLast), [_.findLastIndex](http://lodash.com/docs#findLastIndex), & - [more](http://lodash.com/docs "_.findLastKey, _.forEachRight, _.forInRight, _.forOwnRight, _.partialRight") right-associative methods - -## Resources - - * Podcasts - - [JavaScript Jabber](http://javascriptjabber.com/079-jsj-lo-dash-with-john-david-dalton/) - - * Posts - - [Say “Hello” to Lo-Dash](http://kitcambridge.be/blog/say-hello-to-lo-dash/) - - [Custom builds in Lo-Dash 2.0](http://kitcambridge.be/blog/custom-builds-in-lo-dash-2-dot-0/) - - * Videos - - [Introduction](https://vimeo.com/44154599) - - [Origins](https://vimeo.com/44154600) - - [Optimizations & builds](https://vimeo.com/44154601) - - [Native method use](https://vimeo.com/48576012) - - [Testing](https://vimeo.com/45865290) - - [CascadiaJS ’12](http://www.youtube.com/watch?v=dpPy4f_SeEk) - - A list of other community created podcasts, posts, & videos is available on our [wiki](https://github.com/lodash/lodash/wiki/Resources). - -## Support - -Tested in Chrome 5~31, Firefox 2~25, IE 6-11, Opera 9.25~17, Safari 3-7, Node.js 0.6.21~0.10.22, Narwhal 0.3.2, PhantomJS 1.9.2, RingoJS 0.9, & Rhino 1.7RC5.
-Automated browser test results [are available](https://saucelabs.com/u/lodash) as well as [Travis CI](https://travis-ci.org/) builds for [lodash](https://travis-ci.org/lodash/lodash/), [lodash-cli](https://travis-ci.org/lodash/lodash-cli/), [lodash-amd](https://travis-ci.org/lodash/lodash-amd/), [lodash-node](https://travis-ci.org/lodash/lodash-node/), & [grunt-lodash](https://travis-ci.org/lodash/grunt-lodash). - -Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing.
-[![Sauce Labs](http://lodash.com/_img/sauce.png)](https://saucelabs.com/ "Sauce Labs: Selenium Testing & More") - ## Installation & usage In browsers: @@ -148,16 +77,69 @@ require({ }); ``` -## Author +## Resources -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | + * Podcasts + - [JavaScript Jabber](http://javascriptjabber.com/079-jsj-lo-dash-with-john-david-dalton/) -## Contributors + * Posts + - [Say “Hello” to Lo-Dash](http://kitcambridge.be/blog/say-hello-to-lo-dash/) + - [Custom builds in Lo-Dash 2.0](http://kitcambridge.be/blog/custom-builds-in-lo-dash-2-dot-0/) -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | + * Videos + - [Introduction](https://vimeo.com/44154599) + - [Origins](https://vimeo.com/44154600) + - [Optimizations & builds](https://vimeo.com/44154601) + - [Native method use](https://vimeo.com/48576012) + - [Testing](https://vimeo.com/45865290) + - [CascadiaJS ’12](http://www.youtube.com/watch?v=dpPy4f_SeEk) + + A list of other community created podcasts, posts, & videos is available on our [wiki](https://github.com/lodash/lodash/wiki/Resources). + +## Features + + * AMD loader support ([curl](https://github.com/cujojs/curl), [dojo](http://dojotoolkit.org/), [requirejs](http://requirejs.org/), etc.) + * [_(…)](https://lodash.com/docs#_) supports intuitive chaining + * [_.at](https://lodash.com/docs#at) for cherry-picking collection values + * [_.bindKey](https://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods + * [_.clone](https://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects + * [_.cloneDeep](https://lodash.com/docs#cloneDeep) for deep cloning arrays & objects + * [_.constant](https://lodash.com/docs#constant) & [_.property](https://lodash.com/docs#property) function generators for composing functions + * [_.contains](https://lodash.com/docs#contains) accepts a `fromIndex` + * [_.create](https://lodash.com/docs#create) for easier object inheritance + * [_.createCallback](https://lodash.com/docs#createCallback) for extending callbacks in methods & mixins + * [_.curry](https://lodash.com/docs#curry) for creating [curried](http://hughfdjackson.com/javascript/2013/07/06/why-curry-helps/) functions + * [_.debounce](https://lodash.com/docs#debounce) & [_.throttle](https://lodash.com/docs#throttle) accept additional `options` for more control + * [_.findIndex](https://lodash.com/docs#findIndex) & [_.findKey](https://lodash.com/docs#findKey) for finding indexes & keys + * [_.forEach](https://lodash.com/docs#forEach) is chainable & supports exiting early + * [_.forIn](https://lodash.com/docs#forIn) for iterating own & inherited properties + * [_.forOwn](https://lodash.com/docs#forOwn) for iterating own properties + * [_.isPlainObject](https://lodash.com/docs#isPlainObject) for checking if values are created by `Object` + * [_.mapValues](https://lodash.com/docs#mapValues) for [mapping](https://lodash.com/docs#map) values to an object + * [_.memoize](https://lodash.com/docs#memoize) exposes the `cache` of memoized functions + * [_.merge](https://lodash.com/docs#merge) for a deep [_.extend](https://lodash.com/docs#extend) + * [_.noop](https://lodash.com/docs#noop) for function placeholders + * [_.now](https://lodash.com/docs#now) as a cross-browser `Date.now` alternative + * [_.parseInt](https://lodash.com/docs#parseInt) for consistent behavior + * [_.pull](https://lodash.com/docs#pull) & [_.remove](https://lodash.com/docs#remove) for mutating arrays + * [_.random](https://lodash.com/docs#random) supports returning floating-point numbers + * [_.runInContext](https://lodash.com/docs#runInContext) for easier mocking + * [_.sortBy](https://lodash.com/docs#sortBy) supports sorting by multiple properties + * [_.support](https://lodash.com/docs#support) for flagging environment features + * [_.template](https://lodash.com/docs#template) supports [*“imports”*](https://lodash.com/docs#templateSettings_imports) options & [ES6 template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals) + * [_.transform](https://lodash.com/docs#transform) as a powerful alternative to [_.reduce](https://lodash.com/docs#reduce) for transforming objects + * [_.where](https://lodash.com/docs#where) supports deep object comparisons + * [_.xor](https://lodash.com/docs#xor) as a companion to [_.difference](https://lodash.com/docs#difference), [_.intersection](https://lodash.com/docs#intersection), & [_.union](https://lodash.com/docs#union) + * [_.zip](https://lodash.com/docs#zip) is capable of unzipping values + * [_.omit](https://lodash.com/docs#omit), [_.pick](https://lodash.com/docs#pick), & + [more](https://lodash.com/docs "_.assign, _.clone, _.cloneDeep, _.first, _.initial, _.isEqual, _.last, _.merge, _.rest") accept callbacks + * [_.contains](https://lodash.com/docs#contains), [_.toArray](https://lodash.com/docs#toArray), & + [more](https://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.forEach, _.forEachRight, _.groupBy, _.invoke, _.map, _.max, _.min, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.where") accept strings + * [_.filter](https://lodash.com/docs#filter), [_.map](https://lodash.com/docs#map), & + [more](https://lodash.com/docs "_.countBy, _.every, _.find, _.findKey, _.findLast, _.findLastIndex, _.findLastKey, _.first, _.groupBy, _.initial, _.last, _.max, _.min, _.reject, _.rest, _.some, _.sortBy, _.sortedIndex, _.uniq") support *“_.pluck”* & *“_.where”* shorthands + * [_.findLast](https://lodash.com/docs#findLast), [_.findLastIndex](https://lodash.com/docs#findLastIndex), & + [more](https://lodash.com/docs "_.findLastKey, _.forEachRight, _.forInRight, _.forOwnRight, _.partialRight") right-associative methods + +## Support -[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lodash/lodash/trend.png)](https://bitdeli.com/free "Bitdeli Badge") +Tested in Chrome 5~31, Firefox 2~25, IE 6-11, Opera 9.25-17, Safari 3-7, Node.js 0.6.21-0.10.22, Narwhal 0.3.2, PhantomJS 1.9.2, RingoJS 0.9, & Rhino 1.7RC5. diff --git a/bower.json b/bower.json index a6f139d7c3..86abe975ae 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "lodash", - "version": "2.4.1", + "version": "2.4.2", "main": "dist/lodash.compat.js", "ignore": [ ".*", diff --git a/component.json b/component.json index 6cd4698585..3c5b00f175 100644 --- a/component.json +++ b/component.json @@ -1,7 +1,7 @@ { "name": "lodash", "repo": "lodash/lodash", - "version": "2.4.1", + "version": "2.4.2", "description": "A utility library delivering consistency, customization, performance, & extras.", "license": "MIT", "keywords": ["amd", "browser", "client", "functional", "server", "util"], diff --git a/dist/lodash.compat.js b/dist/lodash.compat.js index 23798ba853..4d35185f87 100644 --- a/dist/lodash.compat.js +++ b/dist/lodash.compat.js @@ -1,11 +1,11 @@ /** * @license - * Lo-Dash 2.4.1 (Custom Build) + * Lo-Dash 2.4.2 (Custom Build) * Build: `lodash -o ./dist/lodash.compat.js` * Copyright 2012-2013 The Dojo Foundation * Based on Underscore.js 1.5.2 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Available under MIT license */ ;(function() { @@ -1818,6 +1818,7 @@ var setBindData = !defineProperty ? noop : function(func, value) { descriptor.value = value; defineProperty(func, '__bindData__', descriptor); + descriptor.value = null; }; /** @@ -6489,7 +6490,7 @@ * debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl * * For more information on precompiling templates see: - * http://lodash.com/custom-builds + * https://lodash.com/custom-builds * * For more information on Chrome extension sandboxes see: * http://developer.chrome.com/stable/extensions/sandboxingEval.html @@ -7058,7 +7059,7 @@ * @memberOf _ * @type string */ - lodash.VERSION = '2.4.1'; + lodash.VERSION = '2.4.2'; // add "Chaining" functions to the wrapper lodash.prototype.chain = wrapperChain; diff --git a/dist/lodash.compat.min.js b/dist/lodash.compat.min.js index d03b6ba6b9..c0992cf882 100644 --- a/dist/lodash.compat.min.js +++ b/dist/lodash.compat.min.js @@ -1,61 +1,92 @@ /** * @license - * Lo-Dash 2.4.1 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE + * Lo-Dash 2.4.2 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE * Build: `lodash -o ./dist/lodash.compat.js` */ -;(function(){function n(n,t,e){e=(e||0)-1;for(var r=n?n.length:0;++ei||typeof a=="undefined")return 1;if(ae?0:e);++r=_&&a===n,f=[];if(l){var c=o(r);c?(a=t,r=c):l=false}for(;++ua(r,c)&&f.push(c);return l&&p(r),f}function ot(n,t,e,r){r=(r||0)-1; -for(var u=n?n.length:0,o=[];++r=_&&l===n,h=u||g?i():s;for(g&&(h=o(h),l=t);++al(h,y))&&((u||g)&&h.push(y),s.push(v))}return g?(c(h.k),p(h)):u&&c(h),s}function ct(n){return function(t,e,r){var u={}; -if(e=v.createCallback(e,r,3),qe(t)){r=-1;for(var o=t.length;++rk;k++)r+="n='"+e.h[k]+"';if((!(r&&x[n])&&m.call(t,n))",e.j||(r+="||(!x[n]&&t[n]!==A[n])"),r+="){"+e.g+"}"; -r+="}"}return(e.b||Le.nonEnumArgs)&&(r+="}"),r+=e.c+";return E",n("d,j,k,m,o,p,q,s,v,A,B,y,I,J,L",t+r+"}")(tt,q,ce,we,d,dt,qe,kt,Q.f,pe,X,$e,M,se,he)}function gt(n){return Ve[n]}function ht(){var t=(t=v.indexOf)===zt?n:t;return t}function vt(n){return typeof n=="function"&&ve.test(n)}function yt(n){var t,e;return!n||he.call(n)!=G||(t=n.constructor,jt(t)&&!(t instanceof t))||!Le.argsClass&&dt(n)||!Le.nodeClass&&f(n)?false:Le.ownLast?(nr(n,function(n,t,r){return e=we.call(r,t),false}),false!==e):(nr(n,function(n,t){e=t -}),typeof e=="undefined"||we.call(n,e))}function mt(n){return He[n]}function dt(n){return n&&typeof n=="object"&&typeof n.length=="number"&&he.call(n)==T||false}function bt(n,t,e){var r=We(n),u=r.length;for(t=tt(t,e,3);u--&&(e=r[u],false!==t(n[e],e,n)););return n}function _t(n){var t=[];return nr(n,function(n,e){jt(n)&&t.push(e)}),t.sort()}function wt(n){for(var t=-1,e=We(n),r=e.length,u={};++te?Be(0,o+e):e)||0,qe(n)?a=-1o&&(o=i)}}else t=null==t&&kt(n)?r:v.createCallback(t,e,3),Xe(n,function(n,e,r){e=t(n,e,r),e>u&&(u=e,o=n)});return o}function Rt(n,t,e,r){var u=3>arguments.length;if(t=v.createCallback(t,r,4),qe(n)){var o=-1,a=n.length;for(u&&(e=n[++o]);++oarguments.length; -return t=v.createCallback(t,r,4),Nt(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)}),e}function Tt(n){var t=-1,e=n?n.length:0,r=Zt(typeof e=="number"?e:0);return Dt(n,function(n){var e=lt(0,++t);r[t]=r[e],r[e]=n}),r}function $t(n,t,e){var r;if(t=v.createCallback(t,e,3),qe(n)){e=-1;for(var u=n.length;++er?Be(0,u+r):r||0}else if(r)return r=Kt(t,e),t[r]===e?r:-1;return n(t,e,r)}function qt(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=v.createCallback(t,e,3);++u>>1,e(n[r])e?0:e);++t=h;m?(u&&(u=me(u)),c=a,o=n.apply(i,r)):u||(u=Ce(y,h))}return m&&l?l=me(l):l||t===p||(l=Ce(v,t)),e&&(m=true,o=n.apply(i,r)),!m||l||u||(r=i=null),o}}function Ht(n){return n}function Ut(n,t,e){var r=true,u=t&&_t(t);t&&(e||u.length)||(null==e&&(e=t),o=y,t=n,n=v,u=_t(t)),false===e?r=false:xt(e)&&"chain"in e&&(r=e.chain);var o=n,a=jt(o);Dt(u,function(e){var u=n[e]=t[e];a&&(o.prototype[e]=function(){var t=this.__chain__,e=this.__wrapped__,a=[e];if(je.apply(a,arguments),a=u.apply(n,a),r||t){if(e===a&&xt(a))return this; -a=new o(a),a.__chain__=t}return a})})}function Qt(){}function Xt(n){return function(t){return t[n]}}function Yt(){return this.__wrapped__}e=e?ut.defaults(Z.Object(),e,ut.pick(Z,R)):Z;var Zt=e.Array,ne=e.Boolean,te=e.Date,ee=e.Function,re=e.Math,ue=e.Number,oe=e.Object,ae=e.RegExp,ie=e.String,le=e.TypeError,fe=[],ce=e.Error.prototype,pe=oe.prototype,se=ie.prototype,ge=e._,he=pe.toString,ve=ae("^"+ie(he).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),ye=re.ceil,me=e.clearTimeout,de=re.floor,be=ee.prototype.toString,_e=vt(_e=oe.getPrototypeOf)&&_e,we=pe.hasOwnProperty,je=fe.push,xe=pe.propertyIsEnumerable,Ce=e.setTimeout,ke=fe.splice,Ee=fe.unshift,Oe=function(){try{var n={},t=vt(t=oe.defineProperty)&&t,e=t(n,n,n)&&t -}catch(r){}return e}(),Se=vt(Se=oe.create)&&Se,Ae=vt(Ae=Zt.isArray)&&Ae,Ie=e.isFinite,De=e.isNaN,Ne=vt(Ne=oe.keys)&&Ne,Be=re.max,Pe=re.min,Re=e.parseInt,Fe=re.random,Te={};Te[$]=Zt,Te[L]=ne,Te[z]=te,Te[K]=ee,Te[G]=oe,Te[W]=ue,Te[J]=ae,Te[M]=ie;var $e={};$e[$]=$e[z]=$e[W]={constructor:true,toLocaleString:true,toString:true,valueOf:true},$e[L]=$e[M]={constructor:true,toString:true,valueOf:true},$e[q]=$e[K]=$e[J]={constructor:true,toString:true},$e[G]={constructor:true},function(){for(var n=F.length;n--;){var t,e=F[n]; -for(t in $e)we.call($e,t)&&!we.call($e[t],e)&&($e[t][e]=false)}}(),y.prototype=v.prototype;var Le=v.support={};!function(){var n=function(){this.x=1},t={0:1,length:1},r=[];n.prototype={valueOf:1,y:1};for(var u in new n)r.push(u);for(u in arguments);Le.argsClass=he.call(arguments)==T,Le.argsObject=arguments.constructor==oe&&!(arguments instanceof Zt),Le.enumErrorProps=xe.call(ce,"message")||xe.call(ce,"name"),Le.enumPrototypes=xe.call(n,"prototype"),Le.funcDecomp=!vt(e.WinRTError)&&B.test(g),Le.funcNames=typeof ee.name=="string",Le.nonEnumArgs=0!=u,Le.nonEnumShadows=!/valueOf/.test(r),Le.ownLast="x"!=r[0],Le.spliceObjects=(fe.splice.call(t,0,1),!t[0]),Le.unindexedChars="xx"!="x"[0]+oe("x")[0]; -try{Le.nodeClass=!(he.call(document)==G&&!({toString:0}+""))}catch(o){Le.nodeClass=true}}(1),v.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:I,variable:"",imports:{_:v}},Se||(nt=function(){function n(){}return function(t){if(xt(t)){n.prototype=t;var r=new n;n.prototype=null}return r||e.Object()}}());var ze=Oe?function(n,t){U.value=t,Oe(n,"__bindData__",U)}:Qt;Le.argsClass||(dt=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&we.call(n,"callee")&&!xe.call(n,"callee")||false -});var qe=Ae||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&he.call(n)==$||false},Ke=st({a:"z",e:"[]",i:"if(!(B[typeof z]))return E",g:"E.push(n)"}),We=Ne?function(n){return xt(n)?Le.enumPrototypes&&typeof n=="function"||Le.nonEnumArgs&&n.length&&dt(n)?Ke(n):Ne(n):[]}:Ke,Ge={a:"g,e,K",i:"e=e&&typeof K=='undefined'?e:d(e,K,3)",b:"typeof u=='number'",v:We,g:"if(e(t[n],n,g)===false)return E"},Je={a:"z,H,l",i:"var a=arguments,b=0,c=typeof l=='number'?2:a.length;while(++b":">",'"':""","'":"'"},He=wt(Ve),Ue=ae("("+We(He).join("|")+")","g"),Qe=ae("["+We(Ve).join("")+"]","g"),Xe=st(Ge),Ye=st(Je,{i:Je.i.replace(";",";if(c>3&&typeof a[c-2]=='function'){var e=d(a[--c-1],a[c--],2)}else if(c>2&&typeof a[c-1]=='function'){e=a[--c]}"),g:"E[n]=e?e(E[n],t[n]):t[n]"}),Ze=st(Je),nr=st(Ge,Me,{j:false}),tr=st(Ge,Me); -jt(/x/)&&(jt=function(n){return typeof n=="function"&&he.call(n)==K});var er=_e?function(n){if(!n||he.call(n)!=G||!Le.argsClass&&dt(n))return false;var t=n.valueOf,e=vt(t)&&(e=_e(t))&&_e(e);return e?n==e||_e(n)==e:yt(n)}:yt,rr=ct(function(n,t,e){we.call(n,e)?n[e]++:n[e]=1}),ur=ct(function(n,t,e){(we.call(n,e)?n[e]:n[e]=[]).push(t)}),or=ct(function(n,t,e){n[e]=t}),ar=Bt,ir=vt(ir=te.now)&&ir||function(){return(new te).getTime()},lr=8==Re(j+"08")?Re:function(n,t){return Re(kt(n)?n.replace(D,""):n,t||0)}; -return v.after=function(n,t){if(!jt(t))throw new le;return function(){return 1>--n?t.apply(this,arguments):void 0}},v.assign=Ye,v.at=function(n){var t=arguments,e=-1,r=ot(t,true,false,1),t=t[2]&&t[2][t[1]]===n?1:r.length,u=Zt(t);for(Le.unindexedChars&&kt(n)&&(n=n.split(""));++e=_&&o(r?e[r]:s)))}var f=e[0],h=-1,v=f?f.length:0,y=[];n:for(;++h(m?t(m,g):l(s,g))){for(r=u,(m||s).push(g);--r;)if(m=a[r],0>(m?t(m,g):l(e[r],g)))continue n;y.push(g) -}}for(;u--;)(m=a[u])&&p(m);return c(a),c(s),y},v.invert=wt,v.invoke=function(n,t){var e=s(arguments,2),r=-1,u=typeof t=="function",o=n?n.length:0,a=Zt(typeof o=="number"?o:0);return Dt(n,function(n){a[++r]=(u?t:n[t]).apply(n,e)}),a},v.keys=We,v.map=Bt,v.mapValues=function(n,t,e){var r={};return t=v.createCallback(t,e,3),tr(n,function(n,e,u){r[e]=t(n,e,u)}),r},v.max=Pt,v.memoize=function(n,t){if(!jt(n))throw new le;var e=function(){var r=e.cache,u=t?t.apply(this,arguments):b+arguments[0];return we.call(r,u)?r[u]:r[u]=n.apply(this,arguments) -};return e.cache={},e},v.merge=function(n){var t=arguments,e=2;if(!xt(n))return n;if("number"!=typeof t[2]&&(e=t.length),3e?Be(0,r+e):Pe(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},v.mixin=Ut,v.noConflict=function(){return e._=ge,this},v.noop=Qt,v.now=ir,v.parseInt=lr,v.random=function(n,t,e){var r=null==n,u=null==t;return null==e&&(typeof n=="boolean"&&u?(e=n,n=1):u||typeof t!="boolean"||(e=t,u=true)),r&&u&&(t=1),n=+n||0,u?(t=n,n=0):t=+t||0,e||n%1||t%1?(e=Fe(),Pe(n+e*(t-n+parseFloat("1e-"+((e+"").length-1))),t)):lt(n,t)},v.reduce=Rt,v.reduceRight=Ft,v.result=function(n,t){if(n){var e=n[t]; -return jt(e)?n[t]():e}},v.runInContext=g,v.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:We(n).length},v.some=$t,v.sortedIndex=Kt,v.template=function(n,t,e){var r=v.templateSettings;n=ie(n||""),e=Ze({},e,r);var u,o=Ze({},e.imports,r.imports),r=We(o),o=Et(o),i=0,l=e.interpolate||N,f="__p+='",l=ae((e.escape||N).source+"|"+l.source+"|"+(l===I?O:N).source+"|"+(e.evaluate||N).source+"|$","g");n.replace(l,function(t,e,r,o,l,c){return r||(r=o),f+=n.slice(i,c).replace(P,a),e&&(f+="'+__e("+e+")+'"),l&&(u=true,f+="';"+l+";\n__p+='"),r&&(f+="'+((__t=("+r+"))==null?'':__t)+'"),i=c+t.length,t -}),f+="';",l=e=e.variable,l||(e="obj",f="with("+e+"){"+f+"}"),f=(u?f.replace(x,""):f).replace(C,"$1").replace(E,"$1;"),f="function("+e+"){"+(l?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+f+"return __p}";try{var c=ee(r,"return "+f).apply(h,o)}catch(p){throw p.source=f,p}return t?c(t):(c.source=f,c)},v.unescape=function(n){return null==n?"":ie(n).replace(Ue,mt)},v.uniqueId=function(n){var t=++m;return ie(null==n?"":n)+t -},v.all=St,v.any=$t,v.detect=It,v.findWhere=It,v.foldl=Rt,v.foldr=Ft,v.include=Ot,v.inject=Rt,Ut(function(){var n={};return tr(v,function(t,e){v.prototype[e]||(n[e]=t)}),n}(),false),v.first=Lt,v.last=function(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;for(t=v.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n?n[u-1]:h;return s(n,Be(0,u-r))},v.sample=function(n,t,e){return n&&typeof n.length!="number"?n=Et(n):Le.unindexedChars&&kt(n)&&(n=n.split("")),null==t||e?n?n[lt(0,n.length-1)]:h:(n=Tt(n),n.length=Pe(Be(0,t),n.length),n) -},v.take=Lt,v.head=Lt,tr(v,function(n,t){var e="sample"!==t;v.prototype[t]||(v.prototype[t]=function(t,r){var u=this.__chain__,o=n(this.__wrapped__,t,r);return u||null!=t&&(!r||e&&typeof t=="function")?new y(o,u):o})}),v.VERSION="2.4.1",v.prototype.chain=function(){return this.__chain__=true,this},v.prototype.toString=function(){return ie(this.__wrapped__)},v.prototype.value=Yt,v.prototype.valueOf=Yt,Xe(["join","pop","shift"],function(n){var t=fe[n];v.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments); -return n?new y(e,n):e}}),Xe(["push","reverse","sort","unshift"],function(n){var t=fe[n];v.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),Xe(["concat","slice","splice"],function(n){var t=fe[n];v.prototype[n]=function(){return new y(t.apply(this.__wrapped__,arguments),this.__chain__)}}),Le.spliceObjects||Xe(["pop","shift","splice"],function(n){var t=fe[n],e="splice"==n;v.prototype[n]=function(){var n=this.__chain__,r=this.__wrapped__,u=t.apply(r,arguments);return 0===r.length&&delete r[0],n||e?new y(u,n):u -}}),v}var h,v=[],y=[],m=0,d={},b=+new Date+"",_=75,w=40,j=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",x=/\b__p\+='';/g,C=/\b(__p\+=)''\+/g,E=/(__e\(.*?\)|\b__t\))\+'';/g,O=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,S=/\w*$/,A=/^\s*function[ \n\r\t]+\w/,I=/<%=([\s\S]+?)%>/g,D=RegExp("^["+j+"]*0+(?=.$)"),N=/($^)/,B=/\bthis\b/,P=/['\n\r\t\u2028\u2029\\]/g,R="Array Boolean Date Error Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setTimeout".split(" "),F="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),T="[object Arguments]",$="[object Array]",L="[object Boolean]",z="[object Date]",q="[object Error]",K="[object Function]",W="[object Number]",G="[object Object]",J="[object RegExp]",M="[object String]",V={}; -V[K]=false,V[T]=V[$]=V[L]=V[z]=V[W]=V[G]=V[J]=V[M]=true;var H={leading:false,maxWait:0,trailing:false},U={configurable:false,enumerable:false,value:null,writable:false},Q={a:"",b:null,c:"",d:"",e:"",v:null,g:"",h:null,support:null,i:"",j:false},X={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},Y={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},Z=X[typeof window]&&window||this,nt=X[typeof exports]&&exports&&!exports.nodeType&&exports,tt=X[typeof module]&&module&&!module.nodeType&&module,et=tt&&tt.exports===nt&&nt,rt=X[typeof global]&&global; -!rt||rt.global!==rt&&rt.window!==rt||(Z=rt);var ut=g();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Z._=ut, define(function(){return ut})):nt&&tt?et?(tt.exports=ut)._=ut:nt._=ut:Z._=ut}).call(this); \ No newline at end of file +;(function(){function n(n,r,e){for(var t=(e||0)-1,o=n?n.length:0;++t-1?0:-1:r?0:-1}function e(n){var r=this.cache,e=typeof n;if("boolean"==e||null==n)r[n]=!0;else{"number"!=e&&"string"!=e&&(e="object");var t="number"==e?n:m+n,o=r[e]||(r[e]={});"object"==e?(o[t]||(o[t]=[])).push(n):o[t]=!0; + +}}function t(n){return n.charCodeAt(0)}function o(n,r){for(var e=n.criteria,t=r.criteria,o=-1,u=e.length;++oi||"undefined"==typeof a)return 1;if(a=_&&a===n,c=[];if(l){var f=u(t);f?(a=r,t=f):l=!1}for(;++o-1:h});return o.pop(),u.pop(),_&&(f(o),f(u)),a}function cn(n,r,e,t,o){(st(r)?or:Ct)(r,function(r,u){var a,i,l=r,c=n[u];if(r&&((i=st(r))||Pt(r))){for(var f=t.length;f--;)if(a=t[f]==r){c=o[f];break}if(!a){var s;e&&(l=e(c,r),(s="undefined"!=typeof l)&&(c=l)),s||(c=i?st(c)?c:[]:Pt(c)?c:{}),t.push(r),o.push(c),s||cn(c,r,e,t,o)}}else e&&(l=e(c,r),"undefined"==typeof l&&(l=r)),"undefined"!=typeof l&&(c=l);n[u]=c; + +})}function fn(n,r){return n+We(ut()*(r-n+1))}function sn(e,t,o){var a=-1,l=yn(),c=e?e.length:0,p=[],g=!t&&c>=_&&l===n,h=o||g?i():p;if(g){var v=u(h);l=r,h=v}for(;++a3&&"function"==typeof r[e-2])var t=en(r[--e-1],r[e--],2);else e>2&&"function"==typeof r[e-1]&&(t=r[--e]);for(var o=p(arguments,1,e),u=-1,a=i(),l=i();++u-1:"number"==typeof u?a=(zn(n)?n.indexOf(r,e):o(n,r,e))>-1:wt(n,function(n){return++tu&&(u=l)}else r=null==r&&zn(n)?t:v.createCallback(r,e,3),wt(n,function(n,e,t){var a=r(n,e,t);a>o&&(o=a,u=n)});return u}function cr(n,r,e){var o=1/0,u=o;if("function"!=typeof r&&e&&e[r]===n&&(r=null),null==r&&st(n))for(var a=-1,i=n.length;++a=_&&u(t?e[t]:p)))}var h=e[0],v=-1,y=h?h.length:0,b=[];n:for(;++v>>1;e(n[a])1?arguments:arguments[0],r=-1,e=n?lr(At(n,"length")):0,t=we(e<0?0:e);++r2?gn(n,17,p(arguments,2),null,r):gn(n,1,null,null,r)}function zr(n){for(var r=arguments.length>1?an(arguments,!0,!1,1):On(n),e=-1,t=r.length;++e2?gn(r,19,p(arguments,2),null,n):gn(r,3,null,null,n)}function Ur(){for(var n=arguments,r=n.length;r--;)if(!$n(n[r]))throw new Ie;return function(){for(var r=arguments,e=n.length;e--;)r=[n[e].apply(this,r)]; + +return r[0]}}function Mr(n,r){return r="number"==typeof r?r:+r||n.length,gn(n,4,null,null,null,r)}function Vr(n,r,e){var t,o,u,a,i,l,c,f=0,s=!1,p=!0;if(!$n(n))throw new Ie;if(r=et(0,r)||0,e===!0){var g=!0;p=!1}else Fn(e)&&(g=e.leading,s="maxWait"in e&&(et(r,e.maxWait)||0),p="trailing"in e?e.trailing:p);var v=function(){var e=r-(Lt()-a);if(e>0)l=Ve(v,e);else{o&&He(o);var s=c;o=l=c=h,s&&(f=Lt(),u=n.apply(i,t),l||o||(t=i=null))}},y=function(){l&&He(l),o=l=c=h,(p||s!==r)&&(f=Lt(),u=n.apply(i,t),l||o||(t=i=null)); + +};return function(){if(t=arguments,a=Lt(),i=this,c=p&&(l||!g),s===!1)var e=g&&!l;else{o||g||(f=a);var h=s-(a-f),b=h<=0;b?(o&&(o=He(o)),f=a,u=n.apply(i,t)):o||(o=Ve(y,h))}return b&&l?l=He(l):l||r===s||(l=Ve(v,r)),e&&(b=!0,u=n.apply(i,t)),!b||l||o||(t=i=null),u}}function Gr(n){if(!$n(n))throw new Ie;var r=p(arguments,1);return Ve(function(){n.apply(h,r)},1)}function Jr(n,r){if(!$n(n))throw new Ie;var e=p(arguments,2);return Ve(function(){n.apply(h,e)},r)}function Qr(n,r){if(!$n(n))throw new Ie;var e=function(){ +var t=e.cache,o=r?r.apply(this,arguments):m+arguments[0];return Ke.call(t,o)?t[o]:t[o]=n.apply(this,arguments)};return e.cache={},e}function Xr(n){var r,e;if(!$n(n))throw new Ie;return function(){return r?e:(r=!0,e=n.apply(this,arguments),n=null,e)}}function Yr(n){return gn(n,16,p(arguments,1))}function Zr(n){return gn(n,32,null,p(arguments,1))}function ne(n,r,e){var t=!0,o=!0;if(!$n(n))throw new Ie;return e===!1?t=!1:Fn(e)&&(t="leading"in e?e.leading:t,o="trailing"in e?e.trailing:o),J.leading=t, +J.maxWait=r,J.trailing=o,Vr(n,r,J)}function re(n,r){return gn(r,16,[n])}function ee(n){return function(){return n}}function te(n,r,e){var t=typeof n;if(null==n||"function"==t)return en(n,r,e);if("object"!=t)return ce(n);var o=gt(n),u=o[0],a=n[u];return 1!=o.length||a!==a||Fn(a)?function(r){for(var e=o.length,t=!1;e--&&(t=ln(r[o[e]],n[o[e]],null,!0)););return t}:function(n){var r=n[u];return a===r&&(0!==a||1/a==1/r)}}function oe(n){return null==n?"":Ae(n).replace(_t,vn)}function ue(n){return n}function ae(n,r,e){ +var t=!0,o=r&&On(r);r&&(e||o.length)||(null==e&&(e=r),u=y,r=n,n=v,o=On(r)),e===!1?t=!1:Fn(e)&&"chain"in e&&(t=e.chain);var u=n,a=$n(u);or(o,function(e){var o=n[e]=r[e];a&&(u.prototype[e]=function(){var r=this.__chain__,e=this.__wrapped__,a=[e];Ue.apply(a,arguments);var i=o.apply(n,a);if(t||r){if(e===i&&Fn(i))return this;i=new u(i),i.__chain__=r}return i})})}function ie(){return e._=De,this}function le(){}function ce(n){return function(r){return r[n]}}function fe(n,r,e){var t=null==n,o=null==r;if(null==e&&("boolean"==typeof n&&o?(e=n, +n=1):o||"boolean"!=typeof r||(e=r,o=!0)),t&&o&&(r=1),n=+n||0,o?(r=n,n=0):r=+r||0,e||n%1||r%1){var u=ut();return tt(n+u*(r-n+parseFloat("1e-"+((u+"").length-1))),r)}return fn(n,r)}function se(n,r){if(n){var e=n[r];return $n(e)?n[r]():e}}function pe(n,r,e){var t=v.templateSettings;n=Ae(n||""),e=jt({},e,t);var o,u=jt({},e.imports,t.imports),i=gt(u),l=Xn(u),c=0,f=e.interpolate||L,s="__p += '",p=Se((e.escape||L).source+"|"+f.source+"|"+(f===A?E:L).source+"|"+(e.evaluate||L).source+"|$","g");n.replace(p,function(r,e,t,u,i,l){ +return t||(t=u),s+=n.slice(c,l).replace(R,a),e&&(s+="' +\n__e("+e+") +\n'"),i&&(o=!0,s+="';\n"+i+";\n__p += '"),t&&(s+="' +\n((__t = ("+t+")) == null ? '' : __t) +\n'"),c=l+r.length,r}),s+="';\n";var g=e.variable,y=g;y||(g="obj",s="with ("+g+") {\n"+s+"\n}\n"),s=(o?s.replace(j,""):s).replace(C,"$1").replace(P,"$1;"),s="function("+g+") {\n"+(y?"":g+" || ("+g+" = {});\n")+"var __t, __p = '', __e = _.escape"+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+s+"return __p\n}"; + +var b="\n/*\n//# sourceURL="+(e.sourceURL||"/lodash/template/source["+$++ +"]")+"\n*/";try{var d=Ce(i,"return "+s+b).apply(h,l)}catch(m){throw m.source=s,m}return r?d(r):(d.source=s,d)}function ge(n,r,e){n=(n=+n)>-1?n:0;var t=-1,o=we(n);for(r=en(r,e,1);++t/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:A,variable:"",imports:{_:v}};var ct=function(n){var r="var index, iterable = "+n.firstArg+", result = "+n.init+";\nif (!iterable) return result;\n"+n.top+";"; + +n.array?(r+="\nvar length = iterable.length; index = -1;\nif ("+n.array+") { ",lt.unindexedChars&&(r+="\n if (isString(iterable)) {\n iterable = iterable.split('')\n } "),r+="\n while (++index < length) {\n "+n.loop+";\n }\n}\nelse { "):lt.nonEnumArgs&&(r+="\n var length = iterable.length; index = -1;\n if (length && isArguments(iterable)) {\n while (++index < length) {\n index += '';\n "+n.loop+";\n }\n } else { "),lt.enumPrototypes&&(r+="\n var skipProto = typeof iterable == 'function';\n "), +lt.enumErrorProps&&(r+="\n var skipErrorProps = iterable === errorProto || iterable instanceof Error;\n ");var e=[];if(lt.enumPrototypes&&e.push('!(skipProto && index == "prototype")'),lt.enumErrorProps&&e.push('!(skipErrorProps && (index == "message" || index == "name"))'),n.useHas&&n.keys)r+="\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] && keys(iterable),\n length = ownProps ? ownProps.length : 0;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n", +e.length&&(r+=" if ("+e.join(" && ")+") {\n "),r+=n.loop+"; ",e.length&&(r+="\n }"),r+="\n } ";else if(r+="\n for (index in iterable) {\n",n.useHas&&e.push("hasOwnProperty.call(iterable, index)"),e.length&&(r+=" if ("+e.join(" && ")+") {\n "),r+=n.loop+"; ",e.length&&(r+="\n }"),r+="\n } ",lt.nonEnumShadows){for(r+="\n\n if (iterable !== objectProto) {\n var ctor = iterable.constructor,\n isProto = iterable === (ctor && ctor.prototype),\n className = iterable === stringProto ? stringClass : iterable === errorProto ? errorClass : toString.call(iterable),\n nonEnum = nonEnumProps[className];\n ", +k=0;k<7;k++)r+="\n index = '"+n.shadowedProps[k]+"';\n if ((!(isProto && nonEnum[index]) && hasOwnProperty.call(iterable, index))",n.useHas||(r+=" || (!nonEnum[index] && iterable[index] !== objectProto[index])"),r+=") {\n "+n.loop+";\n } ";r+="\n } "}return(n.array||lt.nonEnumArgs)&&(r+="\n}"),r+=n.bottom+";\nreturn result"};Xe||(rn=function(){function n(){}return function(r){if(Fn(r)){n.prototype=r;var t=new n;n.prototype=null}return t||e.Object()}}());var ft=Qe?function(n,r){ +Q.value=r,Qe(n,"__bindData__",Q),Q.value=null}:le;lt.argsClass||(_n=function(n){return n&&"object"==typeof n&&"number"==typeof n.length&&Ke.call(n,"callee")&&!Me.call(n,"callee")||!1});var st=Ye||function(n){return n&&"object"==typeof n&&"number"==typeof n.length&&$e.call(n)==B||!1},pt=hn({args:"object",init:"[]",top:"if (!(objectTypes[typeof object])) return result",loop:"result.push(index)"}),gt=rt?function(n){return Fn(n)?lt.enumPrototypes&&"function"==typeof n||lt.nonEnumArgs&&n.length&&_n(n)?pt(n):rt(n):[]; + +}:pt,ht={args:"collection, callback, thisArg",top:"callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)",array:"typeof length == 'number'",keys:gt,loop:"if (callback(iterable[index], index, collection) === false) return result"},vt={args:"object, source, guard",top:"var args = arguments,\n argsIndex = 0,\n argsLength = typeof guard == 'number' ? 2 : args.length;\nwhile (++argsIndex < argsLength) {\n iterable = args[argsIndex];\n if (iterable && objectTypes[typeof iterable]) {", +keys:gt,loop:"if (typeof result[index] == 'undefined') result[index] = iterable[index]",bottom:" }\n}"},yt={top:"if (!objectTypes[typeof iterable]) return result;\n"+ht.top,array:!1},bt={"&":"&","<":"<",">":">",'"':""","'":"'"},dt=An(bt),mt=Se("("+gt(dt).join("|")+")","g"),_t=Se("["+gt(bt).join("")+"]","g"),wt=hn(ht),xt=hn(vt,{top:vt.top.replace(";",";\nif (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);\n} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n callback = args[--argsLength];\n}"), +loop:"result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]"}),jt=hn(vt),kt=hn(ht,yt,{useHas:!1}),Ct=hn(ht,yt);$n(/x/)&&($n=function(n){return"function"==typeof n&&$e.call(n)==z});var Pt=ze?function(n){if(!n||$e.call(n)!=U||!lt.argsClass&&_n(n))return!1;var r=n.valueOf,e=bn(r)&&(e=ze(r))&&ze(e);return e?n==e||ze(n)==e:dn(n)}:dn,Et=pn(function(n,r,e){Ke.call(n,e)?n[e]++:n[e]=1}),Ot=pn(function(n,r,e){(Ke.call(n,e)?n[e]:n[e]=[]).push(r)}),St=pn(function(n,r,e){n[e]=r; + +}),At=ir,It=rr,Lt=bn(Lt=je.now)&&Lt||function(){return(new je).getTime()},Nt=8==ot(x+"08")?ot:function(n,r){return ot(zn(n)?n.replace(I,""):n,r||0)};return v.after=Wr,v.assign=xt,v.at=Yn,v.bind=qr,v.bindAll=zr,v.bindKey=Kr,v.chain=ye,v.compact=mr,v.compose=Ur,v.constant=ee,v.countBy=Et,v.create=jn,v.createCallback=te,v.curry=Mr,v.debounce=Vr,v.defaults=jt,v.defer=Gr,v.delay=Jr,v.difference=_r,v.filter=rr,v.flatten=kr,v.forEach=or,v.forEachRight=ur,v.forIn=kt,v.forInRight=Pn,v.forOwn=Ct,v.forOwnRight=En, +v.functions=On,v.groupBy=Ot,v.indexBy=St,v.initial=Pr,v.intersection=Er,v.invert=An,v.invoke=ar,v.keys=gt,v.map=ir,v.mapValues=Un,v.max=lr,v.memoize=Qr,v.merge=Mn,v.min=cr,v.omit=Vn,v.once=Xr,v.pairs=Gn,v.partial=Yr,v.partialRight=Zr,v.pick=Jn,v.pluck=At,v.property=ce,v.pull=Ar,v.range=Ir,v.reject=pr,v.remove=Lr,v.rest=Nr,v.shuffle=hr,v.sortBy=br,v.tap=be,v.throttle=ne,v.times=ge,v.toArray=dr,v.transform=Qn,v.union=Tr,v.uniq=Dr,v.values=Xn,v.where=It,v.without=$r,v.wrap=re,v.xor=Fr,v.zip=Br,v.zipObject=Hr, +v.collect=ir,v.drop=Nr,v.each=or,v.eachRight=ur,v.extend=xt,v.methods=On,v.object=Hr,v.select=rr,v.tail=Nr,v.unique=Dr,v.unzip=Br,ae(v),v.clone=wn,v.cloneDeep=xn,v.contains=Zn,v.escape=oe,v.every=nr,v.find=er,v.findIndex=wr,v.findKey=kn,v.findLast=tr,v.findLastIndex=xr,v.findLastKey=Cn,v.has=Sn,v.identity=ue,v.indexOf=Cr,v.isArguments=_n,v.isArray=st,v.isBoolean=In,v.isDate=Ln,v.isElement=Nn,v.isEmpty=Rn,v.isEqual=Tn,v.isFinite=Dn,v.isFunction=$n,v.isNaN=Bn,v.isNull=Hn,v.isNumber=Wn,v.isObject=Fn, +v.isPlainObject=Pt,v.isRegExp=qn,v.isString=zn,v.isUndefined=Kn,v.lastIndexOf=Sr,v.mixin=ae,v.noConflict=ie,v.noop=le,v.now=Lt,v.parseInt=Nt,v.random=fe,v.reduce=fr,v.reduceRight=sr,v.result=se,v.runInContext=g,v.size=vr,v.some=yr,v.sortedIndex=Rr,v.template=pe,v.unescape=he,v.uniqueId=ve,v.all=nr,v.any=yr,v.detect=er,v.findWhere=er,v.foldl=fr,v.foldr=sr,v.include=Zn,v.inject=fr,ae(function(){var n={};return Ct(v,function(r,e){v.prototype[e]||(n[e]=r)}),n}(),!1),v.first=jr,v.last=Or,v.sample=gr,v.take=jr, +v.head=jr,Ct(v,function(n,r){var e="sample"!==r;v.prototype[r]||(v.prototype[r]=function(r,t){var o=this.__chain__,u=n(this.__wrapped__,r,t);return o||null!=r&&(!t||e&&"function"==typeof r)?new y(u,o):u})}),v.VERSION="2.4.2",v.prototype.chain=de,v.prototype.toString=me,v.prototype.value=_e,v.prototype.valueOf=_e,wt(["join","pop","shift"],function(n){var r=Le[n];v.prototype[n]=function(){var n=this.__chain__,e=r.apply(this.__wrapped__,arguments);return n?new y(e,n):e}}),wt(["push","reverse","sort","unshift"],function(n){ +var r=Le[n];v.prototype[n]=function(){return r.apply(this.__wrapped__,arguments),this}}),wt(["concat","slice","splice"],function(n){var r=Le[n];v.prototype[n]=function(){return new y(r.apply(this.__wrapped__,arguments),this.__chain__)}}),lt.spliceObjects||wt(["pop","shift","splice"],function(n){var r=Le[n],e="splice"==n;v.prototype[n]=function(){var n=this.__chain__,t=this.__wrapped__,o=r.apply(t,arguments);return 0===t.length&&delete t[0],n||e?new y(o,n):o}}),v}var h,v=[],y=[],b=0,d={},m=+new Date+"",_=75,w=40,x=" \f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",j=/\b__p \+= '';/g,C=/\b(__p \+=) '' \+/g,P=/(__e\(.*?\)|\b__t\)) \+\n'';/g,E=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,O=/\w*$/,S=/^\s*function[ \n\r\t]+\w/,A=/<%=([\s\S]+?)%>/g,I=RegExp("^["+x+"]*0+(?=.$)"),L=/($^)/,N=/\bthis\b/,R=/['\n\r\t\u2028\u2029\\]/g,T=["Array","Boolean","Date","Error","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],D=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],$=0,F="[object Arguments]",B="[object Array]",H="[object Boolean]",W="[object Date]",q="[object Error]",z="[object Function]",K="[object Number]",U="[object Object]",M="[object RegExp]",V="[object String]",G={}; + +G[z]=!1,G[F]=G[B]=G[H]=G[W]=G[K]=G[U]=G[M]=G[V]=!0;var J={leading:!1,maxWait:0,trailing:!1},Q={configurable:!1,enumerable:!1,value:null,writable:!1},X={args:"",array:null,bottom:"",firstArg:"",init:"",keys:null,loop:"",shadowedProps:null,support:null,top:"",useHas:!1},Y={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},Z={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},nn=Y[typeof window]&&window||this,rn=Y[typeof exports]&&exports&&!exports.nodeType&&exports,en=Y[typeof module]&&module&&!module.nodeType&&module,tn=en&&en.exports===rn&&rn,on=Y[typeof global]&&global; + +!on||on.global!==on&&on.window!==on||(nn=on);var un=g();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(nn._=un,define(function(){return un})):rn&&en?tn?(en.exports=un)._=un:rn._=un:nn._=un}).call(this); \ No newline at end of file diff --git a/dist/lodash.js b/dist/lodash.js index d653e5aed7..3646090da2 100644 --- a/dist/lodash.js +++ b/dist/lodash.js @@ -1,11 +1,11 @@ /** * @license - * Lo-Dash 2.4.1 (Custom Build) + * Lo-Dash 2.4.2 (Custom Build) * Build: `lodash modern -o ./dist/lodash.js` * Copyright 2012-2013 The Dojo Foundation * Based on Underscore.js 1.5.2 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Available under MIT license */ ;(function() { @@ -1494,6 +1494,7 @@ var setBindData = !defineProperty ? noop : function(func, value) { descriptor.value = value; defineProperty(func, '__bindData__', descriptor); + descriptor.value = null; }; /** @@ -6139,7 +6140,7 @@ * debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl * * For more information on precompiling templates see: - * http://lodash.com/custom-builds + * https://lodash.com/custom-builds * * For more information on Chrome extension sandboxes see: * http://developer.chrome.com/stable/extensions/sandboxingEval.html @@ -6708,7 +6709,7 @@ * @memberOf _ * @type string */ - lodash.VERSION = '2.4.1'; + lodash.VERSION = '2.4.2'; // add "Chaining" functions to the wrapper lodash.prototype.chain = wrapperChain; diff --git a/dist/lodash.min.js b/dist/lodash.min.js index 85a9626340..dd1c643951 100644 --- a/dist/lodash.min.js +++ b/dist/lodash.min.js @@ -1,56 +1,87 @@ /** * @license - * Lo-Dash 2.4.1 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE + * Lo-Dash 2.4.2 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE * Build: `lodash modern -o ./dist/lodash.js` */ -;(function(){function n(n,t,e){e=(e||0)-1;for(var r=n?n.length:0;++ea||typeof i=="undefined")return 1;if(ie?0:e);++r=b&&i===n,l=[];if(f){var p=o(r);p?(i=t,r=p):f=false}for(;++ui(r,p)&&l.push(p);return f&&c(r),l}function ut(n,t,e,r){r=(r||0)-1;for(var u=n?n.length:0,o=[];++r=b&&f===n,h=u||v?a():s; -for(v&&(h=o(h),f=t);++if(h,y))&&((u||v)&&h.push(y),s.push(g))}return v?(l(h.k),c(h)):u&&l(h),s}function lt(n){return function(t,e,r){var u={};e=J.createCallback(e,r,3),r=-1;var o=t?t.length:0;if(typeof o=="number")for(;++re?Ie(0,o+e):e)||0,Te(n)?i=-1o&&(o=a)}}else t=null==t&&kt(n)?r:J.createCallback(t,e,3),St(n,function(n,e,r){e=t(n,e,r),e>u&&(u=e,o=n)});return o}function Dt(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=J.createCallback(t,r,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(e=n[++o]);++oarguments.length;return t=J.createCallback(t,r,4),Et(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)}),e}function Tt(n){var t=-1,e=n?n.length:0,r=Xt(typeof e=="number"?e:0);return St(n,function(n){var e=at(0,++t);r[t]=r[e],r[e]=n}),r}function Ft(n,t,e){var r;t=J.createCallback(t,e,3),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++er?Ie(0,u+r):r||0}else if(r)return r=zt(t,e),t[r]===e?r:-1;return n(t,e,r)}function qt(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=J.createCallback(t,e,3);++u>>1,e(n[r])e?0:e);++t=v; -m?(i&&(i=ve(i)),s=f,a=n.apply(l,o)):i||(i=_e(r,v))}return m&&c?c=ve(c):c||t===h||(c=_e(u,t)),e&&(m=true,a=n.apply(l,o)),!m||c||i||(o=l=null),a}}function Ut(n){return n}function Gt(n,t,e){var r=true,u=t&&bt(t);t&&(e||u.length)||(null==e&&(e=t),o=Q,t=n,n=J,u=bt(t)),false===e?r=false:wt(e)&&"chain"in e&&(r=e.chain);var o=n,i=dt(o);St(u,function(e){var u=n[e]=t[e];i&&(o.prototype[e]=function(){var t=this.__chain__,e=this.__wrapped__,i=[e];if(be.apply(i,arguments),i=u.apply(n,i),r||t){if(e===i&&wt(i))return this; -i=new o(i),i.__chain__=t}return i})})}function Ht(){}function Jt(n){return function(t){return t[n]}}function Qt(){return this.__wrapped__}e=e?Y.defaults(G.Object(),e,Y.pick(G,A)):G;var Xt=e.Array,Yt=e.Boolean,Zt=e.Date,ne=e.Function,te=e.Math,ee=e.Number,re=e.Object,ue=e.RegExp,oe=e.String,ie=e.TypeError,ae=[],fe=re.prototype,le=e._,ce=fe.toString,pe=ue("^"+oe(ce).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),se=te.ceil,ve=e.clearTimeout,he=te.floor,ge=ne.prototype.toString,ye=vt(ye=re.getPrototypeOf)&&ye,me=fe.hasOwnProperty,be=ae.push,_e=e.setTimeout,de=ae.splice,we=ae.unshift,je=function(){try{var n={},t=vt(t=re.defineProperty)&&t,e=t(n,n,n)&&t -}catch(r){}return e}(),ke=vt(ke=re.create)&&ke,xe=vt(xe=Xt.isArray)&&xe,Ce=e.isFinite,Oe=e.isNaN,Ne=vt(Ne=re.keys)&&Ne,Ie=te.max,Se=te.min,Ee=e.parseInt,Re=te.random,Ae={};Ae[$]=Xt,Ae[T]=Yt,Ae[F]=Zt,Ae[B]=ne,Ae[q]=re,Ae[W]=ee,Ae[z]=ue,Ae[P]=oe,Q.prototype=J.prototype;var De=J.support={};De.funcDecomp=!vt(e.a)&&E.test(s),De.funcNames=typeof ne.name=="string",J.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:N,variable:"",imports:{_:J}},ke||(nt=function(){function n(){}return function(t){if(wt(t)){n.prototype=t; -var r=new n;n.prototype=null}return r||e.Object()}}());var $e=je?function(n,t){M.value=t,je(n,"__bindData__",M)}:Ht,Te=xe||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&ce.call(n)==$||false},Fe=Ne?function(n){return wt(n)?Ne(n):[]}:H,Be={"&":"&","<":"<",">":">",'"':""","'":"'"},We=_t(Be),qe=ue("("+Fe(We).join("|")+")","g"),ze=ue("["+Fe(Be).join("")+"]","g"),Pe=ye?function(n){if(!n||ce.call(n)!=q)return false;var t=n.valueOf,e=vt(t)&&(e=ye(t))&&ye(e);return e?n==e||ye(n)==e:ht(n) -}:ht,Ke=lt(function(n,t,e){me.call(n,e)?n[e]++:n[e]=1}),Le=lt(function(n,t,e){(me.call(n,e)?n[e]:n[e]=[]).push(t)}),Me=lt(function(n,t,e){n[e]=t}),Ve=Rt,Ue=vt(Ue=Zt.now)&&Ue||function(){return(new Zt).getTime()},Ge=8==Ee(d+"08")?Ee:function(n,t){return Ee(kt(n)?n.replace(I,""):n,t||0)};return J.after=function(n,t){if(!dt(t))throw new ie;return function(){return 1>--n?t.apply(this,arguments):void 0}},J.assign=U,J.at=function(n){for(var t=arguments,e=-1,r=ut(t,true,false,1),t=t[2]&&t[2][t[1]]===n?1:r.length,u=Xt(t);++e=b&&o(r?e[r]:s)))}var p=e[0],h=-1,g=p?p.length:0,y=[];n:for(;++h(m?t(m,v):f(s,v))){for(r=u,(m||s).push(v);--r;)if(m=i[r],0>(m?t(m,v):f(e[r],v)))continue n;y.push(v)}}for(;u--;)(m=i[u])&&c(m);return l(i),l(s),y},J.invert=_t,J.invoke=function(n,t){var e=p(arguments,2),r=-1,u=typeof t=="function",o=n?n.length:0,i=Xt(typeof o=="number"?o:0);return St(n,function(n){i[++r]=(u?t:n[t]).apply(n,e)}),i},J.keys=Fe,J.map=Rt,J.mapValues=function(n,t,e){var r={}; -return t=J.createCallback(t,e,3),h(n,function(n,e,u){r[e]=t(n,e,u)}),r},J.max=At,J.memoize=function(n,t){function e(){var r=e.cache,u=t?t.apply(this,arguments):m+arguments[0];return me.call(r,u)?r[u]:r[u]=n.apply(this,arguments)}if(!dt(n))throw new ie;return e.cache={},e},J.merge=function(n){var t=arguments,e=2;if(!wt(n))return n;if("number"!=typeof t[2]&&(e=t.length),3e?Ie(0,r+e):Se(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},J.mixin=Gt,J.noConflict=function(){return e._=le,this},J.noop=Ht,J.now=Ue,J.parseInt=Ge,J.random=function(n,t,e){var r=null==n,u=null==t;return null==e&&(typeof n=="boolean"&&u?(e=n,n=1):u||typeof t!="boolean"||(e=t,u=true)),r&&u&&(t=1),n=+n||0,u?(t=n,n=0):t=+t||0,e||n%1||t%1?(e=Re(),Se(n+e*(t-n+parseFloat("1e-"+((e+"").length-1))),t)):at(n,t) -},J.reduce=Dt,J.reduceRight=$t,J.result=function(n,t){if(n){var e=n[t];return dt(e)?n[t]():e}},J.runInContext=s,J.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Fe(n).length},J.some=Ft,J.sortedIndex=zt,J.template=function(n,t,e){var r=J.templateSettings;n=oe(n||""),e=_({},e,r);var u,o=_({},e.imports,r.imports),r=Fe(o),o=xt(o),a=0,f=e.interpolate||S,l="__p+='",f=ue((e.escape||S).source+"|"+f.source+"|"+(f===N?x:S).source+"|"+(e.evaluate||S).source+"|$","g");n.replace(f,function(t,e,r,o,f,c){return r||(r=o),l+=n.slice(a,c).replace(R,i),e&&(l+="'+__e("+e+")+'"),f&&(u=true,l+="';"+f+";\n__p+='"),r&&(l+="'+((__t=("+r+"))==null?'':__t)+'"),a=c+t.length,t -}),l+="';",f=e=e.variable,f||(e="obj",l="with("+e+"){"+l+"}"),l=(u?l.replace(w,""):l).replace(j,"$1").replace(k,"$1;"),l="function("+e+"){"+(f?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";try{var c=ne(r,"return "+l).apply(v,o)}catch(p){throw p.source=l,p}return t?c(t):(c.source=l,c)},J.unescape=function(n){return null==n?"":oe(n).replace(qe,gt)},J.uniqueId=function(n){var t=++y;return oe(null==n?"":n)+t -},J.all=Ot,J.any=Ft,J.detect=It,J.findWhere=It,J.foldl=Dt,J.foldr=$t,J.include=Ct,J.inject=Dt,Gt(function(){var n={};return h(J,function(t,e){J.prototype[e]||(n[e]=t)}),n}(),false),J.first=Bt,J.last=function(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;for(t=J.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n?n[u-1]:v;return p(n,Ie(0,u-r))},J.sample=function(n,t,e){return n&&typeof n.length!="number"&&(n=xt(n)),null==t||e?n?n[at(0,n.length-1)]:v:(n=Tt(n),n.length=Se(Ie(0,t),n.length),n) -},J.take=Bt,J.head=Bt,h(J,function(n,t){var e="sample"!==t;J.prototype[t]||(J.prototype[t]=function(t,r){var u=this.__chain__,o=n(this.__wrapped__,t,r);return u||null!=t&&(!r||e&&typeof t=="function")?new Q(o,u):o})}),J.VERSION="2.4.1",J.prototype.chain=function(){return this.__chain__=true,this},J.prototype.toString=function(){return oe(this.__wrapped__)},J.prototype.value=Qt,J.prototype.valueOf=Qt,St(["join","pop","shift"],function(n){var t=ae[n];J.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments); -return n?new Q(e,n):e}}),St(["push","reverse","sort","unshift"],function(n){var t=ae[n];J.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),St(["concat","slice","splice"],function(n){var t=ae[n];J.prototype[n]=function(){return new Q(t.apply(this.__wrapped__,arguments),this.__chain__)}}),J}var v,h=[],g=[],y=0,m=+new Date+"",b=75,_=40,d=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",w=/\b__p\+='';/g,j=/\b(__p\+=)''\+/g,k=/(__e\(.*?\)|\b__t\))\+'';/g,x=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,C=/\w*$/,O=/^\s*function[ \n\r\t]+\w/,N=/<%=([\s\S]+?)%>/g,I=RegExp("^["+d+"]*0+(?=.$)"),S=/($^)/,E=/\bthis\b/,R=/['\n\r\t\u2028\u2029\\]/g,A="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setTimeout".split(" "),D="[object Arguments]",$="[object Array]",T="[object Boolean]",F="[object Date]",B="[object Function]",W="[object Number]",q="[object Object]",z="[object RegExp]",P="[object String]",K={}; -K[B]=false,K[D]=K[$]=K[T]=K[F]=K[W]=K[q]=K[z]=K[P]=true;var L={leading:false,maxWait:0,trailing:false},M={configurable:false,enumerable:false,value:null,writable:false},V={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},U={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},G=V[typeof window]&&window||this,H=V[typeof exports]&&exports&&!exports.nodeType&&exports,J=V[typeof module]&&module&&!module.nodeType&&module,Q=J&&J.exports===H&&H,X=V[typeof global]&&global;!X||X.global!==X&&X.window!==X||(G=X); -var Y=s();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(G._=Y, define(function(){return Y})):H&&J?Q?(J.exports=Y)._=Y:H._=Y:G._=Y}).call(this); \ No newline at end of file +;(function(){function n(n,r,t){for(var e=(t||0)-1,u=n?n.length:0;++e-1?0:-1:r?0:-1}function t(n){var r=this.cache,t=typeof n;if("boolean"==t||null==n)r[n]=!0;else{"number"!=t&&"string"!=t&&(t="object");var e="number"==t?n:m+n,u=r[t]||(r[t]={});"object"==t?(u[e]||(u[e]=[])).push(n):u[e]=!0; + +}}function e(n){return n.charCodeAt(0)}function u(n,r){for(var t=n.criteria,e=r.criteria,u=-1,o=t.length;++ui||"undefined"==typeof a)return 1;if(a=b&&a===n,l=[]; + +if(f){var p=o(e);p?(a=r,e=p):f=!1}for(;++u-1:v});return u.pop(),o.pop(),_&&(l(u),l(o)),a}function tn(n,r,t,e,u){(Yt(r)?Xn:fe)(r,function(r,o){ +var a,i,f=r,l=n[o];if(r&&((i=Yt(r))||le(r))){for(var c=e.length;c--;)if(a=e[c]==r){l=u[c];break}if(!a){var p;t&&(f=t(l,r),(p="undefined"!=typeof f)&&(l=f)),p||(l=i?Yt(l)?l:[]:le(l)?l:{}),e.push(r),u.push(l),p||tn(l,r,t,e,u)}}else t&&(f=t(l,r),"undefined"==typeof f&&(f=r)),"undefined"!=typeof f&&(l=f);n[o]=l})}function en(n,r){return n+St(Ht()*(r-n+1))}function un(t,e,u){var a=-1,f=ln(),p=t?t.length:0,s=[],v=!e&&p>=b&&f===n,h=u||v?i():s;if(v){var g=o(h);f=r,h=g}for(;++a3&&"function"==typeof r[t-2])var e=Q(r[--t-1],r[t--],2);else t>2&&"function"==typeof r[t-1]&&(e=r[--t]);for(var u=p(arguments,1,t),o=-1,a=i(),f=i();++o-1:"number"==typeof o?a=(Fn(n)?n.indexOf(r,t):u(n,r,t))>-1:fe(n,function(n){return++eo&&(o=f)}else r=null==r&&Fn(n)?e:h.createCallback(r,t,3),Xn(n,function(n,t,e){var a=r(n,t,e);a>u&&(u=a,o=n)});return o; + +}function tr(n,r,t){var u=1/0,o=u;if("function"!=typeof r&&t&&t[r]===n&&(r=null),null==r&&Yt(n))for(var a=-1,i=n.length;++a=b&&o(e?t[e]:s)))}var h=t[0],g=-1,y=h?h.length:0,m=[];n:for(;++g>>1;t(n[a])1?arguments:arguments[0],r=-1,t=n?rr(ve(n,"length")):0,e=ht(t<0?0:t);++r2?an(n,17,p(arguments,2),null,r):an(n,1,null,null,r)}function Fr(n){for(var r=arguments.length>1?nn(arguments,!0,!1,1):wn(n),t=-1,e=r.length;++t2?an(r,19,p(arguments,2),null,n):an(r,3,null,null,n); + +}function Wr(){for(var n=arguments,r=n.length;r--;)if(!In(n[r]))throw new kt;return function(){for(var r=arguments,t=n.length;t--;)r=[n[t].apply(this,r)];return r[0]}}function qr(n,r){return r="number"==typeof r?r:+r||n.length,an(n,4,null,null,null,r)}function zr(n,r,t){var e,u,o,a,i,f,l,c=0,p=!1,s=!0;if(!In(n))throw new kt;if(r=Mt(0,r)||0,t===!0){var h=!0;s=!1}else Sn(t)&&(h=t.leading,p="maxWait"in t&&(Mt(r,t.maxWait)||0),s="trailing"in t?t.trailing:s);var g=function(){var t=r-(ge()-a);if(t>0)f=Ft(g,t); +else{u&&It(u);var p=l;u=f=l=v,p&&(c=ge(),o=n.apply(i,e),f||u||(e=i=null))}},y=function(){f&&It(f),u=f=l=v,(s||p!==r)&&(c=ge(),o=n.apply(i,e),f||u||(e=i=null))};return function(){if(e=arguments,a=ge(),i=this,l=s&&(f||!h),p===!1)var t=h&&!f;else{u||h||(c=a);var v=p-(a-c),m=v<=0;m?(u&&(u=It(u)),c=a,o=n.apply(i,e)):u||(u=Ft(y,v))}return m&&f?f=It(f):f||r===p||(f=Ft(g,r)),t&&(m=!0,o=n.apply(i,e)),!m||f||u||(e=i=null),o}}function Lr(n){if(!In(n))throw new kt;var r=p(arguments,1);return Ft(function(){n.apply(v,r); + +},1)}function Pr(n,r){if(!In(n))throw new kt;var t=p(arguments,2);return Ft(function(){n.apply(v,t)},r)}function Kr(n,r){if(!In(n))throw new kt;var t=function(){var e=t.cache,u=r?r.apply(this,arguments):m+arguments[0];return Tt.call(e,u)?e[u]:e[u]=n.apply(this,arguments)};return t.cache={},t}function Ur(n){var r,t;if(!In(n))throw new kt;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}}function Mr(n){return an(n,16,p(arguments,1))}function Vr(n){return an(n,32,null,p(arguments,1)); + +}function Gr(n,r,t){var e=!0,u=!0;if(!In(n))throw new kt;return t===!1?e=!1:Sn(t)&&(e="leading"in t?t.leading:e,u="trailing"in t?t.trailing:u),U.leading=e,U.maxWait=r,U.trailing=u,zr(n,r,U)}function Hr(n,r){return an(r,16,[n])}function Jr(n){return function(){return n}}function Qr(n,r,t){var e=typeof n;if(null==n||"function"==e)return Q(n,r,t);if("object"!=e)return tt(n);var u=ne(n),o=u[0],a=n[o];return 1!=u.length||a!==a||Sn(a)?function(r){for(var t=u.length,e=!1;t--&&(e=rn(r[u[t]],n[u[t]],null,!0));); +return e}:function(n){var r=n[o];return a===r&&(0!==a||1/a==1/r)}}function Xr(n){return null==n?"":jt(n).replace(ue,fn)}function Yr(n){return n}function Zr(n,r,t){var e=!0,u=r&&wn(r);r&&(t||u.length)||(null==t&&(t=r),o=g,r=n,n=h,u=wn(r)),t===!1?e=!1:Sn(t)&&"chain"in t&&(e=t.chain);var o=n,a=In(o);Xn(u,function(t){var u=n[t]=r[t];a&&(o.prototype[t]=function(){var r=this.__chain__,t=this.__wrapped__,a=[t];$t.apply(a,arguments);var i=u.apply(n,a);if(e||r){if(t===i&&Sn(i))return this;i=new o(i),i.__chain__=r; + +}return i})})}function nt(){return t._=Ot,this}function rt(){}function tt(n){return function(r){return r[n]}}function et(n,r,t){var e=null==n,u=null==r;if(null==t&&("boolean"==typeof n&&u?(t=n,n=1):u||"boolean"!=typeof r||(t=r,u=!0)),e&&u&&(r=1),n=+n||0,u?(r=n,n=0):r=+r||0,t||n%1||r%1){var o=Ht();return Vt(n+o*(r-n+parseFloat("1e-"+((o+"").length-1))),r)}return en(n,r)}function ut(n,r){if(n){var t=n[r];return In(t)?n[r]():t}}function ot(n,r,t){var e=h.templateSettings;n=jt(n||""),t=ae({},t,e);var u,o=ae({},t.imports,e.imports),i=ne(o),f=Un(o),l=0,c=t.interpolate||E,p="__p += '",s=wt((t.escape||E).source+"|"+c.source+"|"+(c===N?x:E).source+"|"+(t.evaluate||E).source+"|$","g"); + +n.replace(s,function(r,t,e,o,i,f){return e||(e=o),p+=n.slice(l,f).replace(S,a),t&&(p+="' +\n__e("+t+") +\n'"),i&&(u=!0,p+="';\n"+i+";\n__p += '"),e&&(p+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),l=f+r.length,r}),p+="';\n";var g=t.variable,y=g;y||(g="obj",p="with ("+g+") {\n"+p+"\n}\n"),p=(u?p.replace(w,""):p).replace(j,"$1").replace(k,"$1;"),p="function("+g+") {\n"+(y?"":g+" || ("+g+" = {});\n")+"var __t, __p = '', __e = _.escape"+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}"; + +var m="\n/*\n//# sourceURL="+(t.sourceURL||"/lodash/template/source["+D++ +"]")+"\n*/";try{var b=mt(i,"return "+p+m).apply(v,f)}catch(_){throw _.source=p,_}return r?b(r):(b.source=p,b)}function at(n,r,t){n=(n=+n)>-1?n:0;var e=-1,u=ht(n);for(r=Q(r,t,1);++e/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:N, +variable:"",imports:{_:h}},zt||(J=function(){function n(){}return function(r){if(Sn(r)){n.prototype=r;var e=new n;n.prototype=null}return e||t.Object()}}());var Xt=qt?function(n,r){M.value=r,qt(n,"__bindData__",M),M.value=null}:rt,Yt=Lt||function(n){return n&&"object"==typeof n&&"number"==typeof n.length&&Nt.call(n)==$||!1},Zt=function(n){var r,t=n,e=[];if(!t)return e;if(!V[typeof n])return e;for(r in t)Tt.call(t,r)&&e.push(r);return e},ne=Ut?function(n){return Sn(n)?Ut(n):[]}:Zt,re={"&":"&", +"<":"<",">":">",'"':""","'":"'"},te=kn(re),ee=wt("("+ne(te).join("|")+")","g"),ue=wt("["+ne(re).join("")+"]","g"),oe=function(n,r,t){var e,u=n,o=u;if(!u)return o;var a=arguments,i=0,f="number"==typeof t?2:a.length;if(f>3&&"function"==typeof a[f-2])var l=Q(a[--f-1],a[f--],2);else f>2&&"function"==typeof a[f-1]&&(l=a[--f]);for(;++i/g,R=RegExp("^["+d+"]*0+(?=.$)"),E=/($^)/,I=/\bthis\b/,S=/['\n\r\t\u2028\u2029\\]/g,A=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],D=0,T="[object Arguments]",$="[object Array]",F="[object Boolean]",B="[object Date]",W="[object Function]",q="[object Number]",z="[object Object]",L="[object RegExp]",P="[object String]",K={}; + +K[W]=!1,K[T]=K[$]=K[F]=K[B]=K[q]=K[z]=K[L]=K[P]=!0;var U={leading:!1,maxWait:0,trailing:!1},M={configurable:!1,enumerable:!1,value:null,writable:!1},V={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},G={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},H=V[typeof window]&&window||this,J=V[typeof exports]&&exports&&!exports.nodeType&&exports,Q=V[typeof module]&&module&&!module.nodeType&&module,X=Q&&Q.exports===J&&J,Y=V[typeof global]&&global;!Y||Y.global!==Y&&Y.window!==Y||(H=Y); + +var Z=s();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(H._=Z,define(function(){return Z})):J&&Q?X?(Q.exports=Z)._=Z:J._=Z:H._=Z}).call(this); \ No newline at end of file diff --git a/dist/lodash.underscore.js b/dist/lodash.underscore.js index 0c84471f5d..6557daf101 100644 --- a/dist/lodash.underscore.js +++ b/dist/lodash.underscore.js @@ -1,11 +1,11 @@ /** * @license - * Lo-Dash 2.4.1 (Custom Build) + * Lo-Dash 2.4.2 (Custom Build) * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js` * Copyright 2012-2013 The Dojo Foundation * Based on Underscore.js 1.5.2 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Available under MIT license */ ;(function() { @@ -4458,7 +4458,7 @@ * debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl * * For more information on precompiling templates see: - * http://lodash.com/custom-builds + * https://lodash.com/custom-builds * * For more information on Chrome extension sandboxes see: * http://developer.chrome.com/stable/extensions/sandboxingEval.html @@ -4909,7 +4909,7 @@ * @memberOf _ * @type string */ - lodash.VERSION = '2.4.1'; + lodash.VERSION = '2.4.2'; // add "Chaining" functions to the wrapper lodash.prototype.chain = wrapperChain; diff --git a/dist/lodash.underscore.min.js b/dist/lodash.underscore.min.js index e659124478..19c4ce6c9d 100644 --- a/dist/lodash.underscore.min.js +++ b/dist/lodash.underscore.min.js @@ -1,6 +1,6 @@ /** * @license - * Lo-Dash 2.4.1 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE + * Lo-Dash 2.4.2 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js` */ ;(function(){function n(n,r,t){t=(t||0)-1;for(var e=n?n.length:0;++tf||typeof i=="undefined")return 1;if(it?0:t);++et?Mr(0,e+t):$r(t,e-1))+1);e--;)if(n[e]===r)return e; return-1},u.mixin=Z,u.noConflict=function(){return mr._=Tr,this},u.random=function(n,r){return null==n&&null==r&&(r=1),n=+n||0,null==r?(r=n,n=0):r=+r||0,n+Sr(Wr()*(r-n+1))},u.reduce=W,u.reduceRight=z,u.result=function(n,r){if(n){var t=n[r];return A(t)?n[r]():t}},u.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:Ur(n).length},u.some=P,u.sortedIndex=J,u.template=function(n,r,e){var o=u,i=o.templateSettings;n=(n||"")+"",e=j({},e,i);var f=0,a="__p+='",i=e.variable;n.replace(RegExp((e.escape||or).source+"|"+(e.interpolate||or).source+"|"+(e.evaluate||or).source+"|$","g"),function(r,e,u,o,i){return a+=n.slice(f,i).replace(ir,t),e&&(a+="'+_.escape("+e+")+'"),o&&(a+="';"+o+";\n__p+='"),u&&(a+="'+((__t=("+u+"))==null?'':__t)+'"),f=i+r.length,r }),a+="';",i||(i="obj",a="with("+i+"||{}){"+a+"}"),a="function("+i+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+a+"return __p}";try{var l=Function("_","return "+a)(o)}catch(c){throw c.source=a,c}return r?l(r):(l.source=a,l)},u.unescape=function(n){return null==n?"":(n+"").replace(Hr,d)},u.uniqueId=function(n){var r=++tr+"";return n?n+r:r},u.all=B,u.any=P,u.detect=q,u.findWhere=function(n,r){return U(n,r,true)},u.foldl=W,u.foldr=z,u.include=k,u.inject=W,u.first=V,u.last=function(n,r,t){var u=0,o=n?n.length:0; -if(typeof r!="number"&&null!=r){var i=o;for(r=X(r,t,3);i--&&r(n[i],i,n);)u++}else if(u=r,null==u||t)return n?n[o-1]:rr;return e(n,Mr(0,o-u))},u.sample=function(n,r,t){return n&&typeof n.length!="number"&&(n=R(n)),null==r||t?n?n[0+Sr(Wr()*(n.length-1-0+1))]:rr:(n=C(n),n.length=$r(Mr(0,r),n.length),n)},u.take=V,u.head=V,Z(u),u.VERSION="2.4.1",u.prototype.chain=function(){return this.__chain__=true,this},u.prototype.value=function(){return this.__wrapped__},D("pop push reverse shift sort splice unshift".split(" "),function(n){var r=jr[n]; +if(typeof r!="number"&&null!=r){var i=o;for(r=X(r,t,3);i--&&r(n[i],i,n);)u++}else if(u=r,null==u||t)return n?n[o-1]:rr;return e(n,Mr(0,o-u))},u.sample=function(n,r,t){return n&&typeof n.length!="number"&&(n=R(n)),null==r||t?n?n[0+Sr(Wr()*(n.length-1-0+1))]:rr:(n=C(n),n.length=$r(Mr(0,r),n.length),n)},u.take=V,u.head=V,Z(u),u.VERSION="2.4.2",u.prototype.chain=function(){return this.__chain__=true,this},u.prototype.value=function(){return this.__wrapped__},D("pop push reverse shift sort splice unshift".split(" "),function(n){var r=jr[n]; u.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),zr.spliceObjects||0!==n.length||delete n[0],this}}),D(["concat","join","slice"],function(n){var r=jr[n];u.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new o(n),n.__chain__=true),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(mr._=u, define(function(){return u})):_r&&dr?br?(dr.exports=u)._=u:_r._=u:mr._=u}).call(this); \ No newline at end of file diff --git a/doc/README.md b/doc/README.md index 794cd27e07..e5bf07ebac 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,11 +1,10 @@ -# Lo-Dash v2.4.1 - - +# Lo-Dash v2.4.2 + -## `Arrays` +## `Arrays` * `_.compact` * `_.difference` * `_.drop` -> `rest` @@ -38,7 +37,6 @@ - ## `Chaining` @@ -52,7 +50,6 @@ - ## `Collections` @@ -97,7 +94,6 @@ - ## `Functions` @@ -107,7 +103,7 @@ * `_.bindKey` * `_.compose` * `_.curry` -* `_.debounce` +* `_.debounce` * `_.defer` * `_.delay` * `_.memoize` @@ -119,7 +115,6 @@ - ## `Objects` @@ -167,11 +162,9 @@ - ## `Utilities` -* `_.now` * `_.constant` * `_.createCallback` * `_.escape` @@ -179,19 +172,19 @@ * `_.mixin` * `_.noConflict` * `_.noop` +* `_.now` * `_.parseInt` * `_.property` * `_.random` * `_.result` * `_.runInContext` -* `_.template` +* `_.template` * `_.times` * `_.unescape` * `_.uniqueId` - ## `Methods` @@ -199,7 +192,6 @@ - ## `Properties` @@ -219,18 +211,15 @@ * `_.templateSettings` * `_.templateSettings.escape` * `_.templateSettings.evaluate` +* `_.templateSettings.imports` * `_.templateSettings.interpolate` * `_.templateSettings.variable` -* `_.templateSettings.imports` - - - - + @@ -239,62 +228,66 @@ ### `_.compact(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L4479 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L4480 "View in source") [Ⓣ][1] -Creates an array with all falsey values removed. The values `false`, `null`, `0`, `""`, `undefined`, and `NaN` are all falsey. +Creates an array with all falsey values removed. The values `false`, `null`, +`0`, `""`, `undefined`, and `NaN` are all falsey. #### Arguments 1. `array` *(Array)*: The array to compact. #### Returns -*(Array)*: Returns a new array of filtered values. +*(Array)*: Returns a new array of filtered values. #### Example ```js _.compact([0, 1, false, 2, '', 3]); // => [1, 2, 3] ``` - * * * - ### `_.difference(array, [values])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L4508 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L4509 "View in source") [Ⓣ][1] -Creates an array excluding all values of the provided arrays using strict equality for comparisons, i.e. `===`. +Creates an array excluding all values of the provided arrays using strict +equality for comparisons, i.e. `===`. #### Arguments 1. `array` *(Array)*: The array to process. 2. `[values]` *(...Array)*: The arrays of values to exclude. #### Returns -*(Array)*: Returns a new array of filtered values. +*(Array)*: Returns a new array of filtered values. #### Example ```js _.difference([1, 2, 3, 4, 5], [5, 2, 10]); // => [1, 3, 4] ``` - * * * - ### `_.findIndex(array, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L4553 "View in source") [Ⓣ][1] - -This method is like `_.find` except that it returns the index of the first element that passes the callback check, instead of the element itself. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L4554 "View in source") [Ⓣ][1] + +This method is like `_.find` except that it returns the index of the first +element that passes the callback check, instead of the element itself. +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Arguments 1. `array` *(Array)*: The array to search. @@ -302,7 +295,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(number)*: Returns the index of the found element, else `-1`. +*(number)*: Returns the index of the found element, else `-1`. #### Example ```js @@ -325,22 +318,26 @@ _.findIndex(characters, { 'age': 36 }); _.findIndex(characters, 'blocked'); // => 1 ``` - * * * - ### `_.findLastIndex(array, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L4607 "View in source") [Ⓣ][1] - -This method is like `_.findIndex` except that it iterates over elements of a `collection` from right to left. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L4608 "View in source") [Ⓣ][1] + +This method is like `_.findIndex` except that it iterates over elements +of a `collection` from right to left. +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Arguments 1. `array` *(Array)*: The array to search. @@ -348,7 +345,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(number)*: Returns the index of the found element, else `-1`. +*(number)*: Returns the index of the found element, else `-1`. #### Example ```js @@ -371,22 +368,28 @@ _.findLastIndex(characters, { 'age': 36 }); _.findLastIndex(characters, 'blocked'); // => 2 ``` - * * * - ### `_.first(array, [callback], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L4669 "View in source") [Ⓣ][1] - -Gets the first element or first `n` elements of an array. If a callback is provided elements at the beginning of the array are returned as long as the callback returns truey. The callback is bound to `thisArg` and invoked with three arguments; *(value, index, array)*. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L4670 "View in source") [Ⓣ][1] + +Gets the first element or first `n` elements of an array. If a callback +is provided elements at the beginning of the array are returned as long +as the callback returns truey. The callback is bound to `thisArg` and +invoked with three arguments; (value, index, array). +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Aliases *_.head, _.take* @@ -397,7 +400,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(*)*: Returns the first element(s) of `array`. +*(*)*: Returns the first element(s) of `array`. #### Example ```js @@ -426,22 +429,29 @@ _.first(characters, 'blocked'); _.pluck(_.first(characters, { 'employer': 'slate' }), 'name'); // => ['barney', 'fred'] ``` - * * * - ### `_.flatten(array, [isShallow=false], [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L4729 "View in source") [Ⓣ][1] - -Flattens a nested array *(the nesting can be to any depth)*. If `isShallow` is truey, the array will only be flattened a single level. If a callback is provided each element of the array is passed through the callback before flattening. The callback is bound to `thisArg` and invoked with three arguments; *(value, index, array)*. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L4730 "View in source") [Ⓣ][1] + +Flattens a nested array (the nesting can be to any depth). If `isShallow` +is truey, the array will only be flattened a single level. If a callback +is provided each element of the array is passed through the callback before +flattening. The callback is bound to `thisArg` and invoked with three +arguments; (value, index, array). +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Arguments 1. `array` *(Array)*: The array to flatten. @@ -450,7 +460,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 4. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Array)*: Returns a new flattened array. +*(Array)*: Returns a new flattened array. #### Example ```js @@ -469,18 +479,18 @@ var characters = [ _.flatten(characters, 'pets'); // => ['hoppy', 'baby puss', 'dino'] ``` - * * * - ### `_.indexOf(array, value, [fromIndex=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L4766 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L4767 "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 providing `true` for `fromIndex` will run a faster binary search. +Gets the index at which the first occurrence of `value` is found using +strict equality for comparisons, i.e. `===`. If the array is already sorted +providing `true` for `fromIndex` will run a faster binary search. #### Arguments 1. `array` *(Array)*: The array to search. @@ -488,7 +498,7 @@ Gets the index at which the first occurrence of `value` is found using strict eq 3. `[fromIndex=0]` *(boolean|number)*: The index to search from or `true` to perform a binary search on a sorted array. #### Returns -*(number)*: Returns the index of the matched value or `-1`. +*(number)*: Returns the index of the matched value or `-1`. #### Example ```js @@ -501,22 +511,28 @@ _.indexOf([1, 2, 3, 1, 2, 3], 2, 3); _.indexOf([1, 1, 2, 2, 3, 3], 2, true); // => 2 ``` - * * * - ### `_.initial(array, [callback=1], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L4827 "View in source") [Ⓣ][1] - -Gets all but the last element or last `n` elements of an array. If a callback is provided elements at the end of the array are excluded from the result as long as the callback returns truey. The callback is bound to `thisArg` and invoked with three arguments; *(value, index, array)*. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L4828 "View in source") [Ⓣ][1] + +Gets all but the last element or last `n` elements of an array. If a +callback is provided elements at the end of the array are excluded from +the result as long as the callback returns truey. The callback is bound +to `thisArg` and invoked with three arguments; (value, index, array). +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Arguments 1. `array` *(Array)*: The array to query. @@ -524,7 +540,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Array)*: Returns a slice of `array`. +*(Array)*: Returns a slice of `array`. #### Example ```js @@ -553,46 +569,51 @@ _.initial(characters, 'blocked'); _.pluck(_.initial(characters, { 'employer': 'na' }), 'name'); // => ['barney', 'fred'] ``` - * * * - ### `_.intersection([array])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L4857 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L4858 "View in source") [Ⓣ][1] -Creates an array of unique values present in all provided arrays using strict equality for comparisons, i.e. `===`. +Creates an array of unique values present in all provided arrays using +strict equality for comparisons, i.e. `===`. #### Arguments 1. `[array]` *(...Array)*: The arrays to inspect. #### Returns -*(Array)*: Returns an array of shared values. +*(Array)*: Returns an array of shared values. #### Example ```js _.intersection([1, 2, 3], [5, 2, 1, 4], [2, 1]); // => [1, 2] ``` - * * * - ### `_.last(array, [callback], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L4957 "View in source") [Ⓣ][1] - -Gets the last element or last `n` elements of an array. If a callback is provided elements at the end of the array are returned as long as the callback returns truey. The callback is bound to `thisArg` and invoked with three arguments; *(value, index, array)*. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L4958 "View in source") [Ⓣ][1] + +Gets the last element or last `n` elements of an array. If a callback is +provided elements at the end of the array are returned as long as the +callback returns truey. The callback is bound to `thisArg` and invoked +with three arguments; (value, index, array). +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Arguments 1. `array` *(Array)*: The array to query. @@ -600,7 +621,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(*)*: Returns the last element(s) of `array`. +*(*)*: Returns the last element(s) of `array`. #### Example ```js @@ -629,22 +650,27 @@ _.pluck(_.last(characters, 'blocked'), 'name'); _.last(characters, { 'employer': 'na' }); // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] ``` - * * * - ### `_.lastIndexOf(array, value, [fromIndex=array.length-1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5003 "View in source") [Ⓣ][1] - -Gets the index at which the last occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the offset from the end of the collection. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5004 "View in source") [Ⓣ][1] + +Gets the index at which the last occurrence of `value` is found using strict +equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used +as the offset from the end of the collection. +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Arguments 1. `array` *(Array)*: The array to search. @@ -652,7 +678,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[fromIndex=array.length-1]` *(number)*: The index to search from. #### Returns -*(number)*: Returns the index of the matched value or `-1`. +*(number)*: Returns the index of the matched value or `-1`. #### Example ```js @@ -662,25 +688,24 @@ _.lastIndexOf([1, 2, 3, 1, 2, 3], 2); _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3); // => 1 ``` - * * * - ### `_.pull(array, [value])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5033 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5034 "View in source") [Ⓣ][1] -Removes all provided values from the given array using strict equality for comparisons, i.e. `===`. +Removes all provided values from the given array using strict equality for +comparisons, i.e. `===`. #### Arguments 1. `array` *(Array)*: The array to modify. 2. `[value]` *(...*)*: The values to remove. #### Returns -*(Array)*: Returns `array`. +*(Array)*: Returns `array`. #### Example ```js @@ -689,18 +714,18 @@ _.pull(array, 2, 3); console.log(array); // => [1, 1] ``` - * * * - ### `_.range([start=0], end, [step=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5084 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5085 "View in source") [Ⓣ][1] -Creates an array of numbers *(positive and/or negative)* progressing from `start` up to but not including `end`. If `start` is less than `stop` a zero-length range is created unless a negative `step` is specified. +Creates an array of numbers (positive and/or negative) progressing from +`start` up to but not including `end`. If `start` is less than `stop` a +zero-length range is created unless a negative `step` is specified. #### Arguments 1. `[start=0]` *(number)*: The start of the range. @@ -708,7 +733,7 @@ Creates an array of numbers *(positive and/or negative)* progressing from `start 3. `[step=1]` *(number)*: The value to increment or decrement by. #### Returns -*(Array)*: Returns a new range array. +*(Array)*: Returns a new range array. #### Example ```js @@ -730,22 +755,27 @@ _.range(1, 4, 0); _.range(0); // => [] ``` - * * * - ### `_.remove(array, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5137 "View in source") [Ⓣ][1] - -Removes all elements from an array that the callback returns truey for and returns an array of removed elements. The callback is bound to `thisArg` and invoked with three arguments; *(value, index, array)*. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5138 "View in source") [Ⓣ][1] + +Removes all elements from an array that the callback returns truey for +and returns an array of removed elements. The callback is bound to `thisArg` +and invoked with three arguments; (value, index, array). +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Arguments 1. `array` *(Array)*: The array to modify. @@ -753,7 +783,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Array)*: Returns a new array of removed elements. +*(Array)*: Returns a new array of removed elements. #### Example ```js @@ -766,22 +796,29 @@ console.log(array); console.log(evens); // => [2, 4, 6] ``` - * * * - ### `_.rest(array, [callback=1], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5206 "View in source") [Ⓣ][1] - -The opposite of `_.initial` this method gets all but the first element or first `n` elements of an array. If a callback function is provided elements at the beginning of the array are excluded from the result as long as the callback returns truey. The callback is bound to `thisArg` and invoked with three arguments; *(value, index, array)*. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5207 "View in source") [Ⓣ][1] + +The opposite of `_.initial` this method gets all but the first element or +first `n` elements of an array. If a callback function is provided elements +at the beginning of the array are excluded from the result as long as the +callback returns truey. The callback is bound to `thisArg` and invoked +with three arguments; (value, index, array). +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Aliases *_.drop, _.tail* @@ -792,7 +829,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Array)*: Returns a slice of `array`. +*(Array)*: Returns a slice of `array`. #### Example ```js @@ -821,22 +858,29 @@ _.pluck(_.rest(characters, 'blocked'), 'name'); _.rest(characters, { 'employer': 'slate' }); // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] ``` - * * * - ### `_.sortedIndex(array, value, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5270 "View in source") [Ⓣ][1] - -Uses a binary search to determine the smallest index at which a value should be inserted into a given sorted array in order to maintain the sort order of the array. If a callback is provided it will be executed for `value` and each element of `array` to compute their sort ranking. The callback is bound to `thisArg` and invoked with one argument; *(value)*. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5271 "View in source") [Ⓣ][1] + +Uses a binary search to determine the smallest index at which a value +should be inserted into a given sorted array in order to maintain the sort +order of the array. If a callback is provided it will be executed for +`value` and each element of `array` to compute their sort ranking. The +callback is bound to `thisArg` and invoked with one argument; (value). +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Arguments 1. `array` *(Array)*: The array to inspect. @@ -845,7 +889,8 @@ If an object is provided for `callback` the created "_.where" style callback wil 4. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(number)*: Returns the index at which `value` should be inserted into `array`. +*(number)*: Returns the index at which `value` should be inserted +into `array`. #### Example ```js @@ -870,46 +915,53 @@ _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { }, dict); // => 2 ``` - * * * - ### `_.union([array])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5301 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5302 "View in source") [Ⓣ][1] -Creates an array of unique values, in order, of the provided arrays using strict equality for comparisons, i.e. `===`. +Creates an array of unique values, in order, of the provided arrays using +strict equality for comparisons, i.e. `===`. #### Arguments 1. `[array]` *(...Array)*: The arrays to inspect. #### Returns -*(Array)*: Returns an array of combined values. +*(Array)*: Returns an array of combined values. #### Example ```js _.union([1, 2, 3], [5, 2, 1, 4], [2, 1]); // => [1, 2, 3, 5, 4] ``` - * * * - ### `_.uniq(array, [isSorted=false], [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5349 "View in source") [Ⓣ][1] - -Creates a duplicate-value-free version of an array using strict equality for comparisons, i.e. `===`. If the array is sorted, providing `true` for `isSorted` will use a faster algorithm. If a callback is provided each element of `array` is passed through the callback before uniqueness is computed. The callback is bound to `thisArg` and invoked with three arguments; *(value, index, array)*. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5350 "View in source") [Ⓣ][1] + +Creates a duplicate-value-free version of an array using strict equality +for comparisons, i.e. `===`. If the array is sorted, providing +`true` for `isSorted` will use a faster algorithm. If a callback is provided +each element of `array` is passed through the callback before uniqueness +is computed. The callback is bound to `thisArg` and invoked with three +arguments; (value, index, array). +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Aliases *_.unique* @@ -921,7 +973,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 4. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Array)*: Returns a duplicate-value-free array. +*(Array)*: Returns a duplicate-value-free array. #### Example ```js @@ -941,49 +993,47 @@ _.uniq([1, 2.5, 3, 1.5, 2, 3.5], function(num) { return this.floor(num); }, Math _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); // => [{ 'x': 1 }, { 'x': 2 }] ``` - * * * - ### `_.without(array, [value])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5377 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5378 "View in source") [Ⓣ][1] -Creates an array excluding all provided values using strict equality for comparisons, i.e. `===`. +Creates an array excluding all provided values using strict equality for +comparisons, i.e. `===`. #### Arguments 1. `array` *(Array)*: The array to filter. 2. `[value]` *(...*)*: The values to exclude. #### Returns -*(Array)*: Returns a new array of filtered values. +*(Array)*: Returns a new array of filtered values. #### Example ```js _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); // => [2, 3, 4] ``` - * * * - ### `_.xor([array])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5398 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5399 "View in source") [Ⓣ][1] -Creates an array that is the symmetric difference of the provided arrays. See http://en.wikipedia.org/wiki/Symmetric_difference. +Creates an array that is the symmetric difference of the provided arrays. +See http://en.wikipedia.org/wiki/Symmetric_difference. #### Arguments 1. `[array]` *(...Array)*: The arrays to inspect. #### Returns -*(Array)*: Returns an array of values. +*(Array)*: Returns an array of values. #### Example ```js @@ -993,18 +1043,18 @@ _.xor([1, 2, 3], [5, 2, 1, 4]); _.xor([1, 2, 5], [2, 3, 5], [3, 4, 5]); // => [1, 4, 5] ``` - * * * - ### `_.zip([array])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5429 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5430 "View in source") [Ⓣ][1] -Creates an array of grouped elements, the first of which contains the first elements of the given arrays, the second of which contains the second elements of the given arrays, and so on. +Creates an array of grouped elements, the first of which contains the first +elements of the given arrays, the second of which contains the second +elements of the given arrays, and so on. #### Aliases *_.unzip* @@ -1013,25 +1063,25 @@ Creates an array of grouped elements, the first of which contains the first elem 1. `[array]` *(...Array)*: Arrays to process. #### Returns -*(Array)*: Returns a new array of grouped elements. +*(Array)*: Returns a new array of grouped elements. #### Example ```js _.zip(['fred', 'barney'], [30, 40], [true, false]); // => [['fred', 30, true], ['barney', 40, false]] ``` - * * * - ### `_.zipObject(keys, [values=[]])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5459 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5460 "View in source") [Ⓣ][1] -Creates an object composed from arrays of `keys` and `values`. Provide either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]` or two arrays, one of `keys` and one of corresponding `values`. +Creates an object composed from arrays of `keys` and `values`. Provide +either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]` +or two arrays, one of `keys` and one of corresponding `values`. #### Aliases *_.object* @@ -1041,22 +1091,20 @@ Creates an object composed from arrays of `keys` and `values`. Provide either a 2. `[values=[]]` *(Array)*: The array of values. #### Returns -*(Object)*: Returns an object composed of the given keys and corresponding values. +*(Object)*: Returns an object composed of the given keys and +corresponding values. #### Example ```js _.zipObject(['fred', 'barney'], [30, 40]); // => { 'fred': 30, 'barney': 40 } ``` - * * * - - ## `“Chaining” Methods` @@ -1064,30 +1112,57 @@ _.zipObject(['fred', 'barney'], [30, 40]); ### `_(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L647 "View in source") [Ⓣ][1] - -Creates a `lodash` object which wraps the given value to enable intuitive method chaining. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L647 "View in source") [Ⓣ][1] +Creates a `lodash` object which wraps the given value to enable intuitive +method chaining. +
+
In addition to Lo-Dash methods, wrappers also have the following `Array` methods:
-`concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`, and `unshift` - -Chaining is supported in custom builds as long as the `value` method is implicitly or explicitly included in the build. - +`concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`, +and `unshift` +
+
+Chaining is supported in custom builds as long as the `value` method is +implicitly or explicitly included in the build. +
+
The chainable wrapper functions are:
-`after`, `assign`, `bind`, `bindAll`, `bindKey`, `chain`, `compact`, `compose`, `concat`, `countBy`, `create`, `createCallback`, `curry`, `debounce`, `defaults`, `defer`, `delay`, `difference`, `filter`, `flatten`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, `invoke`, `keys`, `map`, `max`, `memoize`, `merge`, `min`, `object`, `omit`, `once`, `pairs`, `partial`, `partialRight`, `pick`, `pluck`, `pull`, `push`, `range`, `reject`, `remove`, `rest`, `reverse`, `shuffle`, `slice`, `sort`, `sortBy`, `splice`, `tap`, `throttle`, `times`, `toArray`, `transform`, `union`, `uniq`, `unshift`, `unzip`, `values`, `where`, `without`, `wrap`, and `zip` - +`after`, `assign`, `bind`, `bindAll`, `bindKey`, `chain`, `compact`, +`compose`, `concat`, `countBy`, `create`, `createCallback`, `curry`, +`debounce`, `defaults`, `defer`, `delay`, `difference`, `filter`, `flatten`, +`forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, +`functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, +`invoke`, `keys`, `map`, `max`, `memoize`, `merge`, `min`, `object`, `omit`, +`once`, `pairs`, `partial`, `partialRight`, `pick`, `pluck`, `pull`, `push`, +`range`, `reject`, `remove`, `rest`, `reverse`, `shuffle`, `slice`, `sort`, +`sortBy`, `splice`, `tap`, `throttle`, `times`, `toArray`, `transform`, +`union`, `uniq`, `unshift`, `unzip`, `values`, `where`, `without`, `wrap`, +and `zip` +
+
The non-chainable wrapper functions are:
-`clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `findIndex`, `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `has`, `identity`, `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`, `isNull`, `isNumber`, `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `join`, `lastIndexOf`, `mixin`, `noConflict`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, `result`, `shift`, `size`, `some`, `sortedIndex`, `runInContext`, `template`, `unescape`, `uniqueId`, and `value` - -The wrapper functions `first` and `last` return wrapped values when `n` is provided, otherwise they return unwrapped values. - +`clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `findIndex`, +`findKey`, `findLast`, `findLastIndex`, `findLastKey`, `has`, `identity`, +`indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, +`isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`, `isNull`, `isNumber`, +`isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `join`, +`lastIndexOf`, `mixin`, `noConflict`, `parseInt`, `pop`, `random`, `reduce`, +`reduceRight`, `result`, `shift`, `size`, `some`, `sortedIndex`, `runInContext`, +`template`, `unescape`, `uniqueId`, and `value` +
+
+The wrapper functions `first` and `last` return wrapped values when `n` is +provided, otherwise they return unwrapped values. +
+
Explicit chaining can be enabled by using the `_.chain` method. #### Arguments 1. `value` *(*)*: The value to wrap in a `lodash` instance. #### Returns -*(Object)*: Returns a `lodash` instance. +*(Object)*: Returns a `lodash` instance. #### Example ```js @@ -1110,24 +1185,23 @@ _.isArray(squares); _.isArray(squares.value()); // => true ``` - * * * - ### `_.chain(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6788 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6789 "View in source") [Ⓣ][1] -Creates a `lodash` object that wraps the given value with explicit method chaining enabled. +Creates a `lodash` object that wraps the given value with explicit +method chaining enabled. #### Arguments 1. `value` *(*)*: The value to wrap. #### Returns -*(Object)*: Returns the wrapper object. +*(Object)*: Returns the wrapper object. #### Example ```js @@ -1144,25 +1218,26 @@ var youngest = _.chain(characters) .value(); // => 'pebbles is 1' ``` - * * * - ### `_.tap(value, interceptor)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6814 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6815 "View in source") [Ⓣ][1] -Invokes `interceptor` with the `value` as the first argument and then returns `value`. The purpose of this method is to "tap into" a method chain in order to perform operations on intermediate results within the chain. +Invokes `interceptor` with the `value` as the first argument and then +returns `value`. The purpose of this method is to "tap into" a method +chain in order to perform operations on intermediate results within +the chain. #### Arguments 1. `value` *(*)*: The value to provide to `interceptor`. 2. `interceptor` *(Function)*: The function to invoke. #### Returns -*(*)*: Returns `value`. +*(*)*: Returns `value`. #### Example ```js @@ -1172,21 +1247,19 @@ _([1, 2, 3, 4]) .value(); // => [3, 2, 1] ``` - * * * - ### `_.prototype.chain()` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6844 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6845 "View in source") [Ⓣ][1] Enables explicit method chaining on the wrapper object. #### Returns -*(*)*: Returns the wrapper object. +*(*)*: Returns the wrapper object. #### Example ```js @@ -1206,37 +1279,33 @@ _(characters).chain() .value(); // => { 'age': 36 } ``` - * * * - ### `_.prototype.toString()` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6861 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6862 "View in source") [Ⓣ][1] Produces the `toString` result of the wrapped value. #### Returns -*(string)*: Returns the string result. +*(string)*: Returns the string result. #### Example ```js _([1, 2, 3]).toString(); // => '1,2,3' ``` - * * * - ### `_.prototype.valueOf()` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6878 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6879 "View in source") [Ⓣ][1] Extracts the wrapped value. @@ -1244,22 +1313,19 @@ Extracts the wrapped value. *_.prototype.value* #### Returns -*(*)*: Returns the wrapped value. +*(*)*: Returns the wrapped value. #### Example ```js _([1, 2, 3]).valueOf(); // => [1, 2, 3] ``` - * * * - - ## `“Collections” Methods` @@ -1267,16 +1333,19 @@ _([1, 2, 3]).valueOf(); ### `_.at(collection, [index])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L3296 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L3297 "View in source") [Ⓣ][1] -Creates an array of elements from the specified indexes, or keys, of the `collection`. Indexes may be specified as individual arguments or as arrays of indexes. +Creates an array of elements from the specified indexes, or keys, of the +`collection`. Indexes may be specified as individual arguments or as arrays +of indexes. #### Arguments 1. `collection` *(Array|Object|string)*: The collection to iterate over. 2. `[index]` *(...(number|number[]|string|string[])*: The indexes of `collection` to retrieve, specified as individual indexes or arrays of indexes. #### Returns -*(Array)*: Returns a new array of elements corresponding to the provided indexes. +*(Array)*: Returns a new array of elements corresponding to the +provided indexes. #### Example ```js @@ -1286,18 +1355,18 @@ _.at(['a', 'b', 'c', 'd', 'e'], [0, 2, 4]); _.at(['fred', 'barney', 'pebbles'], 0, 2); // => ['fred', 'pebbles'] ``` - * * * - ### `_.contains(collection, target, [fromIndex=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L3339 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L3340 "View in source") [Ⓣ][1] -Checks if a given value is present in a collection using strict equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the offset from the end of the collection. +Checks if a given value is present in a collection using strict equality +for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the +offset from the end of the collection. #### Aliases *_.include* @@ -1308,7 +1377,7 @@ Checks if a given value is present in a collection using strict equality for com 3. `[fromIndex=0]` *(number)*: The index to search from. #### Returns -*(boolean)*: Returns `true` if the `target` element is found, else `false`. +*(boolean)*: Returns `true` if the `target` element is found, else `false`. #### Example ```js @@ -1324,22 +1393,29 @@ _.contains({ 'name': 'fred', 'age': 40 }, 'fred'); _.contains('pebbles', 'eb'); // => true ``` - * * * - ### `_.countBy(collection, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L3394 "View in source") [Ⓣ][1] - -Creates an object composed of keys generated from the results of running each element of `collection` through the callback. The corresponding value of each key is the number of times the key was returned by the callback. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L3395 "View in source") [Ⓣ][1] + +Creates an object composed of keys generated from the results of running +each element of `collection` through the callback. The corresponding value +of each key is the number of times the key was returned by the callback. +The callback is bound to `thisArg` and invoked with three arguments; +(value, index|key, collection). +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Arguments 1. `collection` *(Array|Object|string)*: The collection to iterate over. @@ -1347,7 +1423,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Object)*: Returns the composed aggregate object. +*(Object)*: Returns the composed aggregate object. #### Example ```js @@ -1360,22 +1436,27 @@ _.countBy([4.3, 6.1, 6.4], function(num) { return this.floor(num); }, Math); _.countBy(['one', 'two', 'three'], 'length'); // => { '3': 2, '5': 1 } ``` - * * * - ### `_.every(collection, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L3439 "View in source") [Ⓣ][1] - -Checks if the given callback returns truey value for **all** elements of a collection. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L3440 "View in source") [Ⓣ][1] + +Checks if the given callback returns truey value for **all** elements of +a collection. The callback is bound to `thisArg` and invoked with three +arguments; (value, index|key, collection). +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Aliases *_.all* @@ -1386,7 +1467,8 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(boolean)*: Returns `true` if all elements passed the callback check, else `false`. +*(boolean)*: Returns `true` if all elements passed the callback check, +else `false`. #### Example ```js @@ -1406,22 +1488,27 @@ _.every(characters, 'age'); _.every(characters, { 'age': 36 }); // => false ``` - * * * - ### `_.filter(collection, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L3500 "View in source") [Ⓣ][1] - -Iterates over elements of a collection, returning an array of all elements the callback returns truey for. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L3501 "View in source") [Ⓣ][1] + +Iterates over elements of a collection, returning an array of all elements +the callback returns truey for. The callback is bound to `thisArg` and +invoked with three arguments; (value, index|key, collection). +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Aliases *_.select* @@ -1432,7 +1519,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Array)*: Returns a new array of elements that passed the callback check. +*(Array)*: Returns a new array of elements that passed the callback check. #### Example ```js @@ -1452,22 +1539,27 @@ _.filter(characters, 'blocked'); _.filter(characters, { 'age': 36 }); // => [{ 'name': 'barney', 'age': 36, 'blocked': false }] ``` - * * * - ### `_.find(collection, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L3567 "View in source") [Ⓣ][1] - -Iterates over elements of a collection, returning the first element that the callback returns truey for. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L3568 "View in source") [Ⓣ][1] + +Iterates over elements of a collection, returning the first element that +the callback returns truey for. The callback is bound to `thisArg` and +invoked with three arguments; (value, index|key, collection). +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Aliases *_.detect, _.findWhere* @@ -1478,7 +1570,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(*)*: Returns the found element, else `undefined`. +*(*)*: Returns the found element, else `undefined`. #### Example ```js @@ -1501,18 +1593,17 @@ _.find(characters, { 'age': 1 }); _.find(characters, 'blocked'); // => { 'name': 'fred', 'age': 40, 'blocked': true } ``` - * * * - ### `_.findLast(collection, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L3612 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L3613 "View in source") [Ⓣ][1] -This method is like `_.find` except that it iterates over elements of a `collection` from right to left. +This method is like `_.find` except that it iterates over elements +of a `collection` from right to left. #### Arguments 1. `collection` *(Array|Object|string)*: The collection to iterate over. @@ -1520,7 +1611,7 @@ This method is like `_.find` except that it iterates over elements of a `collect 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(*)*: Returns the found element, else `undefined`. +*(*)*: Returns the found element, else `undefined`. #### Example ```js @@ -1529,20 +1620,24 @@ _.findLast([1, 2, 3, 4], function(num) { }); // => 3 ``` - * * * - ### `_.forEach(collection, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L3650 "View in source") [Ⓣ][1] - -Iterates over elements of a collection, executing the callback for each element. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. Callbacks may exit iteration early by explicitly returning `false`. - -Note: As with other "Collections" methods, objects with a `length` property are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` may be used for object iteration. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L3651 "View in source") [Ⓣ][1] + +Iterates over elements of a collection, executing the callback for each +element. The callback is bound to `thisArg` and invoked with three arguments; +(value, index|key, collection). Callbacks may exit iteration early by +explicitly returning `false`. +
+
+Note: As with other "Collections" methods, objects with a `length` property +are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` +may be used for object iteration. #### Aliases *_.each* @@ -1553,7 +1648,7 @@ Note: As with other "Collections" methods, objects with a `length` property are 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Array, Object, string)*: Returns `collection`. +*(Array|Object|string)*: Returns `collection`. #### Example ```js @@ -1563,18 +1658,17 @@ _([1, 2, 3]).forEach(function(num) { console.log(num); }).join(','); _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { console.log(num); }); // => logs each number and returns the object (property order is not guaranteed across environments) ``` - * * * - ### `_.forEachRight(collection, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L3683 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L3684 "View in source") [Ⓣ][1] -This method is like `_.forEach` except that it iterates over elements of a `collection` from right to left. +This method is like `_.forEach` except that it iterates over elements +of a `collection` from right to left. #### Aliases *_.eachRight* @@ -1585,29 +1679,36 @@ This method is like `_.forEach` except that it iterates over elements of a `coll 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Array, Object, string)*: Returns `collection`. +*(Array|Object|string)*: Returns `collection`. #### Example ```js _([1, 2, 3]).forEachRight(function(num) { console.log(num); }).join(','); // => logs each number from right to left and returns '3,2,1' ``` - * * * - ### `_.groupBy(collection, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L3744 "View in source") [Ⓣ][1] - -Creates an object composed of keys generated from the results of running each element of a collection through the callback. The corresponding value of each key is an array of the elements responsible for generating the key. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false` +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L3745 "View in source") [Ⓣ][1] + +Creates an object composed of keys generated from the results of running +each element of a collection through the callback. The corresponding value +of each key is an array of the elements responsible for generating the key. +The callback is bound to `thisArg` and invoked with three arguments; +(value, index|key, collection). +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false` #### Arguments 1. `collection` *(Array|Object|string)*: The collection to iterate over. @@ -1615,7 +1716,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Object)*: Returns the composed aggregate object. +*(Object)*: Returns the composed aggregate object. #### Example ```js @@ -1629,22 +1730,29 @@ _.groupBy([4.2, 6.1, 6.4], function(num) { return this.floor(num); }, Math); _.groupBy(['one', 'two', 'three'], 'length'); // => { '3': ['one', 'two'], '5': ['three'] } ``` - * * * - ### `_.indexBy(collection, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L3787 "View in source") [Ⓣ][1] - -Creates an object composed of keys generated from the results of running each element of the collection through the given callback. The corresponding value of each key is the last element responsible for generating the key. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L3788 "View in source") [Ⓣ][1] + +Creates an object composed of keys generated from the results of running +each element of the collection through the given callback. The corresponding +value of each key is the last element responsible for generating the key. +The callback is bound to `thisArg` and invoked with three arguments; +(value, index|key, collection). +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Arguments 1. `collection` *(Array|Object|string)*: The collection to iterate over. @@ -1652,7 +1760,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Object)*: Returns the composed aggregate object. +*(Object)*: Returns the composed aggregate object. #### Example ```js @@ -1670,18 +1778,19 @@ _.indexBy(keys, function(key) { return String.fromCharCode(key.code); }); _.indexBy(characters, function(key) { this.fromCharCode(key.code); }, String); // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } ``` - * * * - ### `_.invoke(collection, methodName, [arg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L3813 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L3814 "View in source") [Ⓣ][1] -Invokes the method named by `methodName` on each element in the `collection` returning an array of the results of each invoked method. Additional arguments will be provided to each invoked method. If `methodName` is a function it will be invoked for, and `this` bound to, each element in the `collection`. +Invokes the method named by `methodName` on each element in the `collection` +returning an array of the results of each invoked method. Additional arguments +will be provided to each invoked method. If `methodName` is a function it +will be invoked for, and `this` bound to, each element in the `collection`. #### Arguments 1. `collection` *(Array|Object|string)*: The collection to iterate over. @@ -1689,7 +1798,7 @@ Invokes the method named by `methodName` on each element in the `collection` ret 3. `[arg]` *(...*)*: Arguments to invoke the method with. #### Returns -*(Array)*: Returns a new array of the results of each invoked method. +*(Array)*: Returns a new array of the results of each invoked method. #### Example ```js @@ -1699,22 +1808,27 @@ _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); _.invoke([123, 456], String.prototype.split, ''); // => [['1', '2', '3'], ['4', '5', '6']] ``` - * * * - ### `_.map(collection, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L3865 "View in source") [Ⓣ][1] - -Creates an array of values by running each element in the collection through the callback. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L3866 "View in source") [Ⓣ][1] + +Creates an array of values by running each element in the collection +through the callback. The callback is bound to `thisArg` and invoked with +three arguments; (value, index|key, collection). +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Aliases *_.collect* @@ -1725,7 +1839,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Array)*: Returns a new array of the results of each `callback` execution. +*(Array)*: Returns a new array of the results of each `callback` execution. #### Example ```js @@ -1744,22 +1858,29 @@ var characters = [ _.map(characters, 'name'); // => ['barney', 'fred'] ``` - * * * - ### `_.max(collection, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L3923 "View in source") [Ⓣ][1] - -Retrieves the maximum value of a collection. If the collection is empty or falsey `-Infinity` is returned. If a callback is provided it will be executed for each value in the collection to generate the criterion by which the value is ranked. The callback is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L3924 "View in source") [Ⓣ][1] + +Retrieves the maximum value of a collection. If the collection is empty or +falsey `-Infinity` is returned. If a callback is provided it will be executed +for each value in the collection to generate the criterion by which the value +is ranked. The callback is bound to `thisArg` and invoked with three +arguments; (value, index, collection). +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Arguments 1. `collection` *(Array|Object|string)*: The collection to iterate over. @@ -1767,7 +1888,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(*)*: Returns the maximum value. +*(*)*: Returns the maximum value. #### Example ```js @@ -1786,22 +1907,29 @@ _.max(characters, function(chr) { return chr.age; }); _.max(characters, 'age'); // => { 'name': 'fred', 'age': 40 }; ``` - * * * - ### `_.min(collection, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L3998 "View in source") [Ⓣ][1] - -Retrieves the minimum value of a collection. If the collection is empty or falsey `Infinity` is returned. If a callback is provided it will be executed for each value in the collection to generate the criterion by which the value is ranked. The callback is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L3999 "View in source") [Ⓣ][1] + +Retrieves the minimum value of a collection. If the collection is empty or +falsey `Infinity` is returned. If a callback is provided it will be executed +for each value in the collection to generate the criterion by which the value +is ranked. The callback is bound to `thisArg` and invoked with three +arguments; (value, index, collection). +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Arguments 1. `collection` *(Array|Object|string)*: The collection to iterate over. @@ -1809,7 +1937,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(*)*: Returns the minimum value. +*(*)*: Returns the minimum value. #### Example ```js @@ -1828,16 +1956,14 @@ _.min(characters, function(chr) { return chr.age; }); _.min(characters, 'age'); // => { 'name': 'barney', 'age': 36 }; ``` - * * * - ### `_.pluck(collection, property)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L4053 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L4054 "View in source") [Ⓣ][1] Retrieves the value of a specified property from all elements in the collection. @@ -1846,7 +1972,7 @@ Retrieves the value of a specified property from all elements in the collection. 2. `property` *(string)*: The name of the property to pluck. #### Returns -*(Array)*: Returns a new array of property values. +*(Array)*: Returns a new array of property values. #### Example ```js @@ -1858,18 +1984,21 @@ var characters = [ _.pluck(characters, 'name'); // => ['barney', 'fred'] ``` - * * * - ### `_.reduce(collection, [callback=identity], [accumulator], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L4085 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L4086 "View in source") [Ⓣ][1] -Reduces a collection to a value which is the accumulated result of running each element in the collection through the callback, where each successive callback execution consumes the return value of the previous execution. If `accumulator` is not provided the first element of the collection will be used as the initial `accumulator` value. The callback is bound to `thisArg` and invoked with four arguments; *(accumulator, value, index|key, collection)*. +Reduces a collection to a value which is the accumulated result of running +each element in the collection through the callback, where each successive +callback execution consumes the return value of the previous execution. If +`accumulator` is not provided the first element of the collection will be +used as the initial `accumulator` value. The callback is bound to `thisArg` +and invoked with four arguments; (accumulator, value, index|key, collection). #### Aliases *_.foldl, _.inject* @@ -1881,7 +2010,7 @@ Reduces a collection to a value which is the accumulated result of running each 4. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(*)*: Returns the accumulated value. +*(*)*: Returns the accumulated value. #### Example ```js @@ -1896,18 +2025,17 @@ var mapped = _.reduce({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { }, {}); // => { 'a': 3, 'b': 6, 'c': 9 } ``` - * * * - ### `_.reduceRight(collection, [callback=identity], [accumulator], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L4128 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L4129 "View in source") [Ⓣ][1] -This method is like `_.reduce` except that it iterates over elements of a `collection` from right to left. +This method is like `_.reduce` except that it iterates over elements +of a `collection` from right to left. #### Aliases *_.foldr* @@ -1919,7 +2047,7 @@ This method is like `_.reduce` except that it iterates over elements of a `colle 4. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(*)*: Returns the accumulated value. +*(*)*: Returns the accumulated value. #### Example ```js @@ -1927,22 +2055,26 @@ var list = [[0, 1], [2, 3], [4, 5]]; var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []); // => [4, 5, 2, 3, 0, 1] ``` - * * * - ### `_.reject(collection, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L4177 "View in source") [Ⓣ][1] - -The opposite of `_.filter` this method returns the elements of a collection that the callback does **not** return truey for. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L4178 "View in source") [Ⓣ][1] + +The opposite of `_.filter` this method returns the elements of a +collection that the callback does **not** return truey for. +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Arguments 1. `collection` *(Array|Object|string)*: The collection to iterate over. @@ -1950,7 +2082,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Array)*: Returns a new array of elements that failed the callback check. +*(Array)*: Returns a new array of elements that failed the callback check. #### Example ```js @@ -1970,16 +2102,14 @@ _.reject(characters, 'blocked'); _.reject(characters, { 'age': 36 }); // => [{ 'name': 'fred', 'age': 40, 'blocked': true }] ``` - * * * - ### `_.sample(collection, [n])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L4203 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L4204 "View in source") [Ⓣ][1] Retrieves a random element or `n` random elements from a collection. @@ -1988,7 +2118,7 @@ Retrieves a random element or `n` random elements from a collection. 2. `[n]` *(number)*: The number of elements to sample. #### Returns -*(Array)*: Returns the random sample(s) of `collection`. +*(Array)*: Returns the random sample(s) of `collection`. #### Example ```js @@ -1998,48 +2128,46 @@ _.sample([1, 2, 3, 4]); _.sample([1, 2, 3, 4], 2); // => [3, 1] ``` - * * * - ### `_.shuffle(collection)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L4231 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L4232 "View in source") [Ⓣ][1] -Creates an array of shuffled values, using a version of the Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle. +Creates an array of shuffled values, using a version of the Fisher-Yates +shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle. #### Arguments 1. `collection` *(Array|Object|string)*: The collection to shuffle. #### Returns -*(Array)*: Returns a new shuffled collection. +*(Array)*: Returns a new shuffled collection. #### Example ```js _.shuffle([1, 2, 3, 4, 5, 6]); // => [4, 1, 6, 3, 5, 2] ``` - * * * - ### `_.size(collection)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L4264 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L4265 "View in source") [Ⓣ][1] -Gets the size of the `collection` by returning `collection.length` for arrays and array-like objects or the number of own enumerable properties for objects. +Gets the size of the `collection` by returning `collection.length` for arrays +and array-like objects or the number of own enumerable properties for objects. #### Arguments 1. `collection` *(Array|Object|string)*: The collection to inspect. #### Returns -*(number)*: Returns `collection.length` or number of own enumerable properties. +*(number)*: Returns `collection.length` or number of own enumerable properties. #### Example ```js @@ -2052,22 +2180,28 @@ _.size({ 'one': 1, 'two': 2, 'three': 3 }); _.size('pebbles'); // => 7 ``` - * * * - ### `_.some(collection, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L4311 "View in source") [Ⓣ][1] - -Checks if the callback returns a truey value for **any** element of a collection. The function returns as soon as it finds a passing value and does not iterate over the entire collection. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L4312 "View in source") [Ⓣ][1] + +Checks if the callback returns a truey value for **any** element of a +collection. The function returns as soon as it finds a passing value and +does not iterate over the entire collection. The callback is bound to +`thisArg` and invoked with three arguments; (value, index|key, collection). +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Aliases *_.any* @@ -2078,7 +2212,8 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(boolean)*: Returns `true` if any element passed the callback check, else `false`. +*(boolean)*: Returns `true` if any element passed the callback check, +else `false`. #### Example ```js @@ -2098,24 +2233,33 @@ _.some(characters, 'blocked'); _.some(characters, { 'age': 1 }); // => false ``` - * * * - ### `_.sortBy(collection, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L4381 "View in source") [Ⓣ][1] - -Creates an array of elements, sorted in ascending order by the results of running each element in a collection through the callback. This method performs a stable sort, that is, it will preserve the original sort order of equal elements. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an array of property names is provided for `callback` the collection will be sorted by each property value. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L4382 "View in source") [Ⓣ][1] + +Creates an array of elements, sorted in ascending order by the results of +running each element in a collection through the callback. This method +performs a stable sort, that is, it will preserve the original sort order +of equal elements. The callback is bound to `thisArg` and invoked with +three arguments; (value, index|key, collection). +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an array of property names is provided for `callback` the collection +will be sorted by each property value. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Arguments 1. `collection` *(Array|Object|string)*: The collection to iterate over. @@ -2123,7 +2267,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Array)*: Returns a new array of sorted elements. +*(Array)*: Returns a new array of sorted elements. #### Example ```js @@ -2148,16 +2292,14 @@ _.map(_.sortBy(characters, 'age'), _.values); _.map(_.sortBy(characters, ['name', 'age']), _.values); // = > [['barney', 26], ['barney', 36], ['fred', 30], ['fred', 40]] ``` - * * * - ### `_.toArray(collection)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L4427 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L4428 "View in source") [Ⓣ][1] Converts the `collection` to an array. @@ -2165,32 +2307,32 @@ Converts the `collection` to an array. 1. `collection` *(Array|Object|string)*: The collection to convert. #### Returns -*(Array)*: Returns the new converted array. +*(Array)*: Returns the new converted array. #### Example ```js (function() { return _.toArray(arguments).slice(1); })(1, 2, 3, 4); // => [2, 3, 4] ``` - * * * - ### `_.where(collection, props)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L4461 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L4462 "View in source") [Ⓣ][1] -Performs a deep comparison of each element in a `collection` to the given `properties` object, returning an array of all elements that have equivalent property values. +Performs a deep comparison of each element in a `collection` to the given +`properties` object, returning an array of all elements that have equivalent +property values. #### Arguments 1. `collection` *(Array|Object|string)*: The collection to iterate over. 2. `props` *(Object)*: The object of property values to filter by. #### Returns -*(Array)*: Returns a new array of elements that have the given properties. +*(Array)*: Returns a new array of elements that have the given properties. #### Example ```js @@ -2205,15 +2347,12 @@ _.where(characters, { 'age': 36 }); _.where(characters, { 'pets': ['dino'] }); // => [{ 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] }] ``` - * * * - - ## `“Functions” Methods` @@ -2221,16 +2360,17 @@ _.where(characters, { 'pets': ['dino'] }); ### `_.after(n, func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5504 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5505 "View in source") [Ⓣ][1] -Creates a function that executes `func`, with the `this` binding and arguments of the created function, only after being called `n` times. +Creates a function that executes `func`, with the `this` binding and +arguments of the created function, only after being called `n` times. #### Arguments 1. `n` *(number)*: The number of times the function must be called before `func` is executed. 2. `func` *(Function)*: The function to restrict. #### Returns -*(Function)*: Returns the new restricted function. +*(Function)*: Returns the new restricted function. #### Example ```js @@ -2245,18 +2385,18 @@ _.forEach(saves, function(type) { }); // => logs 'Done saving!', after all saves have completed ``` - * * * - ### `_.bind(func, [thisArg], [arg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5537 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5538 "View in source") [Ⓣ][1] -Creates a function that, when called, invokes `func` with the `this` binding of `thisArg` and prepends any additional `bind` arguments to those provided to the bound function. +Creates a function that, when called, invokes `func` with the `this` +binding of `thisArg` and prepends any additional `bind` arguments to those +provided to the bound function. #### Arguments 1. `func` *(Function)*: The function to bind. @@ -2264,7 +2404,7 @@ Creates a function that, when called, invokes `func` with the `this` binding of 3. `[arg]` *(...*)*: Arguments to be partially applied. #### Returns -*(Function)*: Returns the new bound function. +*(Function)*: Returns the new bound function. #### Example ```js @@ -2276,25 +2416,26 @@ func = _.bind(func, { 'name': 'fred' }, 'hi'); func(); // => 'hi fred' ``` - * * * - ### `_.bindAll(object, [methodName])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5567 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5568 "View in source") [Ⓣ][1] -Binds methods of an object to the object itself, overwriting the existing method. Method names may be specified as individual arguments or as arrays of method names. If no method names are provided all the function properties of `object` will be bound. +Binds methods of an object to the object itself, overwriting the existing +method. Method names may be specified as individual arguments or as arrays +of method names. If no method names are provided all the function properties +of `object` will be bound. #### Arguments 1. `object` *(Object)*: The object to bind and assign the bound methods to. 2. `[methodName]` *(...string)*: The object method names to bind, specified as individual method names or arrays of method names. #### Returns -*(Object)*: Returns `object`. +*(Object)*: Returns `object`. #### Example ```js @@ -2307,18 +2448,20 @@ _.bindAll(view); jQuery('#docs').on('click', view.onClick); // => logs 'clicked docs', when the button is clicked ``` - * * * - ### `_.bindKey(object, key, [arg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5613 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5614 "View in source") [Ⓣ][1] -Creates a function that, when called, invokes the method at `object[key]` and prepends any additional `bindKey` arguments to those provided to the bound function. This method differs from `_.bind` by allowing bound functions to reference methods that will be redefined or don't yet exist. See http://michaux.ca/articles/lazy-function-definition-pattern. +Creates a function that, when called, invokes the method at `object[key]` +and prepends any additional `bindKey` arguments to those provided to the bound +function. This method differs from `_.bind` by allowing bound functions to +reference methods that will be redefined or don't yet exist. +See http://michaux.ca/articles/lazy-function-definition-pattern. #### Arguments 1. `object` *(Object)*: The object the method belongs to. @@ -2326,7 +2469,7 @@ Creates a function that, when called, invokes the method at `object[key]` and pr 3. `[arg]` *(...*)*: Arguments to be partially applied. #### Returns -*(Function)*: Returns the new bound function. +*(Function)*: Returns the new bound function. #### Example ```js @@ -2348,24 +2491,25 @@ object.greet = function(greeting) { func(); // => 'hiya fred!' ``` - * * * - ### `_.compose([func])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5649 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5650 "View in source") [Ⓣ][1] -Creates a function that is the composition of the provided functions, where each function consumes the return value of the function that follows. For example, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. Each function is executed with the `this` binding of the composed function. +Creates a function that is the composition of the provided functions, +where each function consumes the return value of the function that follows. +For example, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. +Each function is executed with the `this` binding of the composed function. #### Arguments 1. `[func]` *(...Function)*: Functions to compose. #### Returns -*(Function)*: Returns the new composed function. +*(Function)*: Returns the new composed function. #### Example ```js @@ -2386,25 +2530,27 @@ var welcome = _.compose(greet, format); welcome('pebbles'); // => 'Hiya Penelope!' ``` - * * * - ### `_.curry(func, [arity=func.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5697 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5698 "View in source") [Ⓣ][1] -Creates a function which accepts one or more arguments of `func` that when invoked either executes `func` returning its result, if all `func` arguments have been provided, or returns a function that accepts one or more of the remaining `func` arguments, and so on. The arity of `func` can be specified if `func.length` is not sufficient. +Creates a function which accepts one or more arguments of `func` that when +invoked either executes `func` returning its result, if all `func` arguments +have been provided, or returns a function that accepts one or more of the +remaining `func` arguments, and so on. The arity of `func` can be specified +if `func.length` is not sufficient. #### Arguments 1. `func` *(Function)*: The function to curry. 2. `[arity=func.length]` *(number)*: The arity of `func`. #### Returns -*(Function)*: Returns the new curried function. +*(Function)*: Returns the new curried function. #### Example ```js @@ -2421,20 +2567,25 @@ curried(1, 2)(3); curried(1, 2, 3); // => 6 ``` - * * * - -### `_.debounce(func, wait, [options], [options.maxWait])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5741 "View in source") [Ⓣ][1] +### `_.debounce(func, wait, [options])` +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5742 "View in source") [Ⓣ][1] -Creates a function that will delay the execution of `func` until after `wait` milliseconds have elapsed since the last time it was invoked. Provide an options object to indicate that `func` should be invoked on the leading and/or trailing edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call. - -Note: If `leading` and `trailing` options are `true` `func` will be called on the trailing edge of the timeout only if the the debounced function is invoked more than once during the `wait` timeout. +Creates a function that will delay the execution of `func` until after +`wait` milliseconds have elapsed since the last time it was invoked. +Provide an options object to indicate that `func` should be invoked on +the leading and/or trailing edge of the `wait` timeout. Subsequent calls +to the debounced function will return the result of the last `func` call. +
+
+Note: If `leading` and `trailing` options are `true` `func` will be called +on the trailing edge of the timeout only if the the debounced function is +invoked more than once during the `wait` timeout. #### Arguments 1. `func` *(Function)*: The function to debounce. @@ -2445,7 +2596,7 @@ Note: If `leading` and `trailing` options are `true` `func` will be called on th 6. `[options.trailing=true]` *(boolean)*: Specify execution on the trailing edge of the timeout. #### Returns -*(Function)*: Returns the new debounced function. +*(Function)*: Returns the new debounced function. #### Example ```js @@ -2465,43 +2616,41 @@ source.addEventListener('message', _.debounce(batchLog, 250, { 'maxWait': 1000 }, false); ``` - * * * - ### `_.defer(func, [arg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5857 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5858 "View in source") [Ⓣ][1] -Defers executing the `func` function until the current call stack has cleared. Additional arguments will be provided to `func` when it is invoked. +Defers executing the `func` function until the current call stack has cleared. +Additional arguments will be provided to `func` when it is invoked. #### Arguments 1. `func` *(Function)*: The function to defer. 2. `[arg]` *(...*)*: Arguments to invoke the function with. #### Returns -*(number)*: Returns the timer id. +*(number)*: Returns the timer id. #### Example ```js _.defer(function(text) { console.log(text); }, 'deferred'); // logs 'deferred' after one or more milliseconds ``` - * * * - ### `_.delay(func, wait, [arg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5881 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5882 "View in source") [Ⓣ][1] -Executes the `func` function after `wait` milliseconds. Additional arguments will be provided to `func` when it is invoked. +Executes the `func` function after `wait` milliseconds. Additional arguments +will be provided to `func` when it is invoked. #### Arguments 1. `func` *(Function)*: The function to delay. @@ -2509,32 +2658,35 @@ Executes the `func` function after `wait` milliseconds. Additional arguments wil 3. `[arg]` *(...*)*: Arguments to invoke the function with. #### Returns -*(number)*: Returns the timer id. +*(number)*: Returns the timer id. #### Example ```js _.delay(function(text) { console.log(text); }, 1000, 'later'); // => logs 'later' after one second ``` - * * * - ### `_.memoize(func, [resolver])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5926 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5927 "View in source") [Ⓣ][1] -Creates a function that memoizes the result of `func`. If `resolver` is provided it will be used to determine the cache key for storing the result based on the arguments provided to the memoized function. By default, the first argument provided to the memoized function is used as the cache key. The `func` is executed with the `this` binding of the memoized function. The result cache is exposed as the `cache` property on the memoized function. +Creates a function that memoizes the result of `func`. If `resolver` is +provided it will be used to determine the cache key for storing the result +based on the arguments provided to the memoized function. By default, the +first argument provided to the memoized function is used as the cache key. +The `func` is executed with the `this` binding of the memoized function. +The result cache is exposed as the `cache` property on the memoized function. #### Arguments 1. `func` *(Function)*: The function to have its output memoized. 2. `[resolver]` *(Function)*: A function used to resolve the cache key. #### Returns -*(Function)*: Returns the new memoizing function. +*(Function)*: Returns the new memoizing function. #### Example ```js @@ -2559,24 +2711,24 @@ get.cache.pebbles.name = 'penelope'; get('pebbles'); // => { 'name': 'penelope', 'age': 1 } ``` - * * * - ### `_.once(func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5959 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5960 "View in source") [Ⓣ][1] -Creates a function that is restricted to execute `func` once. Repeat calls to the function will return the value of the first call. The `func` is executed with the `this` binding of the created function. +Creates a function that is restricted to execute `func` once. Repeat calls to +the function will return the value of the first call. The `func` is executed +with the `this` binding of the created function. #### Arguments 1. `func` *(Function)*: The function to restrict. #### Returns -*(Function)*: Returns the new restricted function. +*(Function)*: Returns the new restricted function. #### Example ```js @@ -2585,25 +2737,25 @@ initialize(); initialize(); // `initialize` executes `createApplication` once ``` - * * * - ### `_.partial(func, [arg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L5997 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L5998 "View in source") [Ⓣ][1] -Creates a function that, when called, invokes `func` with any additional `partial` arguments prepended to those provided to the new function. This method is similar to `_.bind` except it does **not** alter the `this` binding. +Creates a function that, when called, invokes `func` with any additional +`partial` arguments prepended to those provided to the new function. This +method is similar to `_.bind` except it does **not** alter the `this` binding. #### Arguments 1. `func` *(Function)*: The function to partially apply arguments to. 2. `[arg]` *(...*)*: Arguments to be partially applied. #### Returns -*(Function)*: Returns the new partially applied function. +*(Function)*: Returns the new partially applied function. #### Example ```js @@ -2612,25 +2764,24 @@ var hi = _.partial(greet, 'hi'); hi('fred'); // => 'hi fred' ``` - * * * - ### `_.partialRight(func, [arg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6028 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6029 "View in source") [Ⓣ][1] -This method is like `_.partial` except that `partial` arguments are appended to those provided to the new function. +This method is like `_.partial` except that `partial` arguments are +appended to those provided to the new function. #### Arguments 1. `func` *(Function)*: The function to partially apply arguments to. 2. `[arg]` *(...*)*: Arguments to be partially applied. #### Returns -*(Function)*: Returns the new partially applied function. +*(Function)*: Returns the new partially applied function. #### Example ```js @@ -2649,20 +2800,25 @@ options.variable options.imports // => { '_': _, 'jq': $ } ``` - * * * - ### `_.throttle(func, wait, [options])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6063 "View in source") [Ⓣ][1] - -Creates a function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. Provide an options object to indicate that `func` should be invoked on the leading and/or trailing edge of the `wait` timeout. Subsequent calls to the throttled function will return the result of the last `func` call. - -Note: If `leading` and `trailing` options are `true` `func` will be called on the trailing edge of the timeout only if the the throttled function is invoked more than once during the `wait` timeout. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6064 "View in source") [Ⓣ][1] + +Creates a function that, when executed, will only call the `func` function +at most once per every `wait` milliseconds. Provide an options object to +indicate that `func` should be invoked on the leading and/or trailing edge +of the `wait` timeout. Subsequent calls to the throttled function will +return the result of the last `func` call. +
+
+Note: If `leading` and `trailing` options are `true` `func` will be called +on the trailing edge of the timeout only if the the throttled function is +invoked more than once during the `wait` timeout. #### Arguments 1. `func` *(Function)*: The function to throttle. @@ -2672,7 +2828,7 @@ Note: If `leading` and `trailing` options are `true` `func` will be called on th 5. `[options.trailing=true]` *(boolean)*: Specify execution on the trailing edge of the timeout. #### Returns -*(Function)*: Returns the new throttled function. +*(Function)*: Returns the new throttled function. #### Example ```js @@ -2685,25 +2841,26 @@ jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { 'trailing': false })); ``` - * * * - ### `_.wrap(value, wrapper)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6104 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6105 "View in source") [Ⓣ][1] -Creates a function that provides `value` to the wrapper function as its first argument. Additional arguments provided to the function are appended to those provided to the wrapper function. The wrapper is executed with the `this` binding of the created function. +Creates a function that provides `value` to the wrapper function as its +first argument. Additional arguments provided to the function are appended +to those provided to the wrapper function. The wrapper is executed with +the `this` binding of the created function. #### Arguments 1. `value` *(*)*: The value to wrap. 2. `wrapper` *(Function)*: The wrapper function. #### Returns -*(Function)*: Returns the new function. +*(Function)*: Returns the new function. #### Example ```js @@ -2714,15 +2871,12 @@ var p = _.wrap(_.escape, function(func, text) { p('Fred, Wilma, & Pebbles'); // => '

Fred, Wilma, & Pebbles

' ``` - * * * - - ## `“Objects” Methods` @@ -2730,9 +2884,13 @@ p('Fred, Wilma, & Pebbles'); ### `_.assign(object, [source], [callback], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2084 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2085 "View in source") [Ⓣ][1] -Assigns own enumerable properties of source object(s) to the destination object. Subsequent sources will overwrite property assignments of previous sources. If a callback is provided it will be executed to produce the assigned values. The callback is bound to `thisArg` and invoked with two arguments; *(objectValue, sourceValue)*. +Assigns own enumerable properties of source object(s) to the destination +object. Subsequent sources will overwrite property assignments of previous +sources. If a callback is provided it will be executed to produce the +assigned values. The callback is bound to `thisArg` and invoked with two +arguments; (objectValue, sourceValue). #### Aliases *_.extend* @@ -2744,7 +2902,7 @@ Assigns own enumerable properties of source object(s) to the destination object. 4. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Object)*: Returns the destination object. +*(Object)*: Returns the destination object. #### Example ```js @@ -2759,18 +2917,20 @@ var object = { 'name': 'barney' }; defaults(object, { 'name': 'fred', 'employer': 'slate' }); // => { 'name': 'barney', 'employer': 'slate' } ``` - * * * - ### `_.clone(value, [isDeep=false], [callback], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2137 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2138 "View in source") [Ⓣ][1] -Creates a clone of `value`. If `isDeep` is `true` nested objects will also be cloned, otherwise they will be assigned by reference. If a callback is provided it will be executed to produce the cloned values. If the callback returns `undefined` cloning will be handled by the method instead. The callback is bound to `thisArg` and invoked with one argument; *(value)*. +Creates a clone of `value`. If `isDeep` is `true` nested objects will also +be cloned, otherwise they will be assigned by reference. If a callback +is provided it will be executed to produce the cloned values. If the +callback returns `undefined` cloning will be handled by the method instead. +The callback is bound to `thisArg` and invoked with one argument; (value). #### Arguments 1. `value` *(*)*: The value to clone. @@ -2779,7 +2939,7 @@ Creates a clone of `value`. If `isDeep` is `true` nested objects will also be cl 4. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(*)*: Returns the cloned value. +*(*)*: Returns the cloned value. #### Example ```js @@ -2806,20 +2966,25 @@ var clone = _.clone(document.body); clone.childNodes.length; // => 0 ``` - * * * - ### `_.cloneDeep(value, [callback], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2189 "View in source") [Ⓣ][1] - -Creates a deep clone of `value`. If a callback is provided it will be executed to produce the cloned values. If the callback returns `undefined` cloning will be handled by the method instead. The callback is bound to `thisArg` and invoked with one argument; *(value)*. - -Note: This method is loosely based on the structured clone algorithm. Functions and DOM nodes are **not** cloned. The enumerable properties of `arguments` objects and objects created by constructors other than `Object` are cloned to plain `Object` objects. See http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2190 "View in source") [Ⓣ][1] + +Creates a deep clone of `value`. If a callback is provided it will be +executed to produce the cloned values. If the callback returns `undefined` +cloning will be handled by the method instead. The callback is bound to +`thisArg` and invoked with one argument; (value). +
+
+Note: This method is loosely based on the structured clone algorithm. Functions +and DOM nodes are **not** cloned. The enumerable properties of `arguments` objects and +objects created by constructors other than `Object` are cloned to plain `Object` objects. +See http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm. #### Arguments 1. `value` *(*)*: The value to deep clone. @@ -2827,7 +2992,7 @@ Note: This method is loosely based on the structured clone algorithm. Functions 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(*)*: Returns the deep cloned value. +*(*)*: Returns the deep cloned value. #### Example ```js @@ -2852,25 +3017,25 @@ var clone = _.cloneDeep(view, function(value) { clone.node == view.node; // => false ``` - * * * - ### `_.create(prototype, [properties])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2224 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2225 "View in source") [Ⓣ][1] -Creates an object that inherits from the given `prototype` object. If a `properties` object is provided its own enumerable properties are assigned to the created object. +Creates an object that inherits from the given `prototype` object. If a +`properties` object is provided its own enumerable properties are assigned +to the created object. #### Arguments 1. `prototype` *(Object)*: The object to inherit from. 2. `[properties]` *(Object)*: The properties to assign to the object. #### Returns -*(Object)*: Returns the new object. +*(Object)*: Returns the new object. #### Example ```js @@ -2892,25 +3057,25 @@ circle instanceof Circle; circle instanceof Shape; // => true ``` - * * * - ### `_.defaults(object, [source])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2249 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2250 "View in source") [Ⓣ][1] -Assigns own enumerable properties of source object(s) to the destination object for all destination properties that resolve to `undefined`. Once a property is set, additional defaults of the same property will be ignored. +Assigns own enumerable properties of source object(s) to the destination +object for all destination properties that resolve to `undefined`. Once a +property is set, additional defaults of the same property will be ignored. #### Arguments 1. `object` *(Object)*: The destination object. 2. `[source]` *(...Object)*: The source objects. #### Returns -*(Object)*: Returns the destination object. +*(Object)*: Returns the destination object. #### Example ```js @@ -2918,22 +3083,26 @@ var object = { 'name': 'barney' }; _.defaults(object, { 'name': 'fred', 'employer': 'slate' }); // => { 'name': 'barney', 'employer': 'slate' } ``` - * * * - ### `_.findKey(object, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2292 "View in source") [Ⓣ][1] - -This method is like `_.findIndex` except that it returns the key of the first element that passes the callback check, instead of the element itself. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2293 "View in source") [Ⓣ][1] + +This method is like `_.findIndex` except that it returns the key of the +first element that passes the callback check, instead of the element itself. +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Arguments 1. `object` *(Object)*: The object to search. @@ -2941,7 +3110,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(string, undefined)*: Returns the key of the found element, else `undefined`. +*(string|undefined)*: Returns the key of the found element, else `undefined`. #### Example ```js @@ -2964,22 +3133,26 @@ _.findKey(characters, { 'age': 1 }); _.findKey(characters, 'blocked'); // => 'fred' ``` - * * * - ### `_.findLastKey(object, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2345 "View in source") [Ⓣ][1] - -This method is like `_.findKey` except that it iterates over elements of a `collection` in the opposite order. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2346 "View in source") [Ⓣ][1] + +This method is like `_.findKey` except that it iterates over elements +of a `collection` in the opposite order. +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Arguments 1. `object` *(Object)*: The object to search. @@ -2987,7 +3160,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(string, undefined)*: Returns the key of the found element, else `undefined`. +*(string|undefined)*: Returns the key of the found element, else `undefined`. #### Example ```js @@ -3010,18 +3183,19 @@ _.findLastKey(characters, { 'age': 40 }); _.findLastKey(characters, 'blocked'); // => 'pebbles' ``` - * * * - ### `_.forIn(object, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2388 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2389 "View in source") [Ⓣ][1] -Iterates over own and inherited enumerable properties of an object, executing the callback for each property. The callback is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`. +Iterates over own and inherited enumerable properties of an object, +executing the callback for each property. The callback is bound to `thisArg` +and invoked with three arguments; (value, key, object). Callbacks may exit +iteration early by explicitly returning `false`. #### Arguments 1. `object` *(Object)*: The object to iterate over. @@ -3029,7 +3203,7 @@ Iterates over own and inherited enumerable properties of an object, executing th 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Object)*: Returns `object`. +*(Object)*: Returns `object`. #### Example ```js @@ -3048,18 +3222,17 @@ _.forIn(new Shape, function(value, key) { }); // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments) ``` - * * * - ### `_.forInRight(object, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2420 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2421 "View in source") [Ⓣ][1] -This method is like `_.forIn` except that it iterates over elements of a `collection` in the opposite order. +This method is like `_.forIn` except that it iterates over elements +of a `collection` in the opposite order. #### Arguments 1. `object` *(Object)*: The object to iterate over. @@ -3067,7 +3240,7 @@ This method is like `_.forIn` except that it iterates over elements of a `collec 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Object)*: Returns `object`. +*(Object)*: Returns `object`. #### Example ```js @@ -3086,18 +3259,19 @@ _.forInRight(new Shape, function(value, key) { }); // => logs 'move', 'y', and 'x' assuming `_.forIn ` logs 'x', 'y', and 'move' ``` - * * * - ### `_.forOwn(object, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2458 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2459 "View in source") [Ⓣ][1] -Iterates over own enumerable properties of an object, executing the callback for each property. The callback is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`. +Iterates over own enumerable properties of an object, executing the callback +for each property. The callback is bound to `thisArg` and invoked with three +arguments; (value, key, object). Callbacks may exit iteration early by +explicitly returning `false`. #### Arguments 1. `object` *(Object)*: The object to iterate over. @@ -3105,7 +3279,7 @@ Iterates over own enumerable properties of an object, executing the callback for 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Object)*: Returns `object`. +*(Object)*: Returns `object`. #### Example ```js @@ -3114,18 +3288,17 @@ _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { }); // => logs '0', '1', and 'length' (property order is not guaranteed across environments) ``` - * * * - ### `_.forOwnRight(object, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2478 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2479 "View in source") [Ⓣ][1] -This method is like `_.forOwn` except that it iterates over elements of a `collection` in the opposite order. +This method is like `_.forOwn` except that it iterates over elements +of a `collection` in the opposite order. #### Arguments 1. `object` *(Object)*: The object to iterate over. @@ -3133,7 +3306,7 @@ This method is like `_.forOwn` except that it iterates over elements of a `colle 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Object)*: Returns `object`. +*(Object)*: Returns `object`. #### Example ```js @@ -3142,18 +3315,17 @@ _.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { }); // => logs 'length', '1', and '0' assuming `_.forOwn` logs '0', '1', and 'length' ``` - * * * - ### `_.functions(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2507 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2508 "View in source") [Ⓣ][1] -Creates a sorted array of property names of all enumerable properties, own and inherited, of `object` that have function values. +Creates a sorted array of property names of all enumerable properties, +own and inherited, of `object` that have function values. #### Aliases *_.methods* @@ -3162,48 +3334,45 @@ Creates a sorted array of property names of all enumerable properties, own and i 1. `object` *(Object)*: The object to inspect. #### Returns -*(Array)*: Returns an array of property names that have function values. +*(Array)*: Returns an array of property names that have function values. #### Example ```js _.functions(_); // => ['all', 'any', 'bind', 'bindAll', 'clone', 'compact', 'compose', ...] ``` - * * * - ### `_.has(object, key)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2532 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2533 "View in source") [Ⓣ][1] -Checks if the specified property name exists as a direct property of `object`, instead of an inherited property. +Checks if the specified property name exists as a direct property of `object`, +instead of an inherited property. #### Arguments 1. `object` *(Object)*: The object to inspect. 2. `key` *(string)*: The name of the property to check. #### Returns -*(boolean)*: Returns `true` if key is a direct property, else `false`. +*(boolean)*: Returns `true` if key is a direct property, else `false`. #### Example ```js _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); // => true ``` - * * * - ### `_.invert(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2549 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2550 "View in source") [Ⓣ][1] Creates an object composed of the inverted keys and values of the given object. @@ -3211,23 +3380,21 @@ Creates an object composed of the inverted keys and values of the given object. 1. `object` *(Object)*: The object to invert. #### Returns -*(Object)*: Returns the created inverted object. +*(Object)*: Returns the created inverted object. #### Example ```js _.invert({ 'first': 'fred', 'second': 'barney' }); // => { 'fred': 'first', 'barney': 'second' } ``` - * * * - ### `_.isArguments(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L1909 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L1910 "View in source") [Ⓣ][1] Checks if `value` is an `arguments` object. @@ -3235,7 +3402,7 @@ Checks if `value` is an `arguments` object. 1. `value` *(*)*: The value to check. #### Returns -*(boolean)*: Returns `true` if the `value` is an `arguments` object, else `false`. +*(boolean)*: Returns `true` if the `value` is an `arguments` object, else `false`. #### Example ```js @@ -3245,16 +3412,14 @@ Checks if `value` is an `arguments` object. _.isArguments([1, 2, 3]); // => false ``` - * * * - ### `_.isArray(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L1938 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L1939 "View in source") [Ⓣ][1] Checks if `value` is an array. @@ -3262,7 +3427,7 @@ Checks if `value` is an array. 1. `value` *(*)*: The value to check. #### Returns -*(boolean)*: Returns `true` if the `value` is an array, else `false`. +*(boolean)*: Returns `true` if the `value` is an array, else `false`. #### Example ```js @@ -3272,16 +3437,14 @@ Checks if `value` is an array. _.isArray([1, 2, 3]); // => true ``` - * * * - ### `_.isBoolean(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2575 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2576 "View in source") [Ⓣ][1] Checks if `value` is a boolean value. @@ -3289,23 +3452,21 @@ Checks if `value` is a boolean value. 1. `value` *(*)*: The value to check. #### Returns -*(boolean)*: Returns `true` if the `value` is a boolean value, else `false`. +*(boolean)*: Returns `true` if the `value` is a boolean value, else `false`. #### Example ```js _.isBoolean(null); // => false ``` - * * * - ### `_.isDate(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2593 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2594 "View in source") [Ⓣ][1] Checks if `value` is a date. @@ -3313,23 +3474,21 @@ Checks if `value` is a date. 1. `value` *(*)*: The value to check. #### Returns -*(boolean)*: Returns `true` if the `value` is a date, else `false`. +*(boolean)*: Returns `true` if the `value` is a date, else `false`. #### Example ```js _.isDate(new Date); // => true ``` - * * * - ### `_.isElement(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2610 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2611 "View in source") [Ⓣ][1] Checks if `value` is a DOM element. @@ -3337,31 +3496,31 @@ Checks if `value` is a DOM element. 1. `value` *(*)*: The value to check. #### Returns -*(boolean)*: Returns `true` if the `value` is a DOM element, else `false`. +*(boolean)*: Returns `true` if the `value` is a DOM element, else `false`. #### Example ```js _.isElement(document.body); // => true ``` - * * * - ### `_.isEmpty(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2635 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2636 "View in source") [Ⓣ][1] -Checks if `value` is empty. Arrays, strings, or `arguments` objects with a length of `0` and objects with no own enumerable properties are considered "empty". +Checks if `value` is empty. Arrays, strings, or `arguments` objects with a +length of `0` and objects with no own enumerable properties are considered +"empty". #### Arguments 1. `value` *(Array|Object|string)*: The value to inspect. #### Returns -*(boolean)*: Returns `true` if the `value` is empty, else `false`. +*(boolean)*: Returns `true` if the `value` is empty, else `false`. #### Example ```js @@ -3374,18 +3533,20 @@ _.isEmpty({}); _.isEmpty(''); // => true ``` - * * * - ### `_.isEqual(a, b, [callback], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2692 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2693 "View in source") [Ⓣ][1] -Performs a deep comparison between two values to determine if they are equivalent to each other. If a callback is provided it will be executed to compare values. If the callback returns `undefined` comparisons will be handled by the method instead. The callback is bound to `thisArg` and invoked with two arguments; *(a, b)*. +Performs a deep comparison between two values to determine if they are +equivalent to each other. If a callback is provided it will be executed +to compare values. If the callback returns `undefined` comparisons will +be handled by the method instead. The callback is bound to `thisArg` and +invoked with two arguments; (a, b). #### Arguments 1. `a` *(*)*: The value to compare. @@ -3394,7 +3555,7 @@ Performs a deep comparison between two values to determine if they are equivalen 4. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(boolean)*: Returns `true` if the values are equivalent, else `false`. +*(boolean)*: Returns `true` if the values are equivalent, else `false`. #### Example ```js @@ -3419,26 +3580,26 @@ _.isEqual(words, otherWords, function(a, b) { }); // => true ``` - * * * - ### `_.isFinite(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2724 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2725 "View in source") [Ⓣ][1] Checks if `value` is, or can be coerced to, a finite number. - -Note: This is not the same as native `isFinite` which will return true for booleans and empty strings. See http://es5.github.io/#x15.1.2.5. +
+
+Note: This is not the same as native `isFinite` which will return true for +booleans and empty strings. See http://es5.github.io/#x15.1.2.5. #### Arguments 1. `value` *(*)*: The value to check. #### Returns -*(boolean)*: Returns `true` if the `value` is finite, else `false`. +*(boolean)*: Returns `true` if the `value` is finite, else `false`. #### Example ```js @@ -3457,16 +3618,14 @@ _.isFinite(''); _.isFinite(Infinity); // => false ``` - * * * - ### `_.isFunction(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2741 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2742 "View in source") [Ⓣ][1] Checks if `value` is a function. @@ -3474,33 +3633,33 @@ Checks if `value` is a function. 1. `value` *(*)*: The value to check. #### Returns -*(boolean)*: Returns `true` if the `value` is a function, else `false`. +*(boolean)*: Returns `true` if the `value` is a function, else `false`. #### Example ```js _.isFunction(_); // => true ``` - * * * - ### `_.isNaN(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2804 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2805 "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 non-numeric values. See http://es5.github.io/#x15.1.2.4. +
+
+Note: This is not the same as native `isNaN` which will return `true` for +`undefined` and other non-numeric values. See http://es5.github.io/#x15.1.2.4. #### Arguments 1. `value` *(*)*: The value to check. #### Returns -*(boolean)*: Returns `true` if the `value` is `NaN`, else `false`. +*(boolean)*: Returns `true` if the `value` is `NaN`, else `false`. #### Example ```js @@ -3516,16 +3675,14 @@ isNaN(undefined); _.isNaN(undefined); // => false ``` - * * * - ### `_.isNull(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2826 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2827 "View in source") [Ⓣ][1] Checks if `value` is `null`. @@ -3533,7 +3690,7 @@ Checks if `value` is `null`. 1. `value` *(*)*: The value to check. #### Returns -*(boolean)*: Returns `true` if the `value` is `null`, else `false`. +*(boolean)*: Returns `true` if the `value` is `null`, else `false`. #### Example ```js @@ -3543,50 +3700,48 @@ _.isNull(null); _.isNull(undefined); // => false ``` - * * * - ### `_.isNumber(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2845 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2846 "View in source") [Ⓣ][1] Checks if `value` is a number. - +
+
Note: `NaN` is considered a number. See http://es5.github.io/#x8.5. #### Arguments 1. `value` *(*)*: The value to check. #### Returns -*(boolean)*: Returns `true` if the `value` is a number, else `false`. +*(boolean)*: Returns `true` if the `value` is a number, else `false`. #### Example ```js _.isNumber(8.4 * 5); // => true ``` - * * * - ### `_.isObject(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2771 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2772 "View in source") [Ⓣ][1] -Checks if `value` is the language type of Object. *(e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)* +Checks if `value` is the language type of Object. +(e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) #### Arguments 1. `value` *(*)*: The value to check. #### Returns -*(boolean)*: Returns `true` if the `value` is an object, else `false`. +*(boolean)*: Returns `true` if the `value` is an object, else `false`. #### Example ```js @@ -3599,16 +3754,14 @@ _.isObject([1, 2, 3]); _.isObject(1); // => false ``` - * * * - ### `_.isPlainObject(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2874 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2875 "View in source") [Ⓣ][1] Checks if `value` is an object created by the `Object` constructor. @@ -3616,7 +3769,7 @@ Checks if `value` is an object created by the `Object` constructor. 1. `value` *(*)*: The value to check. #### Returns -*(boolean)*: Returns `true` if `value` is a plain object, else `false`. +*(boolean)*: Returns `true` if `value` is a plain object, else `false`. #### Example ```js @@ -3634,16 +3787,14 @@ _.isPlainObject([1, 2, 3]); _.isPlainObject({ 'x': 0, 'y': 0 }); // => true ``` - * * * - ### `_.isRegExp(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2899 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2900 "View in source") [Ⓣ][1] Checks if `value` is a regular expression. @@ -3651,23 +3802,21 @@ Checks if `value` is a regular expression. 1. `value` *(*)*: The value to check. #### Returns -*(boolean)*: Returns `true` if the `value` is a regular expression, else `false`. +*(boolean)*: Returns `true` if the `value` is a regular expression, else `false`. #### Example ```js _.isRegExp(/fred/); // => true ``` - * * * - ### `_.isString(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2916 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2917 "View in source") [Ⓣ][1] Checks if `value` is a string. @@ -3675,23 +3824,21 @@ Checks if `value` is a string. 1. `value` *(*)*: The value to check. #### Returns -*(boolean)*: Returns `true` if the `value` is a string, else `false`. +*(boolean)*: Returns `true` if the `value` is a string, else `false`. #### Example ```js _.isString('fred'); // => true ``` - * * * - ### `_.isUndefined(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2934 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2935 "View in source") [Ⓣ][1] Checks if `value` is `undefined`. @@ -3699,23 +3846,21 @@ Checks if `value` is `undefined`. 1. `value` *(*)*: The value to check. #### Returns -*(boolean)*: Returns `true` if the `value` is `undefined`, else `false`. +*(boolean)*: Returns `true` if the `value` is `undefined`, else `false`. #### Example ```js _.isUndefined(void 0); // => true ``` - * * * - ### `_.keys(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L1972 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L1973 "View in source") [Ⓣ][1] Creates an array composed of the own enumerable property names of an object. @@ -3723,29 +3868,35 @@ Creates an array composed of the own enumerable property names of an object. 1. `object` *(Object)*: The object to inspect. #### Returns -*(Array)*: Returns an array of property names. +*(Array)*: Returns an array of property names. #### Example ```js _.keys({ 'one': 1, 'two': 2, 'three': 3 }); // => ['one', 'two', 'three'] (property order is not guaranteed across environments) ``` - * * * - ### `_.mapValues(object, [callback=identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L2974 "View in source") [Ⓣ][1] - -Creates an object with the same keys as `object` and values generated by running each own enumerable property of `object` through the callback. The callback is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. - -If a property name is provided for `callback` the created "_.pluck" style callback will return the property value of the given element. - -If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L2975 "View in source") [Ⓣ][1] + +Creates an object with the same keys as `object` and values generated by +running each own enumerable property of `object` through the callback. +The callback is bound to `thisArg` and invoked with three arguments; +(value, key, object). +
+
+If a property name is provided for `callback` the created "_.pluck" style +callback will return the property value of the given element. +
+
+If an object is provided for `callback` the created "_.where" style callback +will return `true` for elements that have the properties of the given object, +else `false`. #### Arguments 1. `object` *(Object)*: The object to iterate over. @@ -3753,7 +3904,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Array)*: Returns a new object with values of the results of each `callback` execution. +*(Array)*: Returns a new object with values of the results of each `callback` execution. #### Example ```js @@ -3769,18 +3920,22 @@ var characters = { _.mapValues(characters, 'age'); // => { 'fred': 40, 'pebbles': 1 } ``` - * * * - ### `_.merge(object, [source], [callback], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L3035 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L3036 "View in source") [Ⓣ][1] -Recursively merges own enumerable properties of the source object(s), that don't resolve to `undefined` into the destination object. Subsequent sources will overwrite property assignments of previous sources. If a callback is provided it will be executed to produce the merged values of the destination and source properties. If the callback returns `undefined` merging will be handled by the method instead. The callback is bound to `thisArg` and invoked with two arguments; *(objectValue, sourceValue)*. +Recursively merges own enumerable properties of the source object(s), that +don't resolve to `undefined` into the destination object. Subsequent sources +will overwrite property assignments of previous sources. If a callback is +provided it will be executed to produce the merged values of the destination +and source properties. If the callback returns `undefined` merging will +be handled by the method instead. The callback is bound to `thisArg` and +invoked with two arguments; (objectValue, sourceValue). #### Arguments 1. `object` *(Object)*: The destination object. @@ -3789,7 +3944,7 @@ Recursively merges own enumerable properties of the source object(s), that don't 4. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Object)*: Returns the destination object. +*(Object)*: Returns the destination object. #### Example ```js @@ -3825,18 +3980,21 @@ _.merge(food, otherFood, function(a, b) { }); // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot] } ``` - * * * - ### `_.omit(object, [callback], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L3091 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L3092 "View in source") [Ⓣ][1] -Creates a shallow clone of `object` excluding the specified properties. Property names may be specified as individual arguments or as arrays of property names. If a callback is provided it will be executed for each property of `object` omitting the properties the callback returns truey for. The callback is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. +Creates a shallow clone of `object` excluding the specified properties. +Property names may be specified as individual arguments or as arrays of +property names. If a callback is provided it will be executed for each +property of `object` omitting the properties the callback returns truey +for. The callback is bound to `thisArg` and invoked with three arguments; +(value, key, object). #### Arguments 1. `object` *(Object)*: The source object. @@ -3844,7 +4002,7 @@ Creates a shallow clone of `object` excluding the specified properties. Property 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Object)*: Returns an object without the omitted properties. +*(Object)*: Returns an object without the omitted properties. #### Example ```js @@ -3856,42 +4014,44 @@ _.omit({ 'name': 'fred', 'age': 40 }, function(value) { }); // => { 'name': 'fred' } ``` - * * * - ### `_.pairs(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L3132 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L3133 "View in source") [Ⓣ][1] -Creates a two dimensional array of an object's key-value pairs, i.e. `[[key1, value1], [key2, value2]]`. +Creates a two dimensional array of an object's key-value pairs, +i.e. `[[key1, value1], [key2, value2]]`. #### Arguments 1. `object` *(Object)*: The object to inspect. #### Returns -*(Array)*: Returns new array of key-value pairs. +*(Array)*: Returns new array of key-value pairs. #### Example ```js _.pairs({ 'barney': 36, 'fred': 40 }); // => [['barney', 36], ['fred', 40]] (property order is not guaranteed across environments) ``` - * * * - ### `_.pick(object, [callback], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L3172 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L3173 "View in source") [Ⓣ][1] -Creates a shallow clone of `object` composed of the specified properties. Property names may be specified as individual arguments or as arrays of property names. If a callback is provided it will be executed for each property of `object` picking the properties the callback returns truey for. The callback is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. +Creates a shallow clone of `object` composed of the specified properties. +Property names may be specified as individual arguments or as arrays of +property names. If a callback is provided it will be executed for each +property of `object` picking the properties the callback returns truey +for. The callback is bound to `thisArg` and invoked with three arguments; +(value, key, object). #### Arguments 1. `object` *(Object)*: The source object. @@ -3899,7 +4059,7 @@ Creates a shallow clone of `object` composed of the specified properties. Proper 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Object)*: Returns an object composed of the picked properties. +*(Object)*: Returns an object composed of the picked properties. #### Example ```js @@ -3911,18 +4071,21 @@ _.pick({ 'name': 'fred', '_userid': 'fred1' }, function(value, key) { }); // => { 'name': 'fred' } ``` - * * * - ### `_.transform(object, [callback=identity], [accumulator], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L3227 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L3228 "View in source") [Ⓣ][1] -An alternative to `_.reduce` this method transforms `object` to a new `accumulator` object which is the result of running each of its own enumerable properties through a callback, with each callback execution potentially mutating the `accumulator` object. The callback is bound to `thisArg` and invoked with four arguments; *(accumulator, value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`. +An alternative to `_.reduce` this method transforms `object` to a new +`accumulator` object which is the result of running each of its own +enumerable properties through a callback, with each callback execution +potentially mutating the `accumulator` object. The callback is bound to +`thisArg` and invoked with four arguments; (accumulator, value, key, object). +Callbacks may exit iteration early by explicitly returning `false`. #### Arguments 1. `object` *(Array|Object)*: The object to iterate over. @@ -3931,7 +4094,7 @@ An alternative to `_.reduce` this method transforms `object` to a new `accumulat 4. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(*)*: Returns the accumulated value. +*(*)*: Returns the accumulated value. #### Example ```js @@ -3948,16 +4111,14 @@ var mapped = _.transform({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) }); // => { 'a': 3, 'b': 6, 'c': 9 } ``` - * * * - ### `_.values(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L3261 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L3262 "View in source") [Ⓣ][1] Creates an array composed of the own enumerable property values of `object`. @@ -3965,49 +4126,27 @@ Creates an array composed of the own enumerable property values of `object`. 1. `object` *(Object)*: The object to inspect. #### Returns -*(Array)*: Returns an array of property values. +*(Array)*: Returns an array of property values. #### Example ```js _.values({ 'one': 1, 'two': 2, 'three': 3 }); // => [1, 2, 3] (property order is not guaranteed across environments) ``` - * * * - - ## `“Utilities” Methods` - - -### `_.now` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6351 "View in source") [Ⓣ][1] - -*(unknown)*: Gets the number of milliseconds that have elapsed since the Unix epoch *(1 January `1970 00`:00:00 UTC)*. - -#### Example -```js -var stamp = _.now(); -_.defer(function() { console.log(_.now() - stamp); }); -// => logs the number of milliseconds it took for the deferred function to be called -``` - -* * * - - - - ### `_.constant(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6125 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6126 "View in source") [Ⓣ][1] Creates a function that returns `value`. @@ -4015,7 +4154,7 @@ Creates a function that returns `value`. 1. `value` *(*)*: The value to return from the new function. #### Returns -*(Function)*: Returns the new function. +*(Function)*: Returns the new function. #### Example ```js @@ -4024,18 +4163,19 @@ var getter = _.constant(object); getter() === object; // => true ``` - * * * - ### `_.createCallback([func=identity], [thisArg], [argCount])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6162 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6163 "View in source") [Ⓣ][1] -Produces a callback bound to an optional `thisArg`. If `func` is a property name the created callback will return the property value for a given element. If `func` is an object the created callback will return `true` for elements that contain the equivalent object properties, otherwise it will return `false`. +Produces a callback bound to an optional `thisArg`. If `func` is a property +name the created callback will return the property value for a given element. +If `func` is an object the created callback will return `true` for elements +that contain the equivalent object properties, otherwise it will return `false`. #### Arguments 1. `[func=identity]` *(*)*: The value to convert to a callback. @@ -4043,7 +4183,7 @@ Produces a callback bound to an optional `thisArg`. If `func` is a property name 3. `[argCount]` *(number)*: The number of arguments the callback accepts. #### Returns -*(Function)*: Returns a callback function. +*(Function)*: Returns a callback function. #### Example ```js @@ -4063,40 +4203,37 @@ _.createCallback = _.wrap(_.createCallback, function(func, callback, thisArg) { _.filter(characters, 'age__gt38'); // => [{ 'name': 'fred', 'age': 40 }] ``` - * * * - ### `_.escape(string)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6211 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6212 "View in source") [Ⓣ][1] -Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding HTML entities. +Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their +corresponding HTML entities. #### Arguments 1. `string` *(string)*: The string to escape. #### Returns -*(string)*: Returns the escaped string. +*(string)*: Returns the escaped string. #### Example ```js _.escape('Fred, Wilma, & Pebbles'); // => 'Fred, Wilma, & Pebbles' ``` - * * * - ### `_.identity(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6229 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6230 "View in source") [Ⓣ][1] This method returns the first argument provided to it. @@ -4104,7 +4241,7 @@ This method returns the first argument provided to it. 1. `value` *(*)*: Any value. #### Returns -*(*)*: Returns `value`. +*(*)*: Returns `value`. #### Example ```js @@ -4112,18 +4249,17 @@ var object = { 'name': 'fred' }; _.identity(object) === object; // => true ``` - * * * - ### `_.mixin([object=lodash], source, [options])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6261 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6262 "View in source") [Ⓣ][1] -Adds function properties of a source object to the destination object. If `object` is a function methods will be added to its prototype as well. +Adds function properties of a source object to the destination object. +If `object` is a function methods will be added to its prototype as well. #### Arguments 1. `[object=lodash]` *(Function|Object)*: object The destination object. @@ -4148,36 +4284,33 @@ _.mixin({ 'capitalize': capitalize }, { 'chain': false }); _('fred').capitalize(); // => 'Fred' ``` - * * * - ### `_.noConflict()` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6317 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6318 "View in source") [Ⓣ][1] -Reverts the '_' variable to its previous value and returns a reference to the `lodash` function. +Reverts the '_' variable to its previous value and returns a reference to +the `lodash` function. #### Returns -*(Function)*: Returns the `lodash` function. +*(Function)*: Returns the `lodash` function. #### Example ```js var lodash = _.noConflict(); ``` - * * * - ### `_.noop()` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6334 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6335 "View in source") [Ⓣ][1] A no-operation function. @@ -4187,51 +4320,70 @@ var object = { 'name': 'fred' }; _.noop(object) === undefined; // => true ``` - * * * + + +### `_.now` +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6352 "View in source") [Ⓣ][1] + +Gets the number of milliseconds that have elapsed since the Unix epoch +(1 January 1970 00:00:00 UTC). + +#### Example +```js +var stamp = _.now(); +_.defer(function() { console.log(_.now() - stamp); }); +// => logs the number of milliseconds it took for the deferred function to be called +``` +* * * + + ### `_.parseInt(value, [radix])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6374 "View in source") [Ⓣ][1] - -Converts the given value into an integer of the specified radix. If `radix` is `undefined` or `0` a `radix` of `10` is used unless the `value` is a hexadecimal, in which case a `radix` of `16` is used. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6375 "View in source") [Ⓣ][1] -Note: This method avoids differences in native ES3 and ES5 `parseInt` implementations. See http://es5.github.io/#E. +Converts the given value into an integer of the specified radix. +If `radix` is `undefined` or `0` a `radix` of `10` is used unless the +`value` is a hexadecimal, in which case a `radix` of `16` is used. +
+
+Note: This method avoids differences in native ES3 and ES5 `parseInt` +implementations. See http://es5.github.io/#E. #### Arguments 1. `value` *(string)*: The value to parse. 2. `[radix]` *(number)*: The radix used to interpret the value to parse. #### Returns -*(number)*: Returns the new integer value. +*(number)*: Returns the new integer value. #### Example ```js _.parseInt('08'); // => 8 ``` - * * * - ### `_.property(key)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6403 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6404 "View in source") [Ⓣ][1] -Creates a "_.pluck" style function, which returns the `key` value of a given object. +Creates a "_.pluck" style function, which returns the `key` value of a +given object. #### Arguments 1. `key` *(string)*: The name of the property to retrieve. #### Returns -*(Function)*: Returns the new function. +*(Function)*: Returns the new function. #### Example ```js @@ -4248,18 +4400,19 @@ _.map(characters, getName); _.sortBy(characters, getName); // => [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] ``` - * * * - ### `_.random([min=0], [max=1], [floating=false])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6436 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6437 "View in source") [Ⓣ][1] -Produces a random number between `min` and `max` *(inclusive)*. If only one argument is provided a number between `0` and the given number will be returned. If `floating` is truey or either `min` or `max` are floats a floating-point number will be returned instead of an integer. +Produces a random number between `min` and `max` (inclusive). If only one +argument is provided a number between `0` and the given number will be +returned. If `floating` is truey or either `min` or `max` are floats a +floating-point number will be returned instead of an integer. #### Arguments 1. `[min=0]` *(number)*: The minimum possible value. @@ -4267,7 +4420,7 @@ Produces a random number between `min` and `max` *(inclusive)*. If only one argu 3. `[floating=false]` *(boolean)*: Specify returning a floating-point number. #### Returns -*(number)*: Returns a random number. +*(number)*: Returns a random number. #### Example ```js @@ -4283,25 +4436,26 @@ _.random(5, true); _.random(1.2, 5.2); // => a floating-point number between 1.2 and 5.2 ``` - * * * - ### `_.result(object, key)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6494 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6495 "View in source") [Ⓣ][1] -Resolves the value of property `key` on `object`. If `key` is a function it will be invoked with the `this` binding of `object` and its result returned, else the property value is returned. If `object` is falsey then `undefined` is returned. +Resolves the value of property `key` on `object`. If `key` is a function +it will be invoked with the `this` binding of `object` and its result returned, +else the property value is returned. If `object` is falsey then `undefined` +is returned. #### Arguments 1. `object` *(Object)*: The object to inspect. 2. `key` *(string)*: The name of the property to resolve. #### Returns -*(*)*: Returns the resolved value. +*(*)*: Returns the resolved value. #### Example ```js @@ -4318,16 +4472,14 @@ _.result(object, 'cheese'); _.result(object, 'stuff'); // => 'nonsense' ``` - * * * - ### `_.runInContext([context=root])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L469 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L469 "View in source") [Ⓣ][1] Create a new `lodash` function using the given context object. @@ -4335,25 +4487,29 @@ Create a new `lodash` function using the given context object. 1. `[context=root]` *(Object)*: The context object. #### Returns -*(Function)*: Returns the `lodash` function. +*(Function)*: Returns the `lodash` function. * * * - -### `_.template(text, data, [options], [options.escape], [options.evaluate], [options.imports], [options.interpolate], [sourceURL], [variable])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6587 "View in source") [Ⓣ][1] - -A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code. - -Note: In the development build, `_.template` utilizes sourceURLs for easier debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl +### `_.template(text, data, [options], [sourceURL], [variable])` +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6588 "View in source") [Ⓣ][1] +A micro-templating method that handles arbitrary delimiters, preserves +whitespace, and correctly escapes quotes within interpolated code. +
+
+Note: In the development build, `_.template` utilizes sourceURLs for easier +debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl +
+
For more information on precompiling templates see:
-http://lodash.com/custom-builds - +https://lodash.com/custom-builds +
+
For more information on Chrome extension sandboxes see:
http://developer.chrome.com/stable/extensions/sandboxingEval.html @@ -4369,7 +4525,8 @@ http://developer.chrome.com/stable/extensions/sandboxingEval.html 9. `[variable]` *(string)*: The data object variable name. #### Returns -*(Function, string)*: Returns a compiled function when no `data` object is given, else it returns the interpolated text. +*(Function|string)*: Returns a compiled function when no `data` object +is given, else it returns the interpolated text. #### Example ```js @@ -4430,18 +4587,18 @@ fs.writeFileSync(path.join(cwd, 'jst.js'), '\ };\ '); ``` - * * * - ### `_.times(n, callback, [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6710 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6711 "View in source") [Ⓣ][1] -Executes the callback `n` times, returning an array of the results of each callback execution. The callback is bound to `thisArg` and invoked with one argument; *(index)*. +Executes the callback `n` times, returning an array of the results +of each callback execution. The callback is bound to `thisArg` and invoked +with one argument; (index). #### Arguments 1. `n` *(number)*: The number of times to execute the callback. @@ -4449,7 +4606,7 @@ Executes the callback `n` times, returning an array of the results of each callb 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Array)*: Returns an array of the results of each `callback` execution. +*(Array)*: Returns an array of the results of each `callback` execution. #### Example ```js @@ -4462,40 +4619,38 @@ _.times(3, function(n) { mage.castSpell(n); }); _.times(3, function(n) { this.cast(n); }, mage); // => also calls `mage.castSpell(n)` three times ``` - * * * - ### `_.unescape(string)` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6737 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6738 "View in source") [Ⓣ][1] -The inverse of `_.escape` this method converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding characters. +The inverse of `_.escape` this method converts the HTML entities +`&`, `<`, `>`, `"`, and `'` in `string` to their +corresponding characters. #### Arguments 1. `string` *(string)*: The string to unescape. #### Returns -*(string)*: Returns the unescaped string. +*(string)*: Returns the unescaped string. #### Example ```js _.unescape('Fred, Barney & Pebbles'); // => 'Fred, Barney & Pebbles' ``` - * * * - ### `_.uniqueId([prefix])` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L6757 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L6758 "View in source") [Ⓣ][1] Generates a unique ID. If `prefix` is provided the ID will be appended to it. @@ -4503,7 +4658,7 @@ Generates a unique ID. If `prefix` is provided the ID will be appended to it. 1. `[prefix]` *(string)*: The value to prefix the ID with. #### Returns -*(string)*: Returns the unique ID. +*(string)*: Returns the unique ID. #### Example ```js @@ -4513,15 +4668,12 @@ _.uniqueId('contact_'); _.uniqueId(); // => '105' ``` - * * * - - ## `Methods` @@ -4529,7 +4681,7 @@ _.uniqueId(); ### `_.templateSettings.imports._` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L867 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L867 "View in source") [Ⓣ][1] A reference to the `lodash` function. @@ -4537,10 +4689,8 @@ A reference to the `lodash` function. - - ## `Properties` @@ -4548,243 +4698,240 @@ A reference to the `lodash` function. ### `_.VERSION` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L7078 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L7079 "View in source") [Ⓣ][1] -*(string)*: The semantic version number. +(string): The semantic version number. * * * - ### `_.support` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L676 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L676 "View in source") [Ⓣ][1] -*(Object)*: An object used to flag environments features. +(Object): An object used to flag environments features. * * * - ### `_.support.argsClass` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L693 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L693 "View in source") [Ⓣ][1] -*(boolean)*: Detect if an `arguments` object's [[Class]] is resolvable *(all but Firefox < `4`, IE < `9`)*. +(boolean): Detect if an `arguments` object's [[Class]] is resolvable (all but Firefox < 4, IE < 9). * * * - ### `_.support.argsObject` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L701 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L701 "View in source") [Ⓣ][1] -*(boolean)*: Detect if `arguments` objects are `Object` objects *(all but Narwhal and Opera < `10.5`)*. +(boolean): Detect if `arguments` objects are `Object` objects (all but Narwhal and Opera < 10.5). * * * - ### `_.support.enumErrorProps` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L710 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L710 "View in source") [Ⓣ][1] -*(boolean)*: Detect if `name` or `message` properties of `Error.prototype` are enumerable by default. *(IE < `9`, Safari < `5.1`)* +(boolean): Detect if `name` or `message` properties of `Error.prototype` are +enumerable by default. (IE < 9, Safari < 5.1) * * * - ### `_.support.enumPrototypes` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L723 "View in source") [Ⓣ][1] - -*(boolean)*: Detect if `prototype` properties are enumerable by default. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L723 "View in source") [Ⓣ][1] -Firefox < `3.6`, Opera > `9.50` - Opera < `11.60`, and Safari < `5.1` *(if the prototype or a property on the prototype has been set)* incorrectly sets a function's `prototype` property [[Enumerable]] value to `true`. +(boolean): Detect if `prototype` properties are enumerable by default. +
+
+Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1 +(if the prototype or a property on the prototype has been set) +incorrectly sets a function's `prototype` property [[Enumerable]] +value to `true`. * * * - ### `_.support.funcDecomp` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L732 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L732 "View in source") [Ⓣ][1] -*(boolean)*: Detect if functions can be decompiled by `Function#toString` *(all but PS3 and older Opera mobile browsers & avoided in Windows `8` apps)*. +(boolean): Detect if functions can be decompiled by `Function#toString` +(all but PS3 and older Opera mobile browsers & avoided in Windows 8 apps). * * * - ### `_.support.funcNames` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L740 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L740 "View in source") [Ⓣ][1] -*(boolean)*: Detect if `Function#name` is supported *(all but IE)*. +(boolean): Detect if `Function#name` is supported (all but IE). * * * - ### `_.support.nonEnumArgs` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L749 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L749 "View in source") [Ⓣ][1] -*(boolean)*: Detect if `arguments` object indexes are non-enumerable *(Firefox < `4`, IE < `9`, PhantomJS, Safari < `5.1`)*. +(boolean): Detect if `arguments` object indexes are non-enumerable +(Firefox < 4, IE < 9, PhantomJS, Safari < 5.1). * * * - ### `_.support.nonEnumShadows` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L760 "View in source") [Ⓣ][1] - -*(boolean)*: Detect if properties shadowing those on `Object.prototype` are non-enumerable. +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L760 "View in source") [Ⓣ][1] -In IE < `9` an objects own properties, shadowing non-enumerable ones, are made non-enumerable as well *(a.k.a the JScript [[DontEnum]] bug)*. +(boolean): Detect if properties shadowing those on `Object.prototype` are non-enumerable. +
+
+In IE < 9 an objects own properties, shadowing non-enumerable ones, are +made non-enumerable as well (a.k.a the JScript [[DontEnum]] bug). * * * - ### `_.support.ownLast` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L768 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L768 "View in source") [Ⓣ][1] -*(boolean)*: Detect if own properties are iterated after inherited properties *(all but IE < `9`)*. +(boolean): Detect if own properties are iterated after inherited properties (all but IE < 9). * * * - ### `_.support.spliceObjects` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L782 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L782 "View in source") [Ⓣ][1] -*(boolean)*: Detect if `Array#shift` and `Array#splice` augment array-like objects correctly. - -Firefox < `10`, IE compatibility mode, and IE < `9` have buggy Array `shift()` and `splice()` functions that fail to remove the last element, `value[0]`, of array-like objects even though the `length` property is set to `0`. The `shift()` method is buggy in IE `8` compatibility mode, while `splice()` is buggy regardless of mode in IE < `9` and buggy in compatibility mode in IE `9`. +(boolean): Detect if `Array#shift` and `Array#splice` augment array-like objects correctly. +
+
+Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array `shift()` +and `splice()` functions that fail to remove the last element, `value[0]`, +of array-like objects even though the `length` property is set to `0`. +The `shift()` method is buggy in IE 8 compatibility mode, while `splice()` +is buggy regardless of mode in IE < 9 and buggy in compatibility mode in IE 9. * * * - ### `_.support.unindexedChars` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L793 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L793 "View in source") [Ⓣ][1] -*(boolean)*: Detect lack of support for accessing string characters by index. - -IE < `8` can't access characters by index and IE `8` can only access characters by index on string literals. +(boolean): Detect lack of support for accessing string characters by index. +
+
+IE < 8 can't access characters by index and IE 8 can only access +characters by index on string literals. * * * - ### `_.templateSettings` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L819 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L819 "View in source") [Ⓣ][1] -*(Object)*: By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby *(ERB)*. Change the following template settings to use alternative delimiters. +(Object): By default, the template delimiters used by Lo-Dash are similar to those in +embedded Ruby (ERB). Change the following template settings to use alternative +delimiters. * * * - ### `_.templateSettings.escape` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L827 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L827 "View in source") [Ⓣ][1] -*(RegExp)*: Used to detect `data` property values to be HTML-escaped. +(RegExp): Used to detect `data` property values to be HTML-escaped. * * * - ### `_.templateSettings.evaluate` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L835 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L835 "View in source") [Ⓣ][1] -*(RegExp)*: Used to detect code to be evaluated. +(RegExp): Used to detect code to be evaluated. * * * - -### `_.templateSettings.interpolate` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L843 "View in source") [Ⓣ][1] +### `_.templateSettings.imports` +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L859 "View in source") [Ⓣ][1] -*(RegExp)*: Used to detect `data` property values to inject. +(Object): Used to import variables into the compiled template. * * * - -### `_.templateSettings.variable` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L851 "View in source") [Ⓣ][1] +### `_.templateSettings.interpolate` +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L843 "View in source") [Ⓣ][1] -*(string)*: Used to reference the data object in the template text. +(RegExp): Used to detect `data` property values to inject. * * * - -### `_.templateSettings.imports` -# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.1/lodash.js#L859 "View in source") [Ⓣ][1] +### `_.templateSettings.variable` +# [Ⓢ](https://github.com/lodash/lodash/blob/2.4.2/lodash.js#L851 "View in source") [Ⓣ][1] -*(Object)*: Used to import variables into the compiled template. +(string): Used to reference the data object in the template text. * * * - - - - [1]: #arrays "Jump back to the TOC." + [1]: #arrays "Jump back to the TOC." diff --git a/lodash.js b/lodash.js index 5b3790361d..5013f5c1f9 100644 --- a/lodash.js +++ b/lodash.js @@ -1,10 +1,10 @@ /** * @license - * Lo-Dash 2.4.1 + * Lo-Dash 2.4.2 * Copyright 2012-2013 The Dojo Foundation * Based on Underscore.js 1.5.2 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Available under MIT license */ ;(function() { @@ -1835,6 +1835,7 @@ var setBindData = !defineProperty ? noop : function(func, value) { descriptor.value = value; defineProperty(func, '__bindData__', descriptor); + descriptor.value = null; }; /** @@ -6506,7 +6507,7 @@ * debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl * * For more information on precompiling templates see: - * http://lodash.com/custom-builds + * https://lodash.com/custom-builds * * For more information on Chrome extension sandboxes see: * http://developer.chrome.com/stable/extensions/sandboxingEval.html @@ -7075,7 +7076,7 @@ * @memberOf _ * @type string */ - lodash.VERSION = '2.4.1'; + lodash.VERSION = '2.4.2'; // add "Chaining" functions to the wrapper lodash.prototype.chain = wrapperChain; diff --git a/package.json b/package.json index 499f5212a0..f32b7ec0d3 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "lodash", - "version": "2.4.1", + "version": "2.4.2", "description": "A utility library delivering consistency, customization, performance, & extras.", - "homepage": "http://lodash.com/", + "homepage": "https://lodash.com/", "license": "MIT", "main": "dist/lodash.js", "keywords": ["amd", "browser", "client", "customize", "functional", "server", "util"], @@ -11,11 +11,9 @@ "John-David Dalton (http://allyoucanleet.com/)", "Blaine Bublitz (http://www.iceddev.com/)", "Kit Cambridge (http://kitcambridge.be/)", - "Mathias Bynens (http://mathiasbynens.be/)" + "Mathias Bynens (https://mathiasbynens.be/)" ], - "bugs": "https://github.com/lodash/lodash/issues", - "repository": { "type": "git", "url": "https://github.com/lodash/lodash.git" }, - "engines": ["node", "rhino"], + "repository": "lodash/lodash", "files": [ "LICENSE.txt", "lodash.js",