mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 22:47:50 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c084e358bd | ||
|
|
238d45a2cb | ||
|
|
21d056c470 | ||
|
|
0308d4de62 | ||
|
|
f2a6f6ce6a | ||
|
|
cf5d6b5bc8 | ||
|
|
7a6b64b2f6 | ||
|
|
bca11bd21e | ||
|
|
bf39a31907 |
12
README.md
12
README.md
@@ -1,4 +1,4 @@
|
||||
# lodash v4.8.0
|
||||
# lodash v4.8.2
|
||||
|
||||
The [Lodash](https://lodash.com/) library exported as a [UMD](https://github.com/umdjs/umd) module.
|
||||
|
||||
@@ -20,11 +20,11 @@ $ lodash core -o ./dist/lodash.core.js
|
||||
|
||||
## Download
|
||||
|
||||
Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.8.0/LICENSE) & supports [modern environments](#support).<br>
|
||||
Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.8.2/LICENSE) & supports [modern environments](#support).<br>
|
||||
Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick one that’s right for you.
|
||||
|
||||
* [Core build](https://raw.githubusercontent.com/lodash/lodash/4.8.0/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.8.0/dist/lodash.core.min.js))
|
||||
* [Full build](https://raw.githubusercontent.com/lodash/lodash/4.8.0/dist/lodash.js) ([~22 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.8.0/dist/lodash.min.js))
|
||||
* [Core build](https://raw.githubusercontent.com/lodash/lodash/4.8.2/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.8.2/dist/lodash.core.min.js))
|
||||
* [Full build](https://raw.githubusercontent.com/lodash/lodash/4.8.2/dist/lodash.js) ([~22 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.8.2/dist/lodash.min.js))
|
||||
* [CDN copies](https://www.jsdelivr.com/projects/lodash)
|
||||
|
||||
## Why Lodash?
|
||||
@@ -43,10 +43,10 @@ Lodash is available in a [variety of builds](https://lodash.com/custom-builds) &
|
||||
* [lodash](https://www.npmjs.com/package/lodash) & [per method packages](https://www.npmjs.com/browse/keyword/lodash-modularized)
|
||||
* [lodash-amd](https://www.npmjs.com/package/lodash-amd)
|
||||
* [lodash-es](https://www.npmjs.com/package/lodash-es) & [babel-plugin-lodash](https://www.npmjs.com/package/babel-plugin-lodash)
|
||||
* [lodash/fp](https://github.com/lodash/lodash/tree/4.8.0-npm/fp)
|
||||
* [lodash/fp](https://github.com/lodash/lodash/tree/4.8.2-npm/fp)
|
||||
|
||||
## Further Reading
|
||||
|
||||
* [Contributing](https://github.com/lodash/lodash/blob/4.8.0/.github/CONTRIBUTING.md)
|
||||
* [Contributing](https://github.com/lodash/lodash/blob/4.8.2/.github/CONTRIBUTING.md)
|
||||
* [Release Notes](https://github.com/lodash/lodash/releases/tag/4.0.0)
|
||||
* [Wiki (Changelog, Roadmap, etc.)](https://github.com/lodash/lodash/wiki)
|
||||
|
||||
4
dist/lodash.core.js
vendored
4
dist/lodash.core.js
vendored
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @license
|
||||
* lodash 4.8.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 4.8.2 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash core -o ./dist/lodash.core.js`
|
||||
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
@@ -13,7 +13,7 @@
|
||||
var undefined;
|
||||
|
||||
/** Used as the semantic version number. */
|
||||
var VERSION = '4.8.0';
|
||||
var VERSION = '4.8.2';
|
||||
|
||||
/** Used as the `TypeError` message for "Functions" methods. */
|
||||
var FUNC_ERROR_TEXT = 'Expected a function';
|
||||
|
||||
4
dist/lodash.core.min.js
vendored
4
dist/lodash.core.min.js
vendored
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @license
|
||||
* lodash 4.8.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
||||
* lodash 4.8.2 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
||||
* Build: `lodash core -o ./dist/lodash.core.js`
|
||||
*/
|
||||
;(function(){function n(n,t){return n.push.apply(n,t),n}function t(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===ln?i===i:r(i,c)))var c=i,f=o}return f}function r(n,t,r){var e;return r(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return w(t,function(t){return n[t]})}function o(n){return n&&n.Object===Object?n:null}function i(n){return yn[n]}function c(n){var t=false;if(null!=n&&typeof n.toString!="function")try{
|
||||
@@ -25,6 +25,6 @@ return x(Kn({},n))},a.mixin=an,a.negate=function(n){if(typeof n!="function")thro
|
||||
if(r>e&&!c||!i||u&&!f&&a||o&&a){r=1;break n}if(e>r&&!u||!a||c&&!o&&i||f&&i){r=-1;break n}}r=0}return r||n.b-t.b}),E("c"))},a.tap=function(n,t){return t(n),n},a.thru=function(n,t){return t(n)},a.toArray=function(n){return Q(n)?n.length?N(n):[]:cn(n)},a.values=cn,a.extend=Ln,an(a,a),a.clone=function(n){return Y(n)?Un(n)?N(n):F(n,un(n)):n},a.escape=function(n){return(n=en(n))&&hn.test(n)?n.replace(sn,i):n},a.every=function(n,t,r){return t=r?ln:t,v(n,m(t))},a.find=J,a.forEach=M,a.has=function(n,t){return null!=n&&En.call(n,t);
|
||||
},a.head=G,a.identity=fn,a.indexOf=function(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?$n(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1},a.isArguments=L,a.isArray=Un,a.isBoolean=function(n){return true===n||false===n||Z(n)&&"[object Boolean]"==Nn.call(n)},a.isDate=function(n){return Z(n)&&"[object Date]"==Nn.call(n)},a.isEmpty=function(n){if(Q(n)&&(Un(n)||tn(n)||W(n.splice)||L(n)))return!n.length;for(var t in n)if(En.call(n,t))return false;return!(qn&&un(n).length);
|
||||
},a.isEqual=function(n,t){return j(n,t)},a.isFinite=function(n){return typeof n=="number"&&Dn(n)},a.isFunction=W,a.isNaN=function(n){return nn(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=nn,a.isObject=Y,a.isRegExp=function(n){return Y(n)&&"[object RegExp]"==Nn.call(n)},a.isString=tn,a.isUndefined=function(n){return n===ln},a.last=function(n){var t=n?n.length:0;return t?n[t-1]:ln},a.max=function(n){return n&&n.length?t(n,fn,K):ln},a.min=function(n){return n&&n.length?t(n,fn,rn):ln},
|
||||
a.noConflict=function(){return wn._===this&&(wn._=Sn),this},a.noop=function(){},a.reduce=P,a.result=function(n,t,r){return t=null==n?ln:n[t],t===ln&&(t=r),W(t)?t.call(n):t},a.size=function(n){return null==n?0:(n=Q(n)?n:un(n),n.length)},a.some=function(n,t,r){return t=r?ln:t,S(n,m(t))},a.uniqueId=function(n){var t=++kn;return en(n)+t},a.each=M,a.first=G,an(a,function(){var n={};return b(a,function(t,r){En.call(a.prototype,r)||(n[r]=t)}),n}(),{chain:false}),a.VERSION="4.8.0",zn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){
|
||||
a.noConflict=function(){return wn._===this&&(wn._=Sn),this},a.noop=function(){},a.reduce=P,a.result=function(n,t,r){return t=null==n?ln:n[t],t===ln&&(t=r),W(t)?t.call(n):t},a.size=function(n){return null==n?0:(n=Q(n)?n:un(n),n.length)},a.some=function(n,t,r){return t=r?ln:t,S(n,m(t))},a.uniqueId=function(n){var t=++kn;return en(n)+t},a.each=M,a.first=G,an(a,function(){var n={};return b(a,function(t,r){En.call(a.prototype,r)||(n[r]=t)}),n}(),{chain:false}),a.VERSION="4.8.2",zn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){
|
||||
var t=(/^(?:replace|split)$/.test(n)?String.prototype:xn)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);a.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Un(u)?u:[],n)}return this[r](function(r){return t.apply(Un(r)?r:[],n)})}}),a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=function(){return T(this.__wrapped__,this.__actions__)},(mn||dn||{})._=a,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){
|
||||
return a}):bn&&_n?(jn&&((_n.exports=a)._=a),bn._=a):wn._=a}).call(this);
|
||||
4
dist/lodash.fp.js
vendored
4
dist/lodash.fp.js
vendored
@@ -720,10 +720,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
exports.methodSpread = {
|
||||
'invokeArgs': 2,
|
||||
'invokeArgsMap': 2,
|
||||
'over': 0,
|
||||
'overArgs': 1,
|
||||
'overEvery': 0,
|
||||
'overSome': 0,
|
||||
'partial': 1,
|
||||
'partialRight': 1,
|
||||
'without': 1
|
||||
|
||||
15
dist/lodash.fp.min.js
vendored
15
dist/lodash.fp.min.js
vendored
@@ -1,17 +1,16 @@
|
||||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.fp=e():t.fp=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){function n(t,e){return i(t,t,e)}var i=r(1);"function"==typeof _&&(_=n(_.runInContext())),
|
||||
t.exports=n},function(t,e,r){function n(t,e){return 2==e?function(e,r){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}}function i(t,e){return 2==e?function(e,r){return t(e,r)}:function(e){return t(e)}}function a(t){for(var e=t?t.length:0,r=Array(e);e--;)r[e]=t[e];return r}function o(t){return function(e){return t({},e)}}function s(t,e){return function(){var r=arguments.length;if(!r)return i;for(var n=Array(r);r--;)n[r]=arguments[r];var i=n[0]=e.apply(void 0,n);return t.apply(void 0,n),
|
||||
i}}function u(t,e,r,d){function f(t,e){e=F(e);for(var r=-1,n=e.length,i=M(Object(t)),a=i;null!=a&&++r<n;){var o=e[r],s=a[o];null!=s&&(a[o]=M(Object(s))),a=a[o]}return i}function h(t){return N.runInContext.convert(t)(void 0)}function y(t,e){var r=d;return function(n){var i=R?B:j,a=R?B[t]:e,o=w(w({},r),n);return u(i,t,a,o)}}function g(t,e){return v(t,function(t){return"function"==typeof t?i(t,e):t})}function m(t,e){return v(t,function(t){var r=e.length;return n(L(i(t,r),e),r)})}function v(t,e){return function(){
|
||||
var r=arguments.length;if(!r)return t();for(var n=Array(r);r--;)n[r]=arguments[r];var i=I.rearg?0:r-1;return n[i]=e(n[i]),t.apply(void 0,n)}}function x(t,e){t=p.aliasToReal[t]||t;var r,n=e,i=_[t];return i?n=i(e):I.immutable&&(l.array[t]?n=s(e,a):l.object[t]?n=s(e,o(e)):l.set[t]&&(n=s(e,f))),S(T,function(e){return S(p.aryMethod[e],function(i){if(t==i){var a=!R&&p.iterateeAry[t],o=p.iterateeRearg[t],s=p.methodSpread[t];return r=n,!I.fixed||!O&&p.skipFixed[t]||(r=void 0===s?C(r,e):D(r,s)),I.rearg&&e>1&&(k||!p.skipRearg[t])&&(r=L(r,p.methodRearg[t]||p.aryRearg[e])),
|
||||
var r=arguments.length;if(!r)return t();for(var n=Array(r);r--;)n[r]=arguments[r];var i=I.rearg?0:r-1;return n[i]=e(n[i]),t.apply(void 0,n)}}function x(t,e){t=p.aliasToReal[t]||t;var r,n=e,i=_[t];return i?n=i(e):I.immutable&&(l.array[t]?n=s(e,a):l.object[t]?n=s(e,o(e)):l.set[t]&&(n=s(e,f))),P(T,function(e){return P(p.aryMethod[e],function(i){if(t==i){var a=!R&&p.iterateeAry[t],o=p.iterateeRearg[t],s=p.methodSpread[t];return r=n,!I.fixed||!O&&p.skipFixed[t]||(r=void 0===s?C(r,e):D(r,s)),I.rearg&&e>1&&(k||!p.skipRearg[t])&&(r=L(r,p.methodRearg[t]||p.aryRearg[e])),
|
||||
I.cap&&(o?r=m(r,o):a&&(r=g(r,a))),(b||I.curry&&e>1)&&(b&&console.log(b,t),r=q(r,e)),!1}}),!r}),r||(r=n),r==e&&(r=b?q(r,1):function(){return e.apply(this,arguments)}),r.convert=y(t,e),p.placeholder[t]&&(W=!0,r.placeholder=e.placeholder=E),r}var W,R="function"==typeof e,A=e===Object(e);if(A&&(d=r,r=e,e=void 0),null==r)throw new TypeError;d||(d={});var I={cap:"cap"in d?d.cap:!0,curry:"curry"in d?d.curry:!0,fixed:"fixed"in d?d.fixed:!0,immutable:"immutable"in d?d.immutable:!0,rearg:"rearg"in d?d.rearg:!0
|
||||
},b="curry"in d&&d.curry,O="fixed"in d&&d.fixed,k="rearg"in d&&d.rearg,E=R?r:c,B=R?r.runInContext():void 0,j=R?r:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isFunction:t.isFunction,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,spread:t.spread,toPath:t.toPath},C=j.ary,w=j.assign,M=j.clone,q=j.curry,S=j.forEach,P=j.isArray,z=j.isFunction,K=j.keys,L=j.rearg,D=j.spread,F=j.toPath,T=K(p.aryMethod),_={castArray:function(t){return function(){var e=arguments[0];
|
||||
return P(e)?t(a(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[0],r=arguments[1],n=t(e,r),a=n.length;return I.cap&&"number"==typeof r?(r=r>2?r-2:1,a&&r>=a?n:i(n,r)):n}},mixin:function(t){return function(e){var r=this;if(!z(r))return t(r,Object(e));var n=[],i=[];return S(K(e),function(t){var a=e[t];z(a)&&(i.push(t),n.push(r.prototype[t]))}),t(r,Object(e)),S(i,function(t,e){var i=n[e];z(i)?r.prototype[t]=i:delete r.prototype[t]}),r}},runInContext:function(e){
|
||||
return function(r){return u(t,e(r),d)}}};if(!A)return x(e,r);var N=r,V=[];return S(T,function(t){S(p.aryMethod[t],function(t){var e=N[p.remap[t]||t];e&&V.push([t,x(t,e)])})}),S(K(N),function(t){var e=N[t];if("function"==typeof e){for(var r=V.length;r--;)if(V[r][0]==t)return;e.convert=y(t,e),V.push([t,e])}}),S(V,function(t){N[t[0]]=t[1]}),N.convert=h,W&&(N.placeholder=E),S(K(N),function(t){S(p.realToAlias[t]||[],function(e){N[e]=N[t]})}),N}var p=r(2),l=p.mutate,c=r(3);t.exports=u},function(t,e){e.aliasToReal={
|
||||
},b="curry"in d&&d.curry,O="fixed"in d&&d.fixed,k="rearg"in d&&d.rearg,E=R?r:c,B=R?r.runInContext():void 0,j=R?r:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isFunction:t.isFunction,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,spread:t.spread,toPath:t.toPath},C=j.ary,w=j.assign,M=j.clone,q=j.curry,P=j.forEach,S=j.isArray,z=j.isFunction,K=j.keys,L=j.rearg,D=j.spread,F=j.toPath,T=K(p.aryMethod),_={castArray:function(t){return function(){var e=arguments[0];
|
||||
return S(e)?t(a(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[0],r=arguments[1],n=t(e,r),a=n.length;return I.cap&&"number"==typeof r?(r=r>2?r-2:1,a&&r>=a?n:i(n,r)):n}},mixin:function(t){return function(e){var r=this;if(!z(r))return t(r,Object(e));var n=[],i=[];return P(K(e),function(t){var a=e[t];z(a)&&(i.push(t),n.push(r.prototype[t]))}),t(r,Object(e)),P(i,function(t,e){var i=n[e];z(i)?r.prototype[t]=i:delete r.prototype[t]}),r}},runInContext:function(e){
|
||||
return function(r){return u(t,e(r),d)}}};if(!A)return x(e,r);var N=r,V=[];return P(T,function(t){P(p.aryMethod[t],function(t){var e=N[p.remap[t]||t];e&&V.push([t,x(t,e)])})}),P(K(N),function(t){var e=N[t];if("function"==typeof e){for(var r=V.length;r--;)if(V[r][0]==t)return;e.convert=y(t,e),V.push([t,e])}}),P(V,function(t){N[t[0]]=t[1]}),N.convert=h,W&&(N.placeholder=E),P(K(N),function(t){P(p.realToAlias[t]||[],function(e){N[e]=N[t]})}),N}var p=r(2),l=p.mutate,c=r(3);t.exports=u},function(t,e){e.aliasToReal={
|
||||
each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendWith:"assignInWith",first:"head",__:"placeholder",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",equals:"isEqual",identical:"eq",init:"initial",invertObj:"invert",juxt:"over",mapObj:"mapValues",omitAll:"omit",nAry:"ary",path:"get",
|
||||
pathEq:"matchesProperty",pathOr:"getOr",pickAll:"pick",pipe:"flow",prop:"get",propOf:"propertyOf",propOr:"getOr",unapply:"rest",unnest:"flatten",useWith:"overArgs",whereEq:"filter",zipObj:"zipObject"},e.aryMethod={1:["attempt","castArray","ceil","create","curry","curryRight","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","methodOf","mixin","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words"],
|
||||
2:["add","after","ary","assign","assignIn","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","minBy","multiply","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],
|
||||
3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","getOr","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],
|
||||
4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findIndex:1,findKey:1,findLast:1,findLastIndex:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},e.iterateeRearg={mapKeys:[1]},e.methodRearg={assignInWith:[1,2,0],assignWith:[1,2,0],getOr:[2,1,0],isEqualWith:[1,2,0],
|
||||
isMatchWith:[2,1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],updateWith:[3,1,2,0],zipWith:[1,2,0]},e.methodSpread={invokeArgs:2,invokeArgsMap:2,over:0,overArgs:1,overEvery:0,overSome:0,partial:1,partialRight:1,without:1},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignIn:!0,assignInWith:!0,
|
||||
assignWith:!0,defaults:!0,defaultsDeep:!0,merge:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,r=e.aliasToReal,n={};for(var i in r){var a=r[i];t.call(n,a)?n[a].push(i):n[a]=[i]}return n}(),e.remap={curryN:"curry",curryRightN:"curryRight",getOr:"get",invokeArgs:"invoke",invokeArgsMap:"invokeMap",padChars:"pad",padCharsEnd:"padEnd",
|
||||
padCharsStart:"padStart",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,without:!0,zip:!0,zipObject:!0
|
||||
}},function(t,e){t.exports={}}])});
|
||||
isMatchWith:[2,1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],updateWith:[3,1,2,0],zipWith:[1,2,0]},e.methodSpread={invokeArgs:2,invokeArgsMap:2,partial:1,partialRight:1,without:1},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignIn:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsDeep:!0,
|
||||
merge:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,r=e.aliasToReal,n={};for(var i in r){var a=r[i];t.call(n,a)?n[a].push(i):n[a]=[i]}return n}(),e.remap={curryN:"curry",curryRightN:"curryRight",getOr:"get",invokeArgs:"invoke",invokeArgsMap:"invokeMap",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",restFrom:"rest",
|
||||
spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,without:!0,zip:!0,zipObject:!0}},function(t,e){t.exports={}}])});
|
||||
16
dist/lodash.js
vendored
16
dist/lodash.js
vendored
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @license
|
||||
* lodash 4.8.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 4.8.2 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash -o ./dist/lodash.js`
|
||||
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
@@ -13,7 +13,7 @@
|
||||
var undefined;
|
||||
|
||||
/** Used as the semantic version number. */
|
||||
var VERSION = '4.8.0';
|
||||
var VERSION = '4.8.2';
|
||||
|
||||
/** Used as the size to enable large array optimizations. */
|
||||
var LARGE_ARRAY_SIZE = 200;
|
||||
@@ -4609,7 +4609,7 @@
|
||||
*/
|
||||
function createOver(arrayFunc) {
|
||||
return rest(function(iteratees) {
|
||||
iteratees = arrayMap(iteratees, getIteratee());
|
||||
iteratees = arrayMap(baseFlatten(iteratees, 1), getIteratee());
|
||||
return rest(function(args) {
|
||||
var thisArg = this;
|
||||
return arrayFunc(iteratees, function(iteratee) {
|
||||
@@ -9593,7 +9593,7 @@
|
||||
* @memberOf _
|
||||
* @category Function
|
||||
* @param {Function} func The function to wrap.
|
||||
* @param {...Function} [transforms] The functions to transform
|
||||
* @param {...(Function|Function[])} [transforms] The functions to transform.
|
||||
* arguments, specified individually or in arrays.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @example
|
||||
@@ -9617,7 +9617,7 @@
|
||||
* // => [100, 10]
|
||||
*/
|
||||
var overArgs = rest(function(func, transforms) {
|
||||
transforms = arrayMap(transforms, getIteratee());
|
||||
transforms = arrayMap(baseFlatten(transforms, 1), getIteratee());
|
||||
|
||||
var funcsLength = transforms.length;
|
||||
return rest(function(args) {
|
||||
@@ -14692,7 +14692,7 @@
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Util
|
||||
* @param {...Function} iteratees The iteratees to invoke.
|
||||
* @param {...(Function|Function[])} iteratees The iteratees to invoke.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @example
|
||||
*
|
||||
@@ -14711,7 +14711,7 @@
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Util
|
||||
* @param {...Function} predicates The predicates to check.
|
||||
* @param {...(Function|Function[])} predicates The predicates to check.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @example
|
||||
*
|
||||
@@ -14736,7 +14736,7 @@
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Util
|
||||
* @param {...Function} predicates The predicates to check.
|
||||
* @param {...(Function|Function[])} predicates The predicates to check.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @example
|
||||
*
|
||||
|
||||
8
dist/lodash.min.js
vendored
8
dist/lodash.min.js
vendored
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @license
|
||||
* lodash 4.8.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
||||
* lodash 4.8.2 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
||||
* Build: `lodash -o ./dist/lodash.js`
|
||||
*/
|
||||
;(function(){function t(t,n){return t.set(n[0],n[1]),t}function n(t,n){return t.add(n),t}function r(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}function e(t,n,r,e){for(var u=-1,o=t.length;++u<o;){var i=t[u];n(e,i,r(i),t)}return e}function u(t,n){for(var r=-1,e=t.length;++r<e&&false!==n(t[r],r,t););return t}function o(t,n){for(var r=-1,e=t.length;++r<e;)if(!n(t[r],r,t))return false;
|
||||
@@ -35,7 +35,7 @@ if(false===r(o[f],f,o))break}return n}}function sr(t,n,r){function e(){return(th
|
||||
case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var r=an(t.prototype),n=t.apply(r,n);return Ie(n)?n:r}}function vr(t,n,e){function u(){for(var i=arguments.length,f=Array(i),c=i,a=Br(u);c--;)f[c]=arguments[c];return c=3>i&&f[0]!==a&&f[i-1]!==a?[]:F(f,a),i-=c.length,e>i?wr(t,n,dr,u.placeholder,T,f,c,T,T,e-i):r(this&&this!==Jt&&this instanceof u?o:t,this,f);
|
||||
}var o=_r(t);return u}function gr(t){return de(function(n){n=_n(n,1);var r=n.length,e=r,u=Ot.prototype.thru;for(t&&n.reverse();e--;){var o=n[e];if(typeof o!="function")throw new su("Expected a function");if(u&&!i&&"wrapper"==Ir(o))var i=new Ot([],true)}for(e=i?e:r;++e<r;)var o=n[e],u=Ir(o),f="wrapper"==u?po(o):T,i=f&&Zr(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?i[Ir(f[0])].apply(i,f[3]):1==o.length&&Zr(o)?i[u]():i.thru(o);return function(){var t=arguments,e=t[0];if(i&&1==t.length&&Qo(e)&&e.length>=200)return i.plant(e).value();
|
||||
for(var u=0,t=r?n[u].apply(this,t):e;++u<r;)t=n[u].call(this,t);return t}})}function dr(t,n,r,e,u,o,i,f,c,a){function l(){for(var d=arguments.length,y=d,b=Array(d);y--;)b[y]=arguments[y];if(_){var x,j=Br(l),y=b.length;for(x=0;y--;)b[y]===j&&x++}if(e&&(b=nr(b,e,u,_)),o&&(b=rr(b,o,i,_)),d-=x,_&&a>d)return j=F(b,j),wr(t,n,dr,l.placeholder,r,b,j,f,c,a-d);if(j=h?r:this,y=p?j[t]:t,d=b.length,f){x=b.length;for(var m=Fu(f.length,x),w=er(b);m--;){var A=f[m];b[m]=L(A,x)?w[A]:T}}else v&&d>1&&b.reverse();return s&&d>c&&(b.length=c),
|
||||
this&&this!==Jt&&this instanceof l&&(y=g||_r(y)),y.apply(j,b)}var s=128&n,h=1&n,p=2&n,_=24&n,v=512&n,g=p?T:_r(t);return l}function yr(t,n){return function(r,e){return wn(r,t,n(e))}}function br(t){return de(function(n){return n=a(n,Sr()),de(function(e){var u=this;return t(n,function(t){return r(t,u,e)})})})}function xr(t,n){n=n===T?" ":n+"";var r=n.length;return 2>r?r?Nn(n,t):n:(r=Nn(n,Cu(t/P(n))),St.test(n)?r.match(It).slice(0,t).join(""):r.slice(0,t))}function jr(t,n,e,u){function o(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==Jt&&this instanceof o?f:t;++a<l;)s[a]=u[a];
|
||||
this&&this!==Jt&&this instanceof l&&(y=g||_r(y)),y.apply(j,b)}var s=128&n,h=1&n,p=2&n,_=24&n,v=512&n,g=p?T:_r(t);return l}function yr(t,n){return function(r,e){return wn(r,t,n(e))}}function br(t){return de(function(n){return n=a(_n(n,1),Sr()),de(function(e){var u=this;return t(n,function(t){return r(t,u,e)})})})}function xr(t,n){n=n===T?" ":n+"";var r=n.length;return 2>r?r?Nn(n,t):n:(r=Nn(n,Cu(t/P(n))),St.test(n)?r.match(It).slice(0,t).join(""):r.slice(0,t))}function jr(t,n,e,u){function o(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==Jt&&this instanceof o?f:t;++a<l;)s[a]=u[a];
|
||||
for(;c--;)s[a++]=arguments[++n];return r(h,i?e:this,s)}var i=1&n,f=_r(t);return o}function mr(t){return function(n,r,e){e&&typeof e!="number"&&Fr(n,r,e)&&(r=e=T),n=Ne(n),n=n===n?n:0,r===T?(r=n,n=0):r=Ne(r)||0,e=e===T?r>n?1:-1:Ne(e)||0;var u=-1;r=Du(Cu((r-n)/(e||1)),0);for(var o=Array(r);r--;)o[t?r:++u]=n,n+=e;return o}}function wr(t,n,r,e,u,o,i,f,c,a){var l=8&n;f=f?er(f):T;var s=l?i:T;i=l?T:i;var h=l?o:T;return o=l?T:o,n=(n|(l?32:64))&~(l?64:32),4&n||(n&=-4),n=[t,n,u,h,s,o,i,f,c,a],r=r.apply(T,n),
|
||||
Zr(t)&&go(r,n),r.placeholder=e,r}function Ar(t){var n=au[t];return function(t,r){if(t=Ne(t),r=De(r)){var e=(Ze(t)+"e").split("e"),e=n(e[0]+"e"+(+e[1]+r)),e=(Ze(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return n(t)}}function Or(t,n,r,e,u,o,i,f){var c=2&n;if(!c&&typeof t!="function")throw new su("Expected a function");var a=e?e.length:0;if(a||(n&=-97,e=u=T),i=i===T?i:Du(De(i),0),f=f===T?f:De(f),a-=u?u.length:0,64&n){var l=e,s=u;e=u=T}var h=c?T:po(t);return o=[t,n,r,e,u,l,s,o,i,f],h&&(r=o[1],t=h[1],
|
||||
n=r|t,e=128==t&&8==r||128==t&&256==r&&h[8]>=o[7].length||384==t&&h[8]>=h[7].length&&8==r,131>n||e)&&(1&t&&(o[2]=h[2],n|=1&r?0:4),(r=h[3])&&(e=o[3],o[3]=e?nr(e,r,h[4]):er(r),o[4]=e?F(o[3],"__lodash_placeholder__"):er(h[4])),(r=h[5])&&(e=o[5],o[5]=e?rr(e,r,h[6]):er(r),o[6]=e?F(o[5],"__lodash_placeholder__"):er(h[6])),(r=h[7])&&(o[7]=er(r)),128&t&&(o[8]=null==o[8]?h[8]:Fu(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=n),t=o[0],n=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:t.length:Du(o[9]-a,0),
|
||||
@@ -70,7 +70,7 @@ case to:return"[object Map]";case no:return"[object Promise]";case ro:return"[ob
|
||||
}),Io=de(function(t){var n=Xr(t);return we(n)&&(n=T),Gn(_n(t,1,true),Sr(n))}),So=de(function(t){var n=Xr(t);return we(n)&&(n=T),Gn(_n(t,1,true),T,n)}),Ro=de(function(t,n){return we(t)?sn(t,n):[]}),Wo=de(function(t){return Hn(i(t,we))}),Bo=de(function(t){var n=Xr(t);return we(n)&&(n=T),Hn(i(t,we),Sr(n))}),Co=de(function(t){var n=Xr(t);return we(n)&&(n=T),Hn(i(t,we),T,n)}),zo=de(re),Uo=de(function(t){var n=t.length,n=n>1?t[n-1]:T,n=typeof n=="function"?(t.pop(),n):T;return ee(t,n)}),Mo=de(function(t){function n(n){
|
||||
return nn(n,t)}t=_n(t,1);var r=t.length,e=r?t[0]:0,u=this.__wrapped__;return 1>=r&&!this.__actions__.length&&u instanceof kt&&L(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:oe,args:[n],thisArg:T}),new Ot(u,this.__chain__).thru(function(t){return r&&!t.length&&t.push(T),t})):this.thru(n)}),Lo=fr(function(t,n,r){vu.call(t,r)?++t[r]:t[r]=1}),$o=fr(function(t,n,r){vu.call(t,r)?t[r].push(n):t[r]=[n]}),Do=de(function(t,n,e){var u=-1,o=typeof n=="function",i=Nr(n),f=me(t)?Array(t.length):[];return fo(t,function(t){
|
||||
var c=o?n:i&&null!=t?t[n]:T;f[++u]=c?r(c,t,e):An(t,n,e)}),f}),Fo=fr(function(t,n,r){t[r]=n}),No=fr(function(t,n,r){t[r?0:1].push(n)},function(){return[[],[]]}),Po=de(function(t,n){if(null==t)return[];var r=n.length;return r>1&&Fr(t,n[0],n[1])?n=[]:r>2&&Fr(n[0],n[1],n[2])&&(n.length=1),Cn(t,_n(n,1),[])}),Zo=fu.now,qo=de(function(t,n,r){var e=1;if(r.length)var u=F(r,Br(qo)),e=32|e;return Or(t,e,n,r,u)}),To=de(function(t,n,r){var e=3;if(r.length)var u=F(r,Br(To)),e=32|e;return Or(n,e,t,r,u)}),Vo=de(function(t,n){
|
||||
return ln(t,1,n)}),Ko=de(function(t,n,r){return ln(t,Ne(n)||0,r)});ge.Cache=Lt;var Go=de(function(t,n){n=a(n,Sr());var e=n.length;return de(function(u){for(var o=-1,i=Fu(u.length,e);++o<i;)u[o]=n[o].call(this,u[o]);return r(t,this,u)})}),Jo=de(function(t,n){var r=F(n,Br(Jo));return Or(t,32,T,n,r)}),Yo=de(function(t,n){var r=F(n,Br(Yo));return Or(t,64,T,n,r)}),Ho=de(function(t,n){return Or(t,256,T,T,T,_n(n,1))}),Qo=Array.isArray,Xo=ju?function(t){return t instanceof ju}:nu(false),ti=cr(function(t,n){
|
||||
return ln(t,1,n)}),Ko=de(function(t,n,r){return ln(t,Ne(n)||0,r)});ge.Cache=Lt;var Go=de(function(t,n){n=a(_n(n,1),Sr());var e=n.length;return de(function(u){for(var o=-1,i=Fu(u.length,e);++o<i;)u[o]=n[o].call(this,u[o]);return r(t,this,u)})}),Jo=de(function(t,n){var r=F(n,Br(Jo));return Or(t,32,T,n,r)}),Yo=de(function(t,n){var r=F(n,Br(Yo));return Or(t,64,T,n,r)}),Ho=de(function(t,n){return Or(t,256,T,T,T,_n(n,1))}),Qo=Array.isArray,Xo=ju?function(t){return t instanceof ju}:nu(false),ti=cr(function(t,n){
|
||||
if(Hu||qr(n)||me(n))ur(n,Ke(n),t);else for(var r in n)vu.call(n,r)&&Qt(t,r,n[r])}),ni=cr(function(t,n){if(Hu||qr(n)||me(n))ur(n,Ge(n),t);else for(var r in n)Qt(t,r,n[r])}),ri=cr(function(t,n,r,e){or(n,Ge(n),t,e)}),ei=cr(function(t,n,r,e){or(n,Ke(n),t,e)}),ui=de(function(t,n){return nn(t,_n(n,1))}),oi=de(function(t){return t.push(T,Gt),r(ri,T,t)}),ii=de(function(t){return t.push(T,Vr),r(si,T,t)}),fi=yr(function(t,n,r){t[n]=r},nu(ru)),ci=yr(function(t,n,r){vu.call(t,n)?t[n].push(r):t[n]=[r]},Sr),ai=de(An),li=cr(function(t,n,r){
|
||||
Bn(t,n,r)}),si=cr(function(t,n,r,e){Bn(t,n,r,e)}),hi=de(function(t,n){return null==t?{}:(n=a(_n(n,1),en),zn(t,sn(bn(t,Ge,vo),n)))}),pi=de(function(t,n){return null==t?{}:zn(t,_n(n,1))}),_i=pr(function(t,n,r){return n=n.toLowerCase(),t+(r?Qe(n):n)}),vi=pr(function(t,n,r){return t+(r?"-":"")+n.toLowerCase()}),gi=pr(function(t,n,r){return t+(r?" ":"")+n.toLowerCase()}),di=hr("toLowerCase"),yi=pr(function(t,n,r){return t+(r?"_":"")+n.toLowerCase()}),bi=pr(function(t,n,r){return t+(r?" ":"")+ji(n)}),xi=pr(function(t,n,r){
|
||||
return t+(r?" ":"")+n.toUpperCase()}),ji=hr("toUpperCase"),mi=de(function(t,n){try{return r(t,T,n)}catch(e){return Ae(e)?e:new cu(e)}}),wi=de(function(t,n){return u(_n(n,1),function(n){t[n]=qo(t[n],t)}),t}),Ai=gr(),Oi=gr(true),ki=de(function(t,n){return function(r){return An(r,t,n)}}),Ei=de(function(t,n){return function(r){return An(t,r,n)}}),Ii=br(a),Si=br(o),Ri=br(p),Wi=mr(),Bi=mr(true),Ci=W(function(t,n){return t+n}),zi=Ar("ceil"),Ui=W(function(t,n){return t/n}),Mi=Ar("floor"),Li=W(function(t,n){return t*n;
|
||||
@@ -105,7 +105,7 @@ var l="sourceURL"in n?"//# sourceURL="+n.sourceURL+"\n":"";if(t.replace(r,functi
|
||||
n=mi(function(){return Function(i,l+"return "+a).apply(T,f)}),n.source=a,Ae(n))throw n;return n},xt.times=function(t,n){if(t=De(t),1>t||t>9007199254740991)return[];var r=4294967295,e=Fu(t,4294967295);for(n=Sr(n),t-=4294967295,e=w(e,n);++r<t;)n(r);return e},xt.toInteger=De,xt.toLength=Fe,xt.toLower=function(t){return Ze(t).toLowerCase()},xt.toNumber=Ne,xt.toSafeInteger=function(t){return on(De(t),-9007199254740991,9007199254740991)},xt.toString=Ze,xt.toUpper=function(t){return Ze(t).toUpperCase()},
|
||||
xt.trim=function(t,n,r){return(t=Ze(t))?r||n===T?t.replace(at,""):(n+="")?(t=t.match(It),n=n.match(It),t.slice(E(t,n),I(t,n)+1).join("")):t:t},xt.trimEnd=function(t,n,r){return(t=Ze(t))?r||n===T?t.replace(st,""):(n+="")?(t=t.match(It),t.slice(0,I(t,n.match(It))+1).join("")):t:t},xt.trimStart=function(t,n,r){return(t=Ze(t))?r||n===T?t.replace(lt,""):(n+="")?(t=t.match(It),t.slice(E(t,n.match(It))).join("")):t:t},xt.truncate=function(t,n){var r=30,e="...";if(Ie(n))var u="separator"in n?n.separator:u,r="length"in n?De(n.length):r,e="omission"in n?Ze(n.omission):e;
|
||||
t=Ze(t);var o=t.length;if(St.test(t))var i=t.match(It),o=i.length;if(r>=o)return t;if(o=r-P(e),1>o)return e;if(r=i?i.slice(0,o).join(""):t.slice(0,o),u===T)return r+e;if(i&&(o+=r.length-o),Ce(u)){if(t.slice(o).search(u)){var f=r;for(u.global||(u=lu(u.source,Ze(_t.exec(u))+"g")),u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===T?o:c)}}else t.indexOf(u,o)!=o&&(u=r.lastIndexOf(u),u>-1&&(r=r.slice(0,u)));return r+e},xt.unescape=function(t){return(t=Ze(t))&&X.test(t)?t.replace(H,Z):t},xt.uniqueId=function(t){
|
||||
var n=++gu;return Ze(t)+n},xt.upperCase=xi,xt.upperFirst=ji,xt.each=fe,xt.eachRight=ce,xt.first=Qr,uu(xt,function(){var t={};return vn(xt,function(n,r){vu.call(xt.prototype,r)||(t[r]=n)}),t}(),{chain:false}),xt.VERSION="4.8.0",u("bind bindKey curry curryRight partial partialRight".split(" "),function(t){xt[t].placeholder=xt}),u(["drop","take"],function(t,n){kt.prototype[t]=function(r){var e=this.__filtered__;if(e&&!n)return new kt(this);r=r===T?1:Du(De(r),0);var u=this.clone();return e?u.__takeCount__=Fu(r,u.__takeCount__):u.__views__.push({
|
||||
var n=++gu;return Ze(t)+n},xt.upperCase=xi,xt.upperFirst=ji,xt.each=fe,xt.eachRight=ce,xt.first=Qr,uu(xt,function(){var t={};return vn(xt,function(n,r){vu.call(xt.prototype,r)||(t[r]=n)}),t}(),{chain:false}),xt.VERSION="4.8.2",u("bind bindKey curry curryRight partial partialRight".split(" "),function(t){xt[t].placeholder=xt}),u(["drop","take"],function(t,n){kt.prototype[t]=function(r){var e=this.__filtered__;if(e&&!n)return new kt(this);r=r===T?1:Du(De(r),0);var u=this.clone();return e?u.__takeCount__=Fu(r,u.__takeCount__):u.__views__.push({
|
||||
size:Fu(r,4294967295),type:t+(0>u.__dir__?"Right":"")}),u},kt.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),u(["filter","map","takeWhile"],function(t,n){var r=n+1,e=1==r||3==r;kt.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:Sr(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}}),u(["head","last"],function(t,n){var r="take"+(n?"Right":"");kt.prototype[t]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(t,n){var r="drop"+(n?"":"Right");
|
||||
kt.prototype[t]=function(){return this.__filtered__?new kt(this):this[r](1)}}),kt.prototype.compact=function(){return this.filter(ru)},kt.prototype.find=function(t){return this.filter(t).head()},kt.prototype.findLast=function(t){return this.reverse().find(t)},kt.prototype.invokeMap=de(function(t,n){return typeof t=="function"?new kt(this):this.map(function(r){return An(r,t,n)})}),kt.prototype.reject=function(t){return t=Sr(t,3),this.filter(function(n){return!t(n)})},kt.prototype.slice=function(t,n){
|
||||
t=De(t);var r=this;return r.__filtered__&&(t>0||0>n)?new kt(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==T&&(n=De(n),r=0>n?r.dropRight(-n):r.take(n-t)),r)},kt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},kt.prototype.toArray=function(){return this.take(4294967295)},vn(kt.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),u=xt[e?"take"+("last"==n?"Right":""):n],o=e||/^find/.test(n);u&&(xt.prototype[n]=function(){
|
||||
|
||||
4
dist/mapping.fp.js
vendored
4
dist/mapping.fp.js
vendored
@@ -221,10 +221,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
exports.methodSpread = {
|
||||
'invokeArgs': 2,
|
||||
'invokeArgsMap': 2,
|
||||
'over': 0,
|
||||
'overArgs': 1,
|
||||
'overEvery': 0,
|
||||
'overSome': 0,
|
||||
'partial': 1,
|
||||
'partialRight': 1,
|
||||
'without': 1
|
||||
|
||||
622
doc/README.md
622
doc/README.md
File diff suppressed because it is too large
Load Diff
@@ -165,10 +165,6 @@ exports.methodRearg = {
|
||||
exports.methodSpread = {
|
||||
'invokeArgs': 2,
|
||||
'invokeArgsMap': 2,
|
||||
'over': 0,
|
||||
'overArgs': 1,
|
||||
'overEvery': 0,
|
||||
'overSome': 0,
|
||||
'partial': 1,
|
||||
'partialRight': 1,
|
||||
'without': 1
|
||||
|
||||
@@ -33,11 +33,13 @@ to convert each method.
|
||||
|
||||
Iteratee arguments are capped to avoid gotchas with variadic iteratees.
|
||||
```js
|
||||
// The `lodash/map` iteratee recieves three arguments: (value, index|key, collection).
|
||||
// The `lodash/map` iteratee receives three arguments:
|
||||
// (value, index|key, collection)
|
||||
_.map(['6', '8', '10'], parseInt);
|
||||
// → [6, NaN, 2]
|
||||
|
||||
// The `lodash/fp/map` iteratee is capped at one argument: (value).
|
||||
// The `lodash/fp/map` iteratee is capped at one argument:
|
||||
// (value)
|
||||
fp.map(parseInt)(['6', '8', '10']);
|
||||
// → [6, 8, 10]
|
||||
```
|
||||
@@ -66,27 +68,29 @@ fp.padCharsStart('-')(3)('a');
|
||||
```
|
||||
|
||||
Methods with a fixed arity of one:<br>
|
||||
<%= toFuncList(mapping.aryMethod[1]) %>
|
||||
<%= toFuncList(_.difference(mapping.aryMethod[1], _.keys(mapping.skipFixed))) %>
|
||||
|
||||
Methods with a fixed arity of two:<br>
|
||||
<%= toFuncList(mapping.aryMethod[2]) %>
|
||||
<%= toFuncList(_.difference(mapping.aryMethod[2], _.keys(mapping.skipFixed))) %>
|
||||
|
||||
Methods with a fixed arity of three:<br>
|
||||
<%= toFuncList(mapping.aryMethod[3]) %>
|
||||
<%= toFuncList(_.difference(mapping.aryMethod[3], _.keys(mapping.skipFixed))) %>
|
||||
|
||||
Methods with a fixed arity of four:<br>
|
||||
<%= toFuncList(mapping.aryMethod[4]) %>
|
||||
<%= toFuncList(_.difference(mapping.aryMethod[4], _.keys(mapping.skipFixed))) %>
|
||||
|
||||
#### Rearranged Arguments
|
||||
|
||||
Method arguments are rearranged to make composition easier.
|
||||
```js
|
||||
// The `lodash/filter` method accepts (collection, iteratee).
|
||||
// The `lodash/filter` method is data-first iteratee-last:
|
||||
// (collection, iteratee)
|
||||
var compact = _.partial(_.filter, _, Boolean);
|
||||
compact(['a', null, 'c']);
|
||||
// → ['a', 'c']
|
||||
|
||||
// The `lodash/fp/filter` method accepts (iteratee, collection)
|
||||
// The `lodash/fp/filter` method is iteratee-first data-last:
|
||||
// (iteratee, collection)
|
||||
var compact = fp.filter(Boolean);
|
||||
compact(['a', null, 'c']);
|
||||
// → ['a', 'c']
|
||||
|
||||
@@ -4,4 +4,4 @@ module.exports = {
|
||||
'fixed': false,
|
||||
'immutable': false,
|
||||
'rearg': false
|
||||
});
|
||||
};
|
||||
|
||||
16
lodash.js
16
lodash.js
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @license
|
||||
* lodash 4.8.0 <https://lodash.com/>
|
||||
* lodash 4.8.2 <https://lodash.com/>
|
||||
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
@@ -12,7 +12,7 @@
|
||||
var undefined;
|
||||
|
||||
/** Used as the semantic version number. */
|
||||
var VERSION = '4.8.0';
|
||||
var VERSION = '4.8.2';
|
||||
|
||||
/** Used as the size to enable large array optimizations. */
|
||||
var LARGE_ARRAY_SIZE = 200;
|
||||
@@ -4608,7 +4608,7 @@
|
||||
*/
|
||||
function createOver(arrayFunc) {
|
||||
return rest(function(iteratees) {
|
||||
iteratees = arrayMap(iteratees, getIteratee());
|
||||
iteratees = arrayMap(baseFlatten(iteratees, 1), getIteratee());
|
||||
return rest(function(args) {
|
||||
var thisArg = this;
|
||||
return arrayFunc(iteratees, function(iteratee) {
|
||||
@@ -9592,7 +9592,7 @@
|
||||
* @memberOf _
|
||||
* @category Function
|
||||
* @param {Function} func The function to wrap.
|
||||
* @param {...Function} [transforms] The functions to transform
|
||||
* @param {...(Function|Function[])} [transforms] The functions to transform.
|
||||
* arguments, specified individually or in arrays.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @example
|
||||
@@ -9616,7 +9616,7 @@
|
||||
* // => [100, 10]
|
||||
*/
|
||||
var overArgs = rest(function(func, transforms) {
|
||||
transforms = arrayMap(transforms, getIteratee());
|
||||
transforms = arrayMap(baseFlatten(transforms, 1), getIteratee());
|
||||
|
||||
var funcsLength = transforms.length;
|
||||
return rest(function(args) {
|
||||
@@ -14691,7 +14691,7 @@
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Util
|
||||
* @param {...Function} iteratees The iteratees to invoke.
|
||||
* @param {...(Function|Function[])} iteratees The iteratees to invoke.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @example
|
||||
*
|
||||
@@ -14710,7 +14710,7 @@
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Util
|
||||
* @param {...Function} predicates The predicates to check.
|
||||
* @param {...(Function|Function[])} predicates The predicates to check.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @example
|
||||
*
|
||||
@@ -14735,7 +14735,7 @@
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Util
|
||||
* @param {...Function} predicates The predicates to check.
|
||||
* @param {...(Function|Function[])} predicates The predicates to check.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @example
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash",
|
||||
"version": "4.8.0",
|
||||
"version": "4.8.2",
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"main": "lodash.js",
|
||||
@@ -19,7 +19,7 @@
|
||||
"istanbul": "0.4.2",
|
||||
"jquery": "^2.2.2",
|
||||
"jscs": "^2.11.0",
|
||||
"lodash": "4.5.0",
|
||||
"lodash": "4.7.0",
|
||||
"platform": "^1.3.1",
|
||||
"qunit-extras": "^1.5.0",
|
||||
"qunitjs": "~1.23.0",
|
||||
|
||||
21
test/test.js
21
test/test.js
@@ -15583,6 +15583,13 @@
|
||||
assert.deepEqual(over(5, 10), [10, 100]);
|
||||
});
|
||||
|
||||
QUnit.test('should flatten `transforms`', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
var over = _.overArgs(fn, [doubled, square], String);
|
||||
assert.deepEqual(over(5, 10, 15), [10, 100, '15']);
|
||||
});
|
||||
|
||||
QUnit.test('should not transform any argument greater than the number of transforms', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
@@ -16109,6 +16116,13 @@
|
||||
assert.strictEqual(over(object), false);
|
||||
});
|
||||
|
||||
QUnit.test('should flatten `predicates`', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
var over = _.overEvery(alwaysTrue, [alwaysFalse]);
|
||||
assert.strictEqual(over(), false);
|
||||
});
|
||||
|
||||
QUnit.test('should provide arguments to predicates', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
@@ -16204,6 +16218,13 @@
|
||||
assert.strictEqual(over(object), false);
|
||||
});
|
||||
|
||||
QUnit.test('should flatten `predicates`', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
var over = _.overSome(alwaysFalse, [alwaysTrue]);
|
||||
assert.strictEqual(over(), true);
|
||||
});
|
||||
|
||||
QUnit.test('should provide arguments to predicates', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user