Compare commits

...

19 Commits
4.4.0 ... 4.5.0

Author SHA1 Message Date
John-David Dalton
ab73503859 Bump to v4.5.0. 2016-02-17 22:21:48 -08:00
John-David Dalton
a4f7d4cc2a Rebuild lodash and docs. 2016-02-17 22:21:47 -08:00
Myles Borins
cca5ac60d6 Fix npm-test by removing the call to test-docs. 2016-02-17 22:21:47 -08:00
John-David Dalton
9f7f9fc3c5 Adjust heading order. [ci skip] 2016-02-17 01:26:28 -08:00
John-David Dalton
6e2fb92e9a Remove unused baseArity. 2016-02-16 22:29:41 -08:00
John-David Dalton
4f702e2381 Specify utf8 encoding. 2016-02-16 22:04:47 -08:00
John-David Dalton
b188f903ce Add fp tests for iteratee shorthands. 2016-02-16 21:27:08 -08:00
John-David Dalton
7b93dc9c32 Ensure clone methods clone expando properties of boolean, number, & string objects. [closes #2008] 2016-02-16 21:27:03 -08:00
John-David Dalton
664d66a89e Make string tests more consistent. 2016-02-16 20:44:55 -08:00
John-David Dalton
d9dc0e6fd1 Add _.invertBy tests. 2016-02-16 19:30:23 -08:00
John-David Dalton
53168e4cfd Remove dup _.invertBy test. 2016-02-16 18:49:43 -08:00
John-David Dalton
7998632685 Add castArray chaining test. 2016-02-16 18:48:57 -08:00
John-David Dalton
86f2a1061c Simplify readme. [ci skip] 2016-02-16 18:48:11 -08:00
John-David Dalton
9ca02a448e Update cdn links. [ci skip] 2016-02-16 08:52:49 -08:00
John-David Dalton
17091d3a0e Simplify shorthand test labels. 2016-02-16 08:42:29 -08:00
John-David Dalton
c94b1488e9 Make iteraeeAry pass thru non-functions. [closes #2007] 2016-02-16 07:46:54 -08:00
John-David Dalton
7b2274cb44 Add methods to lodash doc notes. [ci skip] 2016-02-16 01:29:25 -08:00
John-David Dalton
7c27a6f51e Make wording of entries align closer to their titles. [ci skip] 2016-02-16 01:29:25 -08:00
John-David Dalton
e91371d406 Increment package version to enable ci tests. 2016-02-16 01:29:25 -08:00
15 changed files with 582 additions and 535 deletions

View File

@@ -1,4 +1,4 @@
# lodash v4.4.0
# lodash v4.5.0
The [lodash](https://lodash.com/) library exported as a [UMD](https://github.com/umdjs/umd) module.
@@ -9,6 +9,24 @@ $ lodash -o ./dist/lodash.js
$ lodash core -o ./dist/lodash.core.js
```
## Community
[![Gitter](https://badges.gitter.im/lodash/lodash.svg)](https://gitter.im/lodash/lodash)
## Documentation
* [API Documentation](https://lodash.com/docs)
* [FP Guide](https://github.com/lodash/lodash/wiki/FP-Guide)
## Download
Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.5.0/LICENSE) & supports [modern environments](#support).<br>
Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick one thats right for you.
* [Core build](https://raw.githubusercontent.com/lodash/lodash/4.5.0/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.5.0/dist/lodash.core.min.js))
* [Full build](https://raw.githubusercontent.com/lodash/lodash/4.5.0/dist/lodash.js) ([~21 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.5.0/dist/lodash.min.js))
* [CDN copies](https://www.jsdelivr.com/projects/lodash)
## Why Lodash?
Lodash makes JavaScript easier by taking the hassle out of working with arrays,<br>
@@ -18,35 +36,14 @@ numbers, objects, strings, etc. Lodashs modular methods are great for:
* Manipulating & testing values
* Creating composite functions
## Community
[![Gitter](https://badges.gitter.im/lodash/lodash.svg)](https://gitter.im/lodash/lodash)
## Documentation
* [API Documentation](https://lodash.com/docs)
* [DevDocs *a searchable interface for our documentation*](https://devdocs.io/lodash/)
* [FP Guide](https://github.com/lodash/lodash/wiki/FP-Guide)
## Download
Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.4.0/LICENSE) & supports [modern environments](#support).<br>
Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick the one thats right for you.
* [Core build](https://raw.githubusercontent.com/lodash/lodash/4.4.0/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.4.0/dist/lodash.core.min.js))
* [Full build](https://raw.githubusercontent.com/lodash/lodash/4.4.0/dist/lodash.js) ([~20 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.4.0/dist/lodash.min.js))
## Module Formats
Lodash is available in a variety of other builds & module formats.
Lodash is available in a [variety of builds](https://lodash.com/custom-builds) & module formats.
* [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.4.0-npm/fp)
CDN copies are available on [cdnjs](https://cdnjs.com/) & [jsDelivr](http://www.jsdelivr.com/).<br>
Create [custom builds](https://lodash.com/custom-builds) with only the features you need.
* [lodash/fp](https://github.com/lodash/lodash/tree/4.5.0-npm/fp)
## Further Reading

43
dist/lodash.core.js vendored
View File

@@ -1,6 +1,6 @@
/**
* @license
* lodash 4.4.0 (Custom Build) <https://lodash.com/>
* lodash 4.5.0 (Custom Build) <https://lodash.com/>
* Build: `lodash core -o ./dist/lodash.core.js`
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@@ -13,7 +13,7 @@
var undefined;
/** Used as the semantic version number. */
var VERSION = '4.4.0';
var VERSION = '4.5.0';
/** Used to compose bitmasks for wrapper metadata. */
var BIND_FLAG = 1,
@@ -449,25 +449,26 @@
* The wrapper methods that are **not** chainable by default are:
* `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
* `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `endsWith`, `eq`,
* `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`,
* `findLast`, `findLastIndex`, `findLastKey`, `floor`, `forEach`, `forEachRight`,
* `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
* `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
* `isArguments`, `isArray`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`,
* `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`,
* `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMatch`, `isMatchWith`,
* `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, `isObject`, `isObjectLike`,
* `isPlainObject`, `isRegExp`, `isSafeInteger`, `isString`, `isUndefined`,
* `isTypedArray`, `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`,
* `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `min`, `minBy`,
* `noConflict`, `noop`, `now`, `pad`, `padEnd`, `padStart`, `parseInt`,
* `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`,
* `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`,
* `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`,
* `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toLower`,
* `toInteger`, `toLength`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`,
* `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`,
* `upperCase`, `upperFirst`, `value`, and `words`
* `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
* `findLastIndex`, `findLastKey`, `floor`, `forEach`, `forEachRight`, `forIn`,
* `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`,
* `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`,
* `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`,
* `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`,
* `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`,
* `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`,
* `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`,
* `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`,
* `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`,
* `lt`, `lte`, `max`, `maxBy`, `mean`, `min`, `minBy`, `noConflict`, `noop`,
* `now`, `pad`, `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`,
* `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `sample`,
* `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`,
* `sortedLastIndex`, `sortedLastIndexBy`, `startCase`, `startsWith`, `subtract`,
* `sum`, `sumBy`, `template`, `times`, `toLower`, `toInteger`, `toLength`,
* `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, `trimEnd`,
* `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, `upperFirst`,
* `value`, and `words`
*
* @name _
* @constructor

View File

@@ -1,6 +1,6 @@
/**
* @license
* lodash 4.4.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
* lodash 4.5.0 (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){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return 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 O(t,function(t){return n[t]})}function o(n){return n&&n.Object===Object?n:null}function i(n){return yn[n];
@@ -25,5 +25,5 @@ return function(){return!n.apply(this,arguments)}},a.once=function(n){return U(2
}),A("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,d(t))},a.find=J,a.forEach=M,a.has=function(n,t){return null!=n&&An.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(An.call(n,t))return false;return true},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 On._===this&&(On._=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,d(t))},a.uniqueId=function(n){var t=++kn;return en(n)+t},a.each=M,a.first=G,an(a,function(){var n={};return g(a,function(t,r){An.call(a.prototype,r)||(n[r]=t)}),n}(),{chain:false}),a.VERSION="4.4.0",qn("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);
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,d(t))},a.uniqueId=function(n){var t=++kn;return en(n)+t},a.each=M,a.first=G,an(a,function(){var n={};return g(a,function(t,r){An.call(a.prototype,r)||(n[r]=t)}),n}(),{chain:false}),a.VERSION="4.5.0",qn("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;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=function(){return T(this.__wrapped__,this.__actions__)},(dn||mn||{})._=a,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return a}):gn&&bn?(jn&&((bn.exports=a)._=a),gn._=a):On._=a}).call(this);

10
dist/lodash.fp.js vendored
View File

@@ -146,12 +146,6 @@ return /******/ (function(modules) { // webpackBootstrap
var aryMethodKeys = keys(mapping.aryMethod);
var baseArity = function(func, n) {
return n == 2
? function(a, b) { return func.apply(undefined, arguments); }
: function(a) { return func.apply(undefined, arguments); };
};
var baseAry = function(func, n) {
return n == 2
? function(a, b) { return func(a, b); }
@@ -192,7 +186,9 @@ return /******/ (function(modules) { // webpackBootstrap
var iterateeAry = function(func, n) {
return overArg(func, function(func) {
return baseAry(func, n);
return typeof func == 'function'
? baseAry(func, n)
: func;
});
};

11
dist/lodash.fp.min.js vendored
View File

@@ -1,11 +1,12 @@
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.fp=r():e.fp=r()}(this,function(){return function(e){function r(i){if(t[i])return t[i].exports;var n=t[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}var t={};return r.m=e,r.c=t,r.p="",r(0)}([function(e,r,t){function i(e,r){return n(e,e,r)}var n=t(1);"function"==typeof _&&(_=i(_.runInContext())),
e.exports=i},function(e,r,t){function i(e,r,t,s){var u,c="function"==typeof r,p=r===Object(r);if(p&&(s=t,t=r,r=void 0),null==t)throw new TypeError;s||(s={});var l={cap:"cap"in s?s.cap:!0,curry:"curry"in s?s.curry:!0,fixed:"fixed"in s?s.fixed:!0,immutable:"immutable"in s?s.immutable:!0,rearg:"rearg"in s?s.rearg:!0},f="rearg"in s&&s.rearg,h=c?t:{ary:e.ary,cloneDeep:e.cloneDeep,curry:e.curry,forEach:e.forEach,isArray:e.isArray,isFunction:e.isFunction,iteratee:e.iteratee,keys:e.keys,rearg:e.rearg,spread:e.spread
},d=h.ary,y=h.cloneDeep,g=h.curry,m=h.forEach,v=h.isArray,W=h.isFunction,x=h.keys,R=h.rearg,I=h.spread,O=x(n.aryMethod),b=function(e,r){return 2==r?function(r,t){return e(r,t)}:function(r){return e(r)}},A=function(e){for(var r=e?e.length:0,t=Array(r);r--;)t[r]=e[r];return t},B=function(e){return function(r){return e({},r)}},E=function(e,r){return function(){var t=arguments.length;if(!t)return n;for(var i=Array(t);t--;)i[t]=arguments[t];var n=i[0]=r(i[0]);return e.apply(void 0,i),n}},k=function(e,r){
return j(e,function(e){return b(e,r)})},j=function(e,r,t){return function(){var t=arguments.length;if(!t)return e();for(var i=Array(t);t--;)i[t]=arguments[t];var n=l.rearg?0:t-1;return i[n]=r(i[n]),e.apply(void 0,i)}},w={castArray:function(e){return function(){var r=arguments[0];return v(r)?e(A(r)):e.apply(void 0,arguments)}},iteratee:function(e){return function(){var r=arguments[0],t=arguments[1];if(!l.cap)return e(r,t);t=t>2?t-2:1,r=e(r);var i=r.length;return i&&t>=i?r:b(r,t)}},mixin:function(e){
return function(r){var t=this;if(!W(t))return e(t,Object(r));var i=[],n=[];return m(x(r),function(e){var a=r[e];W(a)&&(n.push(e),i.push(t.prototype[e]))}),e(t,Object(r)),m(n,function(e,r){var n=i[r];W(n)?t.prototype[e]=n:delete t.prototype[e]}),t}},runInContext:function(r){return function(t){return i(e,r(t),s)}}},q=function(e,r){e=n.aliasToReal[e]||e;var t=w[e];if(t)return t(r);var i=r;l.immutable&&(a.array[e]?i=E(r,A):a.object[e]?i=E(r,B(r)):a.set[e]&&(i=E(r,y)));var s;return m(O,function(r){return m(n.aryMethod[r],function(t){
if(e==t){var a=!c&&n.iterateeAry[e],o=n.methodSpread[e];return s=i,l.fixed&&(s=void 0===o?d(s,r):I(s,o)),l.rearg&&r>1&&(f||!n.skipRearg[e])&&(s=R(s,n.methodRearg[e]||n.aryRearg[r])),l.cap&&a&&(s=k(s,a)),l.curry&&r>1&&(s=g(s,r)),!1}}),!s}),s||(s=i),n.placeholder[e]&&(u=!0,r.placeholder=s.placeholder=o),s};if(!p)return q(r,t);var z=t,M=[];return m(O,function(e){m(n.aryMethod[e],function(e){var r=z[n.remap[e]||e];r&&M.push([e,q(e,r)])})}),m(M,function(e){z[e[0]]=e[1]}),u&&(z.placeholder=o),m(x(z),function(e){
m(n.realToAlias[e]||[],function(r){z[r]=z[e]})}),z}var n=t(2),a=n.mutate,o={};e.exports=i},function(e,r){r.aliasToReal={__:"placeholder",all:"some",allPass:"overEvery",apply:"spread",assoc:"set",assocPath:"set",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",each:"forEach",eachRight:"forEachRight",equals:"isEqual",extend:"assignIn",extendWith:"assignInWith",first:"head",init:"initial",mapObj:"mapValues",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",
pickAll:"pick",pipe:"flow",prop:"get",propOf:"propertyOf",propOr:"getOr",somePass:"overSome",unapply:"rest",unnest:"flatten",useWith:"overArgs",whereEq:"filter",zipObj:"zipObject"},r.aryMethod={1:["attempt","castArray","ceil","create","curry","curryRight","floor","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","bindKey","chunk","cloneDeepWith","cloneWith","concat","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","delay","difference","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","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","merge","minBy","omit","omitBy","orderBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","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"],
return j(e,function(e){return"function"==typeof e?b(e,r):e})},j=function(e,r,t){return function(){var t=arguments.length;if(!t)return e();for(var i=Array(t);t--;)i[t]=arguments[t];var n=l.rearg?0:t-1;return i[n]=r(i[n]),e.apply(void 0,i)}},w={castArray:function(e){return function(){var r=arguments[0];return v(r)?e(A(r)):e.apply(void 0,arguments)}},iteratee:function(e){return function(){var r=arguments[0],t=arguments[1];if(!l.cap)return e(r,t);t=t>2?t-2:1,r=e(r);var i=r.length;return i&&t>=i?r:b(r,t);
}},mixin:function(e){return function(r){var t=this;if(!W(t))return e(t,Object(r));var i=[],n=[];return m(x(r),function(e){var a=r[e];W(a)&&(n.push(e),i.push(t.prototype[e]))}),e(t,Object(r)),m(n,function(e,r){var n=i[r];W(n)?t.prototype[e]=n:delete t.prototype[e]}),t}},runInContext:function(r){return function(t){return i(e,r(t),s)}}},q=function(e,r){e=n.aliasToReal[e]||e;var t=w[e];if(t)return t(r);var i=r;l.immutable&&(a.array[e]?i=E(r,A):a.object[e]?i=E(r,B(r)):a.set[e]&&(i=E(r,y)));var s;return m(O,function(r){
return m(n.aryMethod[r],function(t){if(e==t){var a=!c&&n.iterateeAry[e],o=n.methodSpread[e];return s=i,l.fixed&&(s=void 0===o?d(s,r):I(s,o)),l.rearg&&r>1&&(f||!n.skipRearg[e])&&(s=R(s,n.methodRearg[e]||n.aryRearg[r])),l.cap&&a&&(s=k(s,a)),l.curry&&r>1&&(s=g(s,r)),!1}}),!s}),s||(s=i),n.placeholder[e]&&(u=!0,r.placeholder=s.placeholder=o),s};if(!p)return q(r,t);var z=t,M=[];return m(O,function(e){m(n.aryMethod[e],function(e){var r=z[n.remap[e]||e];r&&M.push([e,q(e,r)])})}),m(M,function(e){z[e[0]]=e[1];
}),u&&(z.placeholder=o),m(x(z),function(e){m(n.realToAlias[e]||[],function(r){z[r]=z[e]})}),z}var n=t(2),a=n.mutate,o={};e.exports=i},function(e,r){r.aliasToReal={__:"placeholder",all:"some",allPass:"overEvery",apply:"spread",assoc:"set",assocPath:"set",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",each:"forEach",eachRight:"forEachRight",equals:"isEqual",extend:"assignIn",extendWith:"assignInWith",first:"head",init:"initial",mapObj:"mapValues",omitAll:"omit",nAry:"ary",
path:"get",pathEq:"matchesProperty",pathOr:"getOr",pickAll:"pick",pipe:"flow",prop:"get",propOf:"propertyOf",propOr:"getOr",somePass:"overSome",unapply:"rest",unnest:"flatten",useWith:"overArgs",whereEq:"filter",zipObj:"zipObject"},r.aryMethod={1:["attempt","castArray","ceil","create","curry","curryRight","floor","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","bindKey","chunk","cloneDeepWith","cloneWith","concat","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","delay","difference","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","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","merge","minBy","omit","omitBy","orderBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","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","isEqualWith","isMatchWith","mergeWith","pullAllBy","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","xorBy","xorWith","zipWith"],4:["fill","setWith"]},r.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},r.iterateeAry={assignWith:2,assignInWith:2,cloneDeepWith:1,cloneWith:1,dropRightWhile:1,dropWhile:1,every:1,filter:1,
find:1,findIndex:1,findKey:1,findLast:1,findLastIndex:1,findLastKey:1,flatMap:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,isEqualWith:2,isMatchWith:2,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},r.methodRearg={assignInWith:[1,2,0],assignWith:[1,2,0],getOr:[2,1,0],isMatchWith:[2,1,0],mergeWith:[1,2,0],pullAllBy:[2,1,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],
zipWith:[1,2,0]},r.methodSpread={partial:1,partialRight:1},r.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!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}},r.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},r.realToAlias=function(){var e=Object.prototype.hasOwnProperty,t=r.aliasToReal,i={};for(var n in t){var a=t[n];e.call(i,a)?i[a].push(n):i[a]=[n];

50
dist/lodash.js vendored
View File

@@ -1,6 +1,6 @@
/**
* @license
* lodash 4.4.0 (Custom Build) <https://lodash.com/>
* lodash 4.5.0 (Custom Build) <https://lodash.com/>
* Build: `lodash -o ./dist/lodash.js`
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@@ -13,7 +13,7 @@
var undefined;
/** Used as the semantic version number. */
var VERSION = '4.4.0';
var VERSION = '4.5.0';
/** Used to compose bitmasks for wrapper metadata. */
var BIND_FLAG = 1,
@@ -1430,25 +1430,26 @@
* The wrapper methods that are **not** chainable by default are:
* `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
* `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `endsWith`, `eq`,
* `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`,
* `findLast`, `findLastIndex`, `findLastKey`, `floor`, `forEach`, `forEachRight`,
* `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
* `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
* `isArguments`, `isArray`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`,
* `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`,
* `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMatch`, `isMatchWith`,
* `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, `isObject`, `isObjectLike`,
* `isPlainObject`, `isRegExp`, `isSafeInteger`, `isString`, `isUndefined`,
* `isTypedArray`, `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`,
* `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `min`, `minBy`,
* `noConflict`, `noop`, `now`, `pad`, `padEnd`, `padStart`, `parseInt`,
* `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`,
* `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`,
* `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`,
* `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toLower`,
* `toInteger`, `toLength`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`,
* `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`,
* `upperCase`, `upperFirst`, `value`, and `words`
* `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
* `findLastIndex`, `findLastKey`, `floor`, `forEach`, `forEachRight`, `forIn`,
* `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`,
* `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`,
* `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`,
* `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`,
* `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`,
* `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`,
* `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`,
* `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`,
* `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`,
* `lt`, `lte`, `max`, `maxBy`, `mean`, `min`, `minBy`, `noConflict`, `noop`,
* `now`, `pad`, `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`,
* `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `sample`,
* `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`,
* `sortedLastIndex`, `sortedLastIndexBy`, `startCase`, `startsWith`, `subtract`,
* `sum`, `sumBy`, `template`, `times`, `toLower`, `toInteger`, `toLength`,
* `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, `trimEnd`,
* `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, `upperFirst`,
* `value`, and `words`
*
* @name _
* @constructor
@@ -2318,9 +2319,10 @@
return copySymbols(value, baseAssign(result, value));
}
} else {
return cloneableTags[tag]
? initCloneByTag(value, tag, isDeep)
: (object ? value : {});
if (!cloneableTags[tag]) {
return object ? value : {};
}
result = initCloneByTag(value, tag, isDeep);
}
}
// Check for circular references and return its corresponding clone.

6
dist/lodash.min.js vendored
View File

@@ -1,6 +1,6 @@
/**
* @license
* lodash 4.4.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
* lodash 4.5.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
* Build: `lodash -o ./dist/lodash.js`
*/
;(function(){function n(n,t){return n.set(t[0],t[1]),n}function t(n,t){return n.add(t),n}function r(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function e(n,t,r,e){for(var u=-1,o=n.length;++u<o;){var i=n[u];t(e,i,r(i),n)}return e}function u(n,t){for(var r=-1,e=n.length;++r<e&&false!==t(n[r],r,n););return n}function o(n,t){for(var r=-1,e=n.length;++r<e;)if(!t(n[r],r,n))return false;
@@ -13,7 +13,7 @@ r[++t]=n}),r}function F(n){if(!n||!En.test(n))return n.length;for(var t=kn.lastI
this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Un(){}function zn(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Mn(n){var t=-1,r=n?n.length:0;for(this.__data__=new zn;++t<r;)this.push(n[t])}function Ln(n,t){var r=n.__data__;return Lr(t)?(r=r.__data__,"__lodash_hash_undefined__"===(typeof t=="string"?r.string:r.hash)[t]):r.has(t)}function $n(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1]);
}}function Dn(n,t){var r=Pn(n,t);return 0>r?false:(r==n.length-1?n.pop():Eu.call(n,r,1),true)}function Zn(n,t){var r=Pn(n,t);return 0>r?Z:n[r][1]}function Pn(n,t){for(var r=n.length;r--;)if(he(n[r][0],t))return r;return-1}function Tn(n,t,r){var e=Pn(n,t);0>e?n.push([t,r]):n[e][1]=r}function Kn(n,t,r,e){return n===Z||he(n,fu[r])&&!au.call(e,r)?t:n}function Jn(n,t,r){(r!==Z&&!he(n[t],r)||typeof t=="number"&&r===Z&&!(t in n))&&(n[t]=r)}function Yn(n,t,r){var e=n[t];(!he(e,r)||he(e,fu[t])&&!au.call(n,t)||r===Z&&!(t in n))&&(n[t]=r);
}function Hn(n,t,r,e){return Yu(n,function(n,u,o){t(e,n,r(n),o)}),e}function Qn(n,t){return n&&nr(t,Ne(t),n)}function Xn(n,t){for(var r=-1,e=null==n,u=t.length,o=Array(u);++r<u;)o[r]=e?Z:Le(n,t[r]);return o}function nt(n){return ve(n)?n:[]}function tt(n){return typeof n=="function"?n:Je}function rt(n){return Do(n)?n:Zr(n)}function et(n,t,r){return n===n&&(r!==Z&&(n=n>r?r:n),t!==Z&&(n=t>n?t:n)),n}function ut(n,t,r,e,o,i){var f;if(r&&(f=o?r(n,e,o,i):r(n)),f!==Z)return f;if(!je(n))return n;if(e=Do(n)){
if(f=Wr(n),!t)return Xt(n,f)}else{var c=Sr(n),a="[object Function]"==c||"[object GeneratorFunction]"==c;if(Zo(n))return Jt(n,t);if("[object Object]"!=c&&"[object Arguments]"!=c&&(!a||o))return Cn[c]?Cr(n,c,t):o?n:{};if(C(n))return o?n:{};if(f=Br(a?{}:n),!t)return rr(n,Qn(f,n))}return i||(i=new $n),(o=i.get(n))?o:(i.set(n,f),(e?u:pt)(n,function(e,u){Yn(f,u,ut(e,t,r,u,n,i))}),e?f:rr(n,f))}function ot(n){var t=Ne(n),r=t.length;return function(e){if(null==e)return!r;for(var u=r;u--;){var o=t[u],i=n[o],f=e[o];
if(f=Wr(n),!t)return Xt(n,f)}else{var c=Sr(n),a="[object Function]"==c||"[object GeneratorFunction]"==c;if(Zo(n))return Jt(n,t);if("[object Object]"==c||"[object Arguments]"==c||a&&!o){if(C(n))return o?n:{};if(f=Br(a?{}:n),!t)return rr(n,Qn(f,n))}else{if(!Cn[c])return o?n:{};f=Cr(n,c,t)}}return i||(i=new $n),(o=i.get(n))?o:(i.set(n,f),(e?u:pt)(n,function(e,u){Yn(f,u,ut(e,t,r,u,n,i))}),e?f:rr(n,f))}function ot(n){var t=Ne(n),r=t.length;return function(e){if(null==e)return!r;for(var u=r;u--;){var o=t[u],i=n[o],f=e[o];
if(f===Z&&!(o in Object(e))||!i(f))return false}return true}}function it(n){return je(n)?Au(n):{}}function ft(n,t,r){if(typeof n!="function")throw new ou("Expected a function");return ku(function(){n.apply(Z,r)},t)}function ct(n,t,r,e){var u=-1,o=f,i=true,l=n.length,s=[],h=t.length;if(!l)return s;r&&(t=a(t,w(r))),e?(o=c,i=false):t.length>=200&&(o=Ln,i=false,t=new Mn(t));n:for(;++u<l;){var p=n[u],_=r?r(p):p;if(i&&_===_){for(var g=h;g--;)if(t[g]===_)continue n;s.push(p)}else o(t,_,e)||s.push(p)}return s}function at(n,t){
var r=true;return Yu(n,function(n,e,u){return r=!!t(n,e,u)}),r}function lt(n,t){var r=[];return Yu(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function st(n,t,r,e){e||(e=[]);for(var u=-1,o=n.length;++u<o;){var i=n[u];t>0&&ve(i)&&(r||Do(i)||_e(i))?t>1?st(i,t-1,r,e):l(e,i):r||(e[e.length]=i)}return e}function ht(n,t){null==n||Qu(n,t,De)}function pt(n,t){return n&&Qu(n,t,Ne)}function _t(n,t){return n&&Xu(n,t,Ne)}function gt(n,t){return i(t,function(t){return ye(n[t])})}function vt(n,t){t=Mr(t,n)?[t+""]:rt(t);
for(var r=0,e=t.length;null!=n&&e>r;)n=n[t[r++]];return r&&r==e?n:Z}function dt(n,t){return au.call(n,t)||typeof n=="object"&&t in n&&null===ju(n)}function yt(n,t){return t in Object(n)}function bt(n,t,r){for(var e=r?c:f,u=n.length,o=u,i=Array(u),l=[];o--;){var s=n[o];o&&t&&(s=a(s,w(t))),i[o]=r||!t&&120>s.length?Z:new Mn(o&&s)}var s=n[0],h=-1,p=s.length,_=i[0];n:for(;++h<p;){var g=s[h],v=t?t(g):g;if(_?!Ln(_,v):!e(l,v,r)){for(o=u;--o;){var d=i[o];if(d?!Ln(d,v):!e(n[o],v,r))continue n}_&&_.push(v),
@@ -102,7 +102,7 @@ a+=n.slice(c,l).replace(jn,W),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"
}),t.source=a,de(t))throw t;return t},yn.times=function(n,t){if(n=Be(n),1>n||n>9007199254740991)return[];var r=4294967295,e=Uu(n,4294967295);for(t=tt(t),n-=4294967295,e=j(e,t);++r<n;)t(r);return e},yn.toInteger=Be,yn.toLength=Ce,yn.toLower=function(n){return Me(n).toLowerCase()},yn.toNumber=Ue,yn.toSafeInteger=function(n){return et(Be(n),-9007199254740991,9007199254740991)},yn.toString=Me,yn.toUpper=function(n){return Me(n).toUpperCase()},yn.trim=function(n,t,r){return(n=Me(n))?r||t===Z?n.replace(fn,""):(t+="")?(n=n.match(kn),
t=t.match(kn),n.slice(O(n,t),k(n,t)+1).join("")):n:n},yn.trimEnd=function(n,t,r){return(n=Me(n))?r||t===Z?n.replace(an,""):(t+="")?(n=n.match(kn),n.slice(0,k(n,t.match(kn))+1).join("")):n:n},yn.trimStart=function(n,t,r){return(n=Me(n))?r||t===Z?n.replace(cn,""):(t+="")?(n=n.match(kn),n.slice(O(n,t.match(kn))).join("")):n:n},yn.truncate=function(n,t){var r=30,e="...";if(je(t))var u="separator"in t?t.separator:u,r="length"in t?Be(t.length):r,e="omission"in t?Me(t.omission):e;n=Me(n);var o=n.length;if(En.test(n))var i=n.match(kn),o=i.length;
if(r>=o)return n;if(o=r-F(e),1>o)return e;if(r=i?i.slice(0,o).join(""):n.slice(0,o),u===Z)return r+e;if(i&&(o+=r.length-o),ke(u)){if(n.slice(o).search(u)){var f=r;for(u.global||(u=uu(u.source,Me(hn.exec(u))+"g")),u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===Z?o:c)}}else n.indexOf(u,o)!=o&&(u=r.lastIndexOf(u),u>-1&&(r=r.slice(0,u)));return r+e},yn.unescape=function(n){return(n=Me(n))&&Y.test(n)?n.replace(V,N):n},yn.uniqueId=function(n){var t=++lu;return Me(n)+t},yn.upperCase=li,yn.upperFirst=fi,
yn.each=te,yn.eachRight=re,yn.first=Kr,He(yn,function(){var n={};return pt(yn,function(t,r){au.call(yn.prototype,r)||(n[r]=t)}),n}(),{chain:false}),yn.VERSION="4.4.0",u("bind bindKey curry curryRight partial partialRight".split(" "),function(n){yn[n].placeholder=yn}),u(["drop","take"],function(n,t){An.prototype[n]=function(r){var e=this.__filtered__;if(e&&!t)return new An(this);r=r===Z?1:Cu(Be(r),0);var u=this.clone();return e?u.__takeCount__=Uu(r,u.__takeCount__):u.__views__.push({size:Uu(r,4294967295),
yn.each=te,yn.eachRight=re,yn.first=Kr,He(yn,function(){var n={};return pt(yn,function(t,r){au.call(yn.prototype,r)||(n[r]=t)}),n}(),{chain:false}),yn.VERSION="4.5.0",u("bind bindKey curry curryRight partial partialRight".split(" "),function(n){yn[n].placeholder=yn}),u(["drop","take"],function(n,t){An.prototype[n]=function(r){var e=this.__filtered__;if(e&&!t)return new An(this);r=r===Z?1:Cu(Be(r),0);var u=this.clone();return e?u.__takeCount__=Uu(r,u.__takeCount__):u.__views__.push({size:Uu(r,4294967295),
type:n+(0>u.__dir__?"Right":"")}),u},An.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),u(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;An.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:kr(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),u(["head","last"],function(n,t){var r="take"+(t?"Right":"");An.prototype[n]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");
An.prototype[n]=function(){return this.__filtered__?new An(this):this[r](1)}}),An.prototype.compact=function(){return this.filter(Je)},An.prototype.find=function(n){return this.filter(n).head()},An.prototype.findLast=function(n){return this.reverse().find(n)},An.prototype.invokeMap=se(function(n,t){return typeof n=="function"?new An(this):this.map(function(r){return jt(r,n,t)})}),An.prototype.reject=function(n){return n=kr(n,3),this.filter(function(t){return!n(t)})},An.prototype.slice=function(n,t){
n=Be(n);var r=this;return r.__filtered__&&(n>0||0>t)?new An(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==Z&&(t=Be(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},An.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},An.prototype.toArray=function(){return this.take(4294967295)},pt(An.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=yn[e?"take"+("last"==t?"Right":""):t],o=e||/^find/.test(t);u&&(yn.prototype[t]=function(){

File diff suppressed because it is too large Load Diff

View File

@@ -67,12 +67,6 @@ function baseConvert(util, name, func, options) {
var aryMethodKeys = keys(mapping.aryMethod);
var baseArity = function(func, n) {
return n == 2
? function(a, b) { return func.apply(undefined, arguments); }
: function(a) { return func.apply(undefined, arguments); };
};
var baseAry = function(func, n) {
return n == 2
? function(a, b) { return func(a, b); }
@@ -113,7 +107,9 @@ function baseConvert(util, name, func, options) {
var iterateeAry = function(func, n) {
return overArg(func, function(func) {
return baseAry(func, n);
return typeof func == 'function'
? baseAry(func, n)
: func;
});
};

View File

@@ -9,7 +9,8 @@ var _ = require('lodash'),
function globTemplate(pattern) {
return _.transform(glob.sync(pattern), function(result, filePath) {
result[path.basename(filePath, path.extname(filePath))] = _.template(fs.readFileSync(filePath));
var key = path.basename(filePath, path.extname(filePath));
result[key] = _.template(fs.readFileSync(filePath, 'utf8'));
}, {});
}

View File

@@ -75,35 +75,35 @@ convert each method.
#### Capped Iteratee Arguments
Methods which provide iteratees one argument:<br>
Methods that cap iteratees to one argument:<br>
<%= toFuncList(_.keys(_.pick(mapping.iterateeAry, _.partial(_.eq, _, 1)))) %>
Methods which provide iteratees two arguments:<br>
Methods that cap iteratees to two arguments:<br>
<%= toFuncList(_.keys(_.pick(mapping.iterateeAry, _.partial(_.eq, _, 2)))) %>
#### Fixed Arity
Methods with arity fixed to one argument:<br>
Methods with a fixed arity of one:<br>
<%= toFuncList(mapping.aryMethod[1]) %>
Methods with arity fixed to two arguments:<br>
Methods with a fixed arity of two:<br>
<%= toFuncList(mapping.aryMethod[2]) %>
Methods with arity fixed to three arguments:<br>
Methods with a fixed arity of three:<br>
<%= toFuncList(mapping.aryMethod[3]) %>
Methods with arity fixed to four arguments:<br>
Methods with a fixed arity of four:<br>
<%= toFuncList(mapping.aryMethod[4]) %>
#### Rearranged Arguments
Methods fixed to two arguments have an argument order of<br>
Methods with a fixed arity of two have an argument order of:<br>
<%= toArgOrder(mapping.aryRearg[2]) %>
Methods fixed to three arguments have an argument order of<br>
Methods with a fixed arity of three have an argument order of:<br>
<%= toArgOrder(mapping.aryRearg[3]) %>
Methods fixed to four arguments have an argument order of<br>
Methods with a fixed arity of four have an argument order of:<br>
<%= toArgOrder(mapping.aryRearg[4]) %>
Methods with custom argument orders:<br>

View File

@@ -1,6 +1,6 @@
/**
* @license
* lodash 4.4.0 <https://lodash.com/>
* lodash 4.5.0 <https://lodash.com/>
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
@@ -12,7 +12,7 @@
var undefined;
/** Used as the semantic version number. */
var VERSION = '4.4.0';
var VERSION = '4.5.0';
/** Used to compose bitmasks for wrapper metadata. */
var BIND_FLAG = 1,
@@ -1429,25 +1429,26 @@
* The wrapper methods that are **not** chainable by default are:
* `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
* `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `endsWith`, `eq`,
* `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`,
* `findLast`, `findLastIndex`, `findLastKey`, `floor`, `forEach`, `forEachRight`,
* `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
* `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
* `isArguments`, `isArray`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`,
* `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`,
* `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMatch`, `isMatchWith`,
* `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, `isObject`, `isObjectLike`,
* `isPlainObject`, `isRegExp`, `isSafeInteger`, `isString`, `isUndefined`,
* `isTypedArray`, `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`,
* `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `min`, `minBy`,
* `noConflict`, `noop`, `now`, `pad`, `padEnd`, `padStart`, `parseInt`,
* `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`,
* `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`,
* `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`,
* `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toLower`,
* `toInteger`, `toLength`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`,
* `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`,
* `upperCase`, `upperFirst`, `value`, and `words`
* `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
* `findLastIndex`, `findLastKey`, `floor`, `forEach`, `forEachRight`, `forIn`,
* `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`,
* `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`,
* `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`,
* `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`,
* `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`,
* `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`,
* `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`,
* `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`,
* `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`,
* `lt`, `lte`, `max`, `maxBy`, `mean`, `min`, `minBy`, `noConflict`, `noop`,
* `now`, `pad`, `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`,
* `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `sample`,
* `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`,
* `sortedLastIndex`, `sortedLastIndexBy`, `startCase`, `startsWith`, `subtract`,
* `sum`, `sumBy`, `template`, `times`, `toLower`, `toInteger`, `toLength`,
* `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, `trimEnd`,
* `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, `upperFirst`,
* `value`, and `words`
*
* @name _
* @constructor
@@ -2317,9 +2318,10 @@
return copySymbols(value, baseAssign(result, value));
}
} else {
return cloneableTags[tag]
? initCloneByTag(value, tag, isDeep)
: (object ? value : {});
if (!cloneableTags[tag]) {
return object ? value : {};
}
result = initCloneByTag(value, tag, isDeep);
}
}
// Check for circular references and return its corresponding clone.

View File

@@ -1,6 +1,6 @@
{
"name": "lodash",
"version": "4.4.0",
"version": "4.5.0",
"main": "lodash.js",
"private": true,
"devDependencies": {
@@ -44,7 +44,7 @@
"style:main": "jscs lodash.js",
"style:perf": "jscs perf/*.js perf/**/*.js",
"style:test": "jscs test/*.js test/**/*.js",
"test": "npm run test:main && npm run test:fp && npm run test:docs",
"test": "npm run test:main && npm run test:fp",
"test:fp": "node test/test-fp",
"test:main": "node test/test"
}

View File

@@ -526,6 +526,32 @@
/*--------------------------------------------------------------------------*/
QUnit.module('iteratee shorthands');
(function() {
var objects = [{ 'a': 1, 'b': 2 }, { 'a': 3, 'b': 4 }];
QUnit.test('should work with "_.matches" shorthands', function(assert) {
assert.expect(1);
assert.deepEqual(fp.filter({ 'a': 3 })(objects), [objects[1]]);
});
QUnit.test('should work with "_.matchesProperty" shorthands', function(assert) {
assert.expect(1);
assert.deepEqual(fp.filter(['a', 3])(objects), [objects[1]]);
});
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(1);
assert.deepEqual(fp.map('a')(objects), [1, 3]);
});
}());
/*--------------------------------------------------------------------------*/
QUnit.module('mutation methods');
(function() {

View File

@@ -813,9 +813,12 @@
try {
var symObject = Object(symbol);
// Avoid symbol detection in Babel's `typeof` helper.
symObject.constructor = Object;
actual = [
Symbol ? lodashBizarro.clone(symObject) : {},
Symbol ? lodashBizarro.clone(symObject) : { 'constructor': Object },
Symbol ? lodashBizarro.isEqual(symObject, Object(symbol)) : false,
Symbol ? lodashBizarro.toString(symObject) : ''
];
@@ -823,7 +826,7 @@
actual = null;
}
label = message('_.clone`, `_.isEqual`, and `_.toString', 'Symbol');
assert.deepEqual(actual, [{}, false, ''], label);
assert.deepEqual(actual, [{ 'constructor': Object }, false, ''], label);
try {
var map = new lodashBizarro.memoize.Cache;
@@ -2591,27 +2594,6 @@
}
});
QUnit.test('`_.' + methodName + '` should clone `index` and `input` array properties', function(assert) {
assert.expect(2);
var array = /x/.exec('vwxyz'),
actual = func(array);
assert.strictEqual(actual.index, 2);
assert.strictEqual(actual.input, 'vwxyz');
});
QUnit.test('`_.' + methodName + '` should clone `lastIndex` regexp property', function(assert) {
assert.expect(1);
// Avoid a regexp literal for older Opera and use `exec` for older Safari.
var regexp = RegExp('x', 'g');
regexp.exec('vwxyz');
var actual = func(regexp);
assert.strictEqual(actual.lastIndex, 3);
});
QUnit.test('`_.' + methodName + '` should clone buffers', function(assert) {
assert.expect(4);
@@ -2631,6 +2613,46 @@
}
});
QUnit.test('`_.' + methodName + '` should clone `index` and `input` array properties', function(assert) {
assert.expect(2);
var array = /c/.exec('abcde'),
actual = func(array);
assert.strictEqual(actual.index, 2);
assert.strictEqual(actual.input, 'abcde');
});
QUnit.test('`_.' + methodName + '` should clone `lastIndex` regexp property', function(assert) {
assert.expect(1);
// Avoid a regexp literal for older Opera and use `exec` for older Safari.
var regexp = RegExp('c', 'g');
regexp.exec('abcde');
var actual = func(regexp);
assert.strictEqual(actual.lastIndex, 3);
});
QUnit.test('`_.' + methodName + '` should clone expando properties', function(assert) {
assert.expect(1);
var values = lodashStable.map([true, false, 1, 'a'], function(value) {
var object = Object(value);
object.a = 1;
return object;
});
var expected = lodashStable.map(values, alwaysTrue);
var actual = lodashStable.map(values, function(value) {
return func(value).a === 1;
});
assert.deepEqual(actual, expected);
});
QUnit.test('`_.' + methodName + '` should clone prototype objects', function(assert) {
assert.expect(2);
@@ -3364,7 +3386,7 @@
assert.deepEqual(actual, expected);
});
QUnit.test('should work with a "_.property" style `iteratee`', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(1);
var actual = _.countBy(['one', 'two', 'three'], 'length');
@@ -4709,19 +4731,19 @@
assert.deepEqual(args, [4, 3, array]);
});
QUnit.test('should work with a "_.matches" style `predicate`', function(assert) {
QUnit.test('should work with "_.matches" shorthands', function(assert) {
assert.expect(1);
assert.deepEqual(_.dropRightWhile(objects, { 'b': 2 }), objects.slice(0, 2));
});
QUnit.test('should work with a "_.matchesProperty" style `predicate`', function(assert) {
QUnit.test('should work with "_.matchesProperty" shorthands', function(assert) {
assert.expect(1);
assert.deepEqual(_.dropRightWhile(objects, ['b', 2]), objects.slice(0, 2));
});
QUnit.test('should work with a "_.property" style `predicate`', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(1);
assert.deepEqual(_.dropRightWhile(objects, 'b'), objects.slice(0, 1));
@@ -4779,19 +4801,19 @@
assert.deepEqual(args, [1, 0, array]);
});
QUnit.test('should work with a "_.matches" style `predicate`', function(assert) {
QUnit.test('should work with "_.matches" shorthands', function(assert) {
assert.expect(1);
assert.deepEqual(_.dropWhile(objects, { 'b': 2 }), objects.slice(1));
});
QUnit.test('should work with a "_.matchesProperty" style `predicate`', function(assert) {
QUnit.test('should work with "_.matchesProperty" shorthands', function(assert) {
assert.expect(1);
assert.deepEqual(_.dropWhile(objects, ['b', 2]), objects.slice(1));
});
QUnit.test('should work with a "_.property" style `predicate`', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(1);
assert.deepEqual(_.dropWhile(objects, 'b'), objects.slice(2));
@@ -5067,7 +5089,7 @@
assert.deepEqual(actual, expected);
});
QUnit.test('should work with a "_.property" style `predicate`', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(2);
var objects = [{ 'a': 0, 'b': 1 }, { 'a': 1, 'b': 2 }];
@@ -5075,7 +5097,7 @@
assert.strictEqual(_.every(objects, 'b'), true);
});
QUnit.test('should work with a "_.matches" style `predicate`', function(assert) {
QUnit.test('should work with "_.matches" shorthands', function(assert) {
assert.expect(2);
var objects = [{ 'a': 0, 'b': 0 }, { 'a': 0, 'b': 1 }];
@@ -5354,19 +5376,19 @@
assert.strictEqual(func(objects, function(object) { return object.a === 3; }), expected[1]);
});
QUnit.test('should work with a "_.matches" style `predicate`', function(assert) {
QUnit.test('should work with "_.matches" shorthands', function(assert) {
assert.expect(1);
assert.strictEqual(func(objects, { 'b': 2 }), expected[2]);
});
QUnit.test('should work with a "_.matchesProperty" style `predicate`', function(assert) {
QUnit.test('should work with "_.matchesProperty" shorthands', function(assert) {
assert.expect(1);
assert.strictEqual(func(objects, ['b', 2]), expected[2]);
});
QUnit.test('should work with a "_.property" style `predicate`', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(1);
assert.strictEqual(func(objects, 'b'), expected[3]);
@@ -5541,7 +5563,7 @@
assert.deepEqual(actual, expected);
});
QUnit.test('should work with a "_.property" style `iteratee`', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(1);
var objects = [{ 'a': [1, 2] }, { 'a': [3, 4] }];
@@ -6720,7 +6742,7 @@
assert.deepEqual(actual, expected);
});
QUnit.test('should work with a "_.property" style `iteratee`', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(1);
var actual = _.groupBy(['one', 'two', 'three'], 'length');
@@ -7671,27 +7693,28 @@
assert.deepEqual(actual, expected);
});
QUnit.test('should use `_.identity` when `iteratee` is nullish', function(assert) {
assert.expect(1);
var values = [, null, undefined],
expected = lodashStable.map(values, lodashStable.constant({ '1': ['a', 'c'], '2': ['b'] }));
var actual = lodashStable.map(values, function(value, index) {
return index ? _.invertBy(object, value) : _.invertBy(object);
});
assert.deepEqual(actual, expected);
});
QUnit.test('should only add multiple values to own, not inherited, properties', function(assert) {
assert.expect(1);
var expected = { 'hasOwnProperty': ['a'], 'constructor': ['b'] },
object = { 'a': 'hasOwnProperty', 'b': 'constructor' };
var object = { 'a': 'hasOwnProperty', 'b': 'constructor' },
expected = { 'hasOwnProperty': ['a'], 'constructor': ['b'] };
assert.ok(lodashStable.isEqual(_.invertBy(object), expected));
});
QUnit.test('should return a wrapped value when chaining', function(assert) {
assert.expect(2);
if (!isNpm) {
var wrapped = _(object).invertBy();
assert.ok(wrapped instanceof _);
assert.deepEqual(wrapped.value(), { '1': ['a', 'c'], '2': ['b'] });
}
else {
skipAssert(assert, 2);
}
});
}());
/*--------------------------------------------------------------------------*/
@@ -8542,8 +8565,8 @@
assert.strictEqual(_.isEqual(array1, array2), true);
array1 = /x/.exec('vwxyz');
array2 = ['x'];
array1 = /c/.exec('abcde');
array2 = ['c'];
assert.strictEqual(_.isEqual(array1, array2), true);
});
@@ -11920,7 +11943,7 @@
assert.deepEqual(actual, expected);
});
QUnit.test('should work with a "_.property" style `iteratee`', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(1);
var expected = { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } },
@@ -12463,7 +12486,7 @@
assert.deepEqual(_.map(object, String), expected);
});
QUnit.test('should work with a "_.property" style `iteratee`', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(1);
var objects = [{ 'a': 'x' }, { 'a': 'y' }];
@@ -12625,7 +12648,7 @@
assert.deepEqual(actual, { '1': 1, '2': 2 });
});
QUnit.test('should work with a "_.property" style `iteratee`', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(1);
var actual = _.mapKeys({ 'a': { 'b': 'c' } }, 'b');
@@ -12662,7 +12685,7 @@
assert.deepEqual(actual, { '0': '1', '1': '2' });
});
QUnit.test('should work with a "_.property" style `iteratee`', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(1);
var actual = _.mapValues({ 'a': { 'b': 1 } }, 'b');
@@ -14120,7 +14143,7 @@
QUnit.test('should not convert strings to arrays when merging arrays of `source`', function(assert) {
assert.expect(1);
var object = { 'a': 'abcdef' },
var object = { 'a': 'abcde' },
actual = _.merge(object, { 'a': ['x', 'y', 'z'] });
assert.deepEqual(actual, { 'a': ['x', 'y', 'z'] });
@@ -14575,7 +14598,7 @@
assert.strictEqual(actual, isMax ? 1 : 3);
});
QUnit.test('should work with a "_.property" style `iteratee`', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(2);
var objects = [{ 'a': 2 }, { 'a': 3 }, { 'a': 1 }],
@@ -15304,7 +15327,7 @@
assert.deepEqual(over('a', 'b', 'c'), ['a', 'a']);
});
QUnit.test('should work with a "_.property" style predicate', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(1);
var object = { 'a': 1, 'b': 2 },
@@ -15313,7 +15336,7 @@
assert.deepEqual(over(object), [2, 1]);
});
QUnit.test('should work with a "_.matches" style predicate', function(assert) {
QUnit.test('should work with "_.matches" shorthands', function(assert) {
assert.expect(1);
var object = { 'a': 1, 'b': 2 },
@@ -15374,7 +15397,7 @@
assert.strictEqual(over(false), false);
});
QUnit.test('should work with a "_.property" style predicate', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(2);
var object = { 'a': 1, 'b': 2 },
@@ -15386,7 +15409,7 @@
assert.strictEqual(over(object), true);
});
QUnit.test('should work with a "_.matches" style predicate', function(assert) {
QUnit.test('should work with "_.matches" shorthands', function(assert) {
assert.expect(2);
var object = { 'a': 1, 'b': 2 },
@@ -15476,7 +15499,7 @@
assert.strictEqual(over(false), false);
});
QUnit.test('should work with a "_.property" style predicate', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(2);
var object = { 'a': 1, 'b': 2 },
@@ -15488,7 +15511,7 @@
assert.strictEqual(over(object), false);
});
QUnit.test('should work with a "_.matches" style predicate', function(assert) {
QUnit.test('should work with "_.matches" shorthands', function(assert) {
assert.expect(2);
var object = { 'a': 1, 'b': 2 },
@@ -16136,7 +16159,7 @@
assert.deepEqual(actual, expected);
});
QUnit.test('should work with a "_.property" style `predicate`', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(1);
var objects = [{ 'a': 1 }, { 'a': 1 }, { 'b': 2 }],
@@ -17292,13 +17315,13 @@
assert.deepEqual(actual, [0]);
});
QUnit.test('`_.' + methodName + '` should work with a "_.property" style `predicate`', function(assert) {
QUnit.test('`_.' + methodName + '` should work with "_.property" shorthands', function(assert) {
assert.expect(1);
assert.deepEqual(func(objects, 'a'), [objects[isFilter ? 1 : 0]]);
});
QUnit.test('`_.' + methodName + '` should work with a "_.matches" style `predicate`', function(assert) {
QUnit.test('`_.' + methodName + '` should work with "_.matches" shorthands', function(assert) {
assert.expect(1);
assert.deepEqual(func(objects, objects[1]), [objects[isFilter ? 1 : 0]]);
@@ -17432,7 +17455,7 @@
assert.deepEqual(argsList, [[1, 0, clone], [2, 1, clone], [3, 2, clone]]);
});
QUnit.test('should work with a "_.matches" style `predicate`', function(assert) {
QUnit.test('should work with "_.matches" shorthands', function(assert) {
assert.expect(1);
var objects = [{ 'a': 0, 'b': 1 }, { 'a': 1, 'b': 2 }];
@@ -17440,7 +17463,7 @@
assert.deepEqual(objects, [{ 'a': 0, 'b': 1 }]);
});
QUnit.test('should work with a "_.matchesProperty" style `predicate`', function(assert) {
QUnit.test('should work with "_.matchesProperty" shorthands', function(assert) {
assert.expect(1);
var objects = [{ 'a': 0, 'b': 1 }, { 'a': 1, 'b': 2 }];
@@ -17448,7 +17471,7 @@
assert.deepEqual(objects, [{ 'a': 0, 'b': 1 }]);
});
QUnit.test('should work with a "_.property" style `predicate`', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(1);
var objects = [{ 'a': 0 }, { 'a': 1 }];
@@ -17541,9 +17564,9 @@
QUnit.test('should replace the matched pattern', function(assert) {
assert.expect(2);
var string = 'abcdef';
assert.strictEqual(_.replace(string, 'def', '123'), 'abc123');
assert.strictEqual(_.replace(string, /[bdf]/g, '-'), 'a-c-e-');
var string = 'abcde';
assert.strictEqual(_.replace(string, 'de', '123'), 'abc123');
assert.strictEqual(_.replace(string, /[bd]/g, '-'), 'a-c-e');
});
}());
@@ -18761,7 +18784,7 @@
assert.deepEqual(actual, expected);
});
QUnit.test('should work with a "_.property" style `predicate`', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(2);
var objects = [{ 'a': 0, 'b': 0 }, { 'a': 0, 'b': 1 }];
@@ -18769,7 +18792,7 @@
assert.strictEqual(_.some(objects, 'b'), true);
});
QUnit.test('should work with a "_.matches" style `predicate`', function(assert) {
QUnit.test('should work with "_.matches" shorthands', function(assert) {
assert.expect(2);
var objects = [{ 'a': 0, 'b': 0 }, { 'a': 1, 'b': 1}];
@@ -18821,7 +18844,7 @@
assert.deepEqual(actual, expected);
});
QUnit.test('should work with a "_.property" style `iteratee`', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(1);
var actual = lodashStable.map(_.sortBy(objects.concat(undefined), 'b'), 'b');
@@ -19053,7 +19076,7 @@
assert.deepEqual(args, [40]);
});
QUnit.test('`_.' + methodName + '` should work with a "_.property" style `iteratee`', function(assert) {
QUnit.test('`_.' + methodName + '` should work with "_.property" shorthands', function(assert) {
assert.expect(1);
var objects = [{ 'x': 30 }, { 'x': 50 }],
@@ -19459,7 +19482,7 @@
assert.deepEqual(args, [6]);
});
QUnit.test('should work with a "_.property" style `iteratee`', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(2);
var arrays = [[2], [3], [1]];
@@ -19766,19 +19789,19 @@
assert.deepEqual(args, [4, 3, array]);
});
QUnit.test('should work with a "_.matches" style `predicate`', function(assert) {
QUnit.test('should work with "_.matches" shorthands', function(assert) {
assert.expect(1);
assert.deepEqual(_.takeRightWhile(objects, { 'b': 2 }), objects.slice(2));
});
QUnit.test('should work with a "_.matchesProperty" style `predicate`', function(assert) {
QUnit.test('should work with "_.matchesProperty" shorthands', function(assert) {
assert.expect(1);
assert.deepEqual(_.takeRightWhile(objects, ['b', 2]), objects.slice(2));
});
QUnit.test('should work with a "_.property" style `predicate`', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(1);
assert.deepEqual(_.takeRightWhile(objects, 'b'), objects.slice(1));
@@ -19881,18 +19904,18 @@
assert.deepEqual(args, [1, 0, array]);
});
QUnit.test('should work with a "_.matches" style `predicate`', function(assert) {
QUnit.test('should work with "_.matches" shorthands', function(assert) {
assert.expect(1);
assert.deepEqual(_.takeWhile(objects, { 'b': 2 }), objects.slice(0, 1));
});
QUnit.test('should work with a "_.matchesProperty" style `predicate`', function(assert) {
QUnit.test('should work with "_.matchesProperty" shorthands', function(assert) {
assert.expect(1);
assert.deepEqual(_.takeWhile(objects, ['b', 2]), objects.slice(0, 1));
});
QUnit.test('should work with a "_.property" style `predicate`', function(assert) {
QUnit.test('should work with "_.property" shorthands', function(assert) {
assert.expect(1);
assert.deepEqual(_.takeWhile(objects, 'b'), objects.slice(0, 2));
@@ -22628,7 +22651,7 @@
assert.deepEqual(args, [objects[0]]);
});
QUnit.test('`_.' + methodName + '` should work with a "_.property" style `iteratee`', function(assert) {
QUnit.test('`_.' + methodName + '` should work with "_.property" shorthands', function(assert) {
assert.expect(2);
var expected = isSorted ? [{ 'a': 1 }, { 'a': 2 }, { 'a': 3 }] : objects.slice(0, 3),
@@ -23793,6 +23816,7 @@
(function() {
var funcs = [
'castArray',
'concat',
'pull',
'pullAll',