mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Rebuild docs and dist.
This commit is contained in:
14
dist/lodash.compat.js
vendored
14
dist/lodash.compat.js
vendored
@@ -692,7 +692,7 @@
|
||||
* `curry`, `debounce`, `defaults`, `defer`, `delay`, `difference`, `filter`,
|
||||
* `flatten`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`,
|
||||
* `forOwnRight`, `functions`, `groupBy`, `indexBy`, `initial`, `intersection`,
|
||||
* `invert`, `invoke`, `keys`, `map`, `mapValues`, `match`, `max`, `memoize`,
|
||||
* `invert`, `invoke`, `keys`, `map`, `mapValues`, `matches`, `max`, `memoize`,
|
||||
* `merge`, `min`, `noop`, `object`, `omit`, `once`, `pairs`, `partial`,
|
||||
* `partialRight`, `pick`, `pluck`, `property`, `pull`, `push`, `range`,
|
||||
* `reject`, `remove`, `rest`, `reverse`, `shuffle`, `slice`, `sort`, `sortBy`,
|
||||
@@ -6999,7 +6999,7 @@
|
||||
func || baseCreateCallback(func, thisArg, argCount);
|
||||
}
|
||||
// handle "_.pluck" and "_.where" style callback shorthands
|
||||
return type != 'object' ? property(func) : match(func);
|
||||
return type != 'object' ? property(func) : matches(func);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -7037,15 +7037,15 @@
|
||||
* { 'name': 'barney', 'age': 36 }
|
||||
* ];
|
||||
*
|
||||
* var matchAge = _.match({ 'age': 36 });
|
||||
* var matchesAge = _.matches({ 'age': 36 });
|
||||
*
|
||||
* _.filter(characters, matchAge);
|
||||
* _.filter(characters, matchesAge);
|
||||
* // => [{ 'name': 'barney', 'age': 36 }]
|
||||
*
|
||||
* _.find(characters, matchAge);
|
||||
* _.find(characters, matchesAge);
|
||||
* // => { 'name': 'barney', 'age': 36 }
|
||||
*/
|
||||
function match(source) {
|
||||
function matches(source) {
|
||||
source || (source = {});
|
||||
|
||||
var props = keys(source),
|
||||
@@ -7459,7 +7459,7 @@
|
||||
lodash.keys = keys;
|
||||
lodash.map = map;
|
||||
lodash.mapValues = mapValues;
|
||||
lodash.match = match;
|
||||
lodash.matches = matches;
|
||||
lodash.max = max;
|
||||
lodash.memoize = memoize;
|
||||
lodash.merge = merge;
|
||||
|
||||
2
dist/lodash.compat.min.js
vendored
2
dist/lodash.compat.min.js
vendored
@@ -46,7 +46,7 @@ n[u]=Ot(n[u],j,null,n)}return n},u.bindKey=function(n,t){return 3>arguments.leng
|
||||
return"boolean"!=u&&null!=t&&(e=r,r=t,t=false,"number"!=u&&"string"!=u||!e||e[r]!==n||(r=null)),null!=r&&(n=Xt(n,r,e)),mt(n,t)},u.forEach=Ut,u.forEachRight=Vt,u.forIn=function(n,t,r){return t=t&&typeof r=="undefined"?t:H(t,r,3),se(n,t)},u.forInRight=function(n,t,r){var e=[];se(n,function(n,t){e.push(t,n)});var u=e.length;for(t=H(t,r,3);u--&&false!==t(e[u--],e[u],n););return n},u.forOwn=function(n,t,r){return t=t&&typeof r=="undefined"?t:H(t,r,3),dt(n,t)},u.forOwnRight=function(n,t,r){var e=we(n),u=e.length;
|
||||
for(t=H(t,r,3);u--&&(r=e[u],false!==t(n[r],r,n)););return n},u.functions=er,u.groupBy=ve,u.indexBy=ye,u.initial=function(n,t,r){var e=0,o=n?n.length:0;if(typeof t!="number"&&null!=t){var a=o;for(t=u.createCallback(t,r,3);a--&&t(n[a],a,n);)e++}else e=null==t||r?1:t||e;return e=o-e,qt(n,0,0<e?e:0)},u.intersection=function(){for(var n=[],e=-1,u=arguments.length,o=c(),a=St(),i=ce&&a===t,l=c();++e<u;){var f=arguments[e];(be(f)||Nt(f))&&(n.push(f),o.push(i&&f.length>=S&&ce(e?n[e]:l)))}var i=n[0],p=-1,g=i?i.length:0,h=[];
|
||||
n:for(;++p<g;){var v=o[0],f=i[p];if(0>(v?r(v,f):a(l,f))){for(e=u,(v||l).push(f);--e;)if(v=o[e],0>(v?r(v,f):a(n[e],f)))continue n;h.push(f)}}return s(o),s(l),h},u.invert=function(n,t){for(var r=-1,e=we(n),u=e.length,o={};++r<u;){var a=e[r],i=n[a];t?Br.call(o,i)?o[i].push(a):o[i]=[a]:o[i]=a}return o},u.invoke=function(n,t){var r=-1,e=typeof t=="function",u=n?n.length:0,o=yr(typeof u=="number"?u:0);if(3>arguments.length&&be(n))for(;++r<u;){var a=n[r];o[r]=e?t.call(a):a[t]()}else{var i=qt(arguments,2);
|
||||
ht(n,function(n){o[++r]=(e?t:n[t]).apply(n,i)})}return o},u.keys=we,u.map=Xt,u.mapValues=function(n,t,r){var e={};return t=u.createCallback(t,r,3),dt(n,function(n,r,u){e[r]=t(n,r,u)}),e},u.match=sr,u.max=Gt,u.memoize=function(n,t){if(!or(n))throw new kr;var r=function(){var e=r.cache,u=t?t.apply(this,arguments):"_"+arguments[0];return Br.call(e,u)?e[u]:e[u]=n.apply(this,arguments)};return r.cache={},r},u.merge=function(n,t,r){if(!ar(n))return n;var e=arguments,u=e.length,o=typeof r;if("number"!=o&&"string"!=o||!e[3]||e[3][r]!==t||(u=2),3<u&&"function"==typeof e[u-2])var a=H(e[--u-1],e[u--],2);
|
||||
ht(n,function(n){o[++r]=(e?t:n[t]).apply(n,i)})}return o},u.keys=we,u.map=Xt,u.mapValues=function(n,t,r){var e={};return t=u.createCallback(t,r,3),dt(n,function(n,r,u){e[r]=t(n,r,u)}),e},u.matches=sr,u.max=Gt,u.memoize=function(n,t){if(!or(n))throw new kr;var r=function(){var e=r.cache,u=t?t.apply(this,arguments):"_"+arguments[0];return Br.call(e,u)?e[u]:e[u]=n.apply(this,arguments)};return r.cache={},r},u.merge=function(n,t,r){if(!ar(n))return n;var e=arguments,u=e.length,o=typeof r;if("number"!=o&&"string"!=o||!e[3]||e[3][r]!==t||(u=2),3<u&&"function"==typeof e[u-2])var a=H(e[--u-1],e[u--],2);
|
||||
else 2<u&&"function"==typeof e[u-1]&&(a=e[--u]);for(var e=qt(arguments,1,u),o=-1,i=c(),l=c();++o<u;)jt(n,e[o],a,i,l);return s(i),s(l),n},u.min=function(n,t,r){var o=1/0,a=o,i=typeof t;if("number"!=i&&"string"!=i||!r||r[t]!==n||(t=null),null==t&&be(n))for(r=-1,i=n.length;++r<i;){var l=n[r];l<a&&(a=l)}else t=null==t&&lr(n)?e:u.createCallback(t,r,3),ht(n,function(n,r,e){r=t(n,r,e),r<o&&(o=r,a=n)});return a},u.omit=function(n,t,r){var e={};if(typeof t!="function"){for(var o=mt(arguments,true,false,1),a=o.length;a--;)o[a]=Cr(o[a]);
|
||||
var i=[];se(n,function(n,t){i.push(t)});for(var l=-1,i=gt(i,o),a=i.length;++l<a;)o=i[l],e[o]=n[o]}else t=u.createCallback(t,r,3),se(n,function(n,r,u){t(n,r,u)||(e[r]=n)});return e},u.once=function(n){var t,r;if(!or(n))throw new kr;return function(){return t?r:(t=true,r=n.apply(this,arguments),n=null,r)}},u.pairs=function(n){for(var t=-1,r=we(n),e=r.length,u=yr(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},u.partial=function(n){if(n)var t=n[N]?n[N][2]:n.length,r=qt(arguments,1),t=t-r.length;return Ot(n,O,t,null,r)
|
||||
},u.partialRight=function(n){if(n)var t=n[N]?n[N][2]:n.length,r=qt(arguments,1),t=t-r.length;return Ot(n,E,t,null,null,r)},u.partition=me,u.pick=function(n,t,r){var e={};if(typeof t!="function")for(var o=-1,a=mt(arguments,true,false,1),i=ar(n)?a.length:0;++o<i;){var l=a[o];l in n&&(e[l]=n[l])}else t=u.createCallback(t,r,3),se(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},u.pluck=de,u.property=vr,u.pull=function(n){for(var t=arguments,r=0,e=t.length,u=n?n.length:0;++r<e;)for(var o=-1,a=t[r];++o<u;)n[o]===a&&(Mr.call(n,o--,1),u--);
|
||||
|
||||
14
dist/lodash.js
vendored
14
dist/lodash.js
vendored
@@ -650,7 +650,7 @@
|
||||
* `curry`, `debounce`, `defaults`, `defer`, `delay`, `difference`, `filter`,
|
||||
* `flatten`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`,
|
||||
* `forOwnRight`, `functions`, `groupBy`, `indexBy`, `initial`, `intersection`,
|
||||
* `invert`, `invoke`, `keys`, `map`, `mapValues`, `match`, `max`, `memoize`,
|
||||
* `invert`, `invoke`, `keys`, `map`, `mapValues`, `matches`, `max`, `memoize`,
|
||||
* `merge`, `min`, `noop`, `object`, `omit`, `once`, `pairs`, `partial`,
|
||||
* `partialRight`, `pick`, `pluck`, `property`, `pull`, `push`, `range`,
|
||||
* `reject`, `remove`, `rest`, `reverse`, `shuffle`, `slice`, `sort`, `sortBy`,
|
||||
@@ -6720,7 +6720,7 @@
|
||||
func || baseCreateCallback(func, thisArg, argCount);
|
||||
}
|
||||
// handle "_.pluck" and "_.where" style callback shorthands
|
||||
return type != 'object' ? property(func) : match(func);
|
||||
return type != 'object' ? property(func) : matches(func);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -6758,15 +6758,15 @@
|
||||
* { 'name': 'barney', 'age': 36 }
|
||||
* ];
|
||||
*
|
||||
* var matchAge = _.match({ 'age': 36 });
|
||||
* var matchesAge = _.matches({ 'age': 36 });
|
||||
*
|
||||
* _.filter(characters, matchAge);
|
||||
* _.filter(characters, matchesAge);
|
||||
* // => [{ 'name': 'barney', 'age': 36 }]
|
||||
*
|
||||
* _.find(characters, matchAge);
|
||||
* _.find(characters, matchesAge);
|
||||
* // => { 'name': 'barney', 'age': 36 }
|
||||
*/
|
||||
function match(source) {
|
||||
function matches(source) {
|
||||
source || (source = {});
|
||||
|
||||
var props = keys(source),
|
||||
@@ -7180,7 +7180,7 @@
|
||||
lodash.keys = keys;
|
||||
lodash.map = map;
|
||||
lodash.mapValues = mapValues;
|
||||
lodash.match = match;
|
||||
lodash.matches = matches;
|
||||
lodash.max = max;
|
||||
lodash.memoize = memoize;
|
||||
lodash.merge = merge;
|
||||
|
||||
2
dist/lodash.min.js
vendored
2
dist/lodash.min.js
vendored
@@ -43,7 +43,7 @@ n[u]=Ct(n[u],w,null,n)}return n},y.bindKey=function(n,t){return 3>arguments.leng
|
||||
return"boolean"!=u&&null!=t&&(e=r,r=t,t=false,"number"!=u&&"string"!=u||!e||e[r]!==n||(r=null)),null!=r&&(n=Ut(n,r,e)),mt(n,t)},y.forEach=Kt,y.forEachRight=Mt,y.forIn=function(n,t,r){return t=t&&typeof r=="undefined"?t:ct(t,r,3),o(n,t)},y.forInRight=function(n,t,r){var e=[];o(n,function(n,t){e.push(t,n)});var u=e.length;for(t=ct(t,r,3);u--&&false!==t(e[u--],e[u],n););return n},y.forOwn=function(n,t,r){return t=t&&typeof r=="undefined"?t:ct(t,r,3),dt(n,t)},y.forOwnRight=function(n,t,r){var e=ve(n),u=e.length;
|
||||
for(t=ct(t,r,3);u--&&(r=e[u],false!==t(n[r],r,n)););return n},y.functions=tr,y.groupBy=le,y.indexBy=ce,y.initial=function(n,t,r){var e=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;for(t=y.createCallback(t,r,3);o--&&t(n[o],o,n);)e++}else e=null==t||r?1:t||e;return e=u-e,Tt(n,0,0<e?e:0)},y.intersection=function(){for(var n=[],e=-1,u=arguments.length,o=c(),i=Ot(),a=ie&&i===t,f=c();++e<u;){var l=arguments[e];(ge(l)||Et(l))&&(n.push(l),o.push(a&&l.length>=A&&ie(e?n[e]:f)))}var a=n[0],s=-1,g=a?a.length:0,h=[];
|
||||
n:for(;++s<g;){var v=o[0],l=a[s];if(0>(v?r(v,l):i(f,l))){for(e=u,(v||f).push(l);--e;)if(v=o[e],0>(v?r(v,l):i(n[e],l)))continue n;h.push(l)}}return p(o),p(f),h},y.invert=function(n,t){for(var r=-1,e=ve(n),u=e.length,o={};++r<u;){var i=e[r],a=n[i];t?Br.call(o,a)?o[a].push(i):o[a]=[i]:o[a]=i}return o},y.invoke=function(n,t){var r=-1,e=typeof t=="function",u=n?n.length:0,o=hr(typeof u=="number"?u:0);if(3>arguments.length&&typeof u=="number")for(;++r<u;){var i=n[r];o[r]=e?t.call(i):i[t]()}else{var a=Tt(arguments,2);
|
||||
ht(n,function(n){o[++r]=(e?t:n[t]).apply(n,a)})}return o},y.keys=ve,y.map=Ut,y.mapValues=function(n,t,r){var e={};return t=y.createCallback(t,r,3),dt(n,function(n,r,u){e[r]=t(n,r,u)}),e},y.match=cr,y.max=Vt,y.memoize=function(n,t){function r(){var e=r.cache,u=t?t.apply(this,arguments):"_"+arguments[0];return Br.call(e,u)?e[u]:e[u]=n.apply(this,arguments)}if(!er(n))throw new jr;return r.cache={},r},y.merge=function(n,t,r){if(!ur(n))return n;var e=arguments,u=e.length,o=typeof r;if("number"!=o&&"string"!=o||!e[3]||e[3][r]!==t||(u=2),3<u&&"function"==typeof e[u-2])var i=ct(e[--u-1],e[u--],2);
|
||||
ht(n,function(n){o[++r]=(e?t:n[t]).apply(n,a)})}return o},y.keys=ve,y.map=Ut,y.mapValues=function(n,t,r){var e={};return t=y.createCallback(t,r,3),dt(n,function(n,r,u){e[r]=t(n,r,u)}),e},y.matches=cr,y.max=Vt,y.memoize=function(n,t){function r(){var e=r.cache,u=t?t.apply(this,arguments):"_"+arguments[0];return Br.call(e,u)?e[u]:e[u]=n.apply(this,arguments)}if(!er(n))throw new jr;return r.cache={},r},y.merge=function(n,t,r){if(!ur(n))return n;var e=arguments,u=e.length,o=typeof r;if("number"!=o&&"string"!=o||!e[3]||e[3][r]!==t||(u=2),3<u&&"function"==typeof e[u-2])var i=ct(e[--u-1],e[u--],2);
|
||||
else 2<u&&"function"==typeof e[u-1]&&(i=e[--u]);for(var e=Tt(arguments,1,u),o=-1,a=c(),f=c();++o<u;)wt(n,e[o],i,a,f);return p(a),p(f),n},y.min=function(n,t,r){var u=1/0,o=u,i=typeof t;if("number"!=i&&"string"!=i||!r||r[t]!==n||(t=null),null==t&&ge(n))for(r=-1,i=n.length;++r<i;){var a=n[r];a<o&&(o=a)}else t=null==t&&ir(n)?e:y.createCallback(t,r,3),ht(n,function(n,r,e){r=t(n,r,e),r<u&&(u=r,o=n)});return o},y.omit=function(n,t,r){var e={};if(typeof t!="function"){for(var u=mt(arguments,true,false,1),i=u.length;i--;)u[i]=kr(u[i]);
|
||||
var a=[];o(n,function(n,t){a.push(t)});for(var f=-1,a=st(a,u),i=a.length;++f<i;)u=a[f],e[u]=n[u]}else t=y.createCallback(t,r,3),o(n,function(n,r,u){t(n,r,u)||(e[r]=n)});return e},y.once=function(n){var t,r;if(!er(n))throw new jr;return function(){return t?r:(t=true,r=n.apply(this,arguments),n=null,r)}},y.pairs=function(n){for(var t=-1,r=ve(n),e=r.length,u=hr(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},y.partial=function(n){if(n)var t=n[N]?n[N][2]:n.length,r=Tt(arguments,1),t=t-r.length;return Ct(n,C,t,null,r)
|
||||
},y.partialRight=function(n){if(n)var t=n[N]?n[N][2]:n.length,r=Tt(arguments,1),t=t-r.length;return Ct(n,O,t,null,null,r)},y.partition=pe,y.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=-1,i=mt(arguments,true,false,1),a=ur(n)?i.length:0;++u<a;){var f=i[u];f in n&&(e[f]=n[f])}else t=y.createCallback(t,r,3),o(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},y.pluck=se,y.property=gr,y.pull=function(n){for(var t=arguments,r=0,e=t.length,u=n?n.length:0;++r<e;)for(var o=-1,i=t[r];++o<u;)n[o]===i&&(zr.call(n,o--,1),u--);
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
* <a href="#_constantvalue">`_.constant`</a>
|
||||
* <a href="#_createcallbackfuncidentity-thisarg-argcount">`_.createCallback`</a>
|
||||
* <a href="#_identityvalue">`_.identity`</a>
|
||||
* <a href="#_matchprops">`_.match`</a>
|
||||
* <a href="#_matchesprops">`_.matches`</a>
|
||||
* <a href="#_mixinobjectlodash-source-options">`_.mixin`</a>
|
||||
* <a href="#_noconflict">`_.noConflict`</a>
|
||||
* <a href="#_noop">`_.noop`</a>
|
||||
@@ -1131,7 +1131,7 @@ In addition to Lo-Dash methods, wrappers also have the following `Array` methods
|
||||
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:<br>
|
||||
`after`, `assign`, `bind`, `bindAll`, `bindKey`, `chain`, `compact`, `compose`, `concat`, `constant`, `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`, `mapValues`, `match`, `max`, `memoize`, `merge`, `min`, `noop`, `object`, `omit`, `once`, `pairs`, `partial`, `partialRight`, `pick`, `pluck`, `property`, `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`, `xor`, and `zip`
|
||||
`after`, `assign`, `bind`, `bindAll`, `bindKey`, `chain`, `compact`, `compose`, `concat`, `constant`, `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`, `mapValues`, `matches`, `max`, `memoize`, `merge`, `min`, `noop`, `object`, `omit`, `once`, `pairs`, `partial`, `partialRight`, `pick`, `pluck`, `property`, `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`, `xor`, and `zip`
|
||||
|
||||
The non-chainable wrapper functions are:<br>
|
||||
`capitalize`, `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`, `now`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, `result`, `shift`, `size`, `some`, `sortedIndex`, `runInContext`, `template`, `trim`, `trimLeft`, `trimRight`, `unescape`, `uniqueId`, and `value`
|
||||
@@ -3989,7 +3989,7 @@ _.omit({ 'name': 'fred', 'age': 40 }, function(value) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pairsobject"></a>`_.pairs(object)`
|
||||
<a href="#_pairsobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6490 "View in source") [Ⓣ][1]
|
||||
<a href="#_pairsobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6482 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a two dimensional array of an object's key-value pairs, i.e. `[[key1, value1], [key2, value2]]`.
|
||||
|
||||
@@ -4013,7 +4013,7 @@ _.pairs({ 'barney': 36, 'fred': 40 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pickobject-callback-thisarg"></a>`_.pick(object, [callback], [thisArg])`
|
||||
<a href="#_pickobject-callback-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6530 "View in source") [Ⓣ][1]
|
||||
<a href="#_pickobject-callback-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6522 "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)*.
|
||||
|
||||
@@ -4044,7 +4044,7 @@ _.pick({ 'name': 'fred', '_userid': 'fred1' }, function(value, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_transformobject-callbackidentity-accumulator-thisarg"></a>`_.transform(object, [callback=identity], [accumulator], [thisArg])`
|
||||
<a href="#_transformobject-callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6594 "View in source") [Ⓣ][1]
|
||||
<a href="#_transformobject-callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6578 "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`.
|
||||
|
||||
@@ -4081,7 +4081,7 @@ var mapped = _.transform({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key)
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_valuesobject"></a>`_.values(object)`
|
||||
<a href="#_valuesobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6628 "View in source") [Ⓣ][1]
|
||||
<a href="#_valuesobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6612 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array composed of the own enumerable property values of `object`.
|
||||
|
||||
@@ -4112,7 +4112,7 @@ _.values({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_capitalizestring"></a>`_.capitalize(string)`
|
||||
<a href="#_capitalizestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6655 "View in source") [Ⓣ][1]
|
||||
<a href="#_capitalizestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6639 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the first character of `string` to upper case.
|
||||
|
||||
@@ -4136,7 +4136,7 @@ _.capitalize('fred');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_escapestring"></a>`_.escape(string)`
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6684 "View in source") [Ⓣ][1]
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6668 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the characters "&", "<", ">", '"', and "'" in `string` to their corresponding HTML entities.
|
||||
|
||||
@@ -4164,7 +4164,7 @@ _.escape('fred, barney, & pebbles');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatetext-data-options"></a>`_.template(text, [data], [options])`
|
||||
<a href="#_templatetext-data-options">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6775 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatetext-data-options">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6759 "View in source") [Ⓣ][1]
|
||||
|
||||
A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code.
|
||||
|
||||
@@ -4256,7 +4256,7 @@ fs.writeFileSync(path.join(cwd, 'jst.js'), '\
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_trimstring-charswhitespace"></a>`_.trim(string, [chars=whitespace])`
|
||||
<a href="#_trimstring-charswhitespace">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6892 "View in source") [Ⓣ][1]
|
||||
<a href="#_trimstring-charswhitespace">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6876 "View in source") [Ⓣ][1]
|
||||
|
||||
Removes leading and trailing whitespace or specified characters from `string`.
|
||||
|
||||
@@ -4284,7 +4284,7 @@ _.trim('-_-fred-_-', '_-');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_trimleftstring-charswhitespace"></a>`_.trimLeft(string, [chars=whitespace])`
|
||||
<a href="#_trimleftstring-charswhitespace">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6916 "View in source") [Ⓣ][1]
|
||||
<a href="#_trimleftstring-charswhitespace">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6900 "View in source") [Ⓣ][1]
|
||||
|
||||
Removes leading whitespace or specified characters from `string`.
|
||||
|
||||
@@ -4312,7 +4312,7 @@ _.trimLeft('-_-fred-_-', '_-');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_trimrightstring-charswhitespace"></a>`_.trimRight(string, [chars=whitespace])`
|
||||
<a href="#_trimrightstring-charswhitespace">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6940 "View in source") [Ⓣ][1]
|
||||
<a href="#_trimrightstring-charswhitespace">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6924 "View in source") [Ⓣ][1]
|
||||
|
||||
Removes trailing whitespace or specified characters from `string`.
|
||||
|
||||
@@ -4340,7 +4340,7 @@ _.trimRight('-_-fred-_-', '_-');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_unescapestring"></a>`_.unescape(string)`
|
||||
<a href="#_unescapestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6965 "View in source") [Ⓣ][1]
|
||||
<a href="#_unescapestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6949 "View in source") [Ⓣ][1]
|
||||
|
||||
The inverse of `_.escape`; this method converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding characters.
|
||||
|
||||
@@ -4373,7 +4373,7 @@ _.unescape('fred, barney & pebbles');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_now"></a>`_.now`
|
||||
<a href="#_now">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7238 "View in source") [Ⓣ][1]
|
||||
<a href="#_now">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7222 "View in source") [Ⓣ][1]
|
||||
|
||||
*(unknown)*: Gets the number of milliseconds that have elapsed since the Unix epoch *(1 January `1970 00`:00:00 UTC)*.
|
||||
|
||||
@@ -4392,7 +4392,7 @@ _.defer(function() { console.log(_.now() - stamp); });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_constantvalue"></a>`_.constant(value)`
|
||||
<a href="#_constantvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6990 "View in source") [Ⓣ][1]
|
||||
<a href="#_constantvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6974 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that returns `value`.
|
||||
|
||||
@@ -4418,7 +4418,7 @@ getter() === object;
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_createcallbackfuncidentity-thisarg-argcount"></a>`_.createCallback([func=identity], [thisArg], [argCount])`
|
||||
<a href="#_createcallbackfuncidentity-thisarg-argcount">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7028 "View in source") [Ⓣ][1]
|
||||
<a href="#_createcallbackfuncidentity-thisarg-argcount">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7012 "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`.
|
||||
|
||||
@@ -4460,7 +4460,7 @@ _.filter(characters, 'age__gt38');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_identityvalue"></a>`_.identity(value)`
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7052 "View in source") [Ⓣ][1]
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7036 "View in source") [Ⓣ][1]
|
||||
|
||||
This method returns the first argument provided to it.
|
||||
|
||||
@@ -4484,8 +4484,8 @@ _.identity(object) === object;
|
||||
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_matchprops"></a>`_.match(props)`
|
||||
<a href="#_matchprops">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7081 "View in source") [Ⓣ][1]
|
||||
### <a id="_matchesprops"></a>`_.matches(props)`
|
||||
<a href="#_matchesprops">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7065 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a "_.where" style function, which performs a deep comparison between a given object and the `props` object, returning `true` if the given object has equivalent property values, else `false`.
|
||||
|
||||
@@ -4502,12 +4502,12 @@ var characters = [
|
||||
{ 'name': 'barney', 'age': 36 }
|
||||
];
|
||||
|
||||
var matchAge = _.match({ 'age': 36 });
|
||||
var matchesAge = _.matches({ 'age': 36 });
|
||||
|
||||
_.filter(characters, matchAge);
|
||||
_.filter(characters, matchesAge);
|
||||
// => [{ 'name': 'barney', 'age': 36 }]
|
||||
|
||||
_.find(characters, matchAge);
|
||||
_.find(characters, matchesAge);
|
||||
// => { 'name': 'barney', 'age': 36 }
|
||||
```
|
||||
|
||||
@@ -4519,7 +4519,7 @@ _.find(characters, matchAge);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mixinobjectlodash-source-options"></a>`_.mixin([object=lodash], source, [options])`
|
||||
<a href="#_mixinobjectlodash-source-options">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7144 "View in source") [Ⓣ][1]
|
||||
<a href="#_mixinobjectlodash-source-options">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7128 "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.
|
||||
|
||||
@@ -4557,7 +4557,7 @@ _('fred').vowels();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_noconflict"></a>`_.noConflict()`
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7204 "View in source") [Ⓣ][1]
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7188 "View in source") [Ⓣ][1]
|
||||
|
||||
Reverts the '_' variable to its previous value and returns a reference to the `lodash` function.
|
||||
|
||||
@@ -4577,7 +4577,7 @@ var lodash = _.noConflict();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_noop"></a>`_.noop()`
|
||||
<a href="#_noop">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7221 "View in source") [Ⓣ][1]
|
||||
<a href="#_noop">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7205 "View in source") [Ⓣ][1]
|
||||
|
||||
A no-operation function.
|
||||
|
||||
@@ -4596,7 +4596,7 @@ _.noop(object) === undefined;
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_parseintvalue-radix"></a>`_.parseInt(value, [radix])`
|
||||
<a href="#_parseintvalue-radix">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7262 "View in source") [Ⓣ][1]
|
||||
<a href="#_parseintvalue-radix">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7246 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts `value` to 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.
|
||||
|
||||
@@ -4623,7 +4623,7 @@ _.parseInt('08');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_propertykey"></a>`_.property(key)`
|
||||
<a href="#_propertykey">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7293 "View in source") [Ⓣ][1]
|
||||
<a href="#_propertykey">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7277 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a "_.pluck" style function, which returns the `key` value of a given object.
|
||||
|
||||
@@ -4657,7 +4657,7 @@ _.sortBy(characters, getName);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_randommin0-max1-floatingfalse"></a>`_.random([min=0], [max=1], [floating=false])`
|
||||
<a href="#_randommin0-max1-floatingfalse">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7326 "View in source") [Ⓣ][1]
|
||||
<a href="#_randommin0-max1-floatingfalse">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7310 "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.
|
||||
|
||||
@@ -4692,7 +4692,7 @@ _.random(1.2, 5.2);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_resultobject-key-defaultvalue"></a>`_.result(object, key, [defaultValue])`
|
||||
<a href="#_resultobject-key-defaultvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7391 "View in source") [Ⓣ][1]
|
||||
<a href="#_resultobject-key-defaultvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7375 "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 `null` or `undefined` then `undefined` is returned. If a default value is provided it will be returned if the property value resolves to `undefined`.
|
||||
|
||||
@@ -4749,7 +4749,7 @@ Create a new `lodash` function using the given context object.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_timesn-callback-thisarg"></a>`_.times(n, callback, [thisArg])`
|
||||
<a href="#_timesn-callback-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7422 "View in source") [Ⓣ][1]
|
||||
<a href="#_timesn-callback-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7406 "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)*.
|
||||
|
||||
@@ -4781,7 +4781,7 @@ _.times(3, function(n) { this.cast(n); }, mage);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_uniqueidprefix"></a>`_.uniqueId([prefix])`
|
||||
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7450 "View in source") [Ⓣ][1]
|
||||
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7434 "View in source") [Ⓣ][1]
|
||||
|
||||
Generates a unique ID. If `prefix` is provided the ID will be appended to it.
|
||||
|
||||
@@ -4834,7 +4834,7 @@ A reference to the `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_version"></a>`_.VERSION`
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7659 "View in source") [Ⓣ][1]
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7643 "View in source") [Ⓣ][1]
|
||||
|
||||
*(string)*: The semantic version number.
|
||||
|
||||
|
||||
@@ -7054,12 +7054,12 @@
|
||||
* { 'name': 'barney', 'age': 36 }
|
||||
* ];
|
||||
*
|
||||
* var matchAge = _.matches({ 'age': 36 });
|
||||
* var matchesAge = _.matches({ 'age': 36 });
|
||||
*
|
||||
* _.filter(characters, matchAge);
|
||||
* _.filter(characters, matchesAge);
|
||||
* // => [{ 'name': 'barney', 'age': 36 }]
|
||||
*
|
||||
* _.find(characters, matchAge);
|
||||
* _.find(characters, matchesAge);
|
||||
* // => { 'name': 'barney', 'age': 36 }
|
||||
*/
|
||||
function matches(source) {
|
||||
|
||||
Reference in New Issue
Block a user