diff --git a/dist/lodash.compat.js b/dist/lodash.compat.js index f31211704..119c4d780 100644 --- a/dist/lodash.compat.js +++ b/dist/lodash.compat.js @@ -4517,6 +4517,9 @@ * binding of `thisArg` and prepends any additional `bind` arguments to those * provided to the bound function. * + * Note: Unlike native `Function#bind` this method does not set the `length` + * property of bound functions. + * * @static * @memberOf _ * @category Functions @@ -4546,6 +4549,8 @@ * of method names. If no method names are provided all the function properties * of `object` will be bound. * + * Note: This method does not set the `length` property of bound functions. + * * @static * @memberOf _ * @category Functions @@ -4674,6 +4679,8 @@ * remaining `func` arguments, and so on. The arity of `func` can be specified * if `func.length` is not sufficient. * + * Note: This method does not set the `length` property of curried functions. + * * @static * @memberOf _ * @category Functions @@ -4982,6 +4989,9 @@ * `partial` arguments prepended to those provided to the new function. This * method is similar to `_.bind` except it does **not** alter the `this` binding. * + * Note: This method does not set the `length` property of partially applied + * functions. + * * @static * @memberOf _ * @category Functions @@ -5003,6 +5013,9 @@ * This method is like `_.partial` except that `partial` arguments are * appended to those provided to the new function. * + * Note: This method does not set the `length` property of partially applied + * functions. + * * @static * @memberOf _ * @category Functions @@ -5137,10 +5150,10 @@ * defaults(object, { 'name': 'fred', 'employer': 'slate' }); * // => { 'name': 'barney', 'employer': 'slate' } */ - function assign(object, source, guard) { + function assign(object, source) { var args = arguments, argsIndex = 0, - argsLength = typeof guard == 'number' ? 2 : args.length; + argsLength = args[3] && args[3][args[2]] === source ? 2 : args.length; if (argsLength > 3 && typeof args[argsLength - 2] == 'function') { var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2); @@ -5306,8 +5319,6 @@ * @category Objects * @param {Object} object The destination object. * @param {...Object} [source] The source objects. - * @param- {Object} [guard] Allows working with `_.reduce` without using its - * `key` and `object` arguments as sources. * @returns {Object} Returns the destination object. * @example * @@ -5315,10 +5326,10 @@ * _.defaults(object, { 'name': 'fred', 'employer': 'slate' }); * // => { 'name': 'barney', 'employer': 'slate' } */ - function defaults(object, source, guard) { + function defaults(object, source) { var args = arguments, argsIndex = 0, - argsLength = typeof guard == 'number' ? 2 : args.length; + argsLength = args[3] && args[3][args[2]] === source ? 2 : args.length; while (++argsIndex < argsLength) { source = args[argsIndex]; @@ -5854,8 +5865,8 @@ /** * 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 the [ES5 spec](http://es5.github.io/#x15.1.2.5) + * Note: This method is not the same as native `isFinite` which will return + * `true` for booleans and empty strings. See the [ES5 spec](http://es5.github.io/#x15.1.2.5) * for more details. * * @static @@ -5938,8 +5949,8 @@ /** * 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 the [ES5 spec](http://es5.github.io/#x15.1.2.4) + * Note: This method is not the same as native `isNaN` which will return `true` + * for `undefined` and other non-numeric values. See the [ES5 spec](http://es5.github.io/#x15.1.2.4) * for more details. * * @static @@ -6379,7 +6390,7 @@ } /** - * An alternative to `_.reduce` this method transforms `object` to a new + * 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 diff --git a/dist/lodash.compat.min.js b/dist/lodash.compat.min.js index 713657e82..3b7b2dd71 100644 --- a/dist/lodash.compat.min.js +++ b/dist/lodash.compat.min.js @@ -27,8 +27,8 @@ if(t=e.createCallback(t,r,3),le(n)){r=-1;for(var o=n.length;++ra&&(a=l)}}else t=null==t&&rr(n)?u:e.createCallback(t,r,3),lt(n,function(n,r,e){r=t(n,r,e),r>o&&(o=r,a=n)});return a}function Wt(n,t,r,u){var o=3>arguments.length;if(t=e.createCallback(t,u,4),le(n)){var a=-1,i=n.length;for(o&&i&&(r=n[++a]);++aarguments.length;return t=e.createCallback(t,u,4),$t(n,function(n,e,u){r=o?(o=false,n):t(r,n,e,u)}),r}function Kt(n){var t=-1,r=n?n.length:0,e=fr(typeof r=="number"?r:0);return Ft(n,function(n){var r=gt(0,++t);e[t]=e[r],e[r]=n}),e}function Mt(n,t,r){var u;if(t=e.createCallback(t,r,3),le(n)){r=-1;for(var o=n.length;++r=y;m?(u&&(u=Sr(u)),c=a,o=n.apply(i,e)):u||(u=Dr(v,y))}return m&&l?l=Sr(l):l||t===p||(l=Dr(g,t)),r&&(m=true,o=n.apply(i,e)),!m||l||u||(e=i=null),o}}function Xt(n,t,r){var e=arguments,u=0,o=typeof r=="number"?2:e.length;if(3=y;m?(u&&(u=Sr(u)),c=a,o=n.apply(i,e)):u||(u=Dr(v,y))}return m&&l?l=Sr(l):l||t===p||(l=Dr(g,t)),r&&(m=true,o=n.apply(i,e)),!m||l||u||(e=i=null),o}}function Xt(n,t){var r=arguments,e=0,u=r[3]&&r[3][r[2]]===t?2:r.length;if(3 { 'name': 'barney', 'employer': 'slate' } */ - function assign(object, source, guard) { + function assign(object, source) { var args = arguments, argsIndex = 0, - argsLength = typeof guard == 'number' ? 2 : args.length; + argsLength = args[3] && args[3][args[2]] === source ? 2 : args.length; if (argsLength > 3 && typeof args[argsLength - 2] == 'function') { var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2); @@ -4991,8 +5004,6 @@ * @category Objects * @param {Object} object The destination object. * @param {...Object} [source] The source objects. - * @param- {Object} [guard] Allows working with `_.reduce` without using its - * `key` and `object` arguments as sources. * @returns {Object} Returns the destination object. * @example * @@ -5000,10 +5011,10 @@ * _.defaults(object, { 'name': 'fred', 'employer': 'slate' }); * // => { 'name': 'barney', 'employer': 'slate' } */ - function defaults(object, source, guard) { + function defaults(object, source) { var args = arguments, argsIndex = 0, - argsLength = typeof guard == 'number' ? 2 : args.length; + argsLength = args[3] && args[3][args[2]] === source ? 2 : args.length; while (++argsIndex < argsLength) { source = args[argsIndex]; @@ -5544,8 +5555,8 @@ /** * 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 the [ES5 spec](http://es5.github.io/#x15.1.2.5) + * Note: This method is not the same as native `isFinite` which will return + * `true` for booleans and empty strings. See the [ES5 spec](http://es5.github.io/#x15.1.2.5) * for more details. * * @static @@ -5622,8 +5633,8 @@ /** * 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 the [ES5 spec](http://es5.github.io/#x15.1.2.4) + * Note: This method is not the same as native `isNaN` which will return `true` + * for `undefined` and other non-numeric values. See the [ES5 spec](http://es5.github.io/#x15.1.2.4) * for more details. * * @static @@ -6059,7 +6070,7 @@ } /** - * An alternative to `_.reduce` this method transforms `object` to a new + * 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 diff --git a/dist/lodash.min.js b/dist/lodash.min.js index 55b741710..dded00773 100644 --- a/dist/lodash.min.js +++ b/dist/lodash.min.js @@ -6,9 +6,9 @@ ;(function(){function n(n,t){if(n!==t){if(n>t||typeof n=="undefined")return 1;if(ne||13e||8202r||13r||8202e||13e||8202r||13r||8202=E&&o===t,f=[];if(a){var c=l(e);c?(o=r,e=c):a=false}for(;++uo(e,c)&&f.push(c);return a&&g(e),f}function ft(n,t,r,e){e=(e||0)-1;for(var u=n?n.length:0,o=[];++e=E&&i===t,p=u||c?s():f; for(c&&(p=l(p),i=r);++oi(p,y))&&((u||c)&&p.push(y),f.push(h))}return c?(v(p.g),g(p)):u&&v(p),f}function gt(n){return function(t,r,e){var u={};r=i.createCallback(r,e,3),e=-1;var o=t?t.length:0;if(typeof o=="number")for(;++ee?zr(0,u+e):e||0}else if(e)return e=Ct(n,r),n[e]===r?e:-1;return t(n,r,e)}function kt(n,t,r){if(typeof t!="number"&&null!=t){var e=0,u=-1,o=n?n.length:0; for(t=i.createCallback(t,r,3);++ut?t=zr(u+t,0):t>u&&(t=u),typeof r=="undefined"?r=u:0>r?r=zr(u+r,0):r>u&&(r=u),u=r-t||0,r=ir(u);++e>>1,r(n[e])r?0:r);++t=e)return false;if(typeof n=="string"||!te(n)&&Zt(n))return Dr?Dr.call(n,t,r):-1r?zr(0,e+r):r)||0,-1o&&(o=f)}}else t=null==t&&Zt(n)?u:i.createCallback(t,r,3),Dt(n,function(n,r,u){r=t(n,r,u),r>e&&(e=r,o=n) });return o}function qt(n,t,r,e){var u=3>arguments.length;t=i.createCallback(t,e,4);var o=-1,a=n?n.length:0;if(typeof a=="number")for(u&&a&&(r=n[++o]);++oarguments.length;return t=i.createCallback(t,e,4),Ft(n,function(n,e,o){r=u?(u=false,n):t(r,n,e,o)}),r}function zt(n){var t=-1,r=n?n.length:0,e=ir(typeof r=="number"?r:0);return Dt(n,function(n){var r=st(0,++t);e[t]=e[r],e[r]=n}),e}function Lt(n,t,r){var e; t=i.createCallback(t,r,3),r=-1;var u=n?n.length:0;if(typeof u=="number")for(;++r=y;m?(i&&(i=xr(i)),s=f,a=n.apply(l,o)):i||(i=Rr(e,y))}return m&&c?c=xr(c):c||t===h||(c=Rr(u,t)),r&&(m=true,a=n.apply(l,o)),!m||c||i||(o=l=null),a}}function Mt(n,t,r){var e=arguments,u=0,o=typeof r=="number"?2:e.length;if(3=y;m?(i&&(i=xr(i)),s=f,a=n.apply(l,o)):i||(i=Rr(e,y))}return m&&c?c=xr(c):c||t===h||(c=Rr(u,t)),r&&(m=true,a=n.apply(l,o)),!m||c||i||(o=l=null),a}}function Mt(n,t){var r=arguments,e=0,u=r[3]&&r[3][r[2]]===t?2:r.length;if(3--n?t.apply(this,arguments):void 0}},i.assign=Mt,i.at=function(n){for(var t=arguments,r=-1,e=ft(t,true,false,1),t=t[2]&&t[2][t[1]]===n?1:e.length,u=ir(t);++r=E&&l(e?n[e]:f)))}var a=n[0],p=-1,h=a?a.length:0,y=[];n:for(;++p(m?r(m,c):i(f,c))){for(e=u,(m||f).push(c);--e;)if(m=o[e],0>(m?r(m,c):i(n[e],c)))continue n;y.push(c)}}for(;u--;)(m=o[u])&&g(m);return v(o),v(f),y},i.invert=function(n,t){for(var r=-1,e=ee(n),u=e.length,o={};++rn.indexOf(";")?n:n.replace(D,w)) },i.uniqueId=function(n){var t=++O;return vr(null==n?"":n)+t},i.all=It,i.any=Lt,i.detect=Tt,i.findWhere=Tt,i.foldl=qt,i.foldr=Wt,i.include=Rt,i.inject=qt,er(function(){var n={};return Vt(i,function(t,r){i.prototype[r]||(n[r]=t)}),n}(),false),i.first=wt,i.last=function(n,t,r){var e=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;for(t=i.createCallback(t,r,3);o--&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n?n[u-1]:k;return e=u-e,xt(n,0"']/g,$=/<%-([\s\S]+?)%>/g,B=/<%([\s\S]+?)%>/g,q=/<%=([\s\S]+?)%>/g,W=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,z=/\w*$/,L=/^\s*function[ \n\r\t]+\w/,P=/^0[xX]/,K=/($^)/,M=/\bthis\b/,U=/['\n\r\t\u2028\u2029\\]/g,V="Array Boolean Date Function Math Number Object RegExp String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError window WinRTError".split(" "),X="[object Arguments]",G="[object Array]",H="[object Boolean]",J="[object Date]",Q="[object Function]",Y="[object Number]",Z="[object Object]",nt="[object RegExp]",tt="[object String]",rt={}; +},i.take=wt,i.head=wt,Vt(i,function(n,t){var r="sample"!==t;i.prototype[t]||(i.prototype[t]=function(t,e){var u=this.__chain__,o=n(this.__wrapped__,t,e);return u||null!=t&&(!e||r&&typeof t=="function")?new b(o,u):o})}),i.VERSION="2.4.1",i.prototype.chain=function(){return this.__chain__=true,this},i.prototype.toString=function(){return vr(this.__wrapped__)},i.prototype.value=Nt,i.prototype.valueOf=Nt,Dt(["join","pop","shift"],function(n){var t=yr[n];i.prototype[n]=function(){var n=this.__chain__,r=t.apply(this.__wrapped__,arguments); +return n?new b(r,n):r}}),Dt(["push","reverse","sort","unshift"],function(n){var t=yr[n];i.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),Dt(["concat","splice"],function(n){var t=yr[n];i.prototype[n]=function(){return new b(t.apply(this.__wrapped__,arguments),this.__chain__)}}),i}var k,x=[],C=[],O=0,A="__1335248838000__",E=75,N=40,R=" \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",I=/\b__p\+='';/g,S=/\b(__p\+=)''\+/g,T=/(__e\(.*?\)|\b__t\))\+'';/g,D=/&(?:amp|lt|gt|quot|#39);/g,F=/[&<>"']/g,$=/<%-([\s\S]+?)%>/g,B=/<%([\s\S]+?)%>/g,q=/<%=([\s\S]+?)%>/g,W=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,z=/\w*$/,L=/^\s*function[ \n\r\t]+\w/,P=/^0[xX]/,K=/($^)/,M=/\bthis\b/,U=/['\n\r\t\u2028\u2029\\]/g,V="Array Boolean Date Function Math Number Object RegExp String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError window WinRTError".split(" "),X="[object Arguments]",G="[object Array]",H="[object Boolean]",J="[object Date]",Q="[object Function]",Y="[object Number]",Z="[object Object]",nt="[object RegExp]",tt="[object String]",rt={}; rt[Q]=false,rt[X]=rt[G]=rt[H]=rt[J]=rt[Y]=rt[Z]=rt[nt]=rt[tt]=true;var et={leading:false,maxWait:0,trailing:false},ut={configurable:false,enumerable:false,value:null,writable:false},ot={"&":"&","<":"<",">":">",'"':""","'":"'"},it={"&":"&","<":"<",">":">",""":'"',"'":"'"},at={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},ft={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},lt=at[typeof window]&&window||this,ct=at[typeof exports]&&exports&&!exports.nodeType&&exports,pt=at[typeof global]&&global; !pt||pt.global!==pt&&pt.window!==pt||(lt=pt);var st=(pt=at[typeof module]&&module&&!module.nodeType&&module)&&pt.exports===ct&&ct,ht=j();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(lt._=ht, define(function(){return ht})):ct&&pt?st?(pt.exports=ht)._=ht:ct._=ht:lt._=ht}).call(this); \ No newline at end of file diff --git a/dist/lodash.underscore.js b/dist/lodash.underscore.js index a1fd19e5b..c3fbf450e 100644 --- a/dist/lodash.underscore.js +++ b/dist/lodash.underscore.js @@ -3041,6 +3041,9 @@ * binding of `thisArg` and prepends any additional `bind` arguments to those * provided to the bound function. * + * Note: Unlike native `Function#bind` this method does not set the `length` + * property of bound functions. + * * @static * @memberOf _ * @category Functions @@ -3070,6 +3073,8 @@ * of method names. If no method names are provided all the function properties * of `object` will be bound. * + * Note: This method does not set the `length` property of bound functions. + * * @static * @memberOf _ * @category Functions @@ -3426,6 +3431,9 @@ * `partial` arguments prepended to those provided to the new function. This * method is similar to `_.bind` except it does **not** alter the `this` binding. * + * Note: This method does not set the `length` property of partially applied + * functions. + * * @static * @memberOf _ * @category Functions @@ -3622,8 +3630,6 @@ * @category Objects * @param {Object} object The destination object. * @param {...Object} [source] The source objects. - * @param- {Object} [guard] Allows working with `_.reduce` without using its - * `key` and `object` arguments as sources. * @returns {Object} Returns the destination object. * @example * @@ -3973,8 +3979,8 @@ /** * 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 the [ES5 spec](http://es5.github.io/#x15.1.2.5) + * Note: This method is not the same as native `isFinite` which will return + * `true` for booleans and empty strings. See the [ES5 spec](http://es5.github.io/#x15.1.2.5) * for more details. * * @static @@ -4057,8 +4063,8 @@ /** * 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 the [ES5 spec](http://es5.github.io/#x15.1.2.4) + * Note: This method is not the same as native `isNaN` which will return `true` + * for `undefined` and other non-numeric values. See the [ES5 spec](http://es5.github.io/#x15.1.2.4) * for more details. * * @static diff --git a/lodash.js b/lodash.js index df5b0cd78..804b91fa2 100644 --- a/lodash.js +++ b/lodash.js @@ -5169,10 +5169,10 @@ * defaults(object, { 'name': 'fred', 'employer': 'slate' }); * // => { 'name': 'barney', 'employer': 'slate' } */ - function assign(object, source, guard) { + function assign(object, source) { var args = arguments, argsIndex = 0, - argsLength = typeof guard == 'number' ? 2 : args.length; + argsLength = args[3] && args[3][args[2]] === source ? 2 : args.length; if (argsLength > 3 && typeof args[argsLength - 2] == 'function') { var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2); @@ -5338,8 +5338,6 @@ * @category Objects * @param {Object} object The destination object. * @param {...Object} [source] The source objects. - * @param- {Object} [guard] Allows working with `_.reduce` without using its - * `key` and `object` arguments as sources. * @returns {Object} Returns the destination object. * @example * @@ -5347,10 +5345,10 @@ * _.defaults(object, { 'name': 'fred', 'employer': 'slate' }); * // => { 'name': 'barney', 'employer': 'slate' } */ - function defaults(object, source, guard) { + function defaults(object, source) { var args = arguments, argsIndex = 0, - argsLength = typeof guard == 'number' ? 2 : args.length; + argsLength = args[3] && args[3][args[2]] === source ? 2 : args.length; while (++argsIndex < argsLength) { source = args[argsIndex];