Compare commits

..

1901 Commits
3.1.0 ... 4.5.1

Author SHA1 Message Date
John-David Dalton
772c461a33 Bump to v4.5.1. 2016-02-21 22:58:49 -08:00
John-David Dalton
110ca4d1b5 Rebuild lodash and docs. 2016-02-21 22:58:49 -08:00
John-David Dalton
aafb05b675 Update for lodash v4 api. 2016-02-21 22:58:49 -08:00
John-David Dalton
ff6fc56a15 Use _baseConvert in fp module. 2016-02-21 21:07:21 -08:00
John-David Dalton
2dfbe9fe77 Use minified lodash in fp module. 2016-02-21 21:07:09 -08:00
John-David Dalton
4a0fe2c17b Use lodash in test/remove.js. 2016-02-21 19:35:08 -08:00
John-David Dalton
9f7e626b9a Make build-module create core.min.js and lodash.min.js. 2016-02-21 19:35:08 -08:00
John-David Dalton
f2985bda5f Add copyFile, minFile, and writeFile to lib/common/util.js. 2016-02-21 19:35:01 -08:00
John-David Dalton
1517745a6a Update placeholder param description of createRecurryWrapper. [ci skip] 2016-02-21 16:57:06 -08:00
John-David Dalton
887cb55919 Add _.placeholder tests. 2016-02-21 13:48:46 -08:00
John-David Dalton
5c42d0ef31 Add intersection tests for two arrays. 2016-02-21 09:59:51 -08:00
John-David Dalton
837d47a309 Update lodash paths travis.yml, test/test.js, and test/index.html. 2016-02-20 23:53:35 -08:00
John-David Dalton
f3766cf889 Add getPlaceholder helper. 2016-02-20 18:07:11 -08:00
John-David Dalton
2b8b63e59f Allow placeholders to persist through more than 1 curried call. 2016-02-20 18:07:05 -08:00
John-David Dalton
d64583b743 Cleanup bitmask groupings in mergeData. 2016-02-20 16:40:59 -08:00
John-David Dalton
9ec65d5ed5 Fix newHolders typo. 2016-02-20 11:28:11 -08:00
John-David Dalton
9fe6afcdcc Use lodashStable.bind in unzip/zip test. 2016-02-20 11:28:11 -08:00
Benjamim Sonntag
6a4e0fb41b Links _.remove and _.pull in the docs. [ci skip] 2016-02-20 11:28:00 -08:00
John-David Dalton
b570884bb3 Remove npm "prepublish" script to avoid running on npm i. 2016-02-19 10:51:48 -08:00
John-David Dalton
8f8f8e288c Update internal module references in tests. 2016-02-19 10:39:38 -08:00
John-David Dalton
8698a5e0e8 Add tests for setting the [[Prototype]] of clones for values where constructor is incorrect. 2016-02-19 08:18:56 -08:00
John-David Dalton
ad5e30e189 Move _.merge test for augmenting objects. 2016-02-19 08:17:44 -08:00
Benjamin Tan
19ee0c74f8 Update link to CONTRIBUTING.md in readme. [ci skip] 2016-02-19 08:02:57 -08:00
John-David Dalton
007e5aa27a Increment package version to enable ci tests. 2016-02-19 01:23:07 -08:00
John-David Dalton
2509f562b5 Update fp wiki template. 2016-02-19 01:23:02 -08:00
John-David Dalton
a58a276ffd Replace "iteratee function" with "iteratee". [ci skip] 2016-02-19 01:04:36 -08:00
John-David Dalton
1a5b9dcce1 Add iteratee signature to _.mapKeys. [ci skip] 2016-02-19 01:04:19 -08:00
John-David Dalton
1240a0dfdd Move contributing text to .github. [ci skip] 2016-02-19 00:46:06 -08:00
Henrik Hjelte
0194169e79 Clarify docs on omitBy predicate params. [ci skip] 2016-02-19 00:11:33 -08:00
John-David Dalton
a71c19e1b5 Avoid unnecessary cloning in fp set methods. [closes #2017] 2016-02-19 00:11:20 -08:00
John-David Dalton
bfbfa719ff Ensure assignValue assigns values if they aren't the same own value. [closes #2022] 2016-02-19 00:01:33 -08:00
John-David Dalton
49389d0a2f Ducktype in _.isError for ES6 support. 2016-02-18 21:52:53 -08:00
John-David Dalton
e380062403 Use getPrototypeOf to set inheritance when constructor is a function. [closes #2018] 2016-02-18 21:52:19 -08:00
John-David Dalton
b83abfa9c1 Make fp arity for orderBy three instead of two. [closes #2019] 2016-02-18 13:37:16 -08:00
John-David Dalton
48dbf203a5 Ensure fp pickBy and omitBy provide value and key arguments. 2016-02-18 01:08:19 -08:00
John-David Dalton
23768398c5 Add iterateeRearg fp mapping back for mapKeys. 2016-02-17 22:21:48 -08:00
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
John-David Dalton
e878559fb9 Bump to v4.4.0. 2016-02-15 23:08:19 -08:00
John-David Dalton
36af8de116 Rebuild lodash and docs. 2016-02-15 23:07:07 -08:00
John-David Dalton
09dd3a8fea Remove noConflict call from the node fp module template. 2016-02-15 23:07:07 -08:00
John-David Dalton
5dd6b90692 Minor comma nit from contributing.md. [ci skip] 2016-02-15 21:30:16 -08:00
John-David Dalton
97fd94744e Add mapping section to fp wiki template. [ci skip] 2016-02-15 17:38:30 -08:00
John-David Dalton
0da3674d5e Update fp doc template. 2016-02-15 17:00:01 -08:00
John-David Dalton
01d530d65e Cleanup fp/build-modules. 2016-02-15 16:59:43 -08:00
John-David Dalton
10dd42b6e4 Restore bizarro tests for Object.create. 2016-02-15 16:47:31 -08:00
John-David Dalton
ba2d3f7704 Use != instead of !== when value is guaranteed to be a string. 2016-02-15 16:36:20 -08:00
Graeme Yeates
607fe2a5f6 Use Object.create in baseCreate (even if shimmed). 2016-02-15 16:35:20 -08:00
John-David Dalton
4643679d79 Remove fp caps mapping. 2016-02-15 13:51:20 -08:00
greenkeeperio-bot
04180c7c96 Update jscs to 2.10.1. 2016-02-15 11:12:14 -08:00
John-David Dalton
3846348f8a Clarify how undefined source values are handled in _.merge. [ci skip] 2016-02-15 10:22:25 -08:00
John-David Dalton
dc2fc9428d Cross reference _.matches and _.isMatch in docs. [ci skip] 2016-02-15 10:22:04 -08:00
John-David Dalton
6e399ce311 Cleanup long lines in isEqualWith docs. [ci skip] 2016-02-15 10:21:19 -08:00
John-David Dalton
641b544801 Add castArray to lodash chaining doc note. [ci skip] 2016-02-15 10:20:40 -08:00
John-David Dalton
761a100397 Ensure _.valuesIn returns results. [closes #2000] 2016-02-15 09:14:10 -08:00
John-David Dalton
cf1a4f893f Update fp doc generation. 2016-02-15 00:18:12 -08:00
John-David Dalton
19613be861 Add isArray to _util.jst. 2016-02-14 23:47:45 -08:00
John-David Dalton
c163659713 Rename fp mapping rename to remap. 2016-02-14 23:47:45 -08:00
John-David Dalton
aae02af265 Cleanup Date shims. 2016-02-14 19:20:17 -08:00
John-David Dalton
cb96bf15b7 Reduce the length of some lines. 2016-02-14 19:14:17 -08:00
John-David Dalton
c006c28f55 Add lib/common/util. 2016-02-14 12:57:34 -08:00
John-David Dalton
d358d00531 Ensure fp castArray shallow clones arrays. 2016-02-14 12:09:17 -08:00
John-David Dalton
abcebb4f48 Remove exposed castFunction and castPath. 2016-02-14 11:02:11 -08:00
John-David Dalton
6e74724c0f Add _.compat test for lazy sequence with a custom _.iteratee. 2016-02-14 09:21:07 -08:00
John-David Dalton
c5f6c43326 Add default wrapper value to jsdoc of _.wrap. [ci skip] 2016-02-14 08:57:28 -08:00
John-David Dalton
a9e8c0ba76 Add changelog mention to the wiki link in readme. [ci skip] 2016-02-14 08:41:43 -08:00
John-David Dalton
5388d8a7b0 Rename _.asArray to _.castArray and add _.castFunction and _.castPath. 2016-02-13 13:40:04 -08:00
Graeme Yeates
ee499b36ea Add _.asArray method. 2016-02-13 09:04:19 -08:00
John-David Dalton
13e4b959a4 Rename skipTest to skipAssert. 2016-02-13 08:32:47 -08:00
John-David Dalton
5a336403f9 Fix fp browser test fails. 2016-02-13 08:31:04 -08:00
John-David Dalton
26265c011a Fix failing _.isError test in phantomjs. 2016-02-13 02:18:37 -08:00
John-David Dalton
4a390bca1c Update tests for es6. 2016-02-13 02:18:15 -08:00
John-David Dalton
af46ead30d Fix caller access in strict mode es6 modules. 2016-02-13 02:01:46 -08:00
John-David Dalton
de0f936e92 Ensure fp convert works with category modules. 2016-02-13 01:23:07 -08:00
John-David Dalton
bf9dcfe89c Add jsdoc constructor tags. [ci skip] 2016-02-12 22:51:26 -08:00
John-David Dalton
df0ecd2a93 Ensure _.isError works with subclasses values. [closes #1994] 2016-02-12 22:51:26 -08:00
John-David Dalton
b3ebb3c3d3 Add _.fromPairs to mention to _.toPairs and _.toPairsIn. [ci skip] 2016-02-12 22:51:26 -08:00
Jeroen Engels
0bead0c69a Update closed issue link in contributing.md to link to enhancement issues. [ci skip] 2016-02-12 22:51:26 -08:00
John-David Dalton
a055b0a04f Fix fp rearg order for zipWith. 2016-02-12 22:51:26 -08:00
John-David Dalton
d6f6007692 Add wiki link to "Further Reading" section of readme. [ci skip] 2016-02-12 22:51:26 -08:00
John-David Dalton
8ee7ffb2ab Add more currying to fp tests. 2016-02-12 22:51:26 -08:00
John-David Dalton
40ff04911e Remove unneeded copyArray from baseMergeDeep. 2016-02-12 22:51:25 -08:00
John-David Dalton
a3676618af Reorg templates. 2016-02-12 22:51:19 -08:00
John-David Dalton
b1ed66c6f5 Add another fp.inRange test. 2016-02-11 22:57:25 -08:00
John-David Dalton
53b3f81abe Ensure _.merge deep clones array/typed-array/plain-object sources. [closes #1987] 2016-02-11 22:56:33 -08:00
John-David Dalton
bd2428dde5 Remove fp doc to be simplified in a later commit. 2016-02-11 21:02:44 -08:00
Jeroen Engels
b7ae5f0885 Add paragraph about making feature requests in docs [ci skip] 2016-02-11 19:57:04 -08:00
John-David Dalton
8c5b64c7d7 Have browser fp convert auto wrap lodash if found. 2016-02-11 15:49:32 -08:00
John-David Dalton
641112dd4d Attempt two to fix bizarro buffer test in Node v0.12. 2016-02-11 10:55:26 -08:00
John-David Dalton
1c47acd040 Ensure maxWait isn't processed on a leading invocation ifleading is false and there isn't an max delay queued. [closes #1964] 2016-02-11 00:18:08 -08:00
greenkeeperio-bot
d58d6f45cc Update glob to 7.0.0. 2016-02-11 00:18:07 -08:00
Artur Baybulatov
7efa921bab Add a note about browser usage of lodash-fp. [ci skip] 2016-02-10 10:54:40 -08:00
John-David Dalton
feafdb3c6a Fix jsdoc type tags. [closes #1976] [ci skip] 2016-02-10 08:26:43 -08:00
John-David Dalton
784ee6a086 Remove fp iterateeRearg mapping. [closes #1971] 2016-02-10 08:19:59 -08:00
John-David Dalton
3014f20b6c Remove copyArray dep from _.flattenDepth. 2016-02-10 00:43:03 -08:00
John-David Dalton
40bb035b09 Minor label cleanup. 2016-02-10 00:15:08 -08:00
John-David Dalton
ba32bf3b8d Cleanup flatten methods and add more flattenDepth tests. 2016-02-10 00:14:10 -08:00
John-David Dalton
e9edc06aaf Enable convert to work when given lodash and options. 2016-02-09 21:56:49 -08:00
Jordan Eldredge
c91196d240 Run style checks before publishing. 2016-02-09 19:39:32 -08:00
Jeroen Engels
08c7bf3c85 Fix code style error and doc nit. [ci skip] 2016-02-09 19:39:32 -08:00
Michael Morgan
046470a8db Added _.flattenDepth for variable-depth flatten. 2016-02-09 19:39:32 -08:00
Billy Janitsch
2b1eedb036 Fix FP rearg for _.zipWith and _.inRange. 2016-02-09 19:39:31 -08:00
Jeroen Engels
02bea6534c fp docs - Remove notes about mutation in description. 2016-02-09 19:36:37 -08:00
Jeroen Engels
6f4099c20b fp docs - Split lib/doc/apply-fp-mapping into multiples files. 2016-02-09 19:36:37 -08:00
Jeroen Engels
39735df82f fp docs - Inject default values and cap args. 2016-02-09 19:36:37 -08:00
Jeroen Engels
5062f22839 fp docs - Remove console.log() from examples. 2016-02-09 19:36:36 -08:00
Jeroen Engels
e397707dc9 fp docs - translate ...args to args[] in example and params. 2016-02-09 19:36:36 -08:00
Jeroen Engels
66d6e226a9 Add scripts to generate the docs for lodash/fp. 2016-02-09 19:36:36 -08:00
Benjamin Tan
fbfa578c11 Write fp docs to a different file. 2016-02-09 19:36:36 -08:00
John-David Dalton
5cd7208ef3 Fix test fail in phantomjs. 2016-02-09 17:11:02 -08:00
John-David Dalton
e5bc6a0315 Fix bizarro buffer test in Node v0.12. 2016-02-09 17:11:02 -08:00
John-David Dalton
495c890aac Add bizarro test for _.isBuffer. 2016-02-09 17:11:02 -08:00
John-David Dalton
5fe4a1b05d Add fp placeholder test for converted partial. 2016-02-09 17:11:02 -08:00
John-David Dalton
d8bf62995b Ensure fp options works when applied individually. 2016-02-09 17:11:02 -08:00
John-David Dalton
e36f7e7161 Enable testing fp/convert in the browser. 2016-02-09 17:11:02 -08:00
John-David Dalton
285b667c3e Update "Why Lodash" section of readme. [ci skip] 2016-02-09 17:11:02 -08:00
John-David Dalton
aefbdbb6d5 Increment package version to enable ci tests. 2016-02-08 00:31:19 -08:00
John-David Dalton
8debfc6e6c Bump to v4.3.0. 2016-02-08 00:31:19 -08:00
John-David Dalton
c9ca772a32 Rebuild lodash and docs. 2016-02-08 00:31:19 -08:00
John-David Dalton
dc65792776 Add fp tests for add, subtract, gt, gte, lt, & lte. 2016-02-08 00:31:19 -08:00
John-David Dalton
18ae1d7c18 Ensure _.add and _.subtract return 0 when no arguments are given. 2016-02-08 00:31:19 -08:00
John-David Dalton
d790a1b3c6 Adjust "provided"/"given" use. [ci skip] 2016-02-08 00:31:18 -08:00
John-David Dalton
349c627110 Add options to baseConvert. 2016-02-08 00:31:13 -08:00
John-David Dalton
db23fcfe9f Rename num params to n. 2016-02-07 22:47:15 -08:00
John-David Dalton
d5a6a75639 Clarify pull request notes in contributing.md. [ci skip] 2016-02-07 22:47:15 -08:00
Robert T. Stewart
404a7181a8 Add 'What is Lodash' section to README.md. [ci skip] 2016-02-07 22:47:15 -08:00
Corbacho
e392b8e240 Improve accuracy of _.throttle. 2016-02-07 22:47:14 -08:00
John-David Dalton
6752d75ad0 Add _.isMap, _.isSet, _.isWeakMap, & _.isWeakSet. 2016-02-07 22:47:14 -08:00
John-David Dalton
e00d9821a8 Add gt, gte, lt, lte to fp skipRearg mapping. 2016-02-07 22:47:14 -08:00
John-David Dalton
1cf7093f46 Allow undefined realm values. 2016-02-07 22:47:14 -08:00
John-David Dalton
88708ec00f Minor test order nit. 2016-02-07 22:47:14 -08:00
John-David Dalton
984b0af883 Add deep clone test for buffers. 2016-02-07 22:47:14 -08:00
John-David Dalton
8810754ada Add _.isArrayBuffer test. 2016-02-07 22:47:14 -08:00
John-David Dalton
0d340b378b Add _.isBuffer test. 2016-02-07 22:47:14 -08:00
John-David Dalton
e30dc968ef Move _.isNull test. 2016-02-07 22:47:13 -08:00
John-David Dalton
ea942b0642 Upgrade sauce tested versions of Chrome and Firefox. 2016-02-07 22:47:13 -08:00
Tyler Garrett
7e9d49b300 Fix DevDoc link in readme. [ci skip] 2016-02-07 22:47:13 -08:00
John-David Dalton
ce60ac4274 Add isDeep flag to cloneBuffer. 2016-02-07 22:47:13 -08:00
John-David Dalton
a04fc310b4 Fix buffer test fails. 2016-02-07 22:47:13 -08:00
John-David Dalton
4a805ea666 Add _.isArrayBuffer and _.isBuffer. 2016-02-07 22:47:13 -08:00
John-David Dalton
1595651780 Add support for cloning buffers. [closes #1940] 2016-02-07 22:47:13 -08:00
John-David Dalton
fc85cac91d Update sauce-tunnel and webpack deps. 2016-02-07 22:47:13 -08:00
John-David Dalton
73134f9dcc Update the readme. 2016-02-07 22:47:13 -08:00
John-David Dalton
eb72bbe6f7 Update license to github formatting. 2016-02-07 22:47:12 -08:00
John-David Dalton
a5ae078f8f Increment package version to enable ci tests. 2016-02-05 00:24:51 -08:00
John-David Dalton
1cd9dc49a9 Bump to v4.2.1. 2016-02-03 01:31:34 -08:00
John-David Dalton
d64a97195b Rebuild lodash and docs. 2016-02-03 01:16:58 -08:00
John-David Dalton
c6a3ace553 Skip pseudo-private aliases. 2016-02-03 01:16:58 -08:00
John-David Dalton
497d57ca95 Ensure fp add and subtract don't have rearg applied. 2016-02-03 00:16:07 -08:00
John-David Dalton
3a07b411fb Add fp tests for placeholders. 2016-02-03 00:16:07 -08:00
John-David Dalton
b0c2a8d5fd Add fp _.partial tests for convert by name. 2016-02-03 00:16:06 -08:00
John-David Dalton
e404d214aa Add _.placeholder support so wrapped functions may support placeholders. 2016-02-03 00:16:06 -08:00
Nathan Tran
7f295dc6e8 Make _baseConvert use spread and not rest. 2016-02-03 00:16:06 -08:00
Prayag Verma
d2a8203efb Remove duplicate to and the words from docs. [ci skip] 2016-02-03 00:16:06 -08:00
John-David Dalton
33bfa8f961 Add trimChars fp mapping. 2016-02-03 00:16:06 -08:00
John-David Dalton
f944254cb8 Cleanup fp.curryN test label. 2016-02-03 00:16:06 -08:00
John-David Dalton
30339cfd86 Add fp.getOr test. 2016-02-03 00:16:06 -08:00
John-David Dalton
7dd5549b05 Increment lodash package version to enable ci tests. 2016-02-03 00:16:06 -08:00
John-David Dalton
b6b59d93d7 Bump to 4.2.0. 2016-02-02 00:33:16 -08:00
John-David Dalton
5af68bbf94 Rebuild lodash and docs. 2016-02-02 00:33:16 -08:00
John-David Dalton
db7debd3da Move benchmark.js to a dev dep. 2016-02-02 00:33:16 -08:00
laispace
29bc8d965b Fix _.sortedUniqBy doc example. [ci skip] 2016-02-01 23:55:34 -08:00
John-David Dalton
daeb55e99d Rename mapping rekey to rename. 2016-02-01 23:53:19 -08:00
John-David Dalton
fa4d85897c Add mutation notes to _.mergeWith, _.set, _.setWith, and _.unset. [ci skip] 2016-02-01 22:53:05 -08:00
John-David Dalton
983363e0cd Cleanup readme. [ci skip] 2016-02-01 22:37:56 -08:00
John-David Dalton
d95dad76b8 Remove dead code. 2016-02-01 22:37:56 -08:00
John-David Dalton
18f74aa5b2 Rename spreadArgs to otherArgs. 2016-02-01 22:37:56 -08:00
John-David Dalton
e96a8f7bc6 Cleanup map tests. 2016-02-01 22:37:56 -08:00
John-David Dalton
29f39be6ad Add _.flapMap tests for collections. 2016-02-01 22:37:56 -08:00
John-David Dalton
7a17967d79 Add _.spread tests for the start param. 2016-02-01 22:37:56 -08:00
John-David Dalton
de5bd32aba Rename rp vars to rest. 2016-02-01 22:37:56 -08:00
Jason Trill
199b2e1a3a Reword docs for _.tap and _.thru. [ci skip] 2016-02-01 22:37:56 -08:00
John-David Dalton
a43e4f10ef Update vendors. 2016-02-01 22:37:55 -08:00
Trevor Hudson
5522e4641d Update _.pickBy docs to include value as an iteratee param. [ci skip] 2016-02-01 22:37:55 -08:00
greenkeeperio-bot
6c82ea8fc3 Update qunitjs to 1.21.0. 2016-02-01 22:37:55 -08:00
John-David Dalton
b4b45b7139 Update docdown. 2016-02-01 22:37:55 -08:00
John-David Dalton
7ebb033016 Add _.at chaining test for objects with index keys. 2016-02-01 22:37:55 -08:00
John-David Dalton
163fdb46f0 Ensure fp _.partial and _.partialRight accept an args param. 2016-02-01 22:37:55 -08:00
John-David Dalton
b38cf204f7 Add start param to _.spread. 2016-02-01 22:37:55 -08:00
John-David Dalton
fe5381b0f4 Cleanup fp mapping. 2016-02-01 22:37:55 -08:00
John-David Dalton
c99e7f1337 Make _.flatMap a "Collection" method. 2016-02-01 22:37:55 -08:00
Mohammed Nauage
b61b674fec Remove sorted behavior from _.indexOf docs. [ci skip] 2016-02-01 22:37:55 -08:00
John-David Dalton
3bdaf99cfa Ensure _.iteratee clones sources for "_.matchesProperty" shorthand. 2016-02-01 22:37:54 -08:00
John-David Dalton
6c85e7015a Add assocPath and dissocPath fp aliases. 2016-02-01 22:37:54 -08:00
John-David Dalton
9788f7101b Ensure fp unset is immutable. [closes #1913] 2016-02-01 22:37:54 -08:00
Billy Janitsch
d0d5a3802d Alias set to assoc in FP. 2016-02-01 22:37:54 -08:00
John-David Dalton
1f160b31ff Make doc code sample comments match source comment style. [ci skip] 2016-01-30 01:02:49 -08:00
Ivan Tanev
13659e87cb Ensure _.attempt preserves custom errors. 2016-01-30 01:02:49 -08:00
John-David Dalton
ac9b0bfc1b Increment package version to enable ci tests. 2016-01-30 01:02:48 -08:00
John-David Dalton
07f7a3f3c5 Bump to 4.1.0. 2016-01-29 14:22:08 -08:00
John-David Dalton
22984f4eb2 Rebuild lodash and docs. 2016-01-29 14:21:44 -08:00
John-David Dalton
2286283f98 Add babel-plugin-lodash mention to readme. [ci skip] 2016-01-29 14:21:37 -08:00
Florent Cailhol
5ca26e6ae0 Remove V8 JIT bug fix for _.isObject. 2016-01-29 01:09:23 -08:00
John-David Dalton
e7c3afc1e5 Add index.js and lodash.js to the list of ignored files when generating fp modules. 2016-01-28 23:58:16 -08:00
John-David Dalton
82e9b4197b Add more fp mutation tests for deep objects. 2016-01-28 23:01:28 -08:00
John-David Dalton
820939f014 Update docdown. 2016-01-28 22:11:48 -08:00
John-David Dalton
e4c9916e17 Add default accumulator values to doc examples. [ci skip] 2016-01-28 22:11:43 -08:00
John-David Dalton
ce88b120eb Use npm config shorthand. 2016-01-28 18:11:53 -08:00
John-David Dalton
23c5101227 Make doc postprocess fix for symbol identifers more generic. 2016-01-28 14:45:15 -08:00
Craig Martin
de3eeb2d47 Use npm pretest hook. 2016-01-28 12:36:13 -08:00
John-David Dalton
03f7205e6d Ensure _.clone and _.cloneDeep work on prototype objects. 2016-01-28 01:05:25 -08:00
John-David Dalton
7bf7ab954b Update vendors and dev deps. 2016-01-28 01:05:25 -08:00
John-David Dalton
97612f3b31 Disable npm progress bar in travis for quicker installs. 2016-01-27 07:38:08 -08:00
John-David Dalton
71702d058c Ignore more files. 2016-01-27 01:19:03 -08:00
John-David Dalton
6a4164d9f3 Ensure remapped fp method modules are created. 2016-01-27 00:47:31 -08:00
John-David Dalton
d3b0eae84c Use mapping for aliasToReal. 2016-01-27 00:47:31 -08:00
John-David Dalton
0105b93f38 Ensure fp convert can work with aliases as name. 2016-01-27 00:19:06 -08:00
John-David Dalton
cae0d2c707 Add aliasToReal fp mapping. 2016-01-27 00:19:06 -08:00
John-David Dalton
dcb1572240 Reorg fp tests. 2016-01-27 00:19:06 -08:00
John-David Dalton
e20f43018b Separate fp _mapping into individual exports. 2016-01-27 00:19:06 -08:00
John-David Dalton
01e176694f Correct fp arg order of assignWith, assignInWith, merge, mergeWith, defaults, and defaultsDeep. 2016-01-27 00:19:06 -08:00
John-David Dalton
a239ccaa9a Add main:modules npm run script. 2016-01-26 21:32:22 -08:00
Jeroen Engels
b97a05b7f2 Add npm scripts to build docs. 2016-01-26 21:32:16 -08:00
John-David Dalton
c86754afde Cleanup hasPath and indexKeys. 2016-01-26 18:20:51 -08:00
John-David Dalton
95da9c0dd4 Optimize _.isEmpty. [closes #1888] 2016-01-26 18:20:50 -08:00
John-David Dalton
567171993b Define trim_trailing_whitespace rule for all files. 2016-01-26 18:20:50 -08:00
Kent C. Dodds
60a0d554a0 Run scripts in parallel. 2016-01-26 10:10:16 -08:00
John-David Dalton
f87af6c642 Add more npm run-scripts. 2016-01-26 08:41:38 -08:00
John-David Dalton
df849e8698 Fix style nits. 2016-01-26 08:41:38 -08:00
John-David Dalton
7a8ef7aeb7 Ensure _.sum and _.sumBy return 0 for empty arrays. [closes #1883] 2016-01-26 01:29:59 -08:00
John-David Dalton
25c7c8b153 Update dev deps. 2016-01-26 00:29:41 -08:00
John-David Dalton
8048f015e5 Ensure _.mergeWith overwrites primitives with source object clones. [closes #1880] 2016-01-26 00:28:38 -08:00
John-David Dalton
8a7fce41bb Add invokeMap to the excused methods in Backbone tests. 2016-01-26 00:28:38 -08:00
John-David Dalton
094a272443 Add _.invertBy. 2016-01-26 00:28:37 -08:00
John-David Dalton
552be2f5fb Remove multiVal param from _.invert. 2016-01-26 00:28:37 -08:00
John-David Dalton
d99954133c Add _.zipObjectDeep. 2016-01-26 00:28:37 -08:00
John-David Dalton
c49ace5587 Add back fp build-modules files. 2016-01-26 00:28:30 -08:00
John-David Dalton
258ad020ed Bump to 4.0.1. 2016-01-25 00:33:25 -08:00
John-David Dalton
59de939c1d Rebuild lodash and docs. 2016-01-25 00:33:25 -08:00
John-David Dalton
9d2d4f39bc Reorg build, fp, and lib files. 2016-01-25 00:32:37 -08:00
John-David Dalton
f555cd2303 Update map references in precompile.js. 2016-01-25 00:24:36 -08:00
Esa-Matti Suuronen
fcb80e926d Add precompile script for fp modules. 2016-01-25 00:24:36 -08:00
John-David Dalton
3f1fd98bef Doc cleanup of aggregator methods. [ci skip] 2016-01-25 00:24:36 -08:00
John-David Dalton
e2280db917 Fix documented iteratee arg count of _.partition. [ci skip] 2016-01-25 00:24:36 -08:00
John-David Dalton
627e92e7e0 Remove empty line in baseInvoke jsdoc. [ci skip] 2016-01-25 00:24:36 -08:00
John-David Dalton
5a9ca34a92 Rename initFromArray and initFromCollection vars to initAccum. 2016-01-25 00:24:36 -08:00
John-David Dalton
880ffcb1f6 Add more fp tests for key methods. 2016-01-25 00:24:36 -08:00
John-David Dalton
4e35d970af Avoid setting ary twice. 2016-01-25 00:24:36 -08:00
John-David Dalton
42a4e09f91 Minor capitalization nit in readme. [ci skip] 2016-01-25 00:24:36 -08:00
John-David Dalton
b13b17e801 Ensure fp key methods provide the key argument to their iteratees. [closes #1842] 2016-01-25 00:24:36 -08:00
John-David Dalton
68d0238044 Remove omitBy and pickBy from funcMethods. 2016-01-25 00:24:35 -08:00
John-David Dalton
82b4f4147e Add fp customizer test for _.setWith. 2016-01-25 00:24:35 -08:00
John-David Dalton
6cbd2c4188 Ensure _.concat treats nullish values as empty arrays. 2016-01-25 00:24:35 -08:00
John-David Dalton
78982f3074 Ensure _.concat returns an empty array for nullish array values. [closes #1856] 2016-01-25 00:24:35 -08:00
John-David Dalton
345746f7ab Add another test to help catch incorrect fp mapping. 2016-01-25 00:24:35 -08:00
John-David Dalton
741a7b9caa Remove mean from fp aryMethod map. 2016-01-25 00:24:35 -08:00
John-David Dalton
7544c8fac8 Add propOr fp alias. 2016-01-25 00:24:35 -08:00
John-David Dalton
a46169329d Fix fp test fails. 2016-01-25 00:24:35 -08:00
John-David Dalton
9aa56630ab Ensure _.noConflict only restores _ if lodash is the current _ value. 2016-01-25 00:24:35 -08:00
Billy Janitsch
01819e7a5a Disable fp concat rearg. 2016-01-25 00:24:34 -08:00
Billy Janitsch
bae497ec5a Update fp property and get aliases. 2016-01-25 00:24:34 -08:00
John-David Dalton
68e0c78602 Remove baseClone use from mergeDefaults. 2016-01-25 00:24:34 -08:00
John-David Dalton
6296afd279 Ensure _.words treats all-lower and all-upper postfixs as separate words. 2016-01-25 00:24:34 -08:00
John-David Dalton
6d58fe912d Ensure _.words captures all caped words. [closes #1833] 2016-01-25 00:24:34 -08:00
Nacho Martín
0c45957096 Fix iteratee arg count in _.partition docs. [ci skip]
If I am not mistaken, the docs for `partition` are wrong. It is only invoked with an argument, not three. See this fiddle https://jsfiddle.net/y8fcwa6m/
2016-01-25 00:24:34 -08:00
John-David Dalton
aa311bd792 Move unset to aryMethod[2] mapping. 2016-01-25 00:24:34 -08:00
John-David Dalton
8858cdbe8c Move position of _.keyBy doc example. [ci skip] 2016-01-25 00:24:34 -08:00
John-David Dalton
9d033247e9 Correct arg count in _.isEqualWit doc note. [ci skip] 2016-01-25 00:24:34 -08:00
Benjamin Tan
cacae31af3 Minor documentation fixes for stringSize, _.cond, _.intersection, and _.reverse. [ci skip] 2016-01-25 00:24:33 -08:00
John-David Dalton
759a44e2b8 Move omitBy and pickBy to aryMethod[2] mapping. [closes #1819] 2016-01-25 00:24:33 -08:00
think2011
2fb778413b Fix returns tag typo in _.toLength docs. [ci skip] 2016-01-25 00:24:33 -08:00
Ismaël Mejía
473d059efd Fix _.map doc example. [ci skip] 2016-01-25 00:24:33 -08:00
John-David Dalton
67cd43d97a Reduce description mentions of eachFunc. [ci skip] 2016-01-25 00:24:33 -08:00
John-David Dalton
b77248c975 Minor cleanup of contributing.md. [ci skip] 2016-01-25 00:24:33 -08:00
John-David Dalton
6bc58a16f6 Remove conditional exposure. 2016-01-25 00:24:33 -08:00
John-David Dalton
0edbd96bb5 Ensure mixinPrereqs is called before Backbone is loaded. 2016-01-25 00:24:33 -08:00
John-David Dalton
6ecc675670 Ensure Backbone test only adds missing methods. 2016-01-25 00:24:33 -08:00
John-David Dalton
c0a6f051fc Move getFuncName test. 2016-01-25 00:24:33 -08:00
John-David Dalton
6bc0aba800 Avoid chatty console.log. 2016-01-25 00:24:32 -08:00
Steven Sojka
6949f71516 Ensure getFuncName works when checking methods that shadow Object.prototype. 2016-01-25 00:24:32 -08:00
John-David Dalton
f6c6de40f1 Update fp mapping with a test to catch potentially missed wrappers. 2016-01-25 00:24:32 -08:00
John-David Dalton
fdea9a447f Revert_Symbol rename. 2016-01-25 00:24:32 -08:00
John-David Dalton
2e02636fc1 Revert lodash path in test/index.html. 2016-01-25 00:24:32 -08:00
John-David Dalton
17b9646c0b Add test warning about the lodash dependency. 2016-01-25 00:24:32 -08:00
John-David Dalton
0a3d7e7cbc Revert lodash dev dep bump. 2016-01-25 00:24:32 -08:00
John-David Dalton
a62d70e80c Add jsdoc name tag for flatMap. [closes #1811] 2016-01-25 00:24:32 -08:00
John-David Dalton
96bbf74207 Add has and hasIn to fp mapping. [closes #1805] 2016-01-25 00:24:32 -08:00
John-David Dalton
6cfe7fa5ea Move forEach and friends to the non-chaining section of the lodash doc note. [ci skip] 2016-01-25 00:24:32 -08:00
John-David Dalton
efc61ea70d Correct arg count typo in _.cloneWith docs. [ci skip] 2016-01-25 00:24:32 -08:00
John-David Dalton
e752b26f9e Clarify max size of _.sampleSize. [ci skp] [closes #1802] 2016-01-25 00:24:31 -08:00
Jeroen Engels
6b19ca1c11 Update contributing.md about how to launch tests. [ci skip] 2016-01-25 00:24:31 -08:00
John-David Dalton
42e01fd37b Add fp tests to npm test. 2016-01-25 00:24:31 -08:00
John-David Dalton
1df18a3e10 Make _.omitBy and _.pickBy pass a key param to iteratees. 2016-01-25 00:24:31 -08:00
John-David Dalton
f31fb8bd34 Add _.isEqual test for unordered object comparisons. 2016-01-25 00:24:31 -08:00
John-David Dalton
1d54d868e3 Fix merging functions and avoid augmenting sources. [closes #1794, #1801] 2016-01-25 00:24:31 -08:00
John-David Dalton
4b801f423b Update fp mapping to include uniqWith. [closes #1800] 2016-01-25 00:24:31 -08:00
John-David Dalton
96ef2110ce Add support for combining diacritical marks for symbols. 2016-01-25 00:24:31 -08:00
Beau Gunderson
84763cab26 Add failing test for Fitzpatrick modifiers. 2016-01-25 00:24:30 -08:00
Beau Gunderson
fc2ce9a021 Add test fails for keycap emoji (#1796). 2016-01-25 00:24:30 -08:00
John-David Dalton
a5c1421c6b Ensure _.fromPairs can consume results of _.toPairs. [closes #1790] 2016-01-25 00:24:30 -08:00
John-David Dalton
1a54e43a24 Add chunk to fp mapping. 2016-01-25 00:24:30 -08:00
John-David Dalton
1ab5a20784 Fix phantomjs test fails. 2016-01-25 00:24:30 -08:00
John-David Dalton
1634388534 Update fallback lodash module path. 2016-01-25 00:24:30 -08:00
Alon Niv
455afb0019 Fix ES5 parseInt link. [ci skip] 2016-01-14 07:46:29 -08:00
John-David Dalton
349dfbf182 Ensure core build slice has default start and end params. [closes #1789] 2016-01-14 01:34:34 -08:00
John-David Dalton
b081b3ae2d Cleanup intentation in baseIsMatch. 2016-01-13 23:09:46 -08:00
John-David Dalton
110f86f803 Fix lodash doc ticks. [ci skip] [closes #1787] 2016-01-13 23:08:56 -08:00
John-David Dalton
ace771d4e9 Add matches to core build. [closes #1784] 2016-01-13 22:41:48 -08:00
John-David Dalton
7544166d11 Add placeholders to fp wrapper. [closes #1780] 2016-01-13 22:07:50 -08:00
mori_9tarou
ff5f06b9f0 Fix _.pullAll doc example typo. [ci skip] 2016-01-13 22:07:12 -08:00
John-David Dalton
06395f8436 Simplify fp map. 2016-01-13 22:03:41 -08:00
John-David Dalton
fe3d86bf13 Ensure _.defaultsDeep doesn't convert function properties to objects. [closes #1783] 2016-01-13 21:20:05 -08:00
John-David Dalton
f92dc95c58 Add fp mapping for _.gt, _.gte, _.lt, and _.lte. [closes #1776] 2016-01-13 14:44:52 -08:00
John-David Dalton
9058c00cfe Add isEqual to fp mapping. [closes #1764] 2016-01-13 08:11:58 -08:00
think2011
8b6bd8442e Fix _.isMatchWith doc typo. [ci skip] 2016-01-13 08:11:37 -08:00
Strider
1ef22e976d Fix _.clone/_.cloneDeep doc typo. [ci skip] 2016-01-13 08:10:23 -08:00
Abhas Tandon
d0d86aecf8 Fix _.maxBy/_.minBy doc example. [ci skip] 2016-01-13 08:08:57 -08:00
John-David Dalton
1ef4807a8e Ensure object are compared unordered. [closes #1758] 2016-01-13 03:56:55 -08:00
John-David Dalton
846e813c99 Ensure each and eachRight have the correct chain behavior. 2016-01-13 03:45:15 -08:00
John-David Dalton
73405cf042 Update fp property alias mapping. [closes #1755] 2016-01-13 00:09:29 -08:00
John-David Dalton
79c873f3f8 Update fp map for assignment methods and set methods. [closes #1754] 2016-01-13 00:06:59 -08:00
greenkeeperio-bot
0fc6929dd4 Update lodash dev dep. 2016-01-13 00:06:59 -08:00
John-David Dalton
753a32bed7 Remove legacy doc note from _.range. [closes #1753] [ci skip] 2016-01-13 00:06:59 -08:00
John-David Dalton
027c572758 Add replace to fp map. 2016-01-13 00:06:59 -08:00
John-David Dalton
afb7d3e351 Add split to fp map. [closes #1752] 2016-01-13 00:06:59 -08:00
John-David Dalton
a5c3ae0a7e Remove run from jsdoc alias tag. [ci skip] 2016-01-13 00:06:59 -08:00
John-David Dalton
9477e46fb3 Fix typos in lodash doc note. [ci skip] 2016-01-13 00:06:58 -08:00
John-David Dalton
bf06df4475 Bump to v4.0.0. 2016-01-13 00:06:58 -08:00
John-David Dalton
e775a58496 Rebuild lodash and docs. 2016-01-13 00:06:58 -08:00
John-David Dalton
ad15e47d4d Update dev deps. 2016-01-13 00:06:58 -08:00
John-David Dalton
45f7a91780 Update fp modules. 2016-01-13 00:06:47 -08:00
John-David Dalton
b1401d03a1 Update fp/util module paths. 2016-01-12 08:00:35 -08:00
John-David Dalton
8b264e5c11 Add eq to fp mapping. 2016-01-11 23:33:44 -08:00
John-David Dalton
2fb4ec0d5f Rename conj and disj to overEvery and overSome in fp mapping. 2016-01-11 23:33:44 -08:00
John-David Dalton
ddd5318bb0 Change category names of "Utility" to "Util" and "Chain" to "Seq". 2016-01-11 22:55:14 -08:00
John-David Dalton
3d44135df5 Remove run alias. 2016-01-11 21:21:21 -08:00
John-David Dalton
a98fc802fc Cleanup _.maxBy and _.minBy doc example. [ci skip] 2016-01-11 16:14:26 -08:00
John-David Dalton
ed364ecfee Cleanup _.iteratee doc example. [ci skip] 2016-01-11 16:14:26 -08:00
John-David Dalton
434d217bfa Cleanup omit and pick doc examples. [ci skip] 2016-01-11 16:14:26 -08:00
John-David Dalton
2386557b5e Add more _.toArray doc examples. [ci skip] 2016-01-11 16:14:26 -08:00
John-David Dalton
f619a6666a Cleanup clone doc examples. [ci skip] 2016-01-11 16:14:26 -08:00
John-David Dalton
359ef9715e Cleanup resolve doc examples. [ci skip] 2016-01-11 16:14:25 -08:00
John-David Dalton
9211bc6329 Remove toInteger from baseSlice. 2016-01-11 08:17:00 -08:00
John-David Dalton
a26ef1a997 Remove unused variables. 2016-01-10 15:35:44 -08:00
John-David Dalton
c9f53b9a1c Remove .sauce.yml. 2016-01-10 13:44:54 -08:00
John-David Dalton
f9a3e66716 Update _.unzipWith and _.zipWith iteratee docs. [ci skip] 2016-01-10 12:38:02 -08:00
John-David Dalton
e5464fa199 Change "callback shorthand" to "iteratee shorthand". [ci skip] 2016-01-10 12:37:40 -08:00
John-David Dalton
9dc2f1ee29 Fix test for es build. 2016-01-09 13:56:56 -08:00
John-David Dalton
b27143aa15 Add missing bizarro labels. 2016-01-09 01:24:56 -08:00
John-David Dalton
07c38311ca Add _.clone test for objects without a constructor function. 2016-01-09 01:17:23 -08:00
John-David Dalton
4a0415a6bd Increase test coverage of symbols. 2016-01-09 01:17:16 -08:00
John-David Dalton
5d97cdbcfe Minor formatting nit. 2016-01-09 01:02:47 -08:00
John-David Dalton
7cce658fc4 Leak to avoid sporadic noglobals fails on Edge in Sauce Labs. 2016-01-08 23:46:48 -08:00
John-David Dalton
84879453b1 Add _.cond test for provided arguments. 2016-01-08 23:01:07 -08:00
John-David Dalton
9cc79db819 Add _.toLength test for -0. 2016-01-08 21:35:16 -08:00
John-David Dalton
17a1663513 Add default wait test for _.delay. 2016-01-08 21:35:16 -08:00
John-David Dalton
11538ccf90 Cleanup test labels. [ci skip] 2016-01-08 21:35:16 -08:00
John-David Dalton
5c51b1c4d1 Simplify baseInRange and baseRange description. [ci skip] 2016-01-08 21:35:16 -08:00
John-David Dalton
5a13fe28c9 Rename _.random params start and end to lower and upper. 2016-01-08 21:35:10 -08:00
John-David Dalton
946560c998 Add baseClamp. 2016-01-08 20:11:59 -08:00
John-David Dalton
7c5e032853 Simplify isNumber. 2016-01-08 11:47:17 -08:00
John-David Dalton
54ae91b2d9 Use freeParseFloat and freeParseInt. 2016-01-08 08:34:37 -08:00
John-David Dalton
8bd8aa3037 Assign methods should create an object when object is nullish. 2016-01-07 21:53:35 -08:00
John-David Dalton
6fa9490a13 Ensure uglify options are set correctly. 2016-01-07 21:20:22 -08:00
John-David Dalton
5dc48d1a83 Sync uglify options with lodash-cli. 2016-01-07 21:20:03 -08:00
John-David Dalton
9e56a92c8a Drop Node 0.8 testing. 2016-01-07 20:41:19 -08:00
John-David Dalton
ac98d81b85 Update deps. 2016-01-07 20:41:19 -08:00
John-David Dalton
05e80e32f7 Simplify trim methods. 2016-01-07 20:41:18 -08:00
John-David Dalton
7435058859 Rename Symbol var to _Symbol to avoid problems with Babel v6.4.0. 2016-01-07 20:41:18 -08:00
John-David Dalton
81b1d6e451 Change arguments passed to _.zipWith and _.unzipWith. 2016-01-07 20:41:18 -08:00
John-David Dalton
52754415e0 Remove support for flattening arrays with circular references. 2016-01-07 20:41:18 -08:00
John-David Dalton
d51d67a5c2 Add sauce.yml. 2016-01-07 20:40:57 -08:00
John-David Dalton
c62fbd811b Enable equalArrays and equalObjects to exit early before checking the stack. 2016-01-05 08:23:08 -08:00
John-David Dalton
1df780abba Add comment to createRange to avoid refactoring the way start is resolved. [ci skip] 2016-01-05 08:11:02 -08:00
John-David Dalton
150511b263 Add createRange. 2016-01-05 07:59:28 -08:00
John-David Dalton
7fefa954c8 Add baseInRange. 2016-01-05 07:40:57 -08:00
Christopher Hiller
030472cee4 Remove references to Bower, Component, and Volo. [ci skip] 2016-01-05 07:34:13 -08:00
John-David Dalton
00c0dc233e Move toNumber use out of baseRange. 2016-01-05 07:31:47 -08:00
greenkeeperio-bot
1013bccb9c Update async and platform dev deps. 2016-01-04 09:19:01 -06:00
John-David Dalton
0911e77c32 Fix _.transform test fail due to _.cloneDeep behavior change. 2016-01-04 09:18:32 -06:00
John-David Dalton
4cdd33b2aa Update tested browsers in sauce. 2016-01-04 09:18:32 -06:00
John-David Dalton
638f081390 Fix fp test fails due to _.cloneDeep behavior change. 2016-01-04 09:18:32 -06:00
John-David Dalton
21f28bfd0d Add missing semicolon. 2016-01-04 09:18:32 -06:00
John-David Dalton
941745cd06 Add _.cond test for this binding. 2016-01-04 09:18:32 -06:00
John-David Dalton
8bf6bcb8a7 Cleanup this binding tests. 2016-01-04 09:18:32 -06:00
John-David Dalton
e7b8fd8281 Add basic _.cond test and test for undefined return values. 2016-01-04 09:18:31 -06:00
John-David Dalton
b1ba01e85a Simplify _.once test. 2016-01-04 09:18:31 -06:00
John-David Dalton
a74c71e423 Add constant function helpers. 2016-01-04 09:18:31 -06:00
John-David Dalton
dba1bcf973 Simplify [[Prototype]] test labels. 2016-01-04 09:18:31 -06:00
John-David Dalton
ed3f8cc39d Add support for creating clones with the same [[Prototype]] as value. 2016-01-04 09:18:31 -06:00
John-David Dalton
f39fdc42f6 Remove legacy options param signature from _.template. 2016-01-04 09:18:31 -06:00
John-David Dalton
9ef191db33 Cleanup _.template tests. 2016-01-04 09:18:31 -06:00
John-David Dalton
9582f25835 Simplify source test labels. 2016-01-04 09:18:31 -06:00
John-David Dalton
4463975ace Add _.templateSettings.imports._.templateSettings tests. 2016-01-04 09:18:31 -06:00
John-David Dalton
33cf509822 Add _.cond test for shorthands. 2016-01-04 09:18:30 -06:00
John-David Dalton
34f44e8f25 Add parentheses to tests. 2016-01-03 10:08:10 -06:00
John-David Dalton
7fb738ab91 Add _.cond test for function checks. 2016-01-03 10:07:48 -06:00
John-David Dalton
973e0812ad Add TypeError check for methods that reject falsey params. 2016-01-02 13:53:30 -06:00
John-David Dalton
cd8218541a Tweak truthy test for memoize resolve. 2016-01-02 13:49:04 -06:00
John-David Dalton
2316dff1e0 Use lodashStable in more places. 2016-01-02 13:48:12 -06:00
John-David Dalton
15ce24db25 Add _.isSymbol tests. 2016-01-02 12:30:13 -06:00
John-David Dalton
b0e0a20e96 Fix realm assignments. 2016-01-02 11:41:18 -06:00
John-David Dalton
849f8e77ec Ensure _.toString does not throw on symbols. 2016-01-02 11:41:11 -06:00
John-David Dalton
f7c7dee8b0 Add _.isSymbol. 2016-01-02 11:04:41 -06:00
John-David Dalton
167fad9649 Cleanup doc note on lazy evaluation. [ci skip] 2016-01-02 10:32:36 -06:00
John-David Dalton
9d3a298895 Cleanup symbol tests. 2016-01-02 10:32:35 -06:00
John-David Dalton
19b5ef7c6f Cleanup _.transform realm test. 2016-01-02 10:32:35 -06:00
John-David Dalton
9b09caa463 Add symbol tests for isType methods. 2016-01-02 10:32:35 -06:00
John-David Dalton
f08b6e2690 Add _.cond doc example. [ci skip] 2016-01-02 10:32:26 -06:00
John-David Dalton
fa13cb5544 Add getIteratee to _.cond. 2016-01-01 23:50:13 -06:00
John-David Dalton
1427c99169 Add _.cond. 2016-01-01 23:18:40 -06:00
John-David Dalton
3e155bdbb9 Move _.bindAll to the utility category. 2016-01-01 16:18:02 -06:00
John-David Dalton
f830612f17 Update tab/spacing rules for html files. 2016-01-01 14:49:47 -06:00
John-David Dalton
3b86574b4d Remove bower.json. 2016-01-01 12:09:06 -06:00
John-David Dalton
30d9cb9a4a Move flow and flowRight to checkFuncs. 2016-01-01 11:15:54 -06:00
John-David Dalton
cfe05b7d34 Bump copyright year. [ci skip] 2016-01-01 10:04:36 -06:00
John-David Dalton
60a016ae39 Remove Rhino mention from comment. [ci skip] 2015-12-31 20:54:47 -06:00
John-David Dalton
6229e02806 Excuse root._ export from coverage. 2015-12-30 17:18:03 -06:00
John-David Dalton
5202294ae2 Add more excused coverage gaps. 2015-12-30 14:50:16 -06:00
John-David Dalton
5bc50c2ef0 Simplify CommonJS UMD. 2015-12-30 14:50:03 -06:00
John-David Dalton
22b0b942ae Simplify assocSet pattern. 2015-12-29 22:18:12 -06:00
John-David Dalton
41f86399f0 Remove coverage check for break in createBaseEach. 2015-12-29 22:15:13 -06:00
John-David Dalton
bc7f2af2ce Add _.orderBy test for string objects. 2015-12-29 21:26:00 -06:00
John-David Dalton
db04398e49 Add support for removing the last capture group. 2015-12-29 09:15:01 -06:00
John-David Dalton
56929e9725 Use == for the 'desc' check in compareMultiple. 2015-12-29 08:52:50 -06:00
John-David Dalton
6798259b84 Use eq in assignInDefaults. 2015-12-29 01:29:18 -06:00
John-David Dalton
20906c7bf7 Update vendors. 2015-12-29 00:25:14 -06:00
John-David Dalton
560ddac75a Simplify Stack test. 2015-12-28 22:33:45 -06:00
John-David Dalton
daecf5cf01 Simplify setProperty. 2015-12-28 22:33:40 -06:00
John-David Dalton
505f8d5cda Fix phantomjs test fails. 2015-12-28 21:54:50 -06:00
John-David Dalton
1d7fd0638d Add more Stack tests. 2015-12-28 20:34:44 -06:00
John-David Dalton
67ca691334 Use eq in assocIndexOf. 2015-12-28 20:34:32 -06:00
John-David Dalton
85da55d917 Add Stack#clear. 2015-12-28 20:34:17 -06:00
John-David Dalton
ee8567ab38 Cleanup MapCache tests. 2015-12-28 20:33:39 -06:00
John-David Dalton
4ca2740628 Add _.transform test to check that object constructor is a function before using its [[Prototype]]. 2015-12-28 16:40:29 -06:00
John-David Dalton
23e6302329 Cleanup tests. 2015-12-28 16:28:05 -06:00
John-David Dalton
95c6dd8992 Add tests for MapCache values. 2015-12-28 15:18:45 -06:00
John-David Dalton
a5b733998d Remove "Opera" from test labels. 2015-12-28 14:54:01 -06:00
John-David Dalton
68b7749a0f Add more MapCache tests. 2015-12-28 14:53:13 -06:00
John-David Dalton
fb37e0767a Add tests for skipping value assignments. 2015-12-28 13:16:05 -06:00
John-David Dalton
43469b9877 Simplify Object.defineProperty use. 2015-12-28 13:15:43 -06:00
John-David Dalton
5a53215506 Rename assignSymbols to copySymbols and implement by way of copyObject. 2015-12-28 11:36:53 -06:00
John-David Dalton
51ce9edcf3 Rearrange _.has and _.hasIn tests. 2015-12-28 11:12:14 -06:00
John-David Dalton
18481a40b2 Add _.has and _.hasIn tests for arguments objects and strings. 2015-12-28 11:11:20 -06:00
John-David Dalton
24c0221ec5 Expand common case check in mergeData. 2015-12-28 10:37:49 -06:00
John-David Dalton
0f928233ce Add _.ary test case for multiple applied arys. 2015-12-28 10:11:17 -06:00
John-David Dalton
e5730af949 Add _.zipObject test for extra keys. 2015-12-28 00:08:26 -06:00
John-David Dalton
ed23b6b89d Rearrange tests for consistency. 2015-12-27 23:59:04 -06:00
John-David Dalton
28420ac1fc Add _.conforms test for missing object properties. 2015-12-27 23:58:51 -06:00
John-David Dalton
6da255f786 Add more MapCache tests. 2015-12-27 23:29:15 -06:00
John-David Dalton
2396932846 Remove dead code from stringToArray. 2015-12-27 23:10:59 -06:00
John-David Dalton
89b9f46ad8 Increase coverage of _.random, _.template, and _.truncate. 2015-12-27 20:23:01 -06:00
John-David Dalton
7dd0bb5005 Use 'utf8', which Node uses, instead of 'utf-8'. 2015-12-27 18:41:21 -06:00
John-David Dalton
44ecbc944b Move _#reverse tests into _.reverse tests. 2015-12-27 18:40:37 -06:00
John-David Dalton
223460bbd2 Remove unneeded assertion from a _.xor chaining test. 2015-12-27 16:22:12 -06:00
John-David Dalton
1a0a9709f2 Add tests for chaining _.invokeMap. 2015-12-27 16:21:21 -06:00
John-David Dalton
a16c282f99 Add more test coverage to _.add, _.subtract, and _.transform. 2015-12-27 15:08:48 -06:00
John-David Dalton
aeac5b0203 Increase code coverage of partial lines. 2015-12-27 14:41:57 -06:00
John-David Dalton
afdc4b746a Remove dead code in createRecurryWrapper. 2015-12-27 14:41:34 -06:00
John-David Dalton
6c84ccd5c5 Remove dead code from baseIntersection and cloneSymbol. 2015-12-27 13:27:47 -06:00
John-David Dalton
916bfed84b Add bizarro tests for Object.getOwnPropertySymbols. 2015-12-27 11:19:36 -06:00
John-David Dalton
35bb3ac128 Remove dead code from baseClone. 2015-12-27 11:19:36 -06:00
John-David Dalton
4f1c3887f7 Remove 'utf-8' option because it's the default. 2015-12-27 11:19:30 -06:00
John-David Dalton
ce19067cfd Cleanup PATTERN use in travis.yml. 2015-12-27 10:10:05 -06:00
John-David Dalton
00f4ebe6aa Remove legacy filePath resolving code. 2015-12-27 00:12:06 -06:00
John-David Dalton
5add1cfd25 Add test/remove.js to remove snippets while preserving new lines. 2015-12-27 00:06:15 -06:00
John-David Dalton
c67092d72b Report coverage from lodash.js instead of dist/lodash.js. 2015-12-26 22:15:50 -06:00
John-David Dalton
4bb5402cca Try codecov. 2015-12-26 22:08:38 -06:00
John-David Dalton
837acf1394 Add "use strict" directive to strict mode test. 2015-12-26 22:08:24 -06:00
John-David Dalton
0d8779734d Cleanup comment. [ci skip] 2015-12-26 22:07:15 -06:00
John-David Dalton
d8213454c2 Use assignValue in assignSymbols. 2015-12-26 21:31:26 -06:00
John-David Dalton
e05c8677bf Search for srcValue in stack before objValue. 2015-12-26 21:31:02 -06:00
John-David Dalton
a5b9063088 Use objValue instead of oldValue. 2015-12-26 21:26:36 -06:00
John-David Dalton
83ea7ac136 Make eq comparisons new value vs. old value. 2015-12-26 21:24:45 -06:00
John-David Dalton
f3075d685e Only copy symbols on objects and nested objects. 2015-12-26 19:24:59 -06:00
John-David Dalton
a811476c1b Add tests for cloning properties that shadow those on Object.prototype. 2015-12-26 12:26:49 -06:00
John-David Dalton
64fe626fa6 Simplify supported comparision doc notes for _.isMatch, _.matches, and _.matchesProperty. [ci skip] 2015-12-26 11:04:17 -06:00
John-David Dalton
f8236c711f Use eq in more places. 2015-12-25 22:01:52 -06:00
Benjamin Tan
b1f6bc72f4 Fix minor doc typo in _.chunk. [ci skip] 2015-12-25 22:01:51 -06:00
John-David Dalton
300dee34bd Test cloning date objects. 2015-12-25 22:01:51 -06:00
John-David Dalton
1eaa112f7d Add tests for cloning symbol properties. 2015-12-25 22:01:51 -06:00
John-David Dalton
8228376160 Use assignValue in baseClone to avoid strict mode errors. 2015-12-25 22:01:45 -06:00
John-David Dalton
a58cd65db8 Add support for cloning symbol properties to _.clone and _.cloneDeep. 2015-12-24 13:35:15 -06:00
John-David Dalton
2df689524e Simplify _.times doc example. [ci skip] 2015-12-24 00:16:25 -06:00
John-David Dalton
a20ad60f13 Add "requireEarlyReturn" rule. 2015-12-23 18:36:13 -06:00
John-David Dalton
1c781389d2 Add support for comparing array buffers to _.isEqual. 2015-12-23 18:18:12 -06:00
flyyang
5e639d1704 Fix doc and test label typos. [ci skip] 2015-12-23 09:22:41 -06:00
John-David Dalton
8e64432e2c Add docs to clarify what values are supported by _.clone and _.isEqual. [ci skip] 2015-12-23 00:56:41 -06:00
John-David Dalton
a8de2ca410 Indent nit. [ci skip] 2015-12-23 00:54:59 -06:00
John-David Dalton
6343518bca Simplify instanbul invocation in travis.yml. 2015-12-22 23:27:16 -06:00
John-David Dalton
351e259174 Add coverage to the .gitignore. 2015-12-22 18:17:07 -06:00
greenkeeperio-bot
1d77e29c3c Update dev deps. 2015-12-22 18:16:45 -06:00
John-David Dalton
eba9b3d22a Avoid test fail in Edge. 2015-12-22 01:22:09 -06:00
John-David Dalton
844fe1d979 Make var name changes for consistency. 2015-12-22 01:04:26 -06:00
John-David Dalton
0971a7820f Add support for symbols to _.clone, _.cloneDeep, and _.isEqual. 2015-12-22 01:04:26 -06:00
John-David Dalton
06c6f180dc Simplify test descriptions. 2015-12-22 01:04:26 -06:00
John-David Dalton
33da30266c Ensure min and max of _.random are swapped if min > max. 2015-12-22 01:04:19 -06:00
John-David Dalton
ad8628f8e7 Avoid isIterateeCall check if step is a number. 2015-12-20 14:03:04 -06:00
John-David Dalton
f42446d22f Avoid isIterateeCall check if floating is a boolean. 2015-12-20 12:39:00 -06:00
John-David Dalton
4b77b7a8b3 Make _.add, _.subtract, and _.sum not skip NaN values. 2015-12-19 10:37:49 -06:00
John-David Dalton
9e99a57615 Make "asc" the default order of _.orderBy. 2015-12-18 23:32:43 -06:00
John-David Dalton
7e648741ad Remove unneeded _.memoize.Cache test. 2015-12-17 20:43:56 -08:00
John-David Dalton
b1d396bbbb Cleanup mapClear. 2015-12-17 20:43:32 -08:00
Aaron Hamid
380435d020 Add clear method to MapCache. 2015-12-17 20:01:17 -08:00
John-David Dalton
71fb66dc37 Rename _.sortByOrder to _.orderBy. 2015-12-16 20:14:52 -08:00
John-David Dalton
a53280f047 Remove volo from package.json. 2015-12-16 17:56:35 -08:00
John-David Dalton
ccfb968b8a Clarify arity param of _.curry. [ci skip] 2015-12-16 01:15:43 -08:00
John-David Dalton
db731e0c91 Cleanup fp mapping and tests. 2015-12-15 22:25:52 -08:00
Benjamin Tan
a4b86f8368 Limit sample to one argument. 2015-12-15 22:25:52 -08:00
Benjamin Tan
44c697908b Ensure curryN, curryRightN, curryRight, and sampleSize are defined. 2015-12-15 22:25:35 -08:00
John-David Dalton
e3c79bd24a Refine Object.prototype check in _.defaults. 2015-12-15 21:04:39 -08:00
John-David Dalton
fb1ed531e4 Cleanup param docs. [ci skip] 2015-12-15 20:55:44 -08:00
John-David Dalton
a6cb6d26a4 Add _.split test for limit. 2015-12-15 20:37:43 -08:00
John-David Dalton
003a5981d6 Cleanup jQuery doc references. [ci skip] 2015-12-15 00:28:47 -08:00
John-David Dalton
0bf38b826e Update dev deps. 2015-12-14 22:53:40 -08:00
John-David Dalton
4038d12f1b Move replace and split tests from chained to non-chained forms. 2015-12-14 21:44:36 -08:00
John-David Dalton
9d60e28aad Reset args to undefined. 2015-12-14 20:37:44 -08:00
John-David Dalton
ae92aa200f Add fp tests for cherry-picked reduce and reduce iterating an object. 2015-12-14 20:37:05 -08:00
John-David Dalton
4584b857ca Update vendor/underscore. 2015-12-14 11:54:17 -08:00
John-David Dalton
46bdf5d79d Simplify _.reduce and _.reduceRight. 2015-12-14 08:25:28 -08:00
John-David Dalton
83720f457e Remove custom lodash option from perf and test ui. 2015-12-14 08:25:10 -08:00
John-David Dalton
0706af1543 Ensure the fp iteratee wrapper enforces arity for functions with a length of 0. 2015-12-14 08:06:29 -08:00
John-David Dalton
41985d8c1a Ensure reduce and reduceRight use getIteratee for the array path. 2015-12-13 23:29:52 -08:00
John-David Dalton
440eb0876c Dry up lib/fp/base.js 2015-12-12 14:10:45 -08:00
John-David Dalton
ac0a0ea07e Add delete to Map interface note. [ci skip] 2015-12-12 11:03:34 -08:00
John-David Dalton
4a534da00a Use MDN for built-in method references. [ci skip] 2015-12-12 11:03:18 -08:00
John-David Dalton
ff4143b482 Expose _.replace and _.split. 2015-12-12 10:54:11 -08:00
John-David Dalton
f132c0024f Make fp versions of set and setWith immutable. 2015-12-11 01:39:33 -08:00
John-David Dalton
82a1010f64 Fix fp test fail when run from Node. 2015-12-11 01:29:14 -08:00
greenkeeperio-bot
d885a9afd0 Update coveralls to 2.11.6. 2015-12-10 22:40:19 -08:00
John-David Dalton
08568fcc8f Update vendor/backbone and vendor/underscore. 2015-12-10 18:32:57 -08:00
John-David Dalton
2192b7748e Remove test/asset/test-ui.js use from test/fp.html. 2015-12-09 23:36:40 -08:00
John-David Dalton
c96a579291 Simplify _.overArgs. 2015-12-09 01:37:34 -08:00
greenkeeperio-bot
095cf94c45 Update jscs to 2.7.0. 2015-12-09 01:28:10 -08:00
John-David Dalton
f7a49778ea Rename _.modArgs to _.overArgs and remove _.modArgsSet. 2015-12-08 23:23:34 -08:00
John-David Dalton
58b235b435 Fix fp test fails in IE10 and Firefox. 2015-12-07 00:58:03 -08:00
John-David Dalton
a7f1c3c883 Fix test fails in IE11. 2015-12-07 00:37:37 -08:00
John-David Dalton
268d411bb4 Update lodash builds in travis.yml. 2015-12-06 22:48:39 -08:00
John-David Dalton
7cdf708e3c Prevent false minified method name test fail. 2015-12-06 22:13:39 -08:00
John-David Dalton
42c077de02 Make fp tests browser runnable. 2015-12-05 23:44:09 -08:00
John-David Dalton
769f78a2b7 Rename test/test.fp.js to test/test-fp.js. 2015-12-05 22:01:05 -08:00
John-David Dalton
b69ba06db9 Add a doc on path creation for _.set. [ci skip] 2015-12-05 12:55:16 -08:00
John-David Dalton
42d5cc584e Simplify iteration in createBaseFor . 2015-12-05 12:55:15 -08:00
John-David Dalton
f3d54d0975 Add _.rangeRight tests. 2015-12-05 12:55:15 -08:00
John-David Dalton
39192ad388 Shorten flag vars. 2015-12-05 12:55:15 -08:00
John-David Dalton
19500d36c7 Avoid fails in flowRight setup. 2015-12-05 12:55:15 -08:00
John-David Dalton
229f0b48cd Update perf/perf.js to correctly load libs when running from the command line. 2015-12-05 12:55:15 -08:00
John-David Dalton
58736f743e Add rangeRight to fp mapping. 2015-12-05 12:55:10 -08:00
John-David Dalton
dc136cbf31 Remove perf/run-perf.sh. 2015-12-03 18:00:00 -08:00
John-David Dalton
81e39f7c4b Add _.rangeRight docs. [ci skip] 2015-12-03 17:59:46 -08:00
John-David Dalton
1cbb6f1405 Add doc note to _.includes about string values. [ci skip] 2015-12-03 11:54:27 -08:00
John-David Dalton
1ae6e67cdc Add _.rangeRight. 2015-12-03 08:41:55 -08:00
John-David Dalton
3d43cc1029 Use "IE" instead of "Internet Explorer" in comment. [ci skip] 2015-12-01 10:10:29 -08:00
John-David Dalton
230e8d0787 Make build expose fp mapping in the dist. 2015-11-30 20:19:56 -08:00
John-David Dalton
8154e5e521 Fix argument juggling. 2015-11-30 20:18:08 -08:00
greenkeeperio-bot
f4467f6033 Update sauce-tunnel to 2.3.0. 2015-11-30 10:34:46 -08:00
Brian Mock
562b04a763 Update email address in CoC. [ci skip] 2015-11-29 15:18:12 -08:00
John-David Dalton
9bcbcc5293 Ensure _.clone handles generators correctly. 2015-11-29 17:00:45 -06:00
John-David Dalton
fdc15df3b3 Remove rhino testing. 2015-11-29 12:00:53 -06:00
John-David Dalton
e778458f78 Minor style tweak to _.overEvery test. 2015-11-29 00:09:13 -06:00
John-David Dalton
0a55eff5d5 Fix spread test fail. 2015-11-29 00:07:43 -06:00
John-David Dalton
3874b5bf84 Add semicolons. 2015-11-29 00:01:28 -06:00
John-David Dalton
d07343a1aa Use apply in more places. 2015-11-28 23:13:55 -06:00
John-David Dalton
a37c6db377 Use apply in _.invokeMap. 2015-11-28 10:02:42 -06:00
John-David Dalton
1f991a7cdc Rename binaryIndex and binaryIndexBy to baseSortedIndex and baseSortedIndexBy. 2015-11-28 00:42:05 -06:00
John-David Dalton
e99a31c2fa Update call and invocation use. [ci skip] 2015-11-27 20:18:09 -06:00
John-David Dalton
876fe52efc Describe HOT vars a bit more. [ci skip] 2015-11-27 20:16:11 -06:00
John-David Dalton
8f190b1fb1 Update Firefox in test/saucelabs.js. 2015-11-27 18:33:56 -06:00
John-David Dalton
411f3ecb3e Update benchmarks. 2015-11-27 18:33:50 -06:00
John-David Dalton
3d31423eef Remove thisArg param benchmarks. 2015-11-27 16:24:13 -06:00
John-David Dalton
68c0eb5216 Remove java scaffolding from benchmarks. 2015-11-27 16:23:51 -06:00
John-David Dalton
39dae19974 Update vendor/benchmark.js. 2015-11-27 16:19:39 -06:00
John-David Dalton
2dd6f0124e Infer sign of range's step when only start and end are provided. 2015-11-27 01:01:44 -06:00
John-David Dalton
826af968c8 Add baseTrim. 2015-11-26 23:17:44 -06:00
John-David Dalton
70c3d325a0 Infer sign of range's step when only end is provided. 2015-11-26 23:17:30 -06:00
John-David Dalton
6289211910 Update test.fp with over methods. 2015-11-25 12:48:38 -08:00
John-David Dalton
86346291a7 Update fp mapping for invoke. 2015-11-25 12:25:45 -08:00
John-David Dalton
05d57b90a9 Rename _.invokePath to _.invoke. 2015-11-25 12:07:13 -08:00
John-David Dalton
dd64f5eac4 Ensure _.flattenDeep works on arrays with circular references. [closes #1664] 2015-11-25 09:20:05 -08:00
John-David Dalton
e6de183651 Update jsdoc params for stack. [ci skip] 2015-11-25 09:20:05 -08:00
John-David Dalton
7bd986337a Add lazy invokeMap. 2015-11-24 23:20:18 -08:00
John-David Dalton
6dc92df880 Add implicit chaining test for _.invokePath. 2015-11-24 16:22:44 -08:00
John-David Dalton
44abe46da4 Rename _.invoke to _.invokeMap. 2015-11-24 16:22:40 -08:00
greenkeeperio-bot
9e334b5ece Update webpack to 1.12.9 & istanbul to 0.4.1. 2015-11-24 12:02:57 -08:00
John-David Dalton
ee8a248086 Add large array test for _.uniqBy and _.sortedUniqBy. 2015-11-24 12:02:57 -08:00
John-David Dalton
8f1f98b003 Add _.invokePath tests. 2015-11-24 12:02:57 -08:00
John-David Dalton
a6bc1fa316 Avoid set optimization if iteratee is provided to baseUniq. 2015-11-24 00:33:28 -08:00
John-David Dalton
ce6c0f3082 Add array path test for _.zipObject. 2015-11-23 21:48:10 -08:00
John-David Dalton
393849384b Update _.result doc example. [ci skip] 2015-11-23 00:00:49 -08:00
John-David Dalton
618280340f Cleanup function doc descriptions and params. [ci skip] 2015-11-23 00:00:24 -08:00
John-David Dalton
6b77af4e5a Add baseInvokePath. 2015-11-22 23:53:13 -08:00
John-David Dalton
aa8524b8ad Add _.flatMap chain sequence test. 2015-11-22 20:31:02 -08:00
John-David Dalton
87a813566a Expose _.invokePath. 2015-11-21 21:57:54 -08:00
John-David Dalton
73a97d5762 Reword chain sequence to sequence. 2015-11-21 12:20:55 -08:00
John-David Dalton
ce4c6ec755 Add _.flatMap test. 2015-11-21 00:16:23 -08:00
John-David Dalton
21b5139d98 Update fp mapping. 2015-11-21 00:12:23 -08:00
John-David Dalton
7745c91c69 Split _.fromPairs into _.zipObject. 2015-11-21 00:02:08 -08:00
John-David Dalton
bce8f498b4 Update _.map doc note on guarded methods. [ci skip] 2015-11-20 21:58:03 -08:00
John-David Dalton
7eaacc3997 Simplify wrapperReverse docs. [ci skip] 2015-11-20 21:57:40 -08:00
John-David Dalton
c699ff7574 Cleanup wrapperAt. 2015-11-20 21:57:17 -08:00
John-David Dalton
11d8867d7a Add _.flatMap. 2015-11-20 21:56:56 -08:00
greenkeeperio-bot
d4eeb8d186 Update dep packages. 2015-11-20 18:01:06 -08:00
John-David Dalton
a562a20b4e Ensure _.bindKey funcs call object[key] when called with the new operator. 2015-11-20 08:13:58 -08:00
John-David Dalton
3ecf626ad0 Update fp mapping. 2015-11-20 08:13:58 -08:00
John-David Dalton
766c4315e6 Rename _.pairs and _.zipObject to _.toPairs and _.fromPairs. 2015-11-20 08:13:51 -08:00
John-David Dalton
b9f2855034 Rename _.conj, _.disj, and _.juxt to _.overEvery, _.overSome, and _.over. 2015-11-19 08:18:32 -08:00
John-David Dalton
44397f79a6 Rename padLeft, padRight, trimLeft, and trimRight to padStart, padEnd, trimStart, and trimEnd. 2015-11-18 15:52:17 -08:00
John-David Dalton
dcca9b82b1 Add doc note to debounce and throttle about the arguments provided to the invoked func. [ci skip] 2015-11-18 15:52:17 -08:00
John-David Dalton
ecef32a101 Minor travis.yml nit. 2015-11-18 15:52:17 -08:00
John-David Dalton
41d425319c Fix core builds and test them. 2015-11-18 15:52:17 -08:00
John-David Dalton
6a49f227b4 Move sauce enviro var higher in travis.yml. 2015-11-18 15:52:16 -08:00
John-David Dalton
a3ced39b12 Use caret for platform.js dep range. 2015-11-18 15:52:16 -08:00
John-David Dalton
b89045b20f Remove unused case in apply. 2015-11-18 15:52:16 -08:00
John-David Dalton
4e3f3899c4 Add at to the lodash shortcut fusion doc note. [ci skip] 2015-11-18 15:52:16 -08:00
John-David Dalton
a8d865a246 Expose _.join. 2015-11-16 08:13:48 -08:00
John-David Dalton
cad0fbfc4d Ensure _.at works with an out of range index when chaining. 2015-11-15 23:44:46 -08:00
John-David Dalton
45f07d5014 Ensure shortcut fusion works for _.at with no indexes specified. 2015-11-15 23:44:45 -08:00
John-David Dalton
64a7503196 Add lazy at tests to ensure it works with string index values. 2015-11-15 23:44:45 -08:00
John-David Dalton
783c23cbfb Make _.at support shortcut fusion in a chain sequence when operating on an array and selecting a single index. [closes #1636] 2015-11-15 23:44:45 -08:00
John-David Dalton
1c04dfe083 Minor wording nit in test description. [ci skip] 2015-11-15 23:44:45 -08:00
John-David Dalton
59ec97f59f Ensure _.keys and _.keysIn skip "length" keys for strict mode arguments objects in Safari 9. 2015-11-14 13:00:12 -08:00
John-David Dalton
c71d26c7e8 Update lodash paths in test-ui.js and perf-ui.js. 2015-11-14 13:00:12 -08:00
John-David Dalton
88e58aa8f9 Update our CoC. [ci skip] 2015-11-14 13:00:12 -08:00
John-David Dalton
40850f9cda Update core builds. 2015-11-14 13:00:12 -08:00
John-David Dalton
be3afcf668 Ensure correct param order in fp.zip. 2015-11-12 09:56:24 -08:00
John-David Dalton
c1b7679cac Make _.times implicitly end a chain sequence. 2015-11-11 23:37:18 -08:00
John-David Dalton
a370c48d9c Rename wrapper param to wrapFunc. 2015-11-11 23:37:18 -08:00
John-David Dalton
6c0e456a5e Description cleanup for Math methods. [ci skip] 2015-11-11 23:37:18 -08:00
John-David Dalton
ebb993b862 Fix code style nits. 2015-11-10 23:58:50 -08:00
Agus Pina
3408db91b6 Add _.mean. 2015-11-10 23:56:07 -08:00
John-David Dalton
f0e8371997 Simplify function descriptions. [ci skip] 2015-11-10 23:34:53 -08:00
John-David Dalton
55383b9de4 Add apply doc block. [ci skip] 2015-11-10 23:34:20 -08:00
John-David Dalton
5551a8365a Cleanup wrapper functions. 2015-11-10 23:33:27 -08:00
John-David Dalton
87fc16af19 Cleanup createPartialWrapper. 2015-11-10 07:40:16 -08:00
John-David Dalton
80d91b693a Optimize createPartialWrapper. 2015-11-09 23:16:22 -08:00
John-David Dalton
977438309b Remove partials cleanup in createWrapper and move it to bind and bindKey. 2015-11-09 23:15:31 -08:00
John-David Dalton
28b426f19d Move createRecurryWrapper lower in source. 2015-11-09 20:09:30 -08:00
John-David Dalton
d40c5d3de8 Add createSet. 2015-11-09 20:09:25 -08:00
Jason Karns
53702774d0 upport deep paths as keys in _.zipObject. 2015-11-09 08:41:21 -08:00
John-David Dalton
b36e659c56 Avoid a circular dependency in createHybridWrapper. 2015-11-09 07:13:41 -08:00
John-David Dalton
0dcf028592 Split createHybridWrapper into createCurryWrapper and createRecurryWrapper. 2015-11-08 23:22:14 -08:00
John-David Dalton
549918d7f9 Update fp test for zipObject. 2015-11-08 21:04:40 -08:00
John-David Dalton
dcb23f46a4 Add concat to fp mapping. 2015-11-08 21:00:52 -08:00
John-David Dalton
c152ae71e2 Add add and subtract to fp mapping. 2015-11-08 20:56:19 -08:00
John-David Dalton
32cd726bd0 Move _#concat to _.concat. 2015-11-08 20:50:21 -08:00
John-David Dalton
4f104d74ca Rename baseIncludes to arrayIncludes and includesWith to arrayIncludesWith. 2015-11-08 19:43:36 -08:00
John-David Dalton
9c44430975 Rename _.includes param target to value. 2015-11-08 19:42:54 -08:00
John-David Dalton
1309f37a7e Cleanup comparator and iteratee param descriptions. [ci skip] 2015-11-08 19:41:05 -08:00
John-David Dalton
3ed0cc14ea Add subtract to lodash doc block. [ci skip] 2015-11-08 13:35:16 -08:00
John-David Dalton
73a698151f Cleanup _.sortedIndexBy and _.sortedLastIndexBy test. 2015-11-08 12:23:18 -08:00
John-David Dalton
8a3842b788 Ensure _.defaults assigns properties that shadow those on Object.prototype. 2015-11-08 12:16:47 -08:00
John-David Dalton
73d68c9609 Simplify NaN checks in tests. 2015-11-08 12:13:37 -08:00
DARCHY Jeremy
f6d81e1bd8 Add _.subtract. 2015-11-07 22:05:34 -08:00
John-David Dalton
98e607e610 Update ecstatic to 1.2.0, webpack to 1.12.3, & jscs to 2.5.1. 2015-11-06 10:54:22 -08:00
John-David Dalton
a7ec0c2e93 Fix fp alias assignments. 2015-11-05 15:10:28 -06:00
John-David Dalton
0b3e19f56e Use argument in place of parameter for test descriptions. [ci skip] 2015-11-05 15:10:11 -06:00
John-David Dalton
60ac7cfe74 Add conj, disj, and juxt to aryMethodMap. 2015-11-05 15:09:23 -06:00
John-David Dalton
491102f221 Correct arity mapping for _.uniqueId. 2015-11-05 09:09:34 -06:00
Xotic750
9db252e55d Cleanup baseFill. 2015-11-04 23:59:42 -06:00
Xotic750
b9b94609f5 Enhance _.debounce to use toNumber. 2015-11-04 23:19:59 -06:00
Xotic750
fe910d01f6 The_.throttle method uses _.debounce so no coersion of wait required. 2015-11-04 23:13:36 -06:00
Xotic750
ea71539b7a Enhance delay with toNumber to use binary and octal strings. 2015-11-04 14:30:36 -06:00
John-David Dalton
3d9fd1d374 Add fast path for falsey values in _.toInteger, _.toLength, _.toNumber, and _.toSafeInteger. 2015-11-03 07:22:00 -06:00
Xotic750
3eda8e64f3 Enhance createRound by using toNumber to allow binary and octal strings. 2015-11-03 06:22:26 -06:00
Xotic750
ec8ccbcc55 Enhance clamp with toNumber to allow binary and octal strings. 2015-11-03 06:13:10 -06:00
Xotic750
1d58823405 Enhance inRange with toNumber to allow binary and octal strings. 2015-11-03 06:13:10 -06:00
Xotic750
19e0650c4f Enhance random with toNumber to allow binary and octal strings. 2015-11-03 06:13:10 -06:00
Xotic750
f45fc10cb1 Enhance range with toNumber to allow binary and octal strings. 2015-11-03 11:35:33 +01:00
greenkeeperio-bot
42dff0e5fb Update fs-extra to 0.26.2. 2015-11-02 22:03:55 -06:00
John-David Dalton
ee9339e73b Add shortcut fusion heuristic note to lodash docs. [ci skip] 2015-11-02 13:12:44 -06:00
John-David Dalton
611aaa5385 Update doc examples of isInteger, isLength, isNumber, isSafeInteger, toInteger, toLength, toNumber, toSafeInteger, and toString. [ci skip] 2015-11-02 13:12:17 -06:00
Xotic750
e25369a306 Improve documents for _.toString by including examples. [ci skip] 2015-11-02 08:38:15 -08:00
Xotic750
67701944f1 Improve toNumber documentation by including examples. [ci skip] 2015-11-02 08:37:47 -08:00
Xotic750
ecaee16d23 Improve documentation of toLength by including examples. [ci skip] 2015-11-02 08:32:43 -08:00
John-David Dalton
b84c336855 Add _.unary tests. 2015-11-01 17:30:06 -08:00
John-David Dalton
447bafaa5b Add _.differenceWith, _.intersectionWith, _.unionWith, _.uniqWith, and _.xorWith` tests. 2015-11-01 17:15:45 -08:00
John-David Dalton
2f93e0a499 Fix failing test in Node < 0.12. 2015-11-01 15:41:19 -08:00
John-David Dalton
6c2ada9ffc Expose _.unary. 2015-11-01 15:21:50 -08:00
John-David Dalton
982b9d2b0a Use hexadecimal instead of hex for consistency. [ci skip] 2015-11-01 15:01:59 -08:00
John-David Dalton
1fe87d0348 Simplify reIsBinary. 2015-11-01 14:56:55 -08:00
John-David Dalton
8d8d4fa3b1 Use MAX_INTEGER instead of Number.MAX_VALUE. 2015-11-01 14:51:44 -08:00
John-David Dalton
94fb8c6f92 Add toNumber use to _.toInteger. 2015-11-01 14:51:25 -08:00
John-David Dalton
04c7b33f90 Cleanup tests. 2015-11-01 14:03:09 -08:00
John-David Dalton
ae76c3ee71 Cleanup _.toNumber test. 2015-11-01 13:43:38 -08:00
John-David Dalton
7d1e24d07f Update to Node 5 in travis tests. 2015-10-31 14:30:42 -07:00
Xotic750
37955345ef Add _.toNumber. 2015-10-31 14:30:10 -07:00
John-David Dalton
4bc35e9ed4 Remove internal isLength test since it's exposed now. 2015-10-31 12:23:03 -07:00
John-David Dalton
c142cfc81d Add "loosely" qualify to the _.isLength spec note. [ci skip] 2015-10-31 11:01:13 -07:00
John-David Dalton
39a22bf15b Cleanup _.toInteger and max MAX_INTEGER equal to Number.MAX_VALUE. 2015-10-31 10:49:40 -07:00
John-David Dalton
eb636f9538 Cleanup _.toLength tests. 2015-10-31 10:46:48 -07:00
John-David Dalton
8a838633d1 Cleanup lodash, isLength, and toLength docs. [ci skip] 2015-10-31 10:46:32 -07:00
John-David Dalton
963e297c74 Cleanup _.isLengh tests. 2015-10-30 23:01:25 -07:00
John-David Dalton
d95dbf6ba8 Simplify reIsUint. 2015-10-30 22:27:21 -07:00
John-David Dalton
ae032c8523 Cleanup isIndex tests. 2015-10-30 21:57:46 -07:00
Xotic750
2b4a10c159 Expose _.toLength. 2015-10-30 21:41:17 -07:00
Xotic750
c7ef030ef5 Improve reIsUint to filter strings like '0001' and add tests. 2015-10-30 21:41:16 -07:00
Xotic750
7e726735ba Expose _.isLength. 2015-10-30 21:40:53 -07:00
John-David Dalton
3d25b2fd9b Add _.differenceWith, _.intersectionWith, _.unionWith, _.uniqWith, and _.xorWith. 2015-10-30 10:04:10 -07:00
John-David Dalton
96a22aaec0 Make fp convert call noConflict. 2015-10-30 01:01:10 -07:00
greenkeeperio-bot
ccef887f88 Update jscs to 2.5.0. 2015-10-29 11:06:49 -07:00
John-David Dalton
7d9c6527a4 Add and update mutation notes for _.assign and _.assignIn. [ci skip] 2015-10-28 07:43:48 -07:00
John-David Dalton
ef7191dbc1 Move assignIn and assignInWith closer to assign. 2015-10-28 07:40:16 -07:00
John-David Dalton
bc2adb208c Ensure _.toString produces the correct result for Object(-0). 2015-10-28 07:29:20 -07:00
Xotic750
cd371ac66f Preserve sign of 0 in _.toString. 2015-10-28 00:04:15 -07:00
John-David Dalton
9c342eb432 Move _.extend and _.extendWith to alias and add _.assignIn and _.assignInWith. 2015-10-27 16:59:44 -07:00
greenkeeperio-bot
95f5b39aed Update qunitjs to 1.20.0. 2015-10-27 16:35:19 -07:00
John-David Dalton
9ce38cb43c Space nit in test catch block. 2015-10-27 08:37:28 -07:00
John-David Dalton
8b57b3086e Newline nit in _.valuesIn description. [ci skip] 2015-10-27 06:50:38 -07:00
John-David Dalton
3fdec6d25e Add missing comma to baseFind description. [ci skip] 2015-10-27 06:50:37 -07:00
John-David Dalton
557af10067 Add _.functionsIn and _.pairsIn. 2015-10-27 06:50:30 -07:00
John-David Dalton
6b2645b310 Add ramda aliases to fp mapping. 2015-10-27 00:55:01 -07:00
John-David Dalton
c360ee0fa4 Use number values for fp cap mapping. 2015-10-26 21:22:29 -07:00
John-David Dalton
3ac5870530 Run travis in its faster container-based infrastructure. 2015-10-26 15:31:58 -07:00
Xotic750
5218fd2c24 Rename _.trunc to _.truncate. 2015-10-26 15:19:10 -07:00
fdegiuli
accb8e9b07 Fix typo in _.sumBy examples. [ci skip] 2015-10-26 15:18:53 -07:00
greenkeeperio-bot
e331ea5d82 Update async to 1.5.0. 2015-10-25 19:03:25 -07:00
John-David Dalton
ae804b8cc7 Cleanup labels for modified sources tests. 2015-10-25 12:43:28 -07:00
John-David Dalton
66d72345f2 Ensure _.conforms functions return true when comparing an empty source. 2015-10-25 12:42:58 -07:00
John-David Dalton
436d64f881 Update fs-extra to version 0.26.0. 2015-10-25 11:42:19 -07:00
John-David Dalton
c3ec32cc16 Add empty invocation test to string methods test. 2015-10-25 11:42:03 -07:00
John-David Dalton
4b86df4966 Add _.template test for empty strings. 2015-10-25 11:42:03 -07:00
John-David Dalton
9fbf1955f2 Add more _.conforms tests. 2015-10-25 11:42:03 -07:00
John-David Dalton
2008a82017 Add _.conforms test. 2015-10-25 11:42:03 -07:00
John-David Dalton
8c04a00177 Newline nit. 2015-10-25 11:42:02 -07:00
John-David Dalton
8370277352 Move flow tests. 2015-10-25 11:42:02 -07:00
John-David Dalton
89279009d8 Ensure _.defaultsDeep doesn't attempt a merge of a string into an array. [closes #1560] 2015-10-25 11:42:02 -07:00
John-David Dalton
182b29662d Cleanup n to integer tests. 2015-10-24 11:26:50 -07:00
John-David Dalton
8119bcdc61 Add _.nthArg tests. 2015-10-24 11:24:46 -07:00
John-David Dalton
b6d40f75c9 Remove slower ipad run from sauce testing. 2015-10-24 11:11:41 -07:00
John-David Dalton
d9570e8223 Simplify lib/fp/fp.js. 2015-10-24 09:58:01 -07:00
John-David Dalton
3a0fc24a6a Allow _.flow and _.flowRight to accept an array of functions. 2015-10-24 09:08:19 -07:00
John-David Dalton
04879d0fe5 Update fp mapping for nthArg, modArgs, and modArgsSet. 2015-10-24 09:08:11 -07:00
John-David Dalton
0d9b03ced2 Move juxt, flow, and flowRight to the Utility category mapping. 2015-10-24 08:05:27 -07:00
John-David Dalton
7be7acfe30 Add _.nthArg. 2015-10-24 00:38:29 -07:00
John-David Dalton
655f7918ea Add _.conj, _.disj, and _.conforms to the lodash doc block. [ci skip] 2015-10-23 23:52:43 -07:00
John-David Dalton
67e799ccb2 Correct jsdoc param indicators for _.omit and _.pick. [ci skip] 2015-10-23 23:05:22 -07:00
John-David Dalton
4c12319d19 Reclassify _.conj and _.disj to the Utility category. 2015-10-23 23:04:12 -07:00
John-David Dalton
3769719816 Use undefined instead of nullish checks in baseConvert. 2015-10-23 22:13:21 -07:00
John-David Dalton
cc8e4956f5 Clarify docs of _.matches and _.modArgs methods. [ci skip] 2015-10-23 22:12:17 -07:00
John-David Dalton
3ad67c754f Add _.conforms. 2015-10-23 22:08:47 -07:00
John-David Dalton
cabd4198b0 Remove nativeMax and nativeMin use from _.clamp. 2015-10-23 16:25:22 -07:00
John-David Dalton
2bf80673ae Cleanup customizer doc examples. [ci skip] 2015-10-23 16:21:29 -07:00
John-David Dalton
2182e0696d Remove unmatched PATTERN3 in travis.yml. 2015-10-23 10:16:53 -07:00
John-David Dalton
9c44b5c384 Remove commented-out tests from travis.yml. 2015-10-23 10:07:08 -07:00
John-David Dalton
d5f51f2881 Rebuild dist. 2015-10-22 22:58:31 -07:00
John-David Dalton
176e17c45d Cleanup lib/fp/fp.js. 2015-10-22 22:57:33 -07:00
John-David Dalton
7912b08c41 Rename restParam to rest in aryMethodMap. 2015-10-22 22:50:56 -07:00
John-David Dalton
643ffce289 Fix aliasMap typo. 2015-10-22 22:49:56 -07:00
John-David Dalton
0d4d740961 Add fp tests. 2015-10-22 22:49:29 -07:00
John-David Dalton
68473f08d6 Add ./lib files to the jscs style check. 2015-10-22 21:17:59 -07:00
John-David Dalton
6c09a69991 Add clamp to fp mapping. 2015-10-22 21:11:07 -07:00
John-David Dalton
ac16bc0e15 Update build scripts. 2015-10-22 21:06:08 -07:00
John-David Dalton
99287a89eb Update bower.json. 2015-10-22 18:37:01 -07:00
John-David Dalton
e0aaf876c2 Combine _.toInteger and _.toSafeInteger tests. 2015-10-22 17:39:57 -07:00
John-David Dalton
022f79beed Add lodash chaining doc notes for _.clamp and _.toSafeInteger. [ci skip] 2015-10-22 17:35:41 -07:00
John-David Dalton
a6aac88561 Cleanup IEEE-754 doc references. [ci skip] 2015-10-22 17:35:41 -07:00
John-David Dalton
87057095bc Cleanup _.isSafeInteger description. [ci skip] 2015-10-22 17:35:40 -07:00
Xotic750
5afa75ce51 Add _.toSafeInteger. 2015-10-22 17:35:36 -07:00
John-David Dalton
c525598fd9 Add _.clamp test for just passing the max param. 2015-10-22 17:08:45 -07:00
John-David Dalton
f54cfb0ea2 Simplify resolving start in _.range. 2015-10-22 17:08:22 -07:00
John-David Dalton
91fcf837f7 Use strict equality undefined checks instead of nullish param checks in _.random. 2015-10-22 17:07:50 -07:00
John-David Dalton
64e98d897f Update tested browsers in test/saucelabs.js. 2015-10-22 06:24:21 -07:00
John-David Dalton
99a5fcc665 Fix typos in _.clamp test labels. 2015-10-21 22:15:17 -07:00
John-David Dalton
f0c38a6419 Use _.clamp in _.sampleSize, _.endsWith, and _.startsWith. 2015-10-21 22:11:41 -07:00
John-David Dalton
14c2747e80 Make min optional for _.clamp. 2015-10-21 22:10:05 -07:00
John-David Dalton
3ee2a15cde Cleanup test labels for -0. 2015-10-21 22:07:19 -07:00
John-David Dalton
8982578edd Ensure a _.range result can start with -0. 2015-10-21 22:05:29 -07:00
John-David Dalton
5ec6f1085a Ensure _.toInteger can return -0. 2015-10-21 22:04:14 -07:00
John-David Dalton
1513e46605 Use strict undefined comparisons where nullish aren't required. 2015-10-21 20:25:50 -07:00
Xotic750
b95ed73e1d Add _.clamp and tests. 2015-10-21 18:21:36 -07:00
Xotic750
ff22efb3e2 Add doc notes on IEEE 754-2008 and floating-point oddness. [ci skip] 2015-10-21 17:48:21 -07:00
John-David Dalton
35c6db1289 Add flush to debounced methods. 2015-10-21 17:48:01 -07:00
John-David Dalton
602e5d2766 Use 'a' for string tests instead of 'x'. 2015-10-20 22:37:27 -07:00
John-David Dalton
247c4f1068 Add identity helper to tests. 2015-10-20 22:10:33 -07:00
John-David Dalton
bdb5e4642f Add fp files. 2015-10-20 21:43:42 -07:00
John-David Dalton
661e9b08b6 Update jscs to version 2.3.5 and update istanbul to version 0.4.0. 2015-10-19 21:04:17 -07:00
John-David Dalton
fdf6478bc9 Use helper methods from the stable lodash release to test unstable bits. 2015-10-19 20:59:12 -07:00
John-David Dalton
10229cd332 Rename npm script from lint to style. 2015-10-19 20:57:12 -07:00
Kris Borchers
33e2499006 Fix JSCS name typo in CONTRIBUTING.md. 2015-10-19 20:57:12 -07:00
sfinktah
6ae58e74c7 Changed references to _.include to _.includes. 2015-10-16 13:10:44 -04:00
Mathias Bynens
689b292c24 Add _.lowerCase, _.lowerFirst, _.toLower, _.toUpper, _.upperCase, _.upperFirst tests. 2015-10-16 13:10:00 -04:00
John-David Dalton
f6a4ab62b8 Add _.toPath test for consecutive brackets and dots. 2015-10-15 06:08:30 -07:00
John-David Dalton
e197884e07 Add _.upperFirst and _.lowerFirst. 2015-10-15 04:09:01 -07:00
John-David Dalton
ba095d11cc Use an MDN url shortener. [ci skip] 2015-10-14 23:24:41 -07:00
John-David Dalton
e22cb5f3b3 Rename _.first to _.head, _.rest to _.tail, & _.restParam to _.rest. 2015-10-14 17:55:01 -07:00
greenkeeperio-bot
da993ee48d Update requirejs to version 2.1.20 and jscs to version 2.3.1. 2015-10-14 17:25:02 -07:00
John-David Dalton
9458759810 Change n params to number where appropriate. 2015-10-13 22:48:46 -07:00
Tejo Kumar Reddy Chenchu
dd27a0adc7 Fix rounding issue with the precision param of _.floor. 2015-10-13 22:42:36 -07:00
John-David Dalton
3fd276f8a6 Change version to 4.0.0-pre. 2015-10-13 09:43:11 -07:00
John-David Dalton
33f454bb75 Correct the jsdoc @name tag of the chain wrapper Symbol.iterator function. [ci skip] 2015-10-13 06:20:19 -07:00
John-David Dalton
1fd5d501b0 Ensure dummy exports and module are reset. 2015-10-13 00:38:16 -07:00
John-David Dalton
e4220282c8 Add _.conj and _.disj test for early exits. 2015-10-12 23:23:51 -07:00
Miro Mannino
6dec9cb831 Clarify exit early behavior in _.every doc and refine related test. 2015-10-12 23:23:03 -07:00
greenkeeperio-bot
1ad55ec263 Update coveralls to version 2.11.4. 2015-10-12 09:30:20 -07:00
John-David Dalton
96f5dbfccf Add bizarro _.memoize.Cache test. 2015-10-12 06:57:33 -07:00
John-David Dalton
fd2aa1f51c Add docdown dev dep. 2015-10-12 06:57:33 -07:00
John-David Dalton
74137d4eab Fix _.differenceBy doc example. [ci skip] 2015-10-12 06:57:33 -07:00
John-David Dalton
02398e319d Update lodash chaining doc notes. [ci skip] 2015-10-12 06:57:27 -07:00
John-David Dalton
32d6a04107 Use array.pop() instead of array.length-- in _.zipWith. 2015-10-11 23:31:04 -07:00
John-David Dalton
6bff374e91 Ensure _.intersectionBy doesn't treat iteratee as an empty array. 2015-10-11 23:31:04 -07:00
John-David Dalton
18b5cb24c2 Ensure baseIntersection doesn't transform array. 2015-10-11 23:31:04 -07:00
John-David Dalton
04e8ca771b Add _.differenceBy, _.intersectionBy, _.pullAllBy, _.unionBy, and _.xorBy tests. 2015-10-11 23:31:04 -07:00
John-David Dalton
174f771612 Add _.reverse test. 2015-10-11 21:34:50 -07:00
John-David Dalton
4f0a5e937b Add _.juxt tests. 2015-10-11 21:22:50 -07:00
John-David Dalton
505f02fd72 Expose _.reverse. 2015-10-11 17:05:25 -07:00
John-David Dalton
a6c7ffd664 Update istanbul to version 0.3.22 and request to version 2.65.0. 2015-10-11 17:03:55 -07:00
John-David Dalton
a08d52eb48 Ensure _.defaultsDeep doesn't modify sources. 2015-10-11 01:39:30 -07:00
John-David Dalton
414ad602f2 Add more tests for _.differenceBy, _.intersectionBy, _.unionBy, and _.xorBy. 2015-10-10 17:50:05 -07:00
greenkeeperio-bot
e961505e0a Update chalk to version 1.1.1 and ecstatic to v1.1.3. 2015-10-10 13:49:13 -07:00
John-David Dalton
59278a7a85 Reduce baseExtremum. 2015-10-09 12:59:14 -07:00
John-David Dalton
adaf6d7955 Tighten reBasicWord and reHasComplexWord. 2015-10-09 08:44:31 -07:00
greenkeeperio-bot
f6624bf270 Update request to version 2.64.0. 2015-10-09 08:03:57 -07:00
John-David Dalton
cdf03228c2 Minor test label nit of param to argument. 2015-10-08 23:41:49 -07:00
John-David Dalton
1fd710e88d Add _.word tests. 2015-10-08 23:41:43 -07:00
John-David Dalton
dc2e760b5a Add reHasComplexWord checks. 2015-10-08 23:31:52 -07:00
John-David Dalton
150bd32f97 Add _.toLower and _.toUpper. 2015-10-08 21:50:30 -07:00
John-David Dalton
d9fc0f1e37 Move dev deps in travis.yml to package.json. 2015-10-08 16:22:26 -07:00
John-David Dalton
e2c7e3a107 Avoid require in comments. [ci skip] 2015-10-08 10:45:46 -07:00
John-David Dalton
4995aa0298 Add a couple more math op chars in the latin-1 block for completeness. 2015-10-08 09:14:48 -07:00
John-David Dalton
54b774e481 Update _.lowerCase and _.upperCase doc examples. [ci skip] 2015-10-08 00:00:00 -07:00
John-David Dalton
c85095d53f Remove unused functions, vars, and params. 2015-10-07 23:54:33 -07:00
John-David Dalton
8132ed52fd Rename var rsJoiner to rsOptJoin to align with others. 2015-10-07 23:22:41 -07:00
John-David Dalton
eb723422c1 Update reWords detection. 2015-10-07 23:09:51 -07:00
John-David Dalton
051e5a6308 Clear args and thisArg in debounce cancel. 2015-10-07 13:21:52 -07:00
John-David Dalton
2d3e64b51a Correct _.pullAllBy doc example. [ci skip] 2015-10-07 00:23:02 -07:00
John-David Dalton
a21b25f751 Add _.differenceBy, _.intersectionBy, _.pickAllBy, _.unionBy, and _.xorBy tests. 2015-10-07 00:18:42 -07:00
John-David Dalton
1d425b1731 Make MapCache, SetCache, and Stack add values left to right. 2015-10-06 23:16:56 -07:00
John-David Dalton
141630f557 Add more MapCache and Stack tests. 2015-10-06 23:16:02 -07:00
John-David Dalton
9fd48bab69 Add bizarro Map tests. 2015-10-06 22:29:24 -07:00
John-David Dalton
f880e39838 Clarify bug comment of baseHas. [ci skip] 2015-10-06 20:11:31 -07:00
John-David Dalton
afb66f4b8a Remove unnecessary Map tests. 2015-10-06 19:53:01 -07:00
John-David Dalton
7e09802565 Reorganize clone tests. 2015-10-06 19:52:25 -07:00
John-David Dalton
a8b3833580 Add Stack test. 2015-10-06 19:51:25 -07:00
John-David Dalton
bf1bcaf394 Add _.cloneDeep test for objects with lots of circular references. 2015-10-06 08:16:22 -07:00
John-David Dalton
7b61569d32 Add bizarro tests for Object.create. 2015-10-06 08:15:07 -07:00
John-David Dalton
9c27ed8bda Remove nullish checks from baseHas and baseHasIn. 2015-10-06 07:07:49 -07:00
John-David Dalton
c9cb64ac10 Remove shim script tag in test/backbone.html. 2015-10-05 23:34:36 -07:00
John-David Dalton
4bd5122462 Update excused Underscore tests. 2015-10-05 23:34:16 -07:00
John-David Dalton
4dac4328e6 Minor whitespace nit in toPath doc example. 2015-10-05 21:57:04 -07:00
John-David Dalton
f7a857744f No longer coerce values to integers in add, max, min, or sum methods. 2015-10-05 21:56:32 -07:00
Droogans
6725e7dc49 Add _.upperCase and _.lowerCase. 2015-10-05 21:32:25 -07:00
John-David Dalton
7da4ea5ecb Simplify _.isFunction. 2015-10-05 11:06:49 -07:00
John-David Dalton
6d5c6b2de7 Optimize _.intersection and _.intersectionBy for empty arrays. 2015-10-05 10:53:41 -07:00
John-David Dalton
ed462747bf Minor ternary formatting. 2015-10-05 10:52:58 -07:00
John-David Dalton
53b37ca98f Use isObjectLike insteadof isObject in isArrayLikeObject. 2015-10-05 07:18:32 -07:00
John-David Dalton
423320f235 Remove unused variable push. 2015-10-05 07:18:13 -07:00
John-David Dalton
020a8c864f Adjust docs param descriptions and examples for xyzBy methods. [ci skip] 2015-10-04 23:00:50 -07:00
John-David Dalton
69e6389369 Add _.differenceBy, _.intersectionBy, _.isArrayLikeObject, _.pullAllBy, _.unionBy, and _.xorBy. 2015-10-04 23:00:30 -07:00
John-David Dalton
0eaa10f578 Adjust stackSet array length check to be consistent with others like it. 2015-10-04 21:39:43 -07:00
John-David Dalton
2740dc5efa Move assocIndexOf closer to other assoc functions. 2015-10-04 14:40:00 -07:00
John-David Dalton
592824781c Make isArrayLike use isFunction. 2015-10-04 14:09:25 -07:00
John-David Dalton
4bef0e21e7 Create getTag helper. 2015-10-04 14:04:49 -07:00
John-David Dalton
7d7ce728ff Fix npm builds. 2015-10-04 00:17:05 -07:00
John-David Dalton
27159cfa00 Move Hash definition above MapCache. 2015-10-03 22:51:56 -07:00
John-David Dalton
d236e37652 Add Stack helpers. 2015-10-03 22:41:06 -07:00
John-David Dalton
940559fc76 Optimize cacheIndexOf, cachePush, and isKeyable. 2015-10-03 16:27:21 -07:00
John-David Dalton
5746169aec Replace createHash with a Hash constructor. 2015-10-03 11:42:30 -07:00
John-David Dalton
4aa6fdeb2a Move assoc and hash functions closer together. 2015-10-01 23:20:32 -07:00
John-David Dalton
77ab121c30 Cleanup bizarro scaffolding in test/test.js. 2015-10-01 22:34:33 -07:00
John-David Dalton
9558048906 Avoid a hasOwnProperty bug in IE 10-11 where objects with a [[Prototype]] of null incorrectly report false for own index properties. 2015-10-01 22:22:05 -07:00
John-David Dalton
b3f6426d36 Add assoc and hash helpers. 2015-10-01 22:21:58 -07:00
John-David Dalton
d407d8aa08 Ensure _.isFunction returns true for generator functions. [closes #1498] 2015-10-01 09:00:00 -07:00
John-David Dalton
8842fa209d Swap createWrapper with alternatives in _.bindAll and _.wrap. 2015-10-01 08:22:12 -07:00
John-David Dalton
bc252228e1 Add bizarro Map. 2015-09-30 23:08:11 -07:00
John-David Dalton
1b3cb0f184 Combine MemCache and Stack into MapCache. 2015-09-30 23:07:03 -07:00
John-David Dalton
f607c671f8 Add a Stack cache helper to avoid linear search of stacks in modern environments. 2015-09-30 20:46:18 -07:00
John-David Dalton
8f431cff52 Cleanup _.every and _.some tests. 2015-09-29 08:16:36 -07:00
John-David Dalton
6a81a7ba8e Add _.conj and _.disj tests. 2015-09-29 08:16:23 -07:00
John-David Dalton
1f713ed9d1 Add more wrapper tests. 2015-09-27 23:01:46 -07:00
John-David Dalton
2cb4829536 Make _.words chainable by default. 2015-09-27 23:01:46 -07:00
John-David Dalton
48d5110b5d Remove wrapperToString. 2015-09-27 23:01:46 -07:00
John-David Dalton
68a5e2017e Make _.drop, _.dropRight, _.take, _.takeRight coerce n of undefined to 0. 2015-09-27 23:01:46 -07:00
John-David Dalton
63c46a9aca Minor space nit in test/test.js. [ci skip] 2015-09-27 23:01:45 -07:00
John-David Dalton
528bec0bb1 Add _.sampleSize. 2015-09-27 23:01:40 -07:00
John-David Dalton
9c79cb7766 Add _.pullAll. 2015-09-27 16:33:10 -07:00
John-David Dalton
38ac518095 Add _#toString test for nullish values. 2015-09-27 10:03:43 -07:00
John-David Dalton
7488068d50 Add support for combining diacritical marks to _.toArray. 2015-09-25 22:27:31 -07:00
John-David Dalton
8e207196d3 Expose _.toString. 2015-09-25 19:51:41 -07:00
John-David Dalton
9c35db38a0 Exit early in baseToString if value is already a string. 2015-09-25 16:28:13 -07:00
John-David Dalton
2087736649 Add support for unicode modifiers. 2015-09-25 01:26:15 -07:00
Tim Ruffles
dd75deb27f Clarify the order in which sources are applied in docs of _.assign, _.defaults, and _.merge. [ci skip] 2015-09-24 08:21:57 -07:00
John-David Dalton
5f42a3d4db Minor createInvoker param description nit. [ci skip] 2015-09-24 00:56:17 -07:00
John-David Dalton
a569b723c5 Use getIteratee in createModArgs. 2015-09-23 23:53:50 -07:00
John-David Dalton
ee2078f3ea Add _.conj, _.disj, & _.juxt. 2015-09-23 22:45:55 -07:00
John-David Dalton
12af298e33 Cleanup doc descriptions for _.modArgs and _.modArgsSet. [ci skip] 2015-09-23 22:45:35 -07:00
John-David Dalton
0429f27c54 Cleanup doc examples for lodash and _.map. [ci skip] 2015-09-23 22:44:53 -07:00
John-David Dalton
5026f51dfd Add accumulator doc note to _.unzipWith and _.zipWith. [closes #1484] [ci skip] 2015-09-23 19:34:07 -07:00
Thomas Reggi
80abaafcae Fix typo "occurence" to "occurrence". [ci skip] 2015-09-23 19:05:19 -07:00
Anderson Aguiar
bc651e886d Fix typo in comment 2015-09-22 22:06:00 -03:00
John-David Dalton
ba9cfc3b26 Clarify baseToString and other converter method docs. [ci skip] 2015-09-22 00:35:24 -07:00
John-David Dalton
b5bbc18c89 Add _#next test for _.toArray results. 2015-09-20 17:09:48 -07:00
John-David Dalton
e35088f9e3 Add dingbat support to _.words. 2015-09-20 12:58:17 -07:00
John-David Dalton
1c3b325633 Cleanup astral tests. 2015-09-20 12:57:40 -07:00
John-David Dalton
0415701e50 Add tests for variation selectors. 2015-09-20 11:59:29 -07:00
John-David Dalton
cfe813fa08 Add regional indicator tests. 2015-09-20 11:59:23 -07:00
John-David Dalton
f4ff336636 Add _.trunc tests for astrals as separators. 2015-09-20 11:58:24 -07:00
John-David Dalton
a4b333ceb8 Use _.toArray in wrapperNext. 2015-09-19 10:34:14 -07:00
John-David Dalton
f029d7c943 Add support for variation selectors. 2015-09-19 10:34:14 -07:00
John-David Dalton
53bf94ce78 Expand existing support for zero-width-joiners. 2015-09-18 15:30:12 -07:00
John-David Dalton
406e36977e Add support for regional indicator symbols and zero-width-joiners. 2015-09-18 01:28:31 -07:00
John-David Dalton
98ee746ada Move _.isArguments checks further down. 2015-09-16 19:11:52 -07:00
John-David Dalton
9e0a22f771 Cleanup and formatting pass. 2015-09-16 19:10:19 -07:00
John-David Dalton
14e62ae8d2 Make _.isString use _.isArray to reduce usage patterns. 2015-09-16 19:09:16 -07:00
John-David Dalton
1162d2edd5 Update _.toInteger test to ensure proper rounding. 2015-09-16 08:33:56 -07:00
John-David Dalton
a84e44b2a3 Use MAX_ARRAY_LENGTH instead of INFINITY for the default __takeCount__ value. 2015-09-15 23:48:36 -07:00
John-David Dalton
cd4f278a16 Add _.toInteger test for negative floats. 2015-09-15 23:45:25 -07:00
John-David Dalton
c7f34e74ac Add _.isInteger and _.isSafeInteger tests. 2015-09-15 23:42:15 -07:00
John-David Dalton
00d26a6419 Attempt again to ensure again _.toInteger converts Infinity to an integer. 2015-09-15 23:41:53 -07:00
John-David Dalton
eb57e522aa Cleanup isXyz tests. 2015-09-15 23:38:36 -07:00
John-David Dalton
e9230463e8 Fix host object tests for _.isInteger and _.isSafeInteger. 2015-09-15 22:08:51 -07:00
John-David Dalton
d652f144b2 Continue astral symbol support in _.trunc. 2015-09-15 20:40:49 -07:00
John-David Dalton
e04a512c4c Update _.isFinite doc examples. [ci skip] 2015-09-15 20:39:51 -07:00
John-David Dalton
c276278767 Use stringToArray more in _.trimLeft and _.trimRight. 2015-09-15 20:39:31 -07:00
John-David Dalton
2e248d1ca8 Ensure _.toInteger converts Infinity to an integer. 2015-09-15 20:37:53 -07:00
John-David Dalton
a5df55a6e7 Update constant references. 2015-09-15 20:36:35 -07:00
John-David Dalton
f7e05e438e Avoid creating an array in stringSize. 2015-09-15 20:34:11 -07:00
John-David Dalton
49266dce89 Add _.isInteger and _.isSafeInteger. 2015-09-15 20:33:36 -07:00
John-David Dalton
3a81738455 Collapse ranges. 2015-09-15 01:09:47 -07:00
John-David Dalton
a4ff501bb1 Add _.toArray test for empty strings. 2015-09-15 00:41:03 -07:00
John-David Dalton
351c131764 Use more stringToArray. 2015-09-15 00:34:42 -07:00
John-David Dalton
799fcb354b Pass style linting. 2015-09-15 00:23:54 -07:00
John-David Dalton
16a29659b3 Add tests for lone surrogates. 2015-09-15 00:02:45 -07:00
John-David Dalton
55ef0f12cc Rework charsLeftIndex and charsRightIndex to pass tests. 2015-09-14 23:45:18 -07:00
John-David Dalton
925c489cf9 Add more astral symbol tests. 2015-09-14 22:47:06 -07:00
John-David Dalton
3f57236c19 Cleanup charsLeftIndex, charsRightIndex, capitalize, and trim methods. 2015-09-14 21:06:28 -07:00
John-David Dalton
b4dd21fc64 First pass at astral symbols tests. 2015-09-14 18:10:11 -07:00
John-David Dalton
8278b1e79f Make _.startCase use _.capitalize. 2015-09-14 18:03:32 -07:00
John-David Dalton
c313f0c135 Minor cleanup to reWords. 2015-09-14 13:24:06 -07:00
John-David Dalton
e9bfaa7d51 Add support for astral symbols to _.camelCase, _.capitalize, _.startCase, and _.words. 2015-09-14 10:38:00 -07:00
John-David Dalton
0ae254d6b4 Add stringToArray helper. 2015-09-14 08:21:48 -07:00
John-David Dalton
bbc7b0b59b Move _.repeat empty string check to the left. 2015-09-14 01:09:54 -07:00
John-David Dalton
7f284d6ed5 Reduce _.forEach iteration note. [ci skip] 2015-09-14 01:09:04 -07:00
John-David Dalton
4744f93a47 Remove unneeded _.runInContext comment block. [ci skip] 2015-09-14 01:07:51 -07:00
John-David Dalton
a2fe87a63a Make regexp var name singular. 2015-09-14 01:07:12 -07:00
John-David Dalton
fa61e30dd5 Add support for astral symbols in string methods. [closes #1463] 2015-09-14 01:06:40 -07:00
John-David Dalton
0fb94ad3c6 Minor formatting nit. 2015-09-13 22:08:14 -07:00
John-David Dalton
33a73fb0c4 Cleanup other realm tests. 2015-09-13 22:08:08 -07:00
John-David Dalton
a61eeeaa03 Minor formatting cleanup in travis.yml. 2015-09-13 10:19:49 -07:00
John-David Dalton
80f6990a43 Remove value guards in baseDifference and baseSortedUniqBy. 2015-09-12 22:29:19 -07:00
John-David Dalton
0d5f8437f5 Indentation nit in baseTimes. 2015-09-12 22:28:46 -07:00
John-David Dalton
5e968deb4e Add more source replacements to travis.yml. 2015-09-12 20:52:40 -07:00
John-David Dalton
ac1ffa2efe Cleanup _.merge tests. 2015-09-12 09:53:30 -07:00
John-David Dalton
ed2e6d16c8 Add more _.merge tests for arguments. 2015-09-12 09:53:30 -07:00
John-David Dalton
dafe807888 Ensure _.merge doesn't modify array/typed-array/plain-object source values. 2015-09-12 09:53:25 -07:00
John-David Dalton
1320706172 Make _.merge source object assignments align with source array assignments. 2015-09-12 00:00:13 -07:00
John-David Dalton
fb4cf9e78f Cleanup _.assign and _.extend docs. [ci skip] 2015-09-11 23:47:32 -07:00
Rhys van der Waerden
8cbb8befd4 Clarify _.merge description. [ci skip]
Mention behaviour difference between merging plain objects and objects with non-Object prototypes. As discussed in #1455.
2015-09-11 23:46:27 -07:00
John-David Dalton
aa303df387 Update core builds. 2015-09-11 18:25:03 -07:00
John-David Dalton
e42d29611c Ensure wrapper actions are copied in wrapperClone. 2015-09-11 18:22:34 -07:00
John-David Dalton
a5213f1291 Add strict equal fast path for object comparisons in equalObjects. 2015-09-11 18:03:20 -07:00
John-David Dalton
875dfec570 Add tag checks back to baseIsEqualDeep. 2015-09-11 18:02:49 -07:00
John-David Dalton
6edde288ee Add requireDotNotation rule to jscsrc. 2015-09-11 18:02:19 -07:00
John-David Dalton
a6ead18121 Avoid deep crawl if object and source are strict equal. 2015-09-11 12:57:34 -07:00
John-David Dalton
7245570405 Cleanup, organize, and group jscs rules. 2015-09-11 00:26:05 -07:00
John-David Dalton
38a37f1b18 Use === in _.isEqual doc example. [ci skip] 2015-09-10 19:08:07 -07:00
John-David Dalton
5c98ab4b8f Simplify doc examples that use Math methods. [ci skip] 2015-09-10 19:07:37 -07:00
John-David Dalton
5ddb1ef76d Remove duplicate jsdoc param from equalObjects docs. [ci skip] 2015-09-10 19:06:56 -07:00
John-David Dalton
8b320f913d Remove unneeded type check from createRound. 2015-09-10 19:06:08 -07:00
John-David Dalton
8e0011d07a Ensure clone methods create maps and sets from other realms. 2015-09-10 19:05:25 -07:00
John-David Dalton
e50734a6fb Update jscs rules. 2015-09-10 19:03:53 -07:00
John-David Dalton
307dae4fac Adjust _.omit and _.pickBy doc examples to show more of a difference between them. [ci skip] 2015-09-10 07:38:56 -07:00
John-David Dalton
d8c5f85cd2 Add _.modArgsSet tests. 2015-09-09 23:45:37 -07:00
John-David Dalton
94c95469e1 Minor test cleanup. 2015-09-09 22:59:37 -07:00
John-David Dalton
e8244f7f07 Adjust property descriptors in tests. 2015-09-09 22:59:37 -07:00
John-David Dalton
a48f48ca95 Ensure _.merge skips merging when object and source are the same value. 2015-09-09 22:59:29 -07:00
John-David Dalton
4a4e54479a Ensure _.merge assigns typed arrays directly. [closes #1453] 2015-09-09 22:10:23 -07:00
John-David Dalton
86d06e0a4c Cleanup _.merge tests. 2015-09-09 22:09:10 -07:00
John-David Dalton
9b41ae847b Consolidate this binding tests. 2015-09-09 20:44:58 -07:00
Ilya Mochalov
012cc521f5 Minor _.plant doc fix. [ci skip] 2015-09-09 18:11:40 -07:00
John-David Dalton
20695548f1 Use more pre-QUnit 2.0 APIs. 2015-09-09 18:05:48 -07:00
John-David Dalton
d77c5123c1 Add _.flip and _.modArgsSet to lodash doc note. [ci skip] 2015-09-09 10:34:50 -07:00
John-David Dalton
c32a6837e6 Update _.flip doc example and test to better show effect. 2015-09-09 10:29:43 -07:00
John-David Dalton
c604be31e0 Add _.flip test. 2015-09-09 08:31:28 -07:00
John-David Dalton
0a08edb6d7 Remove second _.rearg example. [ci skip] 2015-09-09 08:31:19 -07:00
John-David Dalton
4d7aeb8b96 Don't flip if there's less than 2 arguments. 2015-09-09 08:31:03 -07:00
John-David Dalton
6b09f1f233 Remove iojs from travis-yml tests. 2015-09-08 22:51:46 -07:00
Phillip Alexander
7364c84b6b Add Node.js v4 stable to Travis config.
NodeJS v4 was just released [NodeJS v4 announcement](https://nodejs.org/en/blog/release/v4.0.0/). This updates the CI build script to accommodate the release. Note: It should be "4", not "4.0" since Node will surely get a lot of minor updates before it goes LTS and reveal.js should test on the latest of them.
2015-09-08 22:49:16 -07:00
John-David Dalton
02a28d565b Add _.flip. [closes #1449] 2015-09-08 22:48:37 -07:00
John-David Dalton
2ac6e31cc3 Update QUnit to 1.19.0. 2015-09-08 22:34:19 -07:00
John-David Dalton
8bad4ae636 Rename multiValue param to multiVal. [ci skip] 2015-09-07 23:35:06 -07:00
John-David Dalton
f0010ea3a8 Add additional guard to isCombo check in mergeData. 2015-09-07 23:32:16 -07:00
John-David Dalton
f86bff3bf7 Minor _.modArgsSet doc example tweak. [ci skip] 2015-09-07 22:29:13 -07:00
John-David Dalton
99b0094dcd Minor code style nit in tests. [ci skip] 2015-09-07 22:14:20 -07:00
John-David Dalton
db86a6ff1c Simplify _.isMatch set test. 2015-09-07 22:05:44 -07:00
John-David Dalton
cbc188916d Fix typo and fail in _.isMatch test. 2015-09-07 21:59:57 -07:00
John-David Dalton
2f411230c5 Add _.isEqualWith and _.isMatchWith tests for maps and sets. 2015-09-07 21:36:49 -07:00
John-David Dalton
b9c8c877b7 Minor contributing text nit, new methods to functions. [ci skip] 2015-09-07 20:37:07 -07:00
John-David Dalton
13e4ba622e Add code of conduct doc. [ci skip] 2015-09-07 20:33:15 -07:00
John-David Dalton
7863256de5 Add map and set guards to tests to fix travis runs. 2015-09-06 22:41:07 -07:00
John-David Dalton
d81e029ec0 Add _.isMatchWith tests. 2015-09-06 22:32:09 -07:00
John-David Dalton
f6500eafb6 Cleanup _.isMatch tests. 2015-09-06 22:31:39 -07:00
John-David Dalton
9da03f529f Ensure equalByTag passing customizer to equalFunc. 2015-09-06 21:05:05 -07:00
John-David Dalton
1e1e4fd557 Add _.matches and _.matchesProperty tests for partial matching maps and sets. 2015-09-06 20:42:15 -07:00
John-David Dalton
08f8e659fd Cleanup _.matches and _.matchesProperty tests. 2015-09-06 20:35:43 -07:00
John-David Dalton
fc69fe1f21 Use map.size and set.size in mapToArray and setToArray. 2015-09-06 18:00:28 -07:00
John-David Dalton
38a16805ed Optimize map and set comparisons in _.isEqual. 2015-09-06 17:01:17 -07:00
John-David Dalton
dfd4ae9ea4 Add _.modArgsSet. 2015-09-05 22:29:38 -07:00
John-David Dalton
5c9585b2b0 Ensure correct execution order of _.modArgs transforms. 2015-09-05 22:29:11 -07:00
John-David Dalton
dc2e769d9a Ensure _.toPath converts array values to strings. 2015-09-05 11:25:06 -07:00
John-David Dalton
15a4fb7adf Add _.toPath tests. 2015-09-05 10:00:21 -07:00
John-David Dalton
7bb10d56f8 Add _.toPath doc examples. [ci skip] 2015-09-05 10:00:08 -07:00
John-David Dalton
650282b186 Add console.logs to doc examples. [ci skip] 2015-09-05 09:59:38 -07:00
John-David Dalton
ded3cfc251 Add _.toInteger tests. 2015-09-05 09:31:37 -07:00
John-David Dalton
a4fee3a3ad Add _.isObjectLike tests. 2015-09-05 09:26:09 -07:00
John-David Dalton
58d7404ee4 Add a _.memoize test for the this binding of resolver. 2015-09-05 09:14:38 -07:00
John-David Dalton
556eee8563 Use a create function helper for modArgs. 2015-09-05 09:04:46 -07:00
John-David Dalton
1422f50ee9 Remove isStrict guards from tests. 2015-09-05 01:05:39 -07:00
Philippe Lhoste
1be4adf365 Improve documentation for method chaining. [ci skip] 2015-09-05 01:05:39 -07:00
John-David Dalton
4510ada21e Update lodash doc block. [ci skip] 2015-09-05 01:05:39 -07:00
John-David Dalton
e516d99b2d Expose _.toInteger. 2015-09-04 08:35:36 -07:00
John-David Dalton
b534b83756 Fix failing tests in strict mode. 2015-09-04 01:02:47 -07:00
John-David Dalton
41b537249b Expose _.isObjectLike and _.toPath. 2015-09-04 00:55:34 -07:00
John-David Dalton
4a87acf1ac Remove "Number" and "String" from contextProps. 2015-09-04 00:55:16 -07:00
John-David Dalton
41d3b66867 Move NEGATIVE_INFINITY and POSITIVE_INFINITY out of runInContext. 2015-09-04 00:36:34 -07:00
John-David Dalton
3ef7ae24e5 Expose _.isArrayLike. 2015-09-03 22:08:02 -07:00
John-David Dalton
824d3b75f9 Add Safari 8.1 note to _.isArguments. [ci skip] 2015-09-03 20:05:39 -07:00
John-David Dalton
38a802fed3 Fix _.isArguments in Safari 8.1. 2015-09-03 19:53:11 -07:00
John-David Dalton
ee776fd0de Add IE11 note to noMapSetTag definition. [ci skip] 2015-09-03 19:53:11 -07:00
John-David Dalton
a1f29d8f4a Cleanup get/set/unset tests. 2015-09-03 18:28:57 -07:00
John-David Dalton
3e42a817a1 Fix failing map/set tests in IE11. 2015-09-03 15:22:21 -07:00
John-David Dalton
617dd703e1 Soften language on isXyz methods that use duck typing. [ci skip] 2015-09-03 15:22:21 -07:00
John-David Dalton
e63d7ff9d5 Rename var initFromArray to initFromCollection in _.reduce and _.reduceRight. 2015-09-03 15:21:12 -07:00
Ray Hammond
7e73b27edf Updated contributing text to include code style linter details. [ci skip] 2015-09-03 12:54:47 -07:00
Michał Lipiński
6898b896d1 Add _.unset. 2015-09-03 09:28:06 -07:00
John-David Dalton
085e2c24d3 Remove weakmap and set shims. 2015-09-03 09:18:10 -07:00
John-David Dalton
cc77eb7855 Change augment to modify. [ci skip] 2015-09-03 09:06:16 -07:00
John-David Dalton
8e9f9f6f2f Detect maps and sets in IE11. 2015-09-03 09:02:33 -07:00
John-David Dalton
51006e8304 Tweak test try-catch style to be consistent with lodash. 2015-09-03 08:22:33 -07:00
Ray Hammond
fce2bd89c7 Added jscs code style checker. 2015-09-03 08:19:41 -07:00
John-David Dalton
830be3d918 Add strict mode test for _.isArguments. 2015-09-02 22:56:25 -07:00
John-David Dalton
0926e5a986 Fix test errors in IE9. 2015-09-02 16:59:42 -07:00
Ray Hammond
b61411956c Missing semicolon linting fixes to test.js. 2015-09-02 11:44:23 -07:00
John-David Dalton
5648fe940c Add MS Edge testing with saucelabs. 2015-09-02 08:45:44 -07:00
Ray Hammond
57ad32448f Added missing semicolon. 2015-09-02 08:45:34 -07:00
John-David Dalton
b4db3c050d Ensure _.isEqual performs unordered comparisons of maps and sets. 2015-09-01 21:50:28 -07:00
John-David Dalton
3f954ca790 Add _.isEqual tests for maps and sets. 2015-09-01 01:17:15 -07:00
John-David Dalton
6e0174e879 Cleanup _.isEqual tests. 2015-09-01 00:46:55 -07:00
John-David Dalton
e4873f1982 Add map and set tests for clone methods. 2015-09-01 00:37:37 -07:00
John-David Dalton
3d35817a2f Add _.toArray tests for ES6 iterables. 2015-09-01 00:23:08 -07:00
John-David Dalton
8c6aef3edb Cleanup newlines and semicolons. 2015-08-31 23:32:07 -07:00
John-David Dalton
5fd8939b7d Add Symbol.iterator guards to tests. 2015-08-31 19:40:32 -07:00
John-David Dalton
4c1b578b80 Add _#plant test for cloned chainAll settings. 2015-08-31 19:16:00 -07:00
John-David Dalton
f6bf81d16f More test cleanup. 2015-08-31 19:11:29 -07:00
John-David Dalton
2d8cc57642 Ensure _#plant resets iterator data of the cloned sequence. 2015-08-31 18:47:37 -07:00
John-David Dalton
3b131f0231 Add coverage for wrapped[Symbol.iterator]. 2015-08-31 18:04:07 -07:00
John-David Dalton
202ce472bb Cleanup tests. 2015-08-31 17:54:06 -07:00
John-David Dalton
7206edec2e Cleanup .next tests. 2015-08-31 17:52:32 -07:00
John-David Dalton
9e86efadbc Make the chain wrapper iterable. 2015-08-30 23:40:34 -07:00
Graeme Yeates
433331adac Add ES6 compliant lodash(...).next() iterator. 2015-08-30 22:47:32 -07:00
John-David Dalton
a0cd024b39 Add checks to iteratorSymbol assignment. 2015-08-30 10:09:28 -07:00
John-David Dalton
4fbb31b4dc Adjust Set references to fix the build. 2015-08-30 09:59:19 -07:00
John-David Dalton
09bcc5aaec Move more functions out of runInContext. 2015-08-30 09:37:23 -07:00
John-David Dalton
c921c9bd12 Add support for ES6 Set/Map to _.clone/_.isEqual/_.toArray and iterator support to _.toArray. 2015-08-30 08:58:12 -07:00
John-David Dalton
8f621b38bf Update builds. 2015-08-30 05:12:06 -07:00
John-David Dalton
257d957dfb Add baseSortedUniqBy. 2015-08-30 05:12:06 -07:00
John-David Dalton
a0a6f0ae87 Correct arity hints for baseSortByOrder and createAggregator. 2015-08-30 04:55:05 -07:00
John-David Dalton
c396b60612 Cleanup _.pairs and _.invert. 2015-08-30 04:45:49 -07:00
John-David Dalton
98a97b1eaf Use arrayReduce in baseWrapperValue and _.invert, arrayEach in _.bindAll, and baseTimes in _.unzip. 2015-08-30 04:27:52 -07:00
John-David Dalton
7d6fcc75da Use arrayReduce in basePick. 2015-08-30 03:56:14 -07:00
Nathan Bellowe
ecd8b7f614 Update _.modArgs doc example to better show the method's affect. [ci skip] 2015-08-30 03:56:07 -07:00
John-David Dalton
cc1bcc25b9 Enable phantomjs tests in travis.yml. 2015-08-29 14:31:08 -07:00
John-David Dalton
b792276a00 Update PATTERN2 in travis.yml. 2015-08-29 13:33:08 -07:00
John-David Dalton
b1d52ccd82 Rename _.indexBy to _.keyBy to avoid confusion with _.sortedIndexBy forms. 2015-08-29 13:33:08 -07:00
John-David Dalton
cc0e91ac2f Remove duplicated tests. 2015-08-29 10:52:23 -07:00
John-David Dalton
dfac7b4261 Make _.xyzBy methods provide just a single param to their callbacks. 2015-08-29 10:52:02 -07:00
John-David Dalton
1258eef213 Use toInteger in _.repeat. 2015-08-29 09:18:33 -07:00
John-David Dalton
f79148fa62 Rename arraySum to baseSum. 2015-08-29 09:16:48 -07:00
John-David Dalton
4d2aa29926 Simplify baseValues, createCompounder, initKeys, _.after, _.pairs, _.range, & _.times. 2015-08-29 09:15:47 -07:00
John-David Dalton
f016840c53 Correct baseSortedUniqBy. 2015-08-29 09:10:29 -07:00
John-David Dalton
cffeec4713 Cleanup baseSortedUniq and add more uniq related tests. 2015-08-28 08:53:05 -07:00
John-David Dalton
fcbe4620cd Simplify baseFunctions. 2015-08-28 08:15:50 -07:00
John-David Dalton
5a5e0363c2 Remove Chakra check as they've resolve their 'vm' issue. 2015-08-27 10:39:23 -07:00
John-David Dalton
64512ee2ae Fix skipTest count for _.isNil other realm test. 2015-08-27 10:23:57 -07:00
John-David Dalton
ce4f2f1326 Ensure _.merge merges plain-objects onto non plain-objects. [closes #1413] 2015-08-27 09:21:37 -07:00
John-David Dalton
dfebb83c35 Update excused Underscore tests. 2015-08-26 22:43:02 -07:00
John-David Dalton
0ba226e3c2 Fix test fails and _.uniqBy use baseUniqBy. 2015-08-26 22:21:18 -07:00
John-David Dalton
e0f59eccf0 Formatting nit in baseWhile. 2015-08-26 21:43:52 -07:00
John-David Dalton
820e720b0a Cleanup various method descriptions. [ci skip] 2015-08-26 21:43:37 -07:00
John-David Dalton
936c5f5d3d Add baseUniqBy. 2015-08-26 21:43:12 -07:00
John-David Dalton
d0b3b8de44 Minor test cleanup. 2015-08-26 08:30:22 -07:00
John-David Dalton
89d53306f3 Use toInteger in pad methods and make nullish chars checks in pad and trim methods undefined checks. 2015-08-26 08:30:06 -07:00
John-David Dalton
e30a20120c Split out _.sortedIndexOf, _.sortedLastIndexOf, _.sortedUniq, and _.sortedUniqBy. 2015-08-26 08:27:16 -07:00
John-David Dalton
790d6331f8 Remove fromIndex type check from _.includes. 2015-08-25 23:12:12 -07:00
John-David Dalton
9121ab95ea Bump package for easier testing. 2015-08-24 18:09:42 -07:00
John-David Dalton
b09e5cf5a7 Minor shortcut fusion test cleanup. 2015-08-24 08:22:51 -07:00
John-David Dalton
b53a8e873d Rename the baseIteratee param func to value. 2015-08-23 23:36:55 -07:00
John-David Dalton
4c38963c6f Add iteratee arity hints back. 2015-08-23 23:36:05 -07:00
John-David Dalton
b0d6c34565 Add isIterateeCall checks back to _.every and _.some. 2015-08-23 18:41:11 -07:00
John-David Dalton
0a9c9411f0 Update core builds. 2015-08-22 20:37:02 -07:00
John-David Dalton
e253f58aac Fix _.keysIn test fails in IE9. 2015-08-22 20:35:33 -07:00
John-David Dalton
0aa8ad202a Implement copyObject by way of copyObjectWith. 2015-08-22 18:41:48 -07:00
John-David Dalton
7bc5a501c4 Remove explicit Object coercion in _.keysIn. 2015-08-21 18:35:31 -07:00
John-David Dalton
4691a38d21 Add baseKeys. 2015-08-21 13:56:59 -07:00
MaxPRafferty
00bae752d0 Add item to _.fill example. [ci skip]
While not the minimum example required to show the fill functionality, having the fill write more than one value better fits the purpose of the function in practice.
2015-08-21 12:15:29 -07:00
John-David Dalton
e253fe0547 Use nullish to describe _.isNil. [ci skip] 2015-08-21 08:28:49 -07:00
John-David Dalton
e35d73be8f Add isNative chaining test. 2015-08-20 08:16:41 -07:00
John-David Dalton
f9f7af2430 Cleanup _.isNil doc examples and tests. 2015-08-20 08:11:17 -07:00
John-David Dalton
7aef780b14 Add hasIn to lodash chaining doc note. [ci skip] 2015-08-20 08:02:44 -07:00
xixilive
5644a20eec Add _.isNil function. 2015-08-20 00:16:17 -07:00
John-David Dalton
b135431542 Remove unused escapeRegExpChar function. 2015-08-19 22:07:50 -07:00
John-David Dalton
efdb254b12 Fix _.isMatchWith test fail. 2015-08-19 21:56:08 -07:00
John-David Dalton
8fd2f0ae11 Add _.hasIn tests. 2015-08-19 17:26:53 -07:00
John-David Dalton
3f7ee9bd2e Remove unneeded Object use. 2015-08-19 16:42:24 -07:00
John-David Dalton
a049c1189e Consistent use of of instead of on in path related docs. [ci skip] 2015-08-19 16:42:14 -07:00
John-David Dalton
9859b1555f Add _.hasIn and more path helper functions. 2015-08-18 23:29:27 -07:00
John-David Dalton
356e47a6a3 Remove double declared length var in sample. 2015-08-18 14:03:04 -07:00
John-David Dalton
2c1c8fc8df Remove unneeded _.escapeRegExp test. 2015-08-18 13:46:55 -07:00
John-David Dalton
e7bdd4a624 Ensure paths with newlines are walkable. 2015-08-17 23:56:27 -07:00
John-David Dalton
1a9069e80a Remove rogue console.log debug. 2015-08-17 00:24:05 -07:00
John-David Dalton
484861e3ee Change objectValue and sourceValue params to objValue and srcValue. 2015-08-16 23:29:58 -07:00
John-David Dalton
99ba0a4927 Ensure isMatchWith invokes customizer callbacks with object and source params. 2015-08-16 23:28:06 -07:00
John-David Dalton
ba3ede584e Add stack params to several customizer callback calls. 2015-08-14 07:36:09 -07:00
John-David Dalton
dd472f489b Avoid stack overflow with _.defaultsDeep. 2015-08-13 08:56:43 -07:00
John-David Dalton
9f0dd40b3b Remove component.json reference from bower.json. 2015-08-12 08:14:40 -07:00
John-David Dalton
edc03287aa Ensure _.defaultsDeep works on circular references. 2015-08-10 23:08:34 -07:00
John-David Dalton
d6dc7627b9 Start making Underscore tests work with the core build. 2015-08-09 21:49:30 -07:00
John-David Dalton
59773ca284 Update Backbone tests for core build runs. 2015-08-09 21:38:16 -07:00
John-David Dalton
6aa01ffe05 Remove old android platforms from sauce tests. 2015-08-09 21:36:02 -07:00
John-David Dalton
5b3de94fee Add core build to test dropdowns. 2015-08-09 21:34:24 -07:00
John-David Dalton
b4edf122f6 Update _.reduce and _.transform object iteration doc example. [ci skip] 2015-08-09 00:09:17 -07:00
John-David Dalton
1647c4deab Update test/saucelabs.js for lodash v4. 2015-08-08 17:46:32 -07:00
John-David Dalton
3efb91e86d Enable most sauce labs runs. 2015-08-08 17:35:28 -07:00
John-David Dalton
d6f73054a5 Update tested sauce browsers. 2015-08-08 17:35:15 -07:00
John-David Dalton
bd9b38665d Update Underscore/Backbone tests and make them passable. 2015-08-08 16:52:47 -07:00
John-David Dalton
de5c2b906e Add core builds. 2015-08-04 22:54:50 -07:00
John-David Dalton
4a4badcdc1 Reduce _.mixin with arrayEach. 2015-08-04 22:29:58 -07:00
John-David Dalton
fa7ebb36dc Add _.isNaN test for a Number object. 2015-08-04 22:29:58 -07:00
John-David Dalton
447440776b Remove component.json. 2015-08-01 11:12:22 -07:00
John-David Dalton
f5714f2eb0 Reduce _.isEmpty. 2015-08-01 11:03:49 -07:00
John-David Dalton
a3b76f9259 Minor plural nit in _.sortBy docs. [ci skip] 2015-07-31 16:49:04 -07:00
John-David Dalton
ba71421a23 Test label nits. 2015-07-31 14:03:32 -07:00
John-David Dalton
61251b305d Simplify _.escapeRegExp to align with the defunct ES7 proposal. 2015-07-31 14:03:32 -07:00
John-David Dalton
73464d6bb6 Ensure many n like params are coerced to integers. [closes #1377] 2015-07-31 10:41:45 -07:00
John-David Dalton
7f7ebed4ea Drop the __chain__ check from lodash. 2015-07-30 17:46:28 -07:00
John-David Dalton
5c53809269 Use isObject comboed with isArrayLike. 2015-07-30 09:09:11 -07:00
John-David Dalton
3935d5f2f7 Ensure _.merge doesn't convert strings to arrays. [closes #1375] 2015-07-30 09:09:11 -07:00
John-David Dalton
693704a832 Remove argument juggling from _.before. 2015-07-29 23:22:34 -07:00
John-David Dalton
b17f6eee6a Remove unneeded isIterateeCall checks. 2015-07-29 12:20:25 -07:00
John-David Dalton
ccb90f46e6 Remove overloaded options param support for _.trunc. 2015-07-29 12:19:49 -07:00
John-David Dalton
dfa4cd921e Add test for _.escapeRegExp escaping string containing only chars that require leading escaping. 2015-07-29 08:22:10 -07:00
John-David Dalton
32e0afd19c Have _.chunk exit early for empty arrays too. 2015-07-28 22:41:58 -07:00
John-David Dalton
5fb732c0e6 Change default size of _.chunk to 0. 2015-07-28 13:49:55 -07:00
John-David Dalton
48a6c4f2bf Add _.setWith tests. 2015-07-26 10:32:32 -07:00
John-David Dalton
f1597386ef Ensure _.set and _.setWith don't assign a value if it's the same as the destination value. 2015-07-26 09:58:33 -07:00
John-David Dalton
731d5b6872 Add assignValue and assignMergeValue helpers to make value assignments more consistent across methods. 2015-07-26 09:42:21 -07:00
James M Snell
ce569e4bc4 Add npm test. 2015-07-25 20:26:34 -07:00
John-David Dalton
f48b8d6d91 Cleanup _.some docs. [ci skip] 2015-07-24 17:39:56 -07:00
John-David Dalton
4fc94a4383 Use extendWith instead of defaults in _.template to reduce deps. 2015-07-24 17:12:36 -07:00
John-David Dalton
c5057905b6 Cleanup doc examples of _.isEqualWith, _.isMatchWith, & _.setWith. [ci skip] 2015-07-24 17:10:25 -07:00
John-David Dalton
3c388c76c6 Add to docs of _.assignWith and _.setWith. [ci skip] 2015-07-24 08:36:42 -07:00
John-David Dalton
a730fe13c7 Make baseGet align with baseSet. 2015-07-24 08:36:00 -07:00
John-David Dalton
4520e0710d Add _.setWith. 2015-07-23 09:18:09 -07:00
John-David Dalton
7e42892e6a Update vendor. 2015-07-23 09:18:09 -07:00
John-David Dalton
a0c580298e Cleanup comments. [ci skip] 2015-07-23 09:05:50 -07:00
John-David Dalton
e7ad50d243 Remove unneeded var bit from _.omit. 2015-07-20 20:08:53 -07:00
John-David Dalton
1394d42f58 Simplify createXYZ function descriptions. [ci skip] 2015-07-20 17:22:57 -07:00
Graeme Yeates
a8e95e25ad Add string to valid _.includes parameters. [ci skip] 2015-07-20 17:03:57 -07:00
John-David Dalton
87cb4db263 Simplify isHostObject. 2015-07-20 11:34:58 -07:00
John-David Dalton
2ccda44c44 Add isObjectLike and isHostObject checks to _.isPlainObject. 2015-07-20 11:34:58 -07:00
John-David Dalton
0253c7bcf1 Add license field to bower.json. [closes #1355] [ci skip] 2015-07-20 11:34:58 -07:00
John-David Dalton
9c7b39b7a7 Remove _.clone test for strings. 2015-07-20 11:34:58 -07:00
John-David Dalton
5f4611fce2 Minor nit to move objCtorString above objToString. 2015-07-20 11:34:58 -07:00
John-David Dalton
c4fa2e70bf Remove old JScript tests. 2015-07-20 11:34:58 -07:00
John-David Dalton
15b1a22501 Remove non-enumerable prototype property tests. 2015-07-20 11:34:58 -07:00
John-David Dalton
51425788d8 Cleanup _.isEqual test for non-index properties on arrays. 2015-07-20 11:34:58 -07:00
John-David Dalton
a17d5eea47 Remove splice objects tests. 2015-07-20 11:34:58 -07:00
John-David Dalton
ef909e8a54 Remove _.support tests. 2015-07-20 11:34:57 -07:00
John-David Dalton
0a24e9854b Add bizarro test for Object#propertyIsEnumerable. 2015-07-20 11:34:57 -07:00
John-David Dalton
4eb2eea809 Remove unneeded sort calls from keys tests. 2015-07-20 11:34:57 -07:00
John-David Dalton
8a6705617f Consistent Foo style in tests. 2015-07-20 11:34:57 -07:00
John-David Dalton
bbe122aba5 Improve test coverage. 2015-07-20 11:34:57 -07:00
John-David Dalton
40409df885 Ensure basePullAt works with deep paths. 2015-07-20 11:34:57 -07:00
John-David Dalton
7fdbdae6b9 Use arraySum in _.sum. 2015-07-20 11:34:57 -07:00
John-David Dalton
b87a18bd80 Remove toFunction from _.unzipWith. 2015-07-20 11:34:57 -07:00
John-David Dalton
6d650a48db Remove some older browser notes in test labels. [ci skip] 2015-07-20 11:34:56 -07:00
John-David Dalton
54ea0eac8e Remove string tests for "Collection" methods. 2015-07-20 11:34:56 -07:00
John-David Dalton
4054898170 Cleanup lazy method wrapper. 2015-07-20 11:34:56 -07:00
John-David Dalton
8a205e1e32 Add lazy chaining tests for _.find and _.findLast. 2015-07-20 11:34:56 -07:00
Graeme Yeates
39068730e2 Enable shortcut fusion for _.find and _.findLast. 2015-07-20 11:34:56 -07:00
John-David Dalton
1e344455b8 Make eq its own method. 2015-07-20 11:34:56 -07:00
John-David Dalton
9a01f3a337 Move the false example for _.isEqual below the true one. [ci skip] 2015-07-20 11:34:56 -07:00
John-David Dalton
f6ea758b85 Make array length checks more uniform. 2015-07-20 11:34:56 -07:00
John-David Dalton
51fb82902b Make max and min use arrayExtremum instead of their xyzBy counterparts. 2015-07-20 11:34:55 -07:00
John-David Dalton
3c342adb67 Move Reflect assignment. 2015-07-20 11:34:55 -07:00
John-David Dalton
24d592f94f Remove rogue semicolon. 2015-07-20 11:34:55 -07:00
John-David Dalton
181ebf024c Remove compat and modern modifiers from build commands in travis.yml. 2015-07-20 11:34:55 -07:00
John-David Dalton
ecf693ac75 Change file references from lodash.src.js to lodash.js. 2015-07-20 11:34:55 -07:00
John-David Dalton
8266266639 Update vendor/benchmark.js. 2015-07-20 11:34:55 -07:00
John-David Dalton
0f2419357c Move lodash.src.js to lodash.js. 2015-07-20 11:34:30 -07:00
John-David Dalton
2e57123aa2 Remove lodash.js 2015-07-20 11:32:11 -07:00
John-David Dalton
881733e099 Temporarily disable a few more runs in travis.yml. 2015-07-20 11:26:01 -07:00
John-David Dalton
18f778ce11 Remove var use for the baseKeysIn fork assignment. 2015-07-20 11:26:01 -07:00
John-David Dalton
b8060a5bcc Add more methods to the lodash doc note. [ci skip] 2015-07-20 11:26:01 -07:00
Michael Kearns
7a34b2982f Reword _.merge docs for clarity. [ci skip] 2015-07-20 11:26:01 -07:00
John-David Dalton
f695af587a Remove createExtremum. 2015-07-20 11:26:00 -07:00
John-David Dalton
7759615775 Ensure "Collection" methods treat functions as objects. 2015-07-20 11:26:00 -07:00
John-David Dalton
bbad03547d Make _.at an "Object" method. 2015-07-20 11:26:00 -07:00
John-David Dalton
b638f86b75 Use a heavier function check in isArrayLike. 2015-07-20 11:26:00 -07:00
John-David Dalton
ab6210dc30 Avoid es-sham getPrototypeOf when constructor is not a function. 2015-07-20 11:26:00 -07:00
John-David Dalton
9ca16e3933 Rename baseCompareAscending to compareAscending. 2015-07-20 11:26:00 -07:00
John-David Dalton
76ab41a742 Add _.matches and _.matchesProperty tests for primitive object and a source with undefined values. 2015-07-20 11:26:00 -07:00
John-David Dalton
c6f6eb294b Use numberProto more in test/test.js. 2015-07-20 11:26:00 -07:00
John-David Dalton
19836a55a3 Remove an isArray check from baseMatchesProperty. 2015-07-20 11:25:59 -07:00
John-David Dalton
862c7fde6d Docs cleanup pass. [ci skip] 2015-07-20 11:25:59 -07:00
John-David Dalton
5d842273d9 Remove accidental trailing comma. 2015-07-20 11:25:59 -07:00
John-David Dalton
33a9ebaba1 Fix _.matches and _.matchesProperty doc notes on inherited properties. [ci skip] [closes #1344] 2015-07-20 11:25:59 -07:00
John-David Dalton
192e35882a Remove toIterable and toObject. 2015-07-20 11:25:59 -07:00
John-David Dalton
e6b9aaf499 Temporarily reduce scope of automated testing until things are more stable. 2015-07-20 11:25:59 -07:00
John-David Dalton
b821660e79 Remove irrelevant comments. [ci skip] 2015-07-20 11:25:59 -07:00
John-David Dalton
0beaf47a64 Extract common components of _.keys and _.keysIn and make _.keysIn use the Reflect.enumerate shim as a compat path for older enviros. 2015-07-20 11:25:59 -07:00
John-David Dalton
8a9e9e9a11 Remove support for pre-es5 environments. 2015-07-20 11:25:59 -07:00
Oliver Hoffmann
df17244353 Update root assignment to work in Firefox extensions. [closes #1340] 2015-07-20 11:25:58 -07:00
Graeme Yeates
ffd3e17364 Add _.isFunction test for NodeList instances. 2015-07-20 11:25:58 -07:00
John-David Dalton
211a6cc4f1 Doc cleanup to turn "accepts an iteratee" to "accepts iteratee". [ci skip] 2015-07-20 11:25:58 -07:00
John-David Dalton
4c09879aab Add _.assignWith, _.cloneDeepWith, _.cloneWith, _.extendWith, _.isEqualWith, _.isMatchWith, and _.mergeWith. 2015-07-20 11:25:58 -07:00
John-David Dalton
fd526e8754 Split _.omit and _.pick into _.omitBy and _.pickBy. 2015-07-20 11:25:58 -07:00
John-David Dalton
974306d4f0 Generalize the unwrapped value path in lazy method wrappers a bit. 2015-07-20 11:25:58 -07:00
John-David Dalton
56452d9fd8 Document start and end swap for _.inRange. [ci skip] [closes #1332] 2015-07-20 11:25:58 -07:00
John-David Dalton
6d231fecd1 Update html indent style in .editorconfig. 2015-07-20 11:25:58 -07:00
John-David Dalton
2e91cf727a Simplify checkGlobal. 2015-07-20 11:25:58 -07:00
John-David Dalton
64b9402e12 Strict equal nit in _.uniq. 2015-07-20 11:25:57 -07:00
John-David Dalton
4bae0c0139 Minor formatting nit for _.without. 2015-07-20 11:25:57 -07:00
John-David Dalton
06bc4aa50b Make isArayLike return false for functions. 2015-07-20 11:25:57 -07:00
John-David Dalton
31a7ac1e81 Ensure _.assign, _.extend, _.defaults, and _.merge coerce values to objects. 2015-07-20 11:25:57 -07:00
John-David Dalton
c75ac3ac64 Simplify nullish and falsey checks. 2015-07-20 11:25:57 -07:00
John-David Dalton
3e14d8f4dd Minor doc formatting nits for pickByArray and pickByPredicate. [ci skip] 2015-07-20 11:25:57 -07:00
John-David Dalton
6cde31f843 Remove doc references to this bindings and other dropped features. [ci skip] 2015-07-20 11:25:57 -07:00
John-David Dalton
a7b70008ba Drop boolean options param support in _.mixin. 2015-07-20 11:25:57 -07:00
John-David Dalton
8cc19d908e Drop boolean options param support in _.debounce and _.throttle. 2015-07-20 11:25:57 -07:00
John-David Dalton
d58cda122d Remove _.bindAll support for binding all methods when no method names are provided. 2015-07-20 11:25:56 -07:00
John-David Dalton
ab26945eca Add _.extend and make it and _.defaults, _.defaultsDeep, and _.merge iterate over inherited properties. 2015-07-20 11:25:56 -07:00
John-David Dalton
2da1b2af1a Drop boolean orders param support in _.sortByOrder. 2015-07-20 11:25:56 -07:00
John-David Dalton
2586129dcd Replace arrayCopy and baseCopy with copyArray, copyObject, and copyObjectWith. 2015-07-20 11:25:56 -07:00
John-David Dalton
13e5d77041 Remove iOS 4.3 in sauce because they're eoling it. 2015-07-20 11:25:56 -07:00
John-David Dalton
d036ff6c4f Drop IE 6/7 testing. 2015-07-20 11:25:56 -07:00
jdalton
1f1bc393d3 Cleanup docs for deep methods and those that accept customizer functions. [ci skip] 2015-07-20 11:25:56 -07:00
jdalton
9aa34e2487 Remove isDeep params from _.clone and _.flatten. 2015-07-20 11:25:56 -07:00
jdalton
0b7bffe3b5 Use more descriptive var names when mapping falsey values. 2015-07-20 11:25:56 -07:00
jdalton
41f248f54d Split out _.sortedIndex and _.sortedLastIndex into _.sortedIndexBy and _.sortedLastIndexBy. 2015-07-20 11:25:55 -07:00
jdalton
bc7cabde4e Cleanup forEach and friends doc examples. [ci skip] 2015-07-20 11:25:55 -07:00
jdalton
65d5bba7df Make _.maxBy, _.minBy, _.sumBy, & _.uniqBy support only arrays and provide only 1 argument to iteratees. 2015-07-20 11:25:55 -07:00
jdalton
340a6d195f Add _.sumBy. 2015-07-20 11:25:55 -07:00
jdalton
83ac168664 Simplify getIteratee assignments in methods. 2015-07-20 11:25:55 -07:00
jdalton
8ac1a67b7d Split _.uniq out into _.uniqBy. 2015-07-20 11:25:55 -07:00
jdalton
abd67d0786 Remove alias jsdoc tags for those no longer supported. [ci skip] 2015-07-20 11:25:55 -07:00
jdalton
9a9e4cddd7 Rename baseExtremumBy and createExtremumBy helpers. 2015-07-20 11:25:55 -07:00
jdalton
10c44b08c9 Reduce the number of function creator helpers to improve readabilty. 2015-07-20 11:25:54 -07:00
jdalton
86b19f742c Split _.max and _.min out into _.maxBy and _.minBy. 2015-07-20 11:25:54 -07:00
jdalton
cb94b03e3e Document more default params. [ci skip] 2015-07-20 11:25:54 -07:00
jdalton
a898c3d7bc Absorb _.sortByAll into _.sortBy. 2015-07-20 11:25:54 -07:00
jdalton
86be6d7897 Move resolve doc helpers higher in their example blocks. [ci skip] 2015-07-20 11:25:54 -07:00
jdalton
d3d4de12be Rename pickByCallback to pickByPredicate. 2015-07-20 11:25:54 -07:00
jdalton
04bac321d1 Cleanup doc examples. [ci skip] 2015-07-20 11:25:54 -07:00
jdalton
1011353729 Adjust guard doc notes. [ci skip] 2015-07-20 11:25:54 -07:00
jdalton
5651993d93 Use var toIteratee instead of callback. 2015-07-20 11:25:54 -07:00
jdalton
c51466935c Rename bindCallback to toFunction. 2015-07-20 11:25:54 -07:00
John-David Dalton
454aca7003 Remove thisArg params from most methods. 2015-07-20 11:25:53 -07:00
jdalton
5ff9f01aba Remove _.findWhere, _.pluck, & _.where. 2015-07-20 11:25:53 -07:00
jdalton
b5dd2e605d Make _.forEach and friends implicitly end a chain sequence. 2015-07-20 11:25:53 -07:00
jdalton
1bfe25f1a5 Remove aliases and rename _.callback to _.iteratee. 2015-07-20 11:25:53 -07:00
jdalton
bd98779b3c Fix test fails related to root._. 2015-07-20 11:25:53 -07:00
jdalton
7862ae6d36 Adjust UMD to export to window or self when available regardless of other exports. 2015-07-20 11:25:53 -07:00
John-David Dalton
dfbd78f71d Bump to v3.10.1. 2015-07-20 11:25:53 -07:00
John-David Dalton
e132e878d6 Rebuild lodash and docs. 2015-07-20 11:25:39 -07:00
John-David Dalton
bb78c0ea6d Provide correct argsCount hint to customizer functions of clone methods. 2015-07-20 11:23:13 -07:00
Thomas Wienecke
1a772023d5 Documentation (includes): value -> target. [ci skip] 2015-07-20 11:23:13 -07:00
John-David Dalton
230f90173c Use strict equality checks for baseIndexOf comparisons. 2015-07-20 11:23:12 -07:00
jdalton
fbc7c28188 Cleanup Safari 8 bug note in isFunction. [ci skip] 2015-07-20 11:23:12 -07:00
jdalton
5d88cb7099 Code formatting nit for coercing to strings. 2015-07-20 11:23:12 -07:00
jdalton
caae7a5879 Ensure getFuncName returns a string. 2015-07-20 11:23:12 -07:00
jdalton
816f37bdc5 Move getData function guard to `isLaziable. 2015-07-20 11:23:12 -07:00
Graeme Yeates
a2dd7171a5 Let mozilla manage their i18n. [ci skip] 2015-07-20 11:23:12 -07:00
John-David Dalton
a80d0bc2ca Ensure _#reverse doesn't augment the original array if it was sliced before. [closes #1323] 2015-07-20 11:23:12 -07:00
jdalton
2e50d11be5 Ensure func is a function before querying the weakmap. [closes #1319] 2015-07-20 11:23:12 -07:00
jdalton
a5e2caf40b Add small array lazy chain tests for _.first and _.last. 2015-07-20 11:23:11 -07:00
jdalton
82f693a2bc Replace it is in docs with the contraction it's. [ci skip] 2015-07-20 11:23:11 -07:00
jdalton
349baa3550 Bump to v3.10.0. 2015-07-20 11:23:11 -07:00
jdalton
712761ab0a Rebuild lodash and docs. 2015-07-20 11:23:02 -07:00
jdalton
e620d19422 Disable JIT for ringo runs in travis.yml. 2015-06-29 23:19:08 -07:00
jdalton
8ba161463b Clarify implicit chaining in the lodash docs. [ci skip] 2015-06-29 22:45:20 -07:00
jdalton
d93aa183f3 Ensure _.flow and _.flowRight works with _.first. [closes #1308] 2015-06-29 21:38:12 -07:00
jdalton
29ceed91f0 Add more shortcut fusion tests for _.flow and _.flowRight. 2015-06-29 21:38:12 -07:00
jdalton
7f7c7f360e Update instanbul in travis.yml. 2015-06-28 17:19:46 -07:00
jdalton
c77ffa0f6a Simplify baseToString. 2015-06-28 15:03:35 -07:00
jdalton
5acf5f6ee3 Simplify _.isNative deps. 2015-06-28 15:03:19 -07:00
jdalton
10c2232c39 Make _.escapeRegExp escape characters that could cause problems for escape sequences and other edge cases. 2015-06-28 02:00:09 -07:00
jdalton
116dbfd123 Remove unneeded maxWait guard from maxDelayed. 2015-06-26 08:27:23 -07:00
jdalton
ec7dce7d5b Rename _.debounce helper executeBoundFunction to complete. 2015-06-26 08:27:23 -07:00
jdalton
a8c8bd8113 Adjust timeouts on async tests. 2015-06-26 07:00:17 -07:00
jdalton
f57dadc362 Adjust recursive test for older VMs. 2015-06-26 06:59:16 -07:00
jdalton
6b7c1ad6cf Ensure _.indexOf and _.lastIndexOf return -1 when performing a binary search for undefined and it's not found. [closes #1303] 2015-06-25 14:35:02 -07:00
jdalton
67359c22d5 Remove duplicate _.debounce and _.throttle test. 2015-06-25 11:16:52 -07:00
jdalton
1881f5cb39 Ensure _.noConflict operates on root and not context. 2015-06-25 11:15:39 -07:00
jdalton
9f3d284c68 Remove isExposed check from test.js. 2015-06-25 08:05:25 -07:00
jdalton
6921fb66d5 Add _.noConflict test. 2015-06-25 08:05:24 -07:00
Graeme Yeates
91849e4cd1 Test coverage for re-entrant debounced functions 2015-06-23 17:37:45 -07:00
Graeme Yeates
1fcaa481be Reduce debounce redundancy for executing bound function 2015-06-23 17:37:45 -07:00
jdalton
04701cd69e Add defaultsDeep references to lodash and _.reduce doc notes. [ci skip] 2015-06-23 17:37:45 -07:00
Mathias Bynens
f59551b89e Link to the final ES6 spec. [ci skip] 2015-06-23 17:37:45 -07:00
Graeme Yeates
bc34d80949 Clarify shortcut fusion docs. [ci skip] 2015-06-23 17:37:45 -07:00
jdalton
7480e481fc Add _.defaultsDeep tests. 2015-06-22 12:55:29 -07:00
jdalton
71ed48bb76 Ensure leading and trailing debounce options are coerced to booleans. 2015-06-22 12:55:29 -07:00
jdalton
134bf61205 Add _.defaultsDeep. 2015-06-22 12:55:29 -07:00
jdalton
85ddabd763 Cleanup docs for baseMerge, baseMergeDeep, createAggregator, & createAssigner. [ci skip] 2015-06-22 12:55:29 -07:00
Graeme Yeates
889c184ba3 Ensure _.debounce and _.throttle reset lastCall after cancelling. 2015-06-22 12:55:28 -07:00
jdalton
660bc2eb21 Use escapeStringChar in _.escapeRegExp. 2015-06-22 12:55:28 -07:00
jdalton
192667d65f Ensure _.escapeRegExp escapes line terminators. 2015-06-22 12:55:28 -07:00
jdalton
4896c725b6 Ensure _.escapeRegExp handles empty strings in a way to work with compilation. 2015-06-22 12:55:28 -07:00
jdalton
4bcb99a6b9 Simplify _.sum. 2015-06-18 08:41:53 -07:00
jdalton
535eec5366 Add _.sum benchmark. 2015-06-18 08:41:53 -07:00
jdalton
56cd679bcd Improve perf of max and min common case with arrays. 2015-06-18 08:41:53 -07:00
jdalton
e95ae66af0 Update instanbul in travis.yml. 2015-06-14 22:48:50 -07:00
jdalton
dbb342da81 Minor comment tweak in baseClone. [ci skip] 2015-06-14 18:03:54 -07:00
jdalton
958381d3dd Tweak _.modArgs docs. [ci skip] 2015-06-14 18:03:54 -07:00
jdalton
0a165675ce Allow coveralls service to fail. 2015-06-14 07:41:29 -07:00
jdalton
ce13b6abfd Make test labels more consistent. 2015-06-13 18:29:05 -07:00
jdalton
804e00cc26 Ensure bound Date can be instantiated with all 7 params. 2015-06-12 22:12:15 -07:00
jdalton
f79de23be5 Remove unneeded pattern sub in travis.yml. 2015-06-12 18:03:26 -07:00
jdalton
3404dc0b75 Update tested browsers for saucelabs. 2015-06-12 00:24:35 -07:00
jdalton
51c9f4f988 Cleanup _.omit, _.modArgs, & _.pick tests. 2015-06-12 00:23:50 -07:00
jdalton
028ecf5561 Allow _.modArgs to accept an array of transforms. 2015-06-11 08:30:18 -07:00
jdalton
419fb08266 Simplify createCache. 2015-06-11 07:31:36 -07:00
jdalton
1a28ef3244 Ensure _.includes matches an empty string on empty strings. [closes #1275] 2015-06-10 21:10:00 -07:00
Kevin Kirsche
6b8ffb2a85 Remove moot version property from bower.json
Per bower/bower.json-spec@a325da3
2015-06-10 18:32:48 -04:00
jdalton
9121b14009 Cleanup _.mixin test. 2015-06-10 08:17:39 -07:00
jdalton
9b54891474 Add ceil, floor, and round to lodash doc block. [ci skip] 2015-06-10 07:57:39 -07:00
jdalton
058196e42a Rename vendor/benchmark.js license. [ci skip] 2015-06-10 07:22:44 -07:00
jdalton
22743e06d5 Add round test for NaN precision params. 2015-06-08 08:33:03 -07:00
jdalton
c8b818f011 Cleanup _.ceil, _.floor, & _.round. 2015-06-07 21:41:50 -07:00
James Kyle
df838c98e9 Add _.ceil/_.floor/_.round. 2015-06-07 21:27:29 -07:00
jdalton
595eab2614 Rename license file to align with GitHub defaults. [ci skip] 2015-06-07 16:48:48 -07:00
jdalton
288b6ea692 Remove unnecessary lodash binding. 2015-06-07 15:24:53 -07:00
jdalton
7db606857d Adjust tabs to two spaces for html files. 2015-06-07 14:33:28 -07:00
jdalton
746034a4fc Simplified bufferClone. 2015-06-07 13:51:06 -07:00
jdalton
f8ec95d872 Switch null use for clearing vars to undefined. 2015-06-07 13:40:07 -07:00
jdalton
ba082b74a7 Adjust lazy heuristic to punt if not using shortcut fusion. 2015-06-06 15:30:56 -07:00
jdalton
ab981ce15a Update lazy tests using larger arrays. 2015-06-06 15:06:17 -07:00
jdalton
e143936a82 Simplify lazy chaining by removing support for dropWhile and dropRightWhile. 2015-06-06 15:06:12 -07:00
jdalton
497cde7e92 Add LARGE_ARRAY_SIZE to more easily track what's considered a large array. 2015-06-06 14:56:31 -07:00
jdalton
948faf6cf9 Fix object doc param typo for equalByTag. [ci skip] 2015-06-05 07:56:06 -07:00
jdalton
56f199bd69 Make _.sortByOrder support orders of "asc" and "desc". 2015-06-05 07:56:06 -07:00
jdalton
9e1f68d9eb Update vendor/backbone to 1.2.1. 2015-06-05 07:56:06 -07:00
jdalton
7a9011c7e1 Add modArgs to lodash doc block. [ci skip] 2015-06-05 07:56:05 -07:00
jdalton
224a6c1e7c Adjust lazy eval heuristic. 2015-06-05 07:56:00 -07:00
jdalton
c89fe8bdbc Simplify array properties of LazyWrapper. 2015-06-03 23:20:03 -07:00
jdalton
cce9c2225e Ensure bailouts of lazy chaining will fallback appropriately. 2015-06-03 22:54:47 -07:00
jdalton
bdbc157c30 Whitespace nits. [ci skip] 2015-06-03 22:51:04 -07:00
jdalton
11eebfb78d Cleanup fn declaration style in tests. 2015-06-02 21:40:25 -07:00
jdalton
4beadcc4f3 Add this binding test for _.modArgs. 2015-06-02 21:04:18 -07:00
jdalton
e062c8c6f2 Tweak test label. 2015-06-02 21:03:58 -07:00
jdalton
f4709ce1f0 Move this binding tests around. 2015-06-02 21:03:37 -07:00
jdalton
50e129bd8f Add function checks to _.modArgs. 2015-06-02 20:18:13 -07:00
jdalton
f402dbd1e3 Use _.isFunction in _.isNative. 2015-06-02 20:14:13 -07:00
jdalton
55af8b4cb4 Remove _.isFunction fallback test. 2015-06-02 20:13:47 -07:00
jdalton
005b587588 Cleanup _.modArgs. 2015-06-02 08:41:01 -07:00
jdalton
de4463d9a8 Add basic _#concat test. 2015-06-02 08:16:47 -07:00
jdalton
b3d577c937 Replace wrapper with wrapped in docs/tests. 2015-06-02 08:10:10 -07:00
jdalton
51576018fd Cleanup arrayConcat and wrapperConcat docs. [ci skip] 2015-06-02 08:07:22 -07:00
jdalton
1b4f210d82 Add sparse array test for _#concat. 2015-06-02 07:47:18 -07:00
Steven Sojka
612bfd3acc Add _.modArgs. 2015-06-02 07:34:30 -07:00
jdalton
4972c94aed Remove the dot from the iojs identifier in travis.yml. 2015-06-01 23:05:53 -07:00
jdalton
642d77bb91 Add arrayConcat and arrayPush helpers. 2015-06-01 17:51:52 -07:00
jdalton
88270a7b66 Add built-in Date.now fork back. 2015-05-31 13:27:35 -07:00
Justin Ridgewell
29e0d37009 Reset resIndex after recursive baseFlatten. 2015-05-30 16:15:26 -05:00
jdalton
9c339367ad Optimize baseFlatten. 2015-05-29 11:26:14 -04:00
jdalton
f69715d999 Increase coverage of isLaziable. 2015-05-29 07:16:10 -04:00
jdalton
79990cbb27 Remove baseIsFunction. 2015-05-29 06:24:02 -04:00
jdalton
a02be54421 Increase max duration allowed for sauce to run tests. 2015-05-28 22:18:39 -04:00
jdalton
20127f6a2a Re-fix _.isFunction in old Safari. 2015-05-28 16:32:19 -04:00
jdalton
02a132a9d7 Ensure _.chunk floors size values. [closes #1243] 2015-05-28 14:29:26 -04:00
jdalton
7c95c5e80a Remove wild semicolon. 2015-05-28 11:33:03 -04:00
jdalton
c0bc5657ea Remove unnecessary tests. 2015-05-27 17:49:07 -04:00
jdalton
dfec166704 Remove dual environment _.isElement test. 2015-05-27 15:21:52 -04:00
jdalton
32f223c683 New line nit. 2015-05-27 15:20:22 -04:00
jdalton
722eac1681 Simplify _.isFunction. 2015-05-26 11:59:43 -07:00
jdalton
6bcbb6f7bb Simplify _.now and _.isFinite. 2015-05-26 11:39:29 -07:00
jdalton
d266a0c0ce Simplify _.parseInt. 2015-05-26 11:36:42 -07:00
jdalton
acf82af0bf Simplify _.isElement. 2015-05-26 11:35:35 -07:00
jdalton
98956056e3 Simplify bufferClone. 2015-05-26 11:26:48 -07:00
jdalton
ae0bb54b2d Remove bufferClone fork. 2015-05-26 11:22:06 -07:00
jdalton
255da0a0d7 Remove _.isPlainObject fallback. 2015-05-26 11:17:36 -07:00
jdalton
c0e8cc0254 Remove _.isArguments fallback and _.support.argsTag. 2015-05-26 11:14:25 -07:00
jdalton
41cec24644 Remove debounceOptions var. 2015-05-26 10:50:08 -07:00
jdalton
2ecdedd5b4 Bump to v3.9.3. 2015-05-25 16:25:57 -07:00
jdalton
358477c31b Rebuild lodash and docs. 2015-05-25 15:58:57 -07:00
jdalton
c1948f10a2 Avoid NaN use in isIndex. 2015-05-25 12:19:00 -07:00
jdalton
d33c487b29 Add parseFloat to contextProps. 2015-05-25 10:03:30 -07:00
Chris Hiestand
b309b507eb Add tests for parseFloat issues with isIndex and _.set. 2015-05-25 09:56:16 -07:00
jdalton
daa8428b32 Drop parseFloat in isIndex in favor of a more strict regex. [closes #1229] 2015-05-25 09:39:36 -07:00
jdalton
0529df7632 Bump to v3.9.2. 2015-05-24 00:45:38 -07:00
jdalton
fc31fb9eba Rebuild lodash and docs. 2015-05-24 00:45:37 -07:00
jdalton
54436e341a Update travis deps. 2015-05-24 00:45:31 -07:00
jdalton
fc35ac4d67 Cleanup shortcut fusion test. 2015-05-23 21:43:01 -07:00
jdalton
28a0b6f901 Fix test for removal of _.support.funcNames. 2015-05-23 20:12:50 -07:00
jdalton
1b8f2c2adb Make isLaziable work with wrapped lodash methods. 2015-05-23 20:12:20 -07:00
jdalton
6c8988ab69 Use POSITIVE_INFINITY and NEGATIVE_INFINITY more. 2015-05-23 16:15:12 -07:00
jdalton
e3c600a681 Remove rogue new line. 2015-05-23 16:14:37 -07:00
jdalton
979e0de659 Remove unused function charAtCallback. 2015-05-23 16:14:15 -07:00
jdalton
a76c10416d Tweak docs for _.difference, _.intersection, _.union, & _.xor. [ci skip] 2015-05-23 12:37:36 -07:00
jdalton
1276bf8c72 Correct _.sample to avoid favoring putting the second half of the array into the front and the first half in the back. 2015-05-23 00:05:34 -07:00
jdalton
9ef5c5d639 Change var endIndex to lastIndex for source consistency. 2015-05-22 22:38:46 -07:00
jdalton
69f51896c9 Optimize _.sample. 2015-05-22 22:38:39 -07:00
jdalton
5f845aa6f8 Optimize baseIsEqual. 2015-05-22 22:08:29 -07:00
jdalton
87c610beaa Fix doc typos for arrayExtremum and baseMatchesProperty. [ci skip] 2015-05-22 00:44:08 -07:00
jdalton
3a331ec156 More which/that switching in docs. [ci skip] 2015-05-22 00:36:57 -07:00
jdalton
6c5ac490ab Document partial args of _.method and _.methodOf. [ci skip] [closes #1223] 2015-05-22 00:36:51 -07:00
jdalton
50b9840db1 Change dep version in lodash-cli npm-shrinkwrap.json for travis tests. 2015-05-20 08:00:25 -07:00
jdalton
41e884a1d2 Poison the free variable root in Node.js. 2015-05-20 07:59:52 -07:00
jdalton
15841b191d Bump to v3.9.0. 2015-05-19 08:19:55 -07:00
jdalton
65514d89ad Rebuild lodash and docs. 2015-05-19 08:19:42 -07:00
jdalton
c6f8896826 Ensure _.get can return null values. [closes #1216] 2015-05-19 08:18:46 -07:00
jdalton
882d84f1e6 Ensure _.merge skips undefined values if a destination value exists. 2015-05-18 07:30:25 -07:00
jdalton
0eba3a3678 Update ecstatic and istanbul travis deps. 2015-05-18 07:30:24 -07:00
jdalton
756b28c3ab Rename value param to srcValue. 2015-05-17 16:13:54 -07:00
jdalton
d78ebc40ae Fix isEqual tests on older Safari. 2015-05-17 09:14:50 -07:00
jdalton
58aea21b82 Use 'xo' instead of 'hi' for string tests. 2015-05-17 00:55:30 -07:00
jdalton
c2b1d61dd1 Add toObject to _.pairs. 2015-05-17 00:55:30 -07:00
jdalton
f4d72dba06 Adjust test labels for consistency. 2015-05-17 00:55:30 -07:00
jdalton
31e81d7be2 Add string tests for _.isMatch, _.matches, & _.matchesProperty. 2015-05-17 00:55:30 -07:00
jdalton
6c9123beee Add toObject use to baseIsMatch. 2015-05-16 18:53:33 -07:00
jdalton
0fa0397da2 Add checks back to isEqual and simplify checks in baseIsEqual. 2015-05-16 18:53:33 -07:00
jdalton
b652fc7e1a Reduce baseIsMatch and isMatch by adding getMatchData. 2015-05-16 15:24:59 -07:00
jdalton
c42fea0d3d Remove isStrictComparable use from _.isEqual. 2015-05-16 13:29:41 -07:00
jdalton
48a56a848a Add test for modularized flow and flowRight. 2015-05-16 11:30:57 -07:00
jdalton
d6937baa8e Simplify getFuncName. 2015-05-16 11:30:43 -07:00
jdalton
3490f8acb5 Ensure LodashWrapper.prototype.thru exists before creating a wrapper in flow. 2015-05-16 07:01:15 -07:00
jdalton
46ace7e8e8 Simplify getNative. 2015-05-15 11:30:57 -07:00
jdalton
698956e130 Move parseFloat into isIndex. [closes #1209] 2015-05-15 08:55:47 -07:00
jdalton
b25cd39953 Add isObject check to getNative. 2015-05-15 01:29:17 -07:00
jdalton
de4f5eb2ca Allow for getNative to accept a nullish object value. 2015-05-15 00:30:20 -07:00
jdalton
ccc5fa3981 Add getNative helper. 2015-05-15 00:23:27 -07:00
jdalton
b899a19184 Change "it is" to "it's". [ci skip] 2015-05-15 00:22:14 -07:00
jdalton
6af7fac344 Minor style nit in _.isObject. 2015-05-14 21:27:11 -07:00
jdalton
49ef2b4d54 Clarify _.debounce and _.throttle docs. [ci skip] 2015-05-14 09:13:00 -07:00
jdalton
fcc09a7375 Use strict equality check since its type isn't guaranteed. 2015-05-13 23:39:06 -07:00
jdalton
8e9ad4df97 Avoid testing Backbone in IE6 in sauce. 2015-05-13 23:25:47 -07:00
jdalton
4dfcfd2542 Cleanup test/backbone.html and test/underscore.html. 2015-05-13 23:25:31 -07:00
jdalton
12081c9bd6 Bypass vm module use for ChakraNode. 2015-05-13 21:04:51 -07:00
jdalton
abee7fdfa2 Update vendors. 2015-05-13 21:03:09 -07:00
jdalton
ca0bc0632b Reduce _.has. 2015-05-13 08:57:03 -07:00
jdalton
e465750cd2 Fix failing _.has tests in Rhino. 2015-05-13 00:51:58 -07:00
jdalton
934b08f720 Avoid mixing boolean and object types in variable assignments. 2015-05-12 23:41:14 -07:00
jdalton
78cc98840b Remove fast path from _.isMatch. 2015-05-12 21:19:12 -07:00
jdalton
d4cd7a120f Remove support.funcDecomp and support.nonEnumStrings. 2015-05-12 21:18:35 -07:00
jdalton
4b6c91bbf1 Remove support.nonEnumArgs. 2015-05-12 09:23:07 -07:00
jdalton
e3be2b4451 Ensure _.has treats sparse arrays as dense. 2015-05-12 08:58:37 -07:00
jdalton
c6ff845ecb Ensure _.intersection works with a single array. [closes #1199] 2015-05-11 23:52:56 -07:00
jdalton
846bde35ff Use hasOwnProperty instead of objToString for the creation of reIsNative to avoid issues with core-js. [closes #1197] 2015-05-11 10:31:38 -07:00
jdalton
69990ae226 Fix test error in Rhino with CommonJS support. 2015-05-10 23:13:18 -07:00
jdalton
415fc81577 Remove Narwhal reference from source. 2015-05-10 20:20:18 -07:00
jdalton
b675566e23 Cleanup bizarro values, vm values, iframe values, worker addition, & module additions. 2015-05-10 20:17:57 -07:00
jdalton
190da0dcd4 Capitalize comments in test/index.html. [ci skip] 2015-05-10 20:09:14 -07:00
jdalton
5c40f93ca3 Fix AMD tests in PhantomJS. 2015-05-10 17:05:46 -07:00
jdalton
879c1e4992 Increase test coverage. 2015-05-09 18:02:09 -07:00
jdalton
311334c9e1 Add doc examples to _.gt, _.gte, _.lt, & _.lte. [ci skip] 2015-05-09 15:25:32 -07:00
jdalton
dc5268b0c0 Add _.gt, _.gte, _.lt, _.lte, & _.eq unit tests. 2015-05-09 12:25:31 -07:00
jdalton
d77ace6dc3 Upate tested Chrome version in sauce.js. 2015-05-08 18:56:20 -07:00
jdalton
f0b3c1a9ab Cleanup createFlow. 2015-05-08 18:55:57 -07:00
jdalton
9efb73f592 Remove nativeAssign and getOwnPropertySymbols use. 2015-05-08 11:36:44 -07:00
jdalton
569b4b29aa Add case of 5 to createCtorWrapper to align with bindCallback. 2015-05-08 11:36:23 -07:00
jdalton
a61bde5b78 Ensure _.bind works with ES6 class constructors. [closes #1193] 2015-05-08 09:49:54 -07:00
jdalton
542dd67892 Update param docs for createExtremum. [ci skip] 2015-05-08 00:17:48 -07:00
jdalton
172eca6081 Avoid using require in source because browserify does a quick regexp match for \brequire\b before deciding whether to build an AST to get require calls. 2015-05-07 23:59:51 -07:00
jdalton
004aaed783 Remove odd string support from createExtremum. 2015-05-07 23:53:50 -07:00
jdalton
a1b15df648 Update tested Rhino to 1.7.6. 2015-05-07 01:05:16 -07:00
jdalton
b5d5bef678 Avoid undefined length variable use in createExtremum. 2015-05-07 00:38:22 -07:00
Len Smith
421df0dff3 Make null sorted right behind undefined and NaN. 2015-05-07 00:34:12 -07:00
Armaan Ahluwalia
5b5e29cb7b Fixed iteratees doc typos. [ci skip] 2015-05-06 14:58:03 -07:00
jdalton
db67ae12ec Optimize _.max and _.min when invoked with iteratees and add _.gt, _.gte, _.lt, _.lte, & _.eq. 2015-05-06 08:56:50 -07:00
jdalton
7dfd7ad5b9 Minor adjustments to param docs for baseCompareAscending and matchesProperty. [ci skip] 2015-05-06 01:37:56 -07:00
jdalton
ca5fa9e84d Add support for an immutable Map to _.memoize.Cache. 2015-05-05 23:13:00 -07:00
jdalton
1afcfa4406 Use precomputed values for MAX_ARRAY_LENGTH and MAX_SAFE_INTEGER. 2015-05-04 21:53:12 -07:00
jdalton
95b1455b62 Consistently use callback as the variable to store getCallback() results. 2015-05-04 09:06:06 -07:00
jdalton
d825937411 Ensure customizer results are respected by _.isEqual. 2015-05-03 22:57:45 -07:00
jdalton
ee182df533 Optimize object comparisons in _.isEqual. 2015-05-03 19:38:58 -07:00
jdalton
14651d8ea8 Remove customizer assignment from clone and cloneDeep. 2015-05-03 17:20:51 -07:00
jdalton
7e4ed7c1a9 Ensure baseCreate works in ExtendScript. 2015-05-03 13:47:40 -07:00
jdalton
13fe88c03f Cleanup baseIsMatch and equalArrays. 2015-05-02 23:00:57 -07:00
jdalton
7b80a780c7 Remove old Opera from Sauce tests. 2015-05-01 22:16:59 -07:00
jdalton
2b465bdf82 Update QUnit dev dep. 2015-05-01 21:00:50 -07:00
jdalton
6d52119597 Bump to v3.8.0. 2015-05-01 00:45:06 -07:00
jdalton
b75041173c Rebuild lodash and docs. 2015-05-01 00:45:06 -07:00
jdalton
23eba0a029 Avoid isArrayLike in createBaseEach to bail out early when nullish. 2015-05-01 00:45:06 -07:00
jdalton
566781cab2 Loosen -0 and 0 checks. 2015-05-01 00:44:55 -07:00
jdalton
0ea1fc5602 Avoid var name pad in composeArgsRight. 2015-04-30 09:09:47 -07:00
jdalton
2ce9e09e8b Ensure _.padLeft and _.padRight handle empty strings correctly. 2015-04-30 09:09:46 -07:00
Tim D
6cab7ceb0f Removing length assignment in baseFlatten for a perf win. 2015-04-29 19:57:39 -07:00
jdalton
8ae7d8aa07 Simplify SameValueZero doc notes. [ci skip] 2015-04-29 00:25:36 -07:00
jdalton
ce6ccef2d0 Ensure baseAt, basePullAt, and pullAt handle nullish values correctly. 2015-04-29 00:25:36 -07:00
jdalton
2c6d880542 Loosen restrictions of _.intersection and others to accept array-like objects and add isArrayLike helper. [closes #1163] 2015-04-29 00:25:36 -07:00
jdalton
bf89287c56 Optimize lazy slice for start of 0 and an end value. 2015-04-29 00:25:36 -07:00
jdalton
df176dfe8a Fix modularized npm build tests. 2015-04-26 14:22:46 -07:00
jdalton
141a32d388 Add _.callback test for augmenting source objects. 2015-04-26 10:59:29 -07:00
jdalton
37786b76ed Minor whitespace nits. [ci skip] 2015-04-26 00:46:33 -07:00
jdalton
02b920f259 Add _.flow and _.flowRight tests for curried functions with placeholders. 2015-04-23 08:38:58 -07:00
jdalton
31e25f88a0 Narrow bitmask check in createFlow. 2015-04-23 08:06:51 -07:00
jdalton
231c8a468e Replace "that" with "which" in pickByArray and pickByCallback docs. [ci skip] 2015-04-22 23:10:17 -07:00
jdalton
ae346f564f Avoid lazy eval optimization in createFlow if metadata has placeholder arguments. [closes #1160] 2015-04-22 20:44:56 -07:00
jdalton
fcc0608cf2 Only use built-in Object.assign when in strict mode. 2015-04-22 20:23:30 -07:00
jdalton
641cd63462 Fix old V8 JIT bug that has cropped up again. 2015-04-22 20:17:39 -07:00
jdalton
0b907a3efa Make tests work in Phantom 2. 2015-04-22 20:16:43 -07:00
jdalton
ce180cf2bf Excuse Underscore _.now test to avoid occasional false fail in sauce andrioid. 2015-04-22 07:18:14 -07:00
jdalton
d97276404c Update excused Underscore tests. 2015-04-22 07:09:52 -07:00
Ray Hammond
d5a9b4344b Removed unused variables identified by JSHint. 2015-04-21 16:58:10 -07:00
jdalton
e317fdfa3d Cleanup deep path tests. 2015-04-21 08:07:49 -07:00
jdalton
150ea2639a Add complex tests for unquoted bracketed property names. 2015-04-21 08:03:14 -07:00
jdalton
a551348b40 Fix preventExtensions definition typo. [closes #1153] 2015-04-21 07:59:02 -07:00
jdalton
3429b5d661 Ensure empty brackets are ignored by _.get and _.set. 2015-04-21 00:02:28 -07:00
jdalton
c8314b215b Doc and var name tweaks to _.unzip, _.unzipWith, and _.zipWith. 2015-04-20 08:59:53 -07:00
jdalton
5929f7d23b Newline nit in _.assign doc. [ci skip] 2015-04-20 00:35:41 -07:00
jdalton
85a7df3d27 Add _.unzipWith. 2015-04-20 00:10:12 -07:00
jdalton
e6c5a0e848 Update iOS comment on getLength. [ci skip] 2015-04-19 20:04:13 -07:00
Ray Hammond
92dee72b10 Added two missing semicolons. 2015-04-19 17:51:14 -07:00
jdalton
4d6e57a5e6 Make _.zipWith act like _.zip when no iteratee is provided and make _.unzip ignore non array or arguments object values. 2015-04-19 10:32:27 -07:00
jdalton
936a1c2764 Add support for thisArg in zipWith. 2015-04-19 08:02:43 -07:00
jdalton
a08a3c6096 Cleanup tests. 2015-04-18 22:31:46 -07:00
thirdcreed
82be40eace Add _.zipWith. 2015-04-18 11:13:03 -07:00
jdalton
20ba0bd1dc Fix _.uniqueId test to properly compare values. 2015-04-18 11:10:55 -07:00
jdalton
75ce6b82e8 Add sum to guarded doc note in _.map. [ci skip] 2015-04-17 09:04:22 -07:00
jdalton
9749ac56ba Remove extraneous docs for methods that reference others. [ci skip] 2015-04-17 08:37:55 -07:00
jdalton
746f9bb778 Add _.mapKeys. [closes #169] 2015-04-17 08:36:37 -07:00
jdalton
f2dae588aa Add test labels to help track down odd false fail. 2015-04-17 08:27:14 -07:00
jdalton
9f3f0a76aa Ensure baseGet returns undefined and not null. [closes #1136] 2015-04-16 20:07:48 -07:00
jdalton
30f28a51ca Bump v3.7.0. 2015-04-15 20:08:34 -07:00
jdalton
3e22344782 Rebuild lodash and docs. 2015-04-15 19:32:58 -07:00
jdalton
0b20d89d62 Ensure _.times floors n float values. 2015-04-15 19:21:13 -07:00
jdalton
80d892c744 Update Firefox versions in saucelabs.js. 2015-04-15 09:04:28 -07:00
jdalton
53326bef33 Update vendors. 2015-04-15 08:44:18 -07:00
jdalton
f05a5a3abb Fix failing strict mode _.set tests. 2015-04-15 00:00:40 -07:00
jdalton
8581be4977 Ensure baseGet and result work with strings on nested objects. 2015-04-14 22:34:46 -07:00
jdalton
0e8277ba9e Cleanup path methods. 2015-04-14 21:19:31 -07:00
jdalton
3cc2f83912 Add more string character access tests and adjust array path tests. 2015-04-14 21:18:50 -07:00
jdalton
177034a498 Move _.filter benchmark and cleanup labels. 2015-04-14 21:15:18 -07:00
jdalton
f4d06e5183 Remove unneeded "use strict" directive. 2015-04-14 12:54:30 -07:00
jdalton
637a6b5f7e Optimize _.invoke. 2015-04-14 12:29:41 -07:00
jdalton
75445b8b98 Update ecstatic travis dep. 2015-04-14 12:14:12 -07:00
jdalton
f96de55ac7 Optimize isKey. 2015-04-14 12:13:54 -07:00
jdalton
c4d4af3b5a Make freeGlobal detect align with freeSelf and freeWindow checks. 2015-04-13 20:29:58 -07:00
jdalton
5dfee44340 Cleanup doc blocks. [ci skip] 2015-04-13 20:29:26 -07:00
jdalton
99f5857d84 Add stable sort tests for objects. 2015-04-13 20:28:25 -07:00
jdalton
520f7c6812 Ensure index in baseSortByOrder is an integer. 2015-04-13 09:30:01 -07:00
jdalton
63d493aa1f Cleanup _.sortBy, _.sortByAll, _.sortByOrder, & baseSortByOrder. 2015-04-13 08:58:10 -07:00
jdalton
38ab42f855 Add Object.assign reference to _.assign docs. [ci skip] 2015-04-13 07:43:35 -07:00
Graeme Yeates
bc3771f3af Support iteratee use cases for _.sortByAll and _.sortByOrder. 2015-04-12 18:29:26 -07:00
jdalton
9d90af409b Add bizarro test for Object.getOwnPropertySymbols. 2015-04-12 18:28:50 -07:00
jdalton
20183bbd57 Have baseMap use getLength and isLength. 2015-04-12 10:33:34 -07:00
jdalton
1d8efe1cf8 Cleanup deep property tests. 2015-04-11 23:08:59 -07:00
jdalton
23354d413f Add an _.invoke test for deep paths. 2015-04-11 23:08:11 -07:00
jdalton
715f03f5f1 Change call to invoke in _.debounce and _.throttle test. 2015-04-11 23:08:11 -07:00
jdalton
ff6bbaed19 Add more tests for _.sortByAll and _.sortByOrder used as iteratees of _.reduce. 2015-04-11 20:58:31 -07:00
Graeme Yeates
f82cbbab1c Use _.restParam in _.sortByAll. 2015-04-11 20:18:29 -07:00
jdalton
5a1b526b6c Add and adjust deep path examples to _.method, _.methodOf, _.property and _.propertyOf docs. [ci skip] 2015-04-11 18:40:05 -07:00
jdalton
1ef92c87fb Use query instead of inspect in various docs. [ci skip] 2015-04-11 16:33:24 -07:00
jdalton
0aef515522 Rename baseMethod to invokePath and make use of it in _.invoke. 2015-04-11 16:32:27 -07:00
jdalton
9b5c97666a Ensure symbols work for _.assign, _.defaults, & _.merge. 2015-04-11 11:42:36 -07:00
jdalton
a55d822f9a Add more comments to nativeAssign definition. [ci skip] 2015-04-10 21:24:32 -07:00
jdalton
5b2bde6e0d Simplify getSymbols. 2015-04-10 19:56:38 -07:00
jdalton
020c5b27dc Add assert labels to _.tempalte test. 2015-04-10 15:42:03 -07:00
jdalton
65457208e5 Fix feature test for IE tech preview. 2015-04-10 15:41:48 -07:00
jdalton
6eb1b98975 Fix test fails in Node 0.12. 2015-04-10 15:40:26 -07:00
jdalton
a927bab6b3 Use built-in Object.assign if available. 2015-04-10 09:19:39 -07:00
jdalton
48e3e3e8cb Add _.method and _.methodOf docs. [ci skip] 2015-04-09 09:29:23 -07:00
jdalton
b5d095401d Make _.result and _.set docs more consistent with _.get. [ci skip] 2015-04-09 08:42:05 -07:00
jdalton
b3e58d4794 Cleanup createAssigner. 2015-04-09 07:35:32 -07:00
jdalton
79b064320e Update _.assign benchmarks for newer Underscore versions. 2015-04-09 07:30:17 -07:00
Sankar Gorthi
335b8326ee Fix broken link in _.bindKey docs. [ci skip] 2015-04-08 15:22:06 -07:00
jdalton
e777020e44 Update propertyIsEnumerable mock for support.nonEnumArgs feature test changes. 2015-04-08 13:42:48 -07:00
jdalton
745d97ebe1 Replace typeof checks for undefined with === checks. 2015-04-08 09:37:35 -07:00
jdalton
bb06d98a43 Add _.has doc examples of deep paths. [ci skip] 2015-04-08 09:27:37 -07:00
jdalton
3500b0016c Store last(path) in a var. 2015-04-08 08:41:57 -07:00
jdalton
7ec916b777 Add additional backtick reference to _.escape docs. [ci skip] 2015-04-08 08:24:44 -07:00
jdalton
3c71f79929 Fix string indexes with _.has in older enviros. 2015-04-08 00:39:39 -07:00
jdalton
a83e70104c Ensure complex paths work with _.get, _.result, & _.set. 2015-04-07 19:47:31 -07:00
jdalton
85af554bac Replace work with expected value in test labels of _.get, _.isMatch, _.matches, _.matchesProperty, _.method, _.property, _.propertyOf, & _.result. 2015-04-07 18:45:39 -07:00
jdalton
885722afde Add _.has and _.methodOf tests. 2015-04-07 18:41:51 -07:00
jdalton
b2f094da01 Add another path test to a deep property test of _.result. 2015-04-07 09:29:44 -07:00
jdalton
1e85ec6758 Add more _.method tests. 2015-04-07 09:29:09 -07:00
jdalton
c8974aac3e Ensure nullish values aren't treated as empty objects in _.get, _.has, _.matchesProperty, _.property, _.propertyOf, & _.result. 2015-04-07 08:33:19 -07:00
jdalton
ad318c04e5 Use nullish more in test labels. 2015-04-07 08:19:24 -07:00
jdalton
db73e48206 Add mutation notes to docs of _.assign and _.defaults. [ci skip] 2015-04-07 08:07:00 -07:00
jdalton
d13972e0b8 Fix string test fails for _.matchesProperty, _.property, & _.result in IE 6 & 7. 2015-04-07 07:28:58 -07:00
Graeme Yeates
df74b2bfcb Remove _.noop from chainable list. [ci skip] 2015-04-07 00:31:38 -07:00
jdalton
b94b75726d Cleanup _.property and _.propertyOf tests. 2015-04-07 00:24:50 -07:00
jdalton
9a2d38acff Cleanup _.method tests. 2015-04-07 00:24:22 -07:00
jdalton
537f8f401e Cleanup _.matchesProperty tests. 2015-04-07 00:24:01 -07:00
jdalton
04f1a799dc Cleanup _.matches tests. 2015-04-07 00:23:16 -07:00
jdalton
74adb2f540 Consolidate _.get and _.result tests. 2015-04-07 00:22:11 -07:00
jdalton
a129a2509f Ensure _.method aligns with _.invoke. 2015-04-07 00:20:35 -07:00
jdalton
cc0b8e9d10 Ensure methods like _.get, _.has, _.matchesProperty, _.property, & _.propertyOf can get characters of string indexes. 2015-04-07 00:16:33 -07:00
jdalton
af8fcf234f Add _.set test for non-deep paths. 2015-04-06 13:01:27 -06:00
jdalton
e0dc2daf54 Simplify _.set for plain keys. 2015-04-06 12:59:39 -06:00
jdalton
c066e655dc Add empty path and array path coercing _.set test. 2015-04-06 12:04:07 -05:00
jdalton
2698e6f0ea Add more array path tests to _.get. 2015-04-06 11:54:09 -05:00
jdalton
63902bde9c Add array path tests to _.set. 2015-04-06 11:34:33 -05:00
jdalton
c876004fb2 Ensure _.set passes strict mode tests. 2015-04-06 09:57:26 -05:00
jdalton
633f37bfb6 Add array path tests to _.get. 2015-04-06 09:29:36 -05:00
jdalton
d70bc74dc8 Adjust baseGet and isKey to reduce code in other methods. 2015-04-05 21:41:10 -05:00
Justin Ridgewell
d7a4524e70 Add _.method and _.methodOf. 2015-04-05 13:53:54 -05:00
jdalton
fe1e27fd40 Add tests for _.add coercing params to numbers. 2015-04-05 13:45:56 -05:00
jdalton
8a7a099073 Use x even more in support definition. 2015-04-05 13:25:45 -05:00
jdalton
1b53b5f9eb Cleanup doc block for _.support.nonEnumArgs. [ci skip] 2015-04-05 13:25:29 -05:00
James
8b758ee25a Make _.add coerce augend and addend params to numbers. 2015-04-05 11:59:56 -05:00
jdalton
81c24a8478 Add _.get test for empty paths. 2015-04-05 08:38:51 -05:00
jdalton
a6f3e0b6af Remove "correctly" from test labels. 2015-04-05 08:38:14 -05:00
jdalton
6e9e8127b6 Rename variable sum in doc examples to total. [ci skip] 2015-04-05 08:15:36 -05:00
jdalton
63d43275d3 Remove unnecessary parseFloat from baseAt. 2015-04-05 08:13:32 -05:00
jdalton
cb2bf7f8fa Add tests for missing path parts for _.matchesProperty. 2015-04-05 01:39:51 -05:00
jdalton
1fae760ccd Use perl instead of sed in travis.yml. 2015-04-05 01:39:16 -05:00
jdalton
4195c4c4bf Add tests for missing path parts for _.property and _.propertyOf. 2015-04-04 14:35:50 -05:00
jdalton
13e7a1ed93 Add _.isMatch and _.matchesProperty tests for nullish object params. 2015-04-04 00:29:04 -05:00
jdalton
ea4357ca98 Add _.callback tests for deep paths. 2015-04-03 17:44:59 -05:00
jdalton
5e8255d24d Tweak path related test labels. 2015-04-03 17:08:59 -05:00
jdalton
003d6ec43f Add _.has tests for deep paths. 2015-04-03 17:08:30 -05:00
jdalton
9749ff7c67 Add a non-deep property test for _.get. 2015-04-03 12:56:12 -05:00
jdalton
c88589e0e5 Add _.result tests for deep paths. 2015-04-03 12:55:42 -05:00
jdalton
32ef1bb7a5 Add deep props to key tests to make it more interesting. 2015-04-03 12:47:26 -05:00
jdalton
206c65904f Add _.matchesProperty test for deep props. 2015-04-03 12:47:08 -05:00
jdalton
219d4688e4 Ensure path a property name is teated as a key before a path in _.get and _.set. 2015-04-03 12:36:31 -05:00
jdalton
adc687f0a0 Add _.property and _.propertyOf tests for deep paths. 2015-04-03 12:22:38 -05:00
jdalton
88e59c9a5a Cleanup tests. 2015-04-03 11:46:55 -05:00
jdalton
71a89a575f Add _.get and _.set tests. 2015-04-03 11:46:37 -05:00
jdalton
e3dc8dfcf4 Remove rogue newline in initCloneByTag doc block. [ci skip] 2015-04-03 02:12:14 -05:00
jdalton
2dd77d5bc7 Change "method" to "function". [ci skip] 2015-04-03 02:11:42 -05:00
jdalton
0192226bb3 Use "length" when referring to a property name. [ci skip] 2015-04-03 02:11:16 -05:00
jdalton
faf2658da2 Move getLength closer to like functions and give it a proper jsdoc block. 2015-04-03 02:10:21 -05:00
jdalton
9a1c00d2dc Use x a bit more in support definition to prevent aggressive minifier modifications. 2015-04-01 21:42:57 -07:00
jdalton
4a8695caff Use getLength to avoid an iOS JIT bug. 2015-04-01 21:39:37 -07:00
jdalton
b28016bfeb Simplify isLength check in _.keys. 2015-04-01 12:07:12 -07:00
jdalton
4758a9e66d Ensure _.inRange swaps start with end when start is greater than end. [closes #1099] 2015-04-01 08:43:42 -07:00
Trevor Adams
97bd1ef4ec Minor change to _.once to avoid an extra var swap. 2015-04-01 08:38:02 -07:00
jdalton
2adac8bdae Use _.restParam in createAssigner. 2015-04-01 01:57:19 -07:00
jdalton
3c56914822 Simplify isLoose check in baseIsEqualDeep. 2015-04-01 00:08:31 -07:00
jdalton
c5cc907838 Ensure _.match and _.matchesProperty compares functions by reference. [closes #1101] 2015-03-31 23:41:15 -07:00
jdalton
0907aabacd Avoid bug in older browsers where an unmatched capture group returns an empty string. 2015-03-31 09:09:17 -07:00
jdalton
f4290bda7f Update test deps. 2015-03-31 01:06:09 -07:00
jdalton
4bdb82a7a2 Ensure toPath works with a nullish value. 2015-03-31 00:50:47 -07:00
jdalton
6a696dde3a Add _.set tests. 2015-03-31 00:15:46 -07:00
jdalton
8481684a82 Fix start and end typo mix up in _.range docs. [closes #1095] [ci skip] 2015-03-30 21:05:48 -07:00
Benjamin Tan
03aa8b3356 Minor documentation and test name nits. [ci skip] 2015-03-30 20:58:20 -07:00
jdalton
64bfed2640 Clarify _.uniq docs. [ci skip] 2015-03-30 00:55:30 -07:00
jdalton
2edcc89303 Add _.get and _.set. 2015-03-29 20:59:48 -07:00
jdalton
18313f2e90 Minor word nit for mapSet doc. [ci skip] 2015-03-29 20:57:19 -07:00
jdalton
0ff96418bd Simplify reIsDeepProp and rePropName. 2015-03-29 20:32:25 -07:00
Justin Ridgewell
1480abf0e8 Fix Worker tests in Chrome. See https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#Browser_notes. 2015-03-29 18:34:48 -07:00
jdalton
e7ba75d533 Make toPath more robust and add support for deep properties to _.has and _.matchesProperty. 2015-03-29 15:43:53 -07:00
jdalton
044291d940 Add deep property support to _.has. 2015-03-29 08:59:42 -07:00
jdalton
ad62efcb9e Make reComboMarks singular for naming consistency. 2015-03-29 08:08:46 -07:00
jdalton
0dc59d9481 Add support for brackets to toPath. 2015-03-29 08:08:23 -07:00
Justin Ridgewell
11ab3034b1 Ensure _.result calls deep function with correct context. 2015-03-29 08:07:36 -07:00
Justin Ridgewell
c594bda77f Simplify getProperty and friends. 2015-03-29 00:07:13 -07:00
jdalton
8218b74fb3 Remove propertyDeep, propertyDeepOf, and resultDeep in favor of deep property path support in existing methods. 2015-03-28 13:16:16 -07:00
Joshua Piccari
3d0beb1a2e Add _.propertyDeep and _.propertyDeepOf. 2015-03-28 09:54:40 -07:00
Joshua Piccari
515cfd48d8 Add _.resultDeep. 2015-03-28 09:48:55 -07:00
jdalton
1448bab5b3 Clear func in function created by _.before without requiring an additional call. [closes #1088] 2015-03-28 00:39:04 -07:00
jdalton
2884f8acb8 Ensure _.intersection of a single array returns an empty array. [closes #1085] 2015-03-26 13:17:41 -07:00
jdalton
075cae4efb Use basePullAt in _.remove. 2015-03-26 09:03:29 -07:00
Justin Ridgewell
d2b98323dd Don't mutate array during #remove. [closes #1079] 2015-03-26 09:02:55 -07:00
jdalton
b1a81a85b1 Add a test for _.remove and index params. 2015-03-26 07:29:36 -07:00
jdalton
668384649a Change "Iterator" typo to "Iteratee" in docs. [ci skip] 2015-03-26 07:29:36 -07:00
jdalton
a7252b1a7f Bump to v3.6.0. 2015-03-24 22:41:59 -07:00
jdalton
a4e58e4d55 Rebuild lodash and docs. 2015-03-24 22:41:53 -07:00
jdalton
4241e01364 Cleanup comment links. [ci skip] 2015-03-24 22:34:57 -07:00
jdalton
d7d7952138 Increase test coverage by modifying the source to hit the branch of getFuncName used for minified builds. 2015-03-24 20:15:33 -07:00
jdalton
9cc2253339 Add npm i step to contributing.md. [ci skip] 2015-03-24 08:15:32 -07:00
jdalton
6831802590 Rename predicate to iteratee in _.uniq, _.countBy, _.groupBy, _.indexBy, & _.map docs. [closes #1071] [ci skip] 2015-03-23 23:34:33 -07:00
jdalton
9d79cc7e87 Make _.deburr handle combining diacritical marks. [closes #1070] 2015-03-23 20:50:04 -07:00
jdalton
763b003a11 Add note about _.runInContext to _.mixin docs. [ci skip] 2015-03-23 20:04:13 -07:00
jdalton
d560e2a558 Remove unused bar reFuncName. 2015-03-23 19:58:25 -07:00
jdalton
f914f080b1 Simplify ctor check flag in equalObjects. 2015-03-23 09:24:55 -07:00
jdalton
600a4e86e1 Ensure _.matches and _.matchesProperty work with function value params. 2015-03-23 09:24:05 -07:00
jdalton
e7b4ada65f Add _.restParam test for functions with more than 3 params. 2015-03-23 09:06:45 -07:00
jdalton
95f31be096 Add doc blocks for getFuncName and isLaziable. [ci skip] 2015-03-23 09:01:19 -07:00
jdalton
ad6db7eaae Adjust object checks in baseIsMatch, baseMatches, baseMatchesProperty, & isMatch. 2015-03-22 23:44:11 -07:00
jdalton
d7a99c6618 Add _.matches and _.matchesProperty tests for inherited properties. 2015-03-22 00:45:36 -07:00
jdalton
f20d8f5cc0 Loosen _.matches to match objects with inherited properties. [closes #1067] 2015-03-21 23:33:19 -07:00
jdalton
8930e6b393 Add baseWhile and createBaseEach. 2015-03-21 22:07:19 -07:00
jdalton
f26886acb0 Add createSortedIndex. 2015-03-21 18:08:35 -07:00
jdalton
820ab8d486 Add test for _.escapeRegExp with eval and Function. 2015-03-21 11:43:18 -07:00
jdalton
8e425fb358 Tweak _.at and _.matchesProperty doc examples. [ci skip] 2015-03-21 10:01:46 -07:00
jdalton
6006f499ac Fix doc bugs in _.runInContext, _.thru, _.forEachRight, & _.escapeRegExp. [closes #1065] [ci skip] 2015-03-21 10:01:17 -07:00
Christopher Venning
3caa740fc4 Fixed errors in documentation examples for _.trim, _.matchesProperty, & _.property. [ci skip] 2015-03-21 08:53:49 -07:00
jdalton
007ea9ea20 Add length check test to _.flow & _.flowRight. 2015-03-20 23:49:31 -07:00
jdalton
5d248d261d Expand part of shortcut fusion test. 2015-03-20 23:22:36 -07:00
jdalton
26908cba64 Don't assume a lodash method will exist. 2015-03-20 15:15:06 -07:00
jdalton
18d118746e Add _.fill doc example. [ci skip] 2015-03-20 12:37:49 -07:00
jdalton
9a633f5f2e Update root detection in WeakMap and Set shims. 2015-03-20 12:01:37 -07:00
jdalton
5aa44e98d5 Fix rhino and other old environment test fail. 2015-03-20 12:00:29 -07:00
jdalton
33916fa975 No need to redeclare funcName in createFlow. 2015-03-20 11:49:18 -07:00
jdalton
eab18df403 Cleanup isLaziable and getFuncNames. 2015-03-20 09:24:56 -07:00
jdalton
002caceb05 Cleanup isXyz methods. 2015-03-20 09:24:13 -07:00
jdalton
c250aa804a Ensure _.merge correctly coerces objects to arrays. [closes #1061] 2015-03-19 08:58:56 -07:00
jdalton
94ca50883f Drop funcDecomp optimization in baseCallback and ensure shortcut fusion for _.flow and _.flowRight works in minified builds. 2015-03-19 08:40:45 -07:00
jdalton
462c482873 Add support for shortcut fusion to _.flow and _.flowRight. 2015-03-18 10:27:45 -07:00
jdalton
e28e04a990 Add freeSelf as a fallback for when freeWindow is unavailable. 2015-03-17 20:13:10 -07:00
Rocco Nicosia
6438385d64 Fix _.zipObject docs to more clearly demonstrate it as _.pairs inverse. [ci skip] 2015-03-17 16:50:00 -07:00
jdalton
bfb08ce003 Use opposite instead of inverse to describe _.propertyOf. [ci skip] 2015-03-17 16:49:30 -07:00
jdalton
3590a06f40 Update _.zipObject docs to tie into _.pairs. [ci skip] 2015-03-17 16:45:01 -07:00
jdalton
23ca6c5e10 Rename createPad to createPadding and cleanup docs of pad methods. 2015-03-17 15:57:12 -07:00
jdalton
1aea5bcd50 Finish adding comment blocks to creator function. [ci skip] 2015-03-17 13:54:33 -07:00
jdalton
82c5d8ed28 Rename createComposer to createFlow. 2015-03-17 10:27:52 -07:00
jdalton
5dcd58a75f Tweak _.findIndex docs and correct _.findKey docs. [ci skip] 2015-03-17 10:23:59 -07:00
jdalton
dc605a4ee1 More more docs for creator functions. [ci skip] 2015-03-17 10:23:26 -07:00
Justin Ridgewell
fec940ab8b Allocate proper size in in _.restParam.
Since we're putting `rest` at `start` index, `array.length; // => {start + 1}`
2015-03-17 08:50:41 -07:00
jdalton
05fd7cecf4 Add docs for baseSum and arraySum. [ci skip] 2015-03-17 08:48:21 -07:00
jdalton
2f52730b48 Use and consistently. [ci skip] 2015-03-17 08:44:51 -07:00
jdalton
4c1819c7dd Ensure _.sum provides the correct arguments when iterating an object. 2015-03-15 19:49:14 -07:00
jdalton
c58c0df30e Cleanup creator functions. 2015-03-15 17:12:33 -07:00
jdalton
c5902b3144 Cleanup _.sum. 2015-03-15 17:01:40 -07:00
qsona
519eb424e7 Documentation nits. [ci skip] 2015-03-15 14:57:53 -07:00
qsona
03478afea4 Add support for _.sum to take iteratee. 2015-03-15 14:57:13 -07:00
jdalton
306ef8addf Add creator functions. 2015-03-15 14:48:32 -07:00
jdalton
d4659b261d Add baseFindIndex. 2015-03-15 11:22:25 -07:00
jdalton
69ce41807a Add _.restParam. 2015-03-15 10:57:21 -07:00
jdalton
cc81da5aa4 Update Chrome version in saucelabs.js. 2015-03-14 00:14:21 -07:00
jdalton
eee714f52b Add iteratee guard to _.includes. 2015-03-13 13:39:14 -07:00
jdalton
c976b637d8 Adjust test descriptions to be more generic. 2015-03-13 12:33:19 -07:00
jdalton
ea93515d53 Add well-known symbols test for _.uniq. 2015-03-13 09:03:09 -07:00
jdalton
652499bdcf Cleanup sortedIndex test. 2015-03-13 08:51:56 -07:00
Benjamin Tan
819862199a Documentation: Rename predicate to iteratee.
Closes #1049.
[ci skip]
2015-03-13 08:43:05 -07:00
jdalton
6c1bc1d7bb Semicolons out colons in. [ci skip] 2015-03-13 08:43:00 -07:00
octref
36ebe76e0a Fix _.reduce doc 2015-03-13 08:39:10 -07:00
Benjamin Tan
8f8d35dec7 Simplify test/saucelabs.js.
Remove repeated assignment operations.
2015-03-13 19:29:39 +08:00
jdalton
ac1e436339 Simplify isCommon and isCombo checks in mergeData. 2015-03-13 00:12:51 -07:00
jdalton
78d4812b0e Whitespace nits. [ci skip] 2015-03-12 23:02:23 -07:00
jdalton
6a1b7626e3 Add NaN tests for _.indexOf and _.lastIndexOf with a fromIndex. 2015-03-12 22:42:02 -07:00
bryce-gibson
b6ccb4c96f Add example of alternative _.zipObject syntax. [ci skip] 2015-03-12 07:41:15 -07:00
jdalton
9712ac550c Set metadata for curried lazy lodash methods. 2015-03-11 23:41:41 -07:00
jdalton
5b173766c6 Add symbol tests for _.isObject and _.uniq. 2015-03-11 20:52:34 -07:00
jdalton
b535c4f321 Optimize _.reduce and _.reduceRight. 2015-03-11 11:40:51 -07:00
jdalton
56c5ebcb71 Ensure the result of _.difference is based on the values of the first param only. [#1038] 2015-03-10 21:31:46 -07:00
jdalton
028234ba86 Update guard info in _.reduce docs. [ci skip] 2015-03-10 09:21:38 -07:00
jdalton
f063b4d231 Add isIterateeCall guards to _.every and _.some. [closes #1035] 2015-03-10 09:21:01 -07:00
Teoman Soygul
508f27cc32 Fix _.property documentation typo. [ci skip] 2015-03-10 08:44:54 -07:00
jdalton
d4783170e5 Minor cleanup of setting __actions__ in _.mixin. 2015-03-09 08:33:19 -07:00
jdalton
51e459b386 Bump to v3.5.0. 2015-03-08 17:57:42 -07:00
jdalton
1253d254af Rebuild lodash and docs. 2015-03-08 17:57:22 -07:00
jdalton
5e70574396 Add parentheses and cleanup more complex code snippets. 2015-03-08 17:45:53 -07:00
jdalton
b5dce2f74b Optimize createBindWrapper, createPartialWrapper, and createHybridWrapper. 2015-03-08 01:00:04 -08:00
jdalton
6113da3e68 Remove unneeded tests. 2015-03-07 23:27:21 -08:00
jdalton
faf6406289 Ensure lazy drop when applied after filter works correctly. [closes #1026] 2015-03-07 23:20:26 -08:00
jdalton
7c443431d9 Add private guard param doc to _.sortByOrder. [ci skip] 2015-03-07 11:11:24 -08:00
jdalton
0f201e3fd8 Add more chaining tests join, replace, & split. 2015-03-07 00:30:42 -08:00
jdalton
bf96c30187 Cleanup string methods added to LodashWrapper. 2015-03-07 00:23:17 -08:00
octref
eb1b7b914a Add split and replace to LodashWrapper. [closes #1016] 2015-03-06 23:11:52 -08:00
octref
135bc2de52 Adjust _.sortByOrder doc example to better show effect. [ci skip] 2015-03-06 12:02:30 -08:00
jdalton
ab2269717d Bump to v3.4.0. 2015-03-06 00:55:11 -08:00
jdalton
b5a42cfa75 Rebuild lodash and docs. 2015-03-05 23:01:16 -08:00
jdalton
6693416d0a Tweak _.isEmpty and _.size docs. [ci skip] 2015-03-05 22:59:18 -08:00
jdalton
9cdf013933 Ensure length hit of for lazy eval is checked on initial lazy call. [closes #997] 2015-03-05 22:50:16 -08:00
jdalton
1dfaa30520 Add inRange and sortByOrder to lodash doc notes. [ci skip] 2015-03-05 08:27:51 -08:00
jdalton
d898fcee75 Simplify the root assignment. 2015-03-05 07:41:22 -08:00
jdalton
1e647a2058 Rename test module for consistency. 2015-03-04 08:43:37 -08:00
jdalton
10e379d862 Add _.sortByOrder tests. 2015-03-04 08:43:37 -08:00
jdalton
ee456493c4 Remove argument unrolling in LazyWrapper assignments. 2015-03-04 08:43:37 -08:00
jdalton
69e9c7d0be Expand _.defaults test for working with _.reduce. 2015-03-04 08:43:37 -08:00
jdalton
adce718d63 Another cleanup pass on createAssigner. 2015-03-04 08:43:37 -08:00
jdalton
3a94a65f12 Tweak root assignment to work with webpack in a web worker. [closes ##313] 2015-03-04 08:43:37 -08:00
jdalton
bbe30db1b7 Avoid test fails for npm builds. 2015-03-03 12:13:48 -08:00
jdalton
68f3c43805 Add createComposer to reduce the definition of _.flow and _.flowRight. 2015-03-03 11:40:24 -08:00
jdalton
3c99ecda60 Move more code out of the try-block in _.attempt. 2015-03-03 11:40:24 -08:00
jdalton
b1366696c4 Simplify guard check in _.sortByAll. 2015-03-03 11:40:24 -08:00
jdalton
534aeb4065 Use args alias of arguments in _.difference, _.pull, & _.memoize. 2015-03-03 11:40:24 -08:00
jdalton
cc77a36dd9 Cleanup createAssigner. 2015-03-03 11:40:17 -08:00
jdalton
5991068fdf Add more lazy chaining tests. 2015-03-03 09:22:59 -08:00
octref
913778d5ab Let createAssigner get correct customizer
When `_.defaults` is invoked using `_.reduce` / `_.reduceRight`
`createAssigner` discards the customizer, so the effect is
`_.assign` but not `_.defaults`

```
_.reduce([{ 'user': 'barney' }, { 'user': 'fred' }], _.defaults)
// -> {user: "fred"}
_.reduceRight([{ 'user': 'barney' }, { 'user': 'fred' }], _.defaults)
// -> {user: "barney"}

// Fixed
_.reduce([{ 'user': 'barney' }, { 'user': 'fred' }], _.defaults)
// -> {user: "barney"}
_.reduceRight([{ 'user': 'barney' }, { 'user': 'fred' }], _.defaults)
// -> {user: "fred"}
```
2015-03-02 21:19:11 -08:00
h7lin
9a8345d4f9 Fix doc example in _.partition. [ci skip] 2015-03-02 20:25:29 -08:00
jdalton
ba9bd3bc76 Better match words with one character. [closes #1012] 2015-03-02 20:23:14 -08:00
jdalton
aad0070b77 Narrow new LodashWrapper to dropWhile. 2015-03-02 20:23:14 -08:00
jdalton
d192e69811 Break lazy chains before or . [closes #1011] 2015-03-02 09:19:05 -08:00
jdalton
ec8d919b93 Cleanup . 2015-03-02 09:17:16 -08:00
octref
4ce4f1d758 Add _.sortByOrder. 2015-03-01 14:04:00 -08:00
jdalton
3aa40d4df6 Simplify baseFlatten and always provide a fromIndex. 2015-03-01 01:22:38 -08:00
jdalton
ec1be41b62 Correct _.flatten benchmark. 2015-03-01 01:22:38 -08:00
jdalton
c15d81545a Update chalk in travis. 2015-03-01 01:22:38 -08:00
jdalton
1af8b9d16a Cleanup docs of _.flow, _.flowRight, _.defaults, _.range, _.inRange, & _.sum. [ci skip] 2015-02-28 21:12:10 -08:00
jdalton
d860cf834d Avoid testing the minified build on PRs in travis. 2015-02-28 19:18:38 -08:00
jdalton
63d5a3acbc Optimize baseIndexOf more consistently. 2015-02-28 12:42:14 -08:00
jdalton
132aacee89 Optimize lazy evaluation for 1 param. 2015-02-28 10:11:26 -08:00
jdalton
973038da6a Optimize baseIndexOf, indexOfNaN, and baseFlatten. 2015-02-27 21:43:30 -08:00
h7lin
584da3c39b Fix doc example in _.findLastIndex. [ci skip] 2015-02-27 19:56:12 -08:00
Mohsen Azimi
73c4829255 Escape the backtick in _.escape docs. [ci skip] 2015-02-27 19:56:06 -08:00
jdalton
68942f7ec4 Move _.max & _.min to Math category & make _.sum work on collections. 2015-02-27 09:20:57 -08:00
jdalton
e914b83a1b Add gitter badge to readme. [ci skip] [closes #983] 2015-02-27 08:26:09 -08:00
jdalton
2268376360 Update tested Firefox in saucelabs.js. 2015-02-26 19:41:22 -08:00
jdalton
6bb3b9a684 Disable lazy optimizations if the iteratee has more than one param. [closes #997] 2015-02-26 19:40:15 -08:00
jdalton
9f213c119c Add more chaining tests. 2015-02-25 23:35:16 -08:00
jdalton
f081e2b799 Cleanup _.sum tests. 2015-02-25 23:03:01 -08:00
jdalton
a024152c12 Add add and sum to lodash doc notes. [ci skip] 2015-02-25 23:01:50 -08:00
jdalton
42d23dbc70 Simplify _.sum. 2015-02-25 23:01:32 -08:00
John-David Dalton
74786e8a25 Merge pull request #987 from thejameskyle/math
Add math methods.
2015-02-25 19:00:06 -08:00
James Kyle
eeb4ede60d Add _.add/_.sum methods 2015-02-25 10:37:42 -08:00
Juliano Castilho
f2eee8896c Fix code example typo in _.dropRightWhile. [ci skip] 2015-02-25 00:19:53 -08:00
jdalton
bf4a70d91c Bump to v3.3.1. 2015-02-23 23:49:50 -08:00
jdalton
a35ab3937a Rebuild lodash and docs. 2015-02-23 23:49:40 -08:00
jdalton
5ef9a4be8a Ensure isIterateeCall doesn't error if index is an object without a toString method. [closes #994] 2015-02-23 23:48:49 -08:00
jdalton
d76d7582fe Simplify lazy filter, map, & takeWhile assignment. 2015-02-23 21:25:24 -08:00
jdalton
44006142c7 Ensure wait of _.debounce and _.throttle defaults to 0. [closes #991] 2015-02-23 08:28:20 -08:00
jdalton
6840b2cfe5 Consistent use of callCount variable. 2015-02-23 08:28:20 -08:00
jdalton
5613f60403 Ensure lazy takeWhile works with reverse and last`. [closes #990] 2015-02-23 02:05:09 -08:00
jdalton
76d3959f1a Use square in more places. 2015-02-23 01:26:07 -08:00
jdalton
b681759000 Remove unnecessary excused tests. 2015-02-23 00:35:24 -08:00
jdalton
d6336c4302 Fix code styling in _.template doc example. [ci skip] 2015-02-23 00:35:24 -08:00
jdalton
35b161450a Update benchmark and underscore vendor files. 2015-02-23 00:35:24 -08:00
jdalton
861aaf06c6 Optimize _.uniq and others in Firefox. 2015-02-23 00:35:23 -08:00
jdalton
a910884e7d Fix _.indexOf doc example typo. [closes #986] [ci skip] 2015-02-23 00:35:23 -08:00
Jarrett Meyer
0e7bef9014 Fixes missing single quotes in docs. [ci skip] 2015-02-23 00:35:23 -08:00
jdalton
d942189bc6 Bump to v3.3.0. 2015-02-23 00:35:23 -08:00
jdalton
eb16051b1e Rebuild lodash and docs. 2015-02-23 00:35:11 -08:00
jdalton
7749a7e41d Add gitter webhook to travis.yml. 2015-02-20 22:35:41 -08:00
jdalton
dc4cef17d4 Update ecstatic, istanbul, & sauce-tunnel in travis.yml. 2015-02-19 09:11:48 -08:00
jdalton
89ed40e4a4 Add _.merge. tests. 2015-02-19 00:14:59 -08:00
jdalton
10ee74d872 Cleanup clone tests. 2015-02-18 23:48:32 -08:00
jdalton
474ae1e91c Allow isDeep of _.clone to work with more truthy values. 2015-02-18 23:35:43 -08:00
jdalton
0dc70ca5f3 Semicolon nits. 2015-02-18 23:35:09 -08:00
jdalton
633b1663ca Tweak iteration methods test. 2015-02-18 23:22:03 -08:00
jdalton
153fe61b4b Avoid iterating strings in _.merge. [closes #978] 2015-02-18 21:05:39 -08:00
jdalton
9734fd0353 Increase _.merge test coverage. 2015-02-18 01:05:39 -08:00
jdalton
6209c120c0 Non-nits. 2015-02-18 01:03:53 -08:00
jdalton
3516881e7a Update tested Chrome in saucelabs.js. 2015-02-18 00:46:02 -08:00
jdalton
15398555b3 Ensure isIterateeCall works with NaN values. 2015-02-18 00:33:51 -08:00
jdalton
cb132fcbf4 Add more iteration method tests. 2015-02-18 00:03:50 -08:00
jdalton
f42f46c7d6 Adjust doc examples for smaller screens. [ci skip] 2015-02-17 10:08:38 -08:00
jdalton
f1046f1cf1 Consistent use of lodash when referencing a lodash wrapper. [ci skip] 2015-02-15 23:05:30 -08:00
jdalton
4a62287139 Cleanup baseLodash description. [ci skip] 2015-02-15 23:04:50 -08:00
jdalton
69cd56357f Tweak _.propertyOf usage example. [ci skip] 2015-02-15 22:42:16 -08:00
jdalton
b66a886682 Clarify _.noop docs. [ci skip] 2015-02-15 22:41:37 -08:00
jdalton
249504b7d6 Whitespace nits in docs. [ci skip] 2015-02-15 22:40:42 -08:00
jdalton
fa0086404d Add baseLodash. 2015-02-15 21:54:12 -08:00
Milos Zivadinovic
f243ebba91 Add _.inRange. 2015-02-15 18:01:05 -08:00
Austin Pray
540afb193b Fix type in _.some doc example. [closes #969] [ci skip] 2015-02-15 15:46:43 -08:00
jdalton
8294acdf1c Tweak null check tests of _.difference, _.intersection, _.union, & _.xor. 2015-02-15 00:37:18 -08:00
jdalton
7733d02938 Remove baseSlice from _.attempt. 2015-02-15 00:22:55 -08:00
jdalton
9b6342e7fa Add baseIsFunction. 2015-02-12 23:09:49 -08:00
jdalton
22c09cb31b Bump to v3.2.0. 2015-02-12 21:24:55 -08:00
jdalton
21e79cb54a Rebuild lodash and docs. 2015-02-12 21:24:48 -08:00
jdalton
b8cc829f4a Cleanup docs. [ci skip] 2015-02-12 21:13:45 -08:00
jdalton
ace0dacf15 Make baseMatches style consistent with baseMatchesProperty. 2015-02-12 20:18:26 -08:00
Graeme
5ca13098e3 Use predicate instead of iteratee. 2015-02-12 20:18:25 -08:00
jdalton
07b13eedec Cleanup _#plant and _.spread doc examples. [ci skip] 2015-02-12 12:47:54 -08:00
jdalton
d9168ed9ec Add proper jsdoc tags to _.fill. [ci skip] 2015-02-12 12:47:54 -08:00
jdalton
fb4e2c167c Add matchesProperty to lodash doc note. [ci skip] 2015-02-12 12:47:53 -08:00
jdalton
10ee3585f6 Fix spread doc and remove unused thisArg. 2015-02-12 01:59:16 -08:00
jdalton
5d4ba820dd Add _.matchesProperty shorthand tests. 2015-02-12 01:36:08 -08:00
jdalton
a51e00e69f Add _.matchesProperty tests. 2015-02-12 01:30:52 -08:00
jdalton
4dfa963851 Document "_.matchesProperty" shorthands. [ci skip] 2015-02-12 00:27:08 -08:00
jdalton
f2d4f6ccf6 Add _.matchesProperty. 2015-02-11 22:50:39 -08:00
jdalton
182cb8ab25 Simplify lazy pluck and where. 2015-02-11 22:50:22 -08:00
jdalton
ece341d868 Update android testing in saucelabs.js. 2015-02-11 20:25:25 -08:00
jdalton
d72e8c2687 Source cleanup from eslinting. 2015-02-11 20:25:13 -08:00
jdalton
b0ff6f4c7b Remove extraneous description from createAggregator docs. [ci skip] 2015-02-11 08:30:46 -08:00
jdalton
6ec5249492 Change intuitively to implicitly. 2015-02-11 08:29:41 -08:00
jdalton
c44cd76c5a Ensure commit and reverse track __chain__` settings. [closes #958] 2015-02-11 08:29:01 -08:00
jdalton
37f711d72a Adjust dep versions to better suite their range in package.json. 2015-02-11 00:15:11 -08:00
jdalton
fcf18fb965 Remove thisArg from _.spread. [closes #957] 2015-02-11 00:15:11 -08:00
jdalton
2efd6250fb Minor commit nit in test.js. [ci skip] 2015-02-11 00:15:11 -08:00
jdalton
1b4bd8523d Add _.slice assert. 2015-02-11 00:15:11 -08:00
jdalton
60c44910df Fix lazy slice when used after filter. [closes #955] 2015-02-11 00:15:03 -08:00
jdalton
faf67fae03 Update qunit to 1.17.1. 2015-02-10 20:16:27 -08:00
jdalton
e95f547950 Add doc notes on guarded methods. [ci skip] 2015-02-10 09:44:48 -08:00
jdalton
96b663b783 Ensure lazy slice handles floating-point start and end params. 2015-02-10 00:33:10 -08:00
jdalton
ce44f7e4b0 Add lazy compact and toArray. 2015-02-10 00:08:09 -08:00
jdalton
16a9c7d492 Improve label of unstable test. 2015-02-09 08:58:08 -08:00
jdalton
fc369c3448 Add _.fill and _.slice tests for default start and end params. 2015-02-09 08:39:09 -08:00
jdalton
b1a33edf0f Cleanup io.js testing in travis.yml. 2015-02-09 01:24:40 -08:00
jdalton
3b805f1a24 Rebuild lodash. 2015-02-09 01:14:55 -08:00
jdalton
954b4d8075 Add mutation note to _.fill docs. [ci skip] 2015-02-09 00:45:38 -08:00
jdalton
d073e2a881 Add _.fill to lodash docs. [ci skip] 2015-02-09 00:45:37 -08:00
jdalton
044dd2af94 Remove unneeded jsdoc Function type tags. [ci skip] 2015-02-09 00:45:37 -08:00
jdalton
ee489fa8c0 Cleanup tests. 2015-02-09 00:45:37 -08:00
jdalton
035ed5f49b Add _.fill. 2015-02-09 00:45:37 -08:00
jdalton
7dcd690f61 Add object test for _.max and _.min being used as an iteratee for _.map. 2015-02-09 00:45:37 -08:00
jdalton
1c9290aded Add _.includes, _.indexOf, _.lastIndexOf, _.map, _.mapValues, & a few other tests. 2015-02-09 00:45:37 -08:00
jdalton
0b922b1ed1 Move _.support tests to be in alphebetic API order. 2015-02-09 00:45:37 -08:00
jdalton
34eec362e5 Add methods to lodash docs. [ci skip] 2015-02-09 00:45:37 -08:00
jdalton
b829383864 Cleanup docs for _.callback. [ci skip] 2015-02-09 00:45:36 -08:00
jdalton
3960235428 Cleanup _.spread docs & tests. 2015-02-09 00:45:36 -08:00
Nicolas Chambrier
e91a662491 Add _.spread. 2015-02-09 00:45:36 -08:00
jdalton
ba4da24984 Add tests for arguments provided to callbacks of _.takeWhile and friends when in a lazy chain sequence. [closes #944] 2015-02-09 00:45:36 -08:00
jdalton
70378432b7 Minor cleanup of istanbul command in travis.yml. 2015-02-09 00:45:36 -08:00
jdalton
6b63009b14 Expand _.takeWhile, _.takeRightWhile, _.dropWhile, & _.dropRightWhile tests. 2015-02-09 00:45:36 -08:00
jdalton
dd45fea732 Add _#commit, _#plant, & _#run. 2015-02-09 00:45:36 -08:00
jdalton
ee09425cfb Simplify travis.yml. 2015-02-09 00:45:36 -08:00
jdalton
af02a1e024 Replace some _.isFunction checks with simple typeof checks and replace some typeof checks with _.isFunction checks based on likelihood of a problem value older enviros being passed. 2015-02-07 09:45:11 -08:00
jdalton
2a86f0776c Fix travis run. 2015-02-06 23:44:14 -08:00
jdalton
c6f73d9df8 Consistent apply(undefined, ...) use. 2015-02-06 23:14:03 -08:00
jdalton
5ab79f292b Allow _.attempt to provide additional arguments to func. [closes #929] 2015-02-06 23:09:52 -08:00
jdalton
82c7a22d27 Ensure _.flow and _.flowRight return an identity function when no arguments are provided. [closes #938] 2015-02-06 22:45:58 -08:00
jdalton
35fa977981 Update to Node.js 0.12 and simplify io.js install in travis.yml. 2015-02-06 21:57:08 -08:00
jdalton
ecbc46a91d Remove unused unshift variable. 2015-02-06 21:56:37 -08:00
jdalton
d2f6416e45 Add _.runInContext usage example to _.mixin docs. [ci skip] 2015-02-05 09:47:47 -08:00
jdalton
97a885a05c Use sauce-tunnel v2.1.1 to avoid hangs when closing tunnels. 2015-02-04 22:51:25 -08:00
jdalton
aa1edd6b94 Update tested io.js version in travis.yml. 2015-02-04 21:20:11 -08:00
jdalton
083e401717 Fix param doc typos in baseIsMatch, _.chunk, & _.isMatch. [ci skip] [closes #923] 2015-02-04 21:14:42 -08:00
jdalton
bdeca2edce Update .gitignore to ignore lodash.compat.min.js. [ci skip] 2015-02-04 21:14:42 -08:00
152 changed files with 63642 additions and 35409 deletions

View File

@@ -4,15 +4,9 @@
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
[**.{js,json,md}]
indent_style = space
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
[**.html]
indent_style = tab
insert_final_newline = false
trim_trailing_whitespace = true

67
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,67 @@
# Contributing to Lodash
Contributions are always welcome. Before contributing please read the
[code of conduct](https://github.com/lodash/lodash/blob/master/CODE_OF_CONDUCT.md)
& [search the issue tracker](https://github.com/lodash/lodash/issues); your issue
may have already been discussed or fixed in `master`. To contribute,
[fork](https://help.github.com/articles/fork-a-repo/) Lodash, commit your changes,
& [send a pull request](https://help.github.com/articles/using-pull-requests/).
## Feature Requests
Feature requests are always welcome. They should be submitted in the
[issue tracker](https://github.com/lodash/lodash/issues), with a description of
the expected behavior & use case, where theyll remain closed until sufficient
interest has been shown by the community. Before submitting a request,
please search for similar ones in the
[closed issues](https://github.com/lodash/lodash/issues?q=is%3Aissue+is%3Aclosed+label%3Aenhancement).
## Pull Requests
For additions or bug fixes you should only need to modify `lodash.js`. Include
updated unit tests in the `test` directory as part of your pull request. Dont
worry about regenerating the `dist/` or `doc/` files.
Before running the unit tests youll need to install, `npm i`,
[development dependencies](https://docs.npmjs.com/files/package.json#devdependencies).
Run unit tests from the command-line via `npm test`, or open `test/index.html` &
`test/fp.html` in a web browser. The [Backbone](http://backbonejs.org/) &
[Underscore](http://underscorejs.org/) test suites are included as well.
## Contributor License Agreement
Lodash is a member of the [Dojo Foundation](http://dojofoundation.org/).
As such, we request that all contributors sign the Dojo Foundation
[contributor license agreement (CLA)](http://dojofoundation.org/about/claForm).
For more information about CLAs, please check out Alex Russells excellent post,
[“Why Do I Need to Sign This?”](http://infrequently.org/2008/06/why-do-i-need-to-sign-this/).
## Coding Guidelines
In addition to the following guidelines, please follow the conventions already
established in the code.
- **Spacing**:<br>
Use two spaces for indentation. No tabs.
- **Naming**:<br>
Keep variable & method names concise & descriptive.<br>
Variable names `index`, `collection`, & `callback` are preferable to
`i`, `arr`, & `fn`.
- **Quotes**:<br>
Single-quoted strings are preferred to double-quoted strings; however,
please use a double-quoted string if the value contains a single-quote
character to avoid unnecessary escaping.
- **Comments**:<br>
Please use single-line comments to annotate significant additions, &
[JSDoc-style](http://www.2ality.com/2011/08/jsdoc-intro.html) comments for
functions.
Guidelines are enforced using [JSCS](https://www.npmjs.com/package/jscs):
```bash
$ npm run style
```

3
.gitignore vendored
View File

@@ -2,5 +2,6 @@
*.custom.*
*.log
*.map
lodash.compat.js
lodash.compat.min.js
coverage
node_modules

96
.jscsrc Normal file
View File

@@ -0,0 +1,96 @@
{
"maxErrors": "2000",
"maximumLineLength": {
"value": 180,
"allExcept": ["comments", "functionSignature", "regex"]
},
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do",
"try",
"catch"
],
"requireOperatorBeforeLineBreak": [
"=",
"+",
"-",
"/",
"*",
"==",
"===",
"!=",
"!==",
">",
">=",
"<",
"<="
],
"requireSpaceAfterKeywords": [
"if",
"else",
"for",
"while",
"do",
"switch",
"return",
"try",
"catch"
],
"requireSpaceBeforeBinaryOperators": [
"=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
"&=", "|=", "^=", "+=",
"+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
"|", "^", "&&", "||", "===", "==", ">=",
"<=", "<", ">", "!=", "!=="
],
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"requireCamelCaseOrUpperCaseIdentifiers": true,
"requireDotNotation": { "allExcept": ["keywords"] },
"requireEarlyReturn": true,
"requireLineFeedAtFileEnd": true,
"requireSemicolons": true,
"requireSpaceAfterBinaryOperators": true,
"requireSpacesInConditionalExpression": true,
"requireSpaceBeforeObjectValues": true,
"requireSpaceBeforeBlockStatements": true,
"requireSpacesInForStatement": true,
"validateIndentation": 2,
"validateParameterSeparator": ", ",
"validateQuoteMarks": { "mark": "'", "escape": true },
"disallowSpacesInAnonymousFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInFunctionDeclaration": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowKeywords": ["with"],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineBreaks": true,
"disallowNewlineBeforeBlockStatements": true,
"disallowSpaceAfterObjectKeys": true,
"disallowSpaceAfterPrefixUnaryOperators": true,
"disallowSpacesInCallExpression": true,
"disallowSpacesInsideArrayBrackets": true,
"disallowSpacesInsideParentheses": true,
"disallowTrailingWhitespace": true,
"jsDoc": {
"checkRedundantAccess": true,
"checkTypes": true,
"requireNewlineAfterDescription": true,
"requireParamDescription": true,
"requireParamTypes": true,
"requireReturnTypes": true
}
}

View File

@@ -1,63 +1,77 @@
language: node_js
sudo: false
node_js:
- "0.10"
- "5"
env:
global:
- BIN="node" BUILD="compat" ISTANBUL=false NODE_BIN=$BIN OPTION=""
- IOJS_VERSION="v1.0.4" NPM_VERSION="^2.0.0" SAUCE_LABS=false SAUCE_USERNAME="lodash"
- BIN="node" ISTANBUL=false OPTION=""
- SAUCE_LABS=false SAUCE_USERNAME="lodash"
- secure: "tg1JFsIFnxzLaTboFPOnm+aJCuMm5+JdhLlESlqg9x3fwro++7KCnwHKLNovhchaPe4otC43ZMB/nfWhDnDm11dKbm/V6HlTkED+dadTsaLxVDg6J+7yK41QhokBPJOxLV78iDaNaAQVYEirAgZ0yn8kFubxmNKV+bpCGQNc9yU="
matrix:
- BUILD="compat"
- BUILD="modern"
- BUILD="modern"
- BUILD="modern" ISTANBUL=true
- BIN="iojs" BUILD="compat" NODE_BIN=$BIN
- BIN="iojs" BUILD="modern" NODE_BIN=$BIN
-
- BIN="phantomjs"
- BIN="rhino"
- BIN="rhino" OPTION="-require"
- BIN="ringo"
- ISTANBUL=true
- SAUCE_LABS=true
matrix:
include:
- node_js: "0.8"
env: NPM_VERSION="~1.4.0"
- node_js: "0.8"
env: BUILD="modern" NPM_VERSION="~1.4.0"
- node_js: "0.10"
env: SAUCE_LABS=true
- node_js: "0.10"
env: SAUCE_LABS=true BUILD="modern"
env:
- node_js: "0.12"
env:
- node_js: "4"
env:
git:
depth: 10
branches:
only:
- master
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/4aab6358b0e9aed0b628
on_success: change
on_failure: always
before_install:
- "nvm use $TRAVIS_NODE_VERSION"
- "npm config set loglevel error"
- "npm i -g npm@\"$NPM_VERSION\""
- "[ $SAUCE_LABS == false ] || npm i chalk@\"0.5.1\" ecstatic@\"0.5.8\" request@\"^2.0.0\" sauce-tunnel@\"^2.0.0\""
- "[ $ISTANBUL == false ] || (npm i -g coveralls@\"^2.0.0\" && npm i istanbul@\"0.3.5\")"
- "[ $BIN != 'iojs' ] || (wget https://iojs.org/dist/${IOJS_VERSION}/iojs-${IOJS_VERSION}-linux-x64.tar.xz && sudo tar xJf iojs-${IOJS_VERSION}-linux-x64.tar.xz -C /opt && rm iojs-${IOJS_VERSION}-linux-x64.tar.xz)"
- "[ $BIN != 'iojs' ] || (sudo ln -s /opt/iojs-${IOJS_VERSION}-linux-x64/bin/iojs /usr/local/bin/iojs && sudo chmod +x $_)"
- "[ $BIN != 'rhino' ] || (sudo mkdir /opt/rhino-1.7R5 && sudo wget --no-check-certificate -O $_/js.jar https://lodash.com/_travis/rhino-1.7R5.jar)"
- "[ $BIN != 'rhino' ] || (echo -e '#!/bin/sh\\njava -jar /opt/rhino-1.7R5/js.jar $@' | sudo tee /usr/local/bin/rhino && sudo chmod +x /usr/local/bin/rhino)"
- "[ $BIN != 'ringo' ] || (wget --no-check-certificate https://lodash.com/_travis/ringojs-0.11.zip && sudo unzip ringojs-0.11 -d /opt && rm ringojs-0.11.zip)"
- "[ $BIN != 'ringo' ] || (sudo ln -s /opt/ringojs-0.11/bin/ringo /usr/local/bin/ringo && sudo chmod +x $_)"
- "sed -i'' 's|\"lodash\"|\"lodash-compat\"|' ./package.json"
- "git clone --depth=10 --branch=master git://github.com/lodash/lodash-cli.git ./node_modules/lodash-cli && mkdir $_/node_modules && cd $_ && ln -s ../../../ ./lodash-compat && cd ../ && npm i && cd ../../"
- "$NODE_BIN ./node_modules/lodash-cli/bin/lodash $BUILD -o ./lodash.$BUILD.js"
- "npm set loglevel error"
- "npm set progress false"
- "npm i -g npm@\"^2.0.0\""
- |
PATTERN[0]="|\s*if\s*\(isHostObject\b[\s\S]+?\}(?=\n)|"
PATTERN[1]="|\s*if\s*\(enumerate\b[\s\S]+?\};\s*\}|"
PATTERN[2]="|\s*while\s*\([^)]+\)\s*\{\s*iteratee\(index\);\s*\}|"
PATTERN[3]="|\s*else\s*\{\s*assocSet\(data\b[\s\S]+?\}|"
PATTERN[4]="|\s*if\s*\(ctorString\b[\s\S]+?\}\s*\}|"
PATTERN[5]="|\bindex,\s*iterable\)\s*===\s*false\)[^}]+?(break;)|"
PATTERN[6]="|\s*if\s*\(!lodashFunc\)\s*\{\s*return;\s*\}|"
PATTERN[7]="|\s*define\([\s\S]+?\);|"
PATTERN[8]="|\s*root\._\s*=\s*_;|"
if [ $ISTANBUL == true ]; then
set -e
for PTRN in ${PATTERN[@]}; do
node ./test/remove.js "$PTRN" ./lodash.js
done
fi
- "git clone --depth=10 --branch=master git://github.com/lodash/lodash-cli ./node_modules/lodash-cli && mkdir $_/node_modules && cd $_ && ln -s ../../../ ./lodash && cd ../ && npm i && cd ../../"
- "node ./node_modules/lodash-cli/bin/lodash -o ./dist/lodash.js"
script:
- "[ $ISTANBUL == false ] || (nvm install 0.11.11 && cp ./lodash.$BUILD.js ./lodash.js && $BIN --harmony ./node_modules/istanbul/lib/cli.js cover -x \"**/vendor/**\" --report lcovonly ./test/test.js -- ./lodash.js)"
- "([ $ISTANBUL == true ] && [ $TRAVIS_SECURE_ENV_VARS == true ] && nvm use $TRAVIS_NODE_VERSION && cat ./coverage/lcov.info | coveralls) || true"
- "[ $ISTANBUL == false ] || istanbul cover -x \"**/vendor/**\" --report lcovonly ./test/test.js -- ./lodash.js"
- "[ $ISTANBUL == false ] || [ $TRAVIS_SECURE_ENV_VARS == false ] || (cat ./coverage/lcov.info | coveralls) || true"
- "[ $ISTANBUL == false ] || [ $TRAVIS_SECURE_ENV_VARS == false ] || (cat ./coverage/coverage.json | codecov) || true"
- "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || cd ./test"
- "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || $BIN $OPTION ./test.js ../lodash.$BUILD.js"
- "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || $BIN $OPTION ./test.js ../lodash.$BUILD.min.js"
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../lodash.$BUILD.js&noglobals=true\" tags=\"$BUILD,development\""
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../lodash.$BUILD.min.js&noglobals=true\" tags=\"$BUILD,production\""
- "[ $SAUCE_LABS == false ] || [ $BUILD != 'compat' ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../lodash.$BUILD.js\" tags=\"$BUILD,development,ie-compat\" compatMode=7"
- "[ $SAUCE_LABS == false ] || [ $BUILD != 'compat' ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../lodash.$BUILD.min.js\" tags=\"$BUILD,production,ie-compat\" compatMode=7"
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"backbone tests\" runner=\"test/backbone.html?build=../lodash.$BUILD.min.js\" tags=\"$BUILD,production,backbone\""
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"backbone tests\" runner=\"test/backbone.html?build=../lodash.$BUILD.js\" tags=\"$BUILD,development,backbone\""
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"underscore tests\" runner=\"test/underscore.html?build=../lodash.$BUILD.min.js\" tags=\"$BUILD,production,underscore\""
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"underscore tests\" runner=\"test/underscore.html?build=../lodash.$BUILD.js\" tags=\"$BUILD,development,underscore\""
- "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || $BIN $OPTION ./test.js ../lodash.js"
- "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || [ $TRAVIS_SECURE_ENV_VARS == false ] || $BIN $OPTION ./test.js ../dist/lodash.min.js"
- "[ $SAUCE_LABS == false ] || rm -rf ./node_modules/lodash"
- "[ $SAUCE_LABS == false ] || ($BIN ./node_modules/lodash-cli/bin/lodash modularize exports=node -o ./node_modules/lodash && node ./node_modules/lodash-cli/bin/lodash -d -o ./node_modules/lodash/lodash.js)"
- "[ $SAUCE_LABS == false ] || $BIN ./node_modules/lodash-cli/bin/lodash core -o ./dist/lodash.core.js"
- "[ $SAUCE_LABS == false ] || npm run build"
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../dist/lodash.js&noglobals=true\" tags=\"development\""
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../dist/lodash.min.js&noglobals=true\" tags=\"production\""
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"lodash-fp tests\" runner=\"test/fp.html?noglobals=true\" tags=\"development\""
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"underscore tests\" runner=\"test/underscore.html?build=../dist/lodash.js\" tags=\"development,underscore\""
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"underscore tests\" runner=\"test/underscore.html?build=../dist/lodash.min.js\" tags=\"production,underscore\""
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"backbone tests\" runner=\"test/backbone.html?build=../dist/lodash.js\" tags=\"development,backbone\""
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"backbone tests\" runner=\"test/backbone.html?build=../dist/lodash.min.js\" tags=\"production,backbone\""
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"backbone tests\" runner=\"test/backbone.html?build=../dist/lodash.core.js\" tags=\"development,backbone\""
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"backbone tests\" runner=\"test/backbone.html?build=../dist/lodash.core.min.js\" tags=\"production,backbone\""

49
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,49 @@
# Contributor Code of Conduct
As contributors and maintainers of this project, and in the interest of
fostering an open and welcoming community, we pledge to respect all people who
contribute through reporting issues, posting feature requests, updating
documentation, submitting pull requests or patches, and other activities.
We are committed to making participation in this project a harassment-free
experience for everyone, regardless of level of experience, gender, gender
identity and expression, sexual orientation, disability, personal appearance,
body size, race, ethnicity, age, religion, or nationality.
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing other's private information, such as physical or electronic
addresses, without explicit permission
* Other unethical or unprofessional conduct
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
By adopting this Code of Conduct, project maintainers commit themselves to
fairly and consistently applying these principles to every aspect of managing
this project. Project maintainers who do not follow or enforce the Code of
Conduct may be permanently removed from the project team.
This code of conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting a project maintainer at
[coc@lodash.com](mailto:coc@lodash.com). All complaints will be reviewed and
investigated and will result in a response that is deemed necessary and
appropriate to the circumstances. Maintainers are obligated to maintain
confidentiality with regard to the reporter of an incident.
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.3.0, available at
[http://contributor-covenant.org/version/1/3/0/][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/3/0/

View File

@@ -1,37 +0,0 @@
# Contributing to lodash
If youd like to contribute a feature or bug fix, you can [fork](https://help.github.com/articles/fork-a-repo/) lodash, commit your changes, & [send a pull request](https://help.github.com/articles/using-pull-requests/).
Please make sure to [search the issue tracker](https://github.com/lodash/lodash/issues) first; your issue may have already been discussed or fixed in `master`.
## Tests
Include updated unit tests in the `test` directory as part of your pull request.
Dont worry about regenerating the documentation, lodash.js, or lodash.min.js.
You can run the tests from the command line via `node test/test`, or open `test/index.html` in a web browser.
The `test/run-test.sh` script attempts to run the tests in [Rhino](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino), [RingoJS](http://ringojs.org/), [PhantomJS](http://phantomjs.org/), & [Node](http://nodejs.org/), before running them in your default browser.
The [Backbone](http://backbonejs.org/) & [Underscore](http://underscorejs.org/) test suites are included as well.
## Contributor License Agreement
lodash is a member of the [Dojo Foundation](http://dojofoundation.org/).
As such, we request that all contributors sign the Dojo Foundation [contributor license agreement](http://dojofoundation.org/about/claForm).
For more information about CLAs, please check out Alex Russells excellent post, [“Why Do I Need to Sign This?”](http://infrequently.org/2008/06/why-do-i-need-to-sign-this/).
## Coding Guidelines
In addition to the following guidelines, please follow the conventions already established in the code.
- **Spacing**:<br>
Use two spaces for indentation. No tabs.
- **Naming**:<br>
Keep variable & method names concise & descriptive.<br>
Variable names `index`, `collection`, & `callback` are preferable to `i`, `arr`, & `fn`.
- **Quotes**:<br>
Single-quoted strings are preferred to double-quoted strings; however, please use a double-quoted string if the value contains a single-quote character to avoid unnecessary escaping.
- **Comments**:<br>
Please use single-line comments to annotate significant additions, & [JSDoc-style](http://www.2ality.com/2011/08/jsdoc-intro.html) comments for new methods.

23
LICENSE Normal file
View File

@@ -0,0 +1,23 @@
The MIT License (MIT)
Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,22 +0,0 @@
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -1,25 +1,52 @@
# lodash v3.1.0
# lodash v4.5.1
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash](https://lodash.com/) with packages for [Bower](http://bower.io/), [Component](http://component.github.io/), & [Volo](http://volojs.org/).
The [lodash](https://lodash.com/) library exported as a [UMD](https://github.com/umdjs/umd) module.
Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli):
```bash
$ lodash modern -o ./lodash.js
$ npm run build
$ lodash -o ./dist/lodash.js
$ lodash core -o ./dist/lodash.core.js
```
## Module formats
## Community
lodash is also available in a variety of other builds & module formats.
[![Gitter](https://badges.gitter.im/lodash/lodash.svg)](https://gitter.im/lodash/lodash)
* npm packages for [modern](https://www.npmjs.com/package/lodash), [compatibility](https://www.npmjs.com/package/lodash-compat), & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) builds
* AMD modules for [modern](https://github.com/lodash/lodash/tree/3.1.0-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.1.0-amd) builds
* ES modules for the [modern](https://github.com/lodash/lodash/tree/3.1.0-es) build
## 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.1/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.1/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.5.1/dist/lodash.core.min.js))
* [Full build](https://raw.githubusercontent.com/lodash/lodash/4.5.1/dist/lodash.js) ([~21 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.5.1/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>
numbers, objects, strings, etc. Lodashs modular methods are great for:
* Iterating arrays, objects, & strings
* Manipulating & testing values
* Creating composite functions
## 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.5.1-npm/fp)
## Further Reading
* [API Documentation](https://lodash.com/docs)
* [Build Differences](https://github.com/lodash/lodash/wiki/Build-Differences)
* [Changelog](https://github.com/lodash/lodash/wiki/Changelog)
* [Release Notes](https://github.com/lodash/lodash/releases)
* [Roadmap](https://github.com/lodash/lodash/wiki/Roadmap)
* [More Resources](https://github.com/lodash/lodash/wiki/Resources)
* [Contributing](https://github.com/lodash/lodash/blob/master/.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)

View File

@@ -1,20 +0,0 @@
{
"name": "lodash",
"version": "3.1.0",
"main": "lodash.js",
"ignore": [
".*",
"*.custom.*",
"*.log",
"*.map",
"*.md",
"lodash.src.js",
"component.json",
"package.json",
"doc",
"node_modules",
"perf",
"test",
"vendor"
]
}

View File

@@ -1,10 +0,0 @@
{
"name": "lodash",
"repo": "lodash/lodash",
"version": "3.1.0",
"description": "The modern build of lodash.",
"license": "MIT",
"main": "lodash.js",
"keywords": ["stdlib", "util"],
"scripts": ["lodash.js"]
}

3823
dist/lodash.core.js vendored Normal file

File diff suppressed because it is too large Load Diff

29
dist/lodash.core.min.js vendored Normal file
View File

@@ -0,0 +1,29 @@
/**
* @license
* lodash 4.5.1 (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===an?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 vn[n];
}function c(n){var t=false;if(null!=n&&typeof n.toString!="function")try{t=!!(n+"")}catch(r){}return t}function f(n,t){return n=typeof n=="number"||hn.test(n)?+n:-1,n>-1&&0==n%1&&(null==t?9007199254740991:t)>n}function a(n){if(Y(n)&&!Pn(n)){if(n instanceof l)return n;if(En.call(n,"__wrapped__")){var t=new l(n.__wrapped__,n.__chain__);return t.__actions__=N(n.__actions__),t}}return new l(n)}function l(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function p(n,t,r,e){var u;return(u=n===an)||(u=xn[r],
u=(n===u||n!==n&&u!==u)&&!En.call(e,r)),u?t:n}function s(n){return X(n)?Fn(n):{}}function h(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(an,r)},t)}function v(n,t){var r=true;return $n(n,function(n,e,u){return r=!!t(n,e,u)}),r}function y(n,t){var r=[];return $n(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function _(t,r,e,u){u||(u=[]);for(var o=-1,i=t.length;++o<i;){var c=t[o];r>0&&Y(c)&&L(c)&&(e||Pn(c)||K(c))?r>1?_(c,r-1,e,u):n(u,c):e||(u[u.length]=c);
}return u}function g(n,t){return n&&qn(n,t,en)}function b(n,t){return y(t,function(t){return Q(n[t])})}function j(n,t,r,e,u){return n===t?true:null==n||null==t||!X(n)&&!Y(t)?n!==n&&t!==t:m(n,t,j,r,e,u)}function m(n,t,r,e,u,o){var i=Pn(n),f=Pn(t),a="[object Array]",l="[object Array]";i||(a=kn.call(n),"[object Arguments]"==a&&(a="[object Object]")),f||(l=kn.call(t),"[object Arguments]"==l&&(l="[object Object]"));var p="[object Object]"==a&&!c(n),f="[object Object]"==l&&!c(t);return!(l=a==l)||i||p?2&u||(a=p&&En.call(n,"__wrapped__"),
f=f&&En.call(t,"__wrapped__"),!a&&!f)?l?(o||(o=[]),(a=J(o,function(t){return t[0]===n}))&&a[1]?a[1]==t:(o.push([n,t]),t=(i?I:q)(n,t,r,e,u,o),o.pop(),t)):false:r(a?n.value():n,f?t.value():t,e,u,o):$(n,t,a)}function d(n){var t=typeof n;return"function"==t?n:null==n?cn:("object"==t?x:A)(n)}function w(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function O(n,t){var r=-1,e=L(n)?Array(n.length):[];return $n(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function x(n){var t=en(n);return function(r){
var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&j(n[u],r[u],an,3)))return false}return true}}function E(n,t){return n=Object(n),P(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function A(n){return function(t){return null==t?an:t[n]}}function k(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function N(n){return k(n,0,n.length)}function S(n,t){var r;return $n(n,function(n,e,u){return r=t(n,e,u),
!r}),!!r}function T(t,r){return P(r,function(t,r){return r.func.apply(r.thisArg,n([t],r.args))},t)}function F(n,t,r,e){r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u],c=e?e(r[i],n[i],i,r,n):n[i],f=r,a=f[i];En.call(f,i)&&(a===c||a!==a&&c!==c)&&(c!==an||i in f)||(f[i]=c)}return r}function R(n){return V(function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:an,o=typeof o=="function"?(u--,o):an;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function B(n){return function(){var t=arguments,r=s(n.prototype),t=n.apply(r,t);
return X(t)?t:r}}function D(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==wn&&this instanceof e?u:n;++c<f;)a[c]=r[c];for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=B(n);return e}function I(n,t,r,e,u,o){var i=-1,c=1&u,f=n.length,a=t.length;if(f!=a&&!(2&u&&a>f))return false;for(a=true;++i<f;){var l=n[i],p=t[i];if(void 0!==an){a=false;break}if(c){if(!S(t,function(n){return l===n||r(l,n,e,u,o);
})){a=false;break}}else if(l!==p&&!r(l,p,e,u,o)){a=false;break}}return a}function $(n,t,r){switch(r){case"[object Boolean]":case"[object Date]":return+n==+t;case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object Number]":return n!=+n?t!=+t:n==+t;case"[object RegExp]":case"[object String]":return n==t+""}return false}function q(n,t,r,e,u,o){var i=2&u,c=en(n),f=c.length,a=en(t).length;if(f!=a&&!i)return false;for(var l=f;l--;){var p=c[l];if(!(i?p in t:En.call(t,p)))return false}for(a=true;++l<f;){
var p=c[l],s=n[p],h=t[p];if(void 0!==an||s!==h&&!r(s,h,e,u,o)){a=false;break}i||(i="constructor"==p)}return a&&!i&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(a=false)),a}function z(n){var t=n?n.length:an;if(W(t)&&(Pn(n)||nn(n)||K(n))){n=String;for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);t=e}else t=null;return t}function C(n){var t=n&&n.constructor,t=Q(t)&&t.prototype||xn;return n===t}function G(n){
return n?n[0]:an}function J(n,t){return r(n,d(t),$n)}function M(n,t){return $n(n,typeof t=="function"?t:cn)}function P(n,t,r){return e(n,d(t),r,3>arguments.length,$n)}function U(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Un(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=an),r}}function V(n){var t;if(typeof n!="function")throw new TypeError("Expected a function");return t=In(t===an?n.length-1:Un(t),0),function(){for(var r=arguments,e=-1,u=In(r.length-t,0),o=Array(u);++e<u;)o[e]=r[t+e];
for(u=Array(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function H(n,t){return n>t}function K(n){return Y(n)&&L(n)&&En.call(n,"callee")&&(!Rn.call(n,"callee")||"[object Arguments]"==kn.call(n))}function L(n){return null!=n&&!(typeof n=="function"&&Q(n))&&W(zn(n))}function Q(n){return n=X(n)?kn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function W(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n}function X(n){var t=typeof n;return!!n&&("object"==t||"function"==t);
}function Y(n){return!!n&&typeof n=="object"}function Z(n){return typeof n=="number"||Y(n)&&"[object Number]"==kn.call(n)}function nn(n){return typeof n=="string"||!Pn(n)&&Y(n)&&"[object String]"==kn.call(n)}function tn(n,t){return t>n}function rn(n){return typeof n=="string"?n:null==n?"":n+""}function en(n){var t=C(n);if(!t&&!L(n))return Dn(Object(n));var r,e=z(n),u=!!e,e=e||[],o=e.length;for(r in n)!En.call(n,r)||u&&("length"==r||f(r,o))||t&&"constructor"==r||e.push(r);return e}function un(n){for(var t=-1,r=C(n),e=w(n),u=e.length,o=z(n),i=!!o,o=o||[],c=o.length;++t<u;){
var a=e[t];i&&("length"==a||f(a,c))||"constructor"==a&&(r||!En.call(n,a))||o.push(a)}return o}function on(n){return n?u(n,en(n)):[]}function cn(n){return n}function fn(t,r,e){var u=en(r),o=b(r,u);null!=e||X(r)&&(o.length||!u.length)||(e=r,r=t,t=this,o=b(r,en(r)));var i=X(e)&&"chain"in e?e.chain:true,c=Q(t);return $n(o,function(e){var u=r[e];t[e]=u,c&&(t.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=t(this.__wrapped__);return(e.__actions__=N(this.__actions__)).push({func:u,args:arguments,
thisArg:t}),e.__chain__=r,e}return u.apply(t,n([this.value()],arguments))})}),t}var an,ln=1/0,pn=/[&<>"'`]/g,sn=RegExp(pn.source),hn=/^(?:0|[1-9]\d*)$/,vn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},yn={"function":true,object:true},_n=yn[typeof exports]&&exports&&!exports.nodeType?exports:an,gn=yn[typeof module]&&module&&!module.nodeType?module:an,bn=gn&&gn.exports===_n?_n:an,jn=o(yn[typeof self]&&self),mn=o(yn[typeof window]&&window),dn=o(yn[typeof this]&&this),wn=o(_n&&gn&&typeof global=="object"&&global)||mn!==(dn&&dn.window)&&mn||jn||dn||Function("return this")(),On=Array.prototype,xn=Object.prototype,En=xn.hasOwnProperty,An=0,kn=xn.toString,Nn=wn._,Sn=wn.Reflect,Tn=Sn?Sn.f:an,Fn=Object.create,Rn=xn.propertyIsEnumerable,Bn=wn.isFinite,Dn=Object.keys,In=Math.max,$n=function(n,t){
return function(r,e){if(null==r)return r;if(!L(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(g),qn=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}();Tn&&!Rn.call({valueOf:1},"valueOf")&&(w=function(n){n=Tn(n);for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r});var zn=A("length"),Cn=V(function(t,r){return Pn(t)||(t=null==t?[]:[Object(t)]),_(r,1),
n(N(t),on)}),Gn=V(function(n,t,r){return D(n,t,r)}),Jn=V(function(n,t){return h(n,1,t)}),Mn=V(function(n,t,r){return h(n,Vn(t)||0,r)}),Pn=Array.isArray,Un=Number,Vn=Number,Hn=R(function(n,t){F(t,en(t),n)}),Kn=R(function(n,t){F(t,un(t),n)}),Ln=R(function(n,t,r,e){F(t,un(t),n,e)}),Qn=V(function(n){return n.push(an,p),Ln.apply(an,n)}),Wn=V(function(n,t){return null==n?{}:E(n,_(t,1))}),Xn=d;l.prototype=s(a.prototype),l.prototype.constructor=l,a.assignIn=Kn,a.before=U,a.bind=Gn,a.chain=function(n){return n=a(n),
n.__chain__=true,n},a.compact=function(n){return y(n,Boolean)},a.concat=Cn,a.create=function(n,t){var r=s(n);return t?Hn(r,t):r},a.defaults=Qn,a.defer=Jn,a.delay=Mn,a.filter=function(n,t){return y(n,d(t))},a.flatten=function(n){return n&&n.length?_(n,1):[]},a.flattenDeep=function(n){return n&&n.length?_(n,ln):[]},a.iteratee=Xn,a.keys=en,a.map=function(n,t){return O(n,d(t))},a.matches=function(n){return x(Hn({},n))},a.mixin=fn,a.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");
return function(){return!n.apply(this,arguments)}},a.once=function(n){return U(2,n)},a.pick=Wn,a.slice=function(n,t,r){var e=n?n.length:0;return r=r===an?e:+r,e?k(n,null==t?0:+t,r):[]},a.sortBy=function(n,t){var r=0;return t=d(t),O(O(n,function(n,e,u){return{c:n,b:r++,a:t(n,e,u)}}).sort(function(n,t){var r;n:{r=n.a;var e=t.a;if(r!==e){var u=null===r,o=r===an,i=r===r,c=null===e,f=e===an,a=e===e;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;
}),A("c"))},a.tap=function(n,t){return t(n),n},a.thru=function(n,t){return t(n)},a.toArray=function(n){return L(n)?n.length?N(n):[]:on(n)},a.values=on,a.extend=Kn,fn(a,a),a.clone=function(n){return X(n)?Pn(n)?N(n):F(n,en(n)):n},a.escape=function(n){return(n=rn(n))&&sn.test(n)?n.replace(pn,i):n},a.every=function(n,t,r){return t=r?an:t,v(n,d(t))},a.find=J,a.forEach=M,a.has=function(n,t){return null!=n&&En.call(n,t)},a.head=G,a.identity=cn,a.indexOf=function(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?In(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=K,a.isArray=Pn,a.isBoolean=function(n){return true===n||false===n||Y(n)&&"[object Boolean]"==kn.call(n)},a.isDate=function(n){return Y(n)&&"[object Date]"==kn.call(n)},a.isEmpty=function(n){if(L(n)&&(Pn(n)||nn(n)||Q(n.splice)||K(n)))return!n.length;for(var t in n)if(En.call(n,t))return false;return true},a.isEqual=function(n,t){return j(n,t)},a.isFinite=function(n){return typeof n=="number"&&Bn(n)},a.isFunction=Q,a.isNaN=function(n){
return Z(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=Z,a.isObject=X,a.isRegExp=function(n){return X(n)&&"[object RegExp]"==kn.call(n)},a.isString=nn,a.isUndefined=function(n){return n===an},a.last=function(n){var t=n?n.length:0;return t?n[t-1]:an},a.max=function(n){return n&&n.length?t(n,cn,H):an},a.min=function(n){return n&&n.length?t(n,cn,tn):an},a.noConflict=function(){return wn._===this&&(wn._=Nn),this},a.noop=function(){},a.reduce=P,a.result=function(n,t,r){return t=null==n?an:n[t],
t===an&&(t=r),Q(t)?t.call(n):t},a.size=function(n){return null==n?0:(n=L(n)?n:en(n),n.length)},a.some=function(n,t,r){return t=r?an:t,S(n,d(t))},a.uniqueId=function(n){var t=++An;return rn(n)+t},a.each=M,a.first=G,fn(a,function(){var n={};return g(a,function(t,r){En.call(a.prototype,r)||(n[r]=t)}),n}(),{chain:false}),a.VERSION="4.5.1",$n("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:On)[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__)},(mn||jn||{})._=a,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return a}):_n&&gn?(bn&&((gn.exports=a)._=a),_n._=a):wn._=a}).call(this);

647
dist/lodash.fp.js vendored Normal file
View File

@@ -0,0 +1,647 @@
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["fp"] = factory();
else
root["fp"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
var baseConvert = __webpack_require__(1);
/**
* Converts `lodash` to an immutable auto-curried iteratee-first data-last version.
*
* @param {Function} lodash The lodash function.
* @param {Object} [options] The options object. See `baseConvert` for more details.
* @returns {Function} Returns the converted `lodash`.
*/
function browserConvert(lodash, options) {
return baseConvert(lodash, lodash, options);
}
if (typeof _ == 'function') {
_ = browserConvert(_.runInContext());
}
module.exports = browserConvert;
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
var mapping = __webpack_require__(2),
mutateMap = mapping.mutate,
placeholder = {};
/**
* The base implementation of `convert` which accepts a `util` object of methods
* required to perform conversions.
*
* @param {Object} util The util object.
* @param {string} name The name of the function to wrap.
* @param {Function} func The function to wrap.
* @param {Object} [options] The options object.
* @param {boolean} [options.cap=true] Specify capping iteratee arguments.
* @param {boolean} [options.curry=true] Specify currying.
* @param {boolean} [options.fixed=true] Specify fixed arity.
* @param {boolean} [options.immutable=true] Specify immutable operations.
* @param {boolean} [options.rearg=true] Specify rearranging arguments.
* @returns {Function|Object} Returns the converted function or object.
*/
function baseConvert(util, name, func, options) {
var setPlaceholder,
isLib = typeof name == 'function',
isObj = name === Object(name);
if (isObj) {
options = func;
func = name;
name = undefined;
}
if (func == null) {
throw new TypeError;
}
options || (options = {});
var config = {
'cap': 'cap' in options ? options.cap : true,
'curry': 'curry' in options ? options.curry : true,
'fixed': 'fixed' in options ? options.fixed : true,
'immutable': 'immutable' in options ? options.immutable : true,
'rearg': 'rearg' in options ? options.rearg : true
};
var forceRearg = ('rearg' in options) && options.rearg;
var helpers = isLib ? func : {
'ary': util.ary,
'clone': util.clone,
'curry': util.curry,
'forEach': util.forEach,
'isArray': util.isArray,
'isFunction': util.isFunction,
'iteratee': util.iteratee,
'keys': util.keys,
'rearg': util.rearg,
'spread': util.spread,
'toPath': util.toPath
};
var ary = helpers.ary,
clone = helpers.clone,
curry = helpers.curry,
each = helpers.forEach,
isArray = helpers.isArray,
isFunction = helpers.isFunction,
keys = helpers.keys,
rearg = helpers.rearg,
spread = helpers.spread,
toPath = helpers.toPath;
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); }
: function(a) { return func(a); };
};
var cloneArray = function(array) {
var length = array ? array.length : 0,
result = Array(length);
while (length--) {
result[length] = array[length];
}
return result;
};
var cloneByPath = function(object, path) {
path = toPath(path);
var index = -1,
length = path.length,
result = clone(Object(object)),
nested = result;
while (nested != null && ++index < length) {
var key = path[index],
value = nested[key];
if (value != null) {
nested[key] = clone(Object(value));
}
nested = nested[key];
}
return result;
};
var createCloner = function(func) {
return function(object) {
return func({}, object);
};
};
var immutWrap = function(func, cloner) {
return function() {
var length = arguments.length;
if (!length) {
return result;
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var result = args[0] = cloner.apply(undefined, args);
func.apply(undefined, args);
return result;
};
};
var iterateeAry = function(func, n) {
return overArg(func, function(func) {
return typeof func == 'function' ? baseAry(func, n) : func;
});
};
var iterateeRearg = function(func, indexes) {
return overArg(func, function(func) {
var n = indexes.length;
return baseArity(rearg(baseAry(func, n), indexes), n);
});
};
var overArg = function(func, iteratee, retArg) {
return function() {
var length = arguments.length;
if (!length) {
return func();
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var index = config.rearg ? 0 : (length - 1);
args[index] = iteratee(args[index]);
return func.apply(undefined, args);
};
};
var wrappers = {
'castArray': function(castArray) {
return function() {
var value = arguments[0];
return isArray(value)
? castArray(cloneArray(value))
: castArray.apply(undefined, arguments);
};
},
'iteratee': function(iteratee) {
return function() {
var func = arguments[0],
arity = arguments[1],
result = iteratee(func, arity),
length = result.length;
if (config.cap && typeof arity == 'number') {
arity = arity > 2 ? (arity - 2) : 1;
return (length && length <= arity) ? result : baseAry(result, arity);
}
return result;
};
},
'mixin': function(mixin) {
return function(source) {
var func = this;
if (!isFunction(func)) {
return mixin(func, Object(source));
}
var methods = [],
methodNames = [];
each(keys(source), function(key) {
var value = source[key];
if (isFunction(value)) {
methodNames.push(key);
methods.push(func.prototype[key]);
}
});
mixin(func, Object(source));
each(methodNames, function(methodName, index) {
var method = methods[index];
if (isFunction(method)) {
func.prototype[methodName] = method;
} else {
delete func.prototype[methodName];
}
});
return func;
};
},
'runInContext': function(runInContext) {
return function(context) {
return baseConvert(util, runInContext(context), options);
};
}
};
var wrap = function(name, func) {
name = mapping.aliasToReal[name] || name;
var wrapper = wrappers[name];
if (wrapper) {
return wrapper(func);
}
var wrapped = func;
if (config.immutable) {
if (mutateMap.array[name]) {
wrapped = immutWrap(func, cloneArray);
}
else if (mutateMap.object[name]) {
wrapped = immutWrap(func, createCloner(func));
}
else if (mutateMap.set[name]) {
wrapped = immutWrap(func, cloneByPath);
}
}
var result;
each(aryMethodKeys, function(aryKey) {
each(mapping.aryMethod[aryKey], function(otherName) {
if (name == otherName) {
var aryN = !isLib && mapping.iterateeAry[name],
reargIndexes = mapping.iterateeRearg[name],
spreadStart = mapping.methodSpread[name];
result = wrapped;
if (config.fixed) {
result = spreadStart === undefined
? ary(result, aryKey)
: spread(result, spreadStart);
}
if (config.rearg && aryKey > 1 && (forceRearg || !mapping.skipRearg[name])) {
result = rearg(result, mapping.methodRearg[name] || mapping.aryRearg[aryKey]);
}
if (config.cap) {
if (reargIndexes) {
result = iterateeRearg(result, reargIndexes);
} else if (aryN) {
result = iterateeAry(result, aryN);
}
}
if (config.curry && aryKey > 1) {
result = curry(result, aryKey);
}
return false;
}
});
return !result;
});
result || (result = wrapped);
if (mapping.placeholder[name]) {
setPlaceholder = true;
func.placeholder = result.placeholder = placeholder;
}
return result;
};
if (!isObj) {
return wrap(name, func);
}
var _ = func;
// Iterate over methods for the current ary cap.
var pairs = [];
each(aryMethodKeys, function(aryKey) {
each(mapping.aryMethod[aryKey], function(key) {
var func = _[mapping.remap[key] || key];
if (func) {
pairs.push([key, wrap(key, func)]);
}
});
});
// Assign to `_` leaving `_.prototype` unchanged to allow chaining.
each(pairs, function(pair) {
_[pair[0]] = pair[1];
});
if (setPlaceholder) {
_.placeholder = placeholder;
}
// Wrap the lodash method and its aliases.
each(keys(_), function(key) {
each(mapping.realToAlias[key] || [], function(alias) {
_[alias] = _[key];
});
});
return _;
}
module.exports = baseConvert;
/***/ },
/* 2 */
/***/ function(module, exports) {
/** Used to map aliases to their real names. */
exports.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'
};
/** Used to map ary to method names. */
exports.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', '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', 'orderBy', 'pullAllBy', 'reduce', 'reduceRight',
'replace', 'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform',
'unionBy', 'unionWith', 'xorBy', 'xorWith', 'zipWith'
],
'4': [
'fill', 'setWith'
]
};
/** Used to map ary to rearg configs. */
exports.aryRearg = {
'2': [1, 0],
'3': [2, 0, 1],
'4': [3, 2, 0, 1]
};
/** Used to map method names to their iteratee ary. */
exports.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
};
/** Used to map method names to iteratee rearg configs. */
exports.iterateeRearg = {
'mapKeys': [1]
};
/** Used to map method names to rearg configs. */
exports.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]
};
/** Used to map method names to spread configs. */
exports.methodSpread = {
'partial': 1,
'partialRight': 1
};
/** Used to identify methods which mutate arrays or objects. */
exports.mutate = {
'array': {
'fill': true,
'pull': true,
'pullAll': true,
'pullAllBy': true,
'pullAt': true,
'remove': true,
'reverse': true
},
'object': {
'assign': true,
'assignIn': true,
'assignInWith': true,
'assignWith': true,
'defaults': true,
'defaultsDeep': true,
'merge': true,
'mergeWith': true
},
'set': {
'set': true,
'setWith': true,
'unset': true
}
};
/** Used to track methods with placeholder support */
exports.placeholder = {
'bind': true,
'bindKey': true,
'curry': true,
'curryRight': true,
'partial': true,
'partialRight': true
};
/** Used to map real names to their aliases. */
exports.realToAlias = (function() {
var hasOwnProperty = Object.prototype.hasOwnProperty,
object = exports.aliasToReal,
result = {};
for (var key in object) {
var value = object[key];
if (hasOwnProperty.call(result, value)) {
result[value].push(key);
} else {
result[value] = [key];
}
}
return result;
}());
/** Used to map method names to other names. */
exports.remap = {
'curryN': 'curry',
'curryRightN': 'curryRight',
'getOr': 'get',
'trimChars': 'trim',
'trimCharsEnd': 'trimEnd',
'trimCharsStart': 'trimStart'
};
/** Used to track methods that skip `_.rearg`. */
exports.skipRearg = {
'add': true,
'assign': true,
'assignIn': true,
'concat': true,
'difference': true,
'gt': true,
'gte': true,
'lt': true,
'lte': true,
'matchesProperty': true,
'merge': true,
'partial': true,
'partialRight': true,
'random': true,
'range': true,
'rangeRight': true,
'subtract': true,
'zip': true,
'zipObject': true
};
/***/ }
/******/ ])
});
;

13
dist/lodash.fp.min.js vendored Normal file
View File

@@ -0,0 +1,13 @@
!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,r,s){var u,c="function"==typeof e,p=e===Object(e);if(p&&(s=r,r=e,e=void 0),null==r)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?r:{ary:t.ary,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},d=h.ary,y=h.clone,g=h.curry,m=h.forEach,v=h.isArray,W=h.isFunction,x=h.keys,R=h.rearg,I=h.spread,O=h.toPath,b=x(i.aryMethod),A=function(t,e){return 2==e?function(e,r){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}},B=function(t,e){return 2==e?function(e,r){return t(e,r)}:function(e){return t(e)}},E=function(t){for(var e=t?t.length:0,r=Array(e);e--;)r[e]=t[e];return r},j=function(t,e){e=O(e);for(var r=-1,n=e.length,i=y(Object(t)),a=i;null!=a&&++r<n;){
var o=e[r],s=a[o];null!=s&&(a[o]=y(Object(s))),a=a[o]}return i},k=function(t){return function(e){return t({},e)}},w=function(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}},q=function(t,e){return P(t,function(t){return"function"==typeof t?B(t,e):t})},z=function(t,e){return P(t,function(t){var r=e.length;return A(R(B(t,r),e),r)})},P=function(t,e,r){return function(){var r=arguments.length;
if(!r)return t();for(var n=Array(r);r--;)n[r]=arguments[r];var i=l.rearg?0:r-1;return n[i]=e(n[i]),t.apply(void 0,n)}},M={castArray:function(t){return function(){var e=arguments[0];return v(e)?t(E(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[0],r=arguments[1],n=t(e,r),i=n.length;return l.cap&&"number"==typeof r?(r=r>2?r-2:1,i&&r>=i?n:B(n,r)):n}},mixin:function(t){return function(e){var r=this;if(!W(r))return t(r,Object(e));var n=[],i=[];return m(x(e),function(t){
var a=e[t];W(a)&&(i.push(t),n.push(r.prototype[t]))}),t(r,Object(e)),m(i,function(t,e){var i=n[e];W(i)?r.prototype[t]=i:delete r.prototype[t]}),r}},runInContext:function(e){return function(r){return n(t,e(r),s)}}},L=function(t,e){t=i.aliasToReal[t]||t;var r=M[t];if(r)return r(e);var n=e;l.immutable&&(a.array[t]?n=w(e,E):a.object[t]?n=w(e,k(e)):a.set[t]&&(n=w(e,j)));var s;return m(b,function(e){return m(i.aryMethod[e],function(r){if(t==r){var a=!c&&i.iterateeAry[t],o=i.iterateeRearg[t],u=i.methodSpread[t];
return s=n,l.fixed&&(s=void 0===u?d(s,e):I(s,u)),l.rearg&&e>1&&(f||!i.skipRearg[t])&&(s=R(s,i.methodRearg[t]||i.aryRearg[e])),l.cap&&(o?s=z(s,o):a&&(s=q(s,a))),l.curry&&e>1&&(s=g(s,e)),!1}}),!s}),s||(s=n),i.placeholder[t]&&(u=!0,e.placeholder=s.placeholder=o),s};if(!p)return L(e,r);var S=r,C=[];return m(b,function(t){m(i.aryMethod[t],function(t){var e=S[i.remap[t]||t];e&&C.push([t,L(t,e)])})}),m(C,function(t){S[t[0]]=t[1]}),u&&(S.placeholder=o),m(x(S),function(t){m(i.realToAlias[t]||[],function(e){
S[e]=S[t]})}),S}var i=r(2),a=i.mutate,o={};t.exports=n},function(t,e){e.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"},e.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","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","orderBy","pullAllBy","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","xorBy","xorWith","zipWith"],4:["fill","setWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.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},e.iterateeRearg={mapKeys:[1]},e.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]},e.methodSpread={partial:1,partialRight:1},e.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}},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",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart"},e.skipRearg={add:!0,assign:!0,assignIn:!0,concat:!0,difference:!0,gt:!0,gte:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,partial:!0,partialRight:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0}}])});

14933
dist/lodash.js vendored Normal file

File diff suppressed because it is too large Load Diff

120
dist/lodash.min.js vendored Normal file
View File

@@ -0,0 +1,120 @@
/**
* @license
* lodash 4.5.1 (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;
return true}function i(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;){var i=n[r];t(i,r,n)&&(o[++u]=i)}return o}function f(n,t){return!!n.length&&-1<d(n,t,0)}function c(n,t,r){for(var e=-1,u=n.length;++e<u;)if(r(t,n[e]))return true;return false}function a(n,t){for(var r=-1,e=n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function l(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function s(n,t,r,e){var u=-1,o=n.length;for(e&&o&&(r=n[++u]);++u<o;)r=t(r,n[u],u,n);return r}function h(n,t,r,e){
var u=n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function p(n,t){for(var r=-1,e=n.length;++r<e;)if(t(n[r],r,n))return true;return false}function _(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(f===Z?i===i:r(i,f)))var f=i,c=o}return c}function g(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,false):void 0}),u}function v(n,t,r){for(var e=n.length,u=r?e:-1;r?u--:++u<e;)if(t(n[u],u,n))return u;return-1}function d(n,t,r){if(t!==t)return B(n,r);--r;for(var e=n.length;++r<e;)if(n[r]===t)return r;
return-1}function y(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function b(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}function x(n,t){for(var r,e=-1,u=n.length;++e<u;){var o=t(n[e]);o!==Z&&(r=r===Z?o:r+o)}return r}function m(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function j(n,t){return a(t,function(t){return[t,n[t]]})}function w(n){return function(t){return n(t)}}function A(n,t){return a(t,function(t){return n[t]})}function O(n,t){for(var r=-1,e=n.length;++r<e&&-1<d(t,n[r],0););
return r}function k(n,t){for(var r=n.length;r--&&-1<d(t,n[r],0););return r}function E(n){return n&&n.Object===Object?n:null}function I(n,t){if(n!==t){var r=null===n,e=n===Z,u=n===n,o=null===t,i=t===Z,f=t===t;if(n>t&&!o||!u||r&&!i&&f||e&&f)return 1;if(t>n&&!r||!f||o&&!e&&u||i&&u)return-1}return 0}function S(n){return Un[n]}function R(n){return zn[n]}function W(n){return"\\"+$n[n]}function B(n,t,r){var e=n.length;for(t+=r?0:-1;r?t--:++t<e;){var u=n[t];if(u!==u)return t}return-1}function C(n){var t=false;
if(null!=n&&typeof n.toString!="function")try{t=!!(n+"")}catch(r){}return t}function U(n,t){return n=typeof n=="number"||yn.test(n)?+n:-1,n>-1&&0==n%1&&(null==t?9007199254740991:t)>n}function z(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function M(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function L(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;){var i=n[r];(i===t||"__lodash_placeholder__"===i)&&(n[r]="__lodash_placeholder__",o[++u]=r)}return o;
}function $(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function F(n){if(!n||!En.test(n))return n.length;for(var t=kn.lastIndex=0;kn.test(n);)t++;return t}function N(n){return Mn[n]}function D(E){function yn(n){if(we(n)&&!Zo(n)&&!(n instanceof An)){if(n instanceof wn)return n;if(lu.call(n,"__wrapped__"))return Pr(n)}return new wn(n)}function jn(){}function wn(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=Z}function An(n){
this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=false,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 $r(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():Iu.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(pe(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||pe(n,cu[r])&&!lu.call(e,r)?t:n}function Gn(n,t,r){(r!==Z&&!pe(n[t],r)||typeof t=="number"&&r===Z&&!(t in n))&&(n[t]=r)}function Yn(n,t,r){
var e=n[t];lu.call(n,t)&&pe(e,r)&&(r!==Z||t in n)||(n[t]=r)}function Hn(n,t,r,e){return Hu(n,function(n,u,o){t(e,n,r(n),o)}),e}function Qn(n,t){return n&&nr(t,De(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:$e(n,t[r]);return o}function nt(n){return de(n)?n:[]}function tt(n){return typeof n=="function"?n:Ye}function rt(n){return Zo(n)?n:qr(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=Zo(n)){if(f=Br(n),!t)return Xt(n,f)}else{var c=Rr(n),a="[object Function]"==c||"[object GeneratorFunction]"==c;if(qo(n))return Jt(n,t);if("[object Object]"==c||"[object Arguments]"==c||a&&!o){if(C(n))return o?n:{};if(f=Cr(a?{}:n),!t)return rr(n,Qn(f,n))}else{if(!Cn[c])return o?n:{};f=Ur(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=De(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)?Ou(n):{}}function ft(n,t,r){if(typeof n!="function")throw new iu("Expected a function");return Eu(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 Hu(n,function(n,e,u){return r=!!t(n,e,u)}),r}function lt(n,t){var r=[];return Hu(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&&de(i)&&(r||Zo(i)||ge(i))?t>1?st(i,t-1,r,e):l(e,i):r||(e[e.length]=i)}return e}function ht(n,t){return null==n?n:Xu(n,t,Ze)}function pt(n,t){return n&&Xu(n,t,De)}function _t(n,t){return n&&no(n,t,De)}function gt(n,t){return i(t,function(t){
return be(n[t])})}function vt(n,t){t=Lr(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 lu.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),l.push(g)}}return l}function xt(n,t,r,e){return pt(n,function(n,u,o){t(e,r(n),u,o)}),e}function mt(n,t,e){return Lr(t,n)||(t=rt(t),n=Zr(n,t),t=Vr(t)),t=null==n?n:n[t],null==t?Z:r(t,n,e)}function jt(n,t,r,e,u){if(n===t)return true;if(null==n||null==t||!je(n)&&!we(t))return n!==n&&t!==t;n:{var o=Zo(n),i=Zo(t),f="[object Array]",c="[object Array]";o||(f=Rr(n),"[object Arguments]"==f?f="[object Object]":"[object Object]"!=f&&(o=Re(n))),i||(c=Rr(t),"[object Arguments]"==c?c="[object Object]":"[object Object]"!=c&&Re(t));
var a="[object Object]"==f&&!C(n),i="[object Object]"==c&&!C(t),c=f==c;if(!c||o||a){if(!(2&e)&&(f=a&&lu.call(n,"__wrapped__"),i=i&&lu.call(t,"__wrapped__"),f||i)){n=jt(f?n.value():n,i?t.value():t,r,e,u);break n}c?(u||(u=new $n),n=(o?jr:Ar)(n,t,jt,r,e,u)):n=false}else n=wr(n,t,f,jt,r,e)}return n}function wt(n,t,r,e){var u=r.length,o=u,i=!e;if(null==n)return!o;for(n=Object(n);u--;){var f=r[u];if(i&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return false}for(;++u<o;){var f=r[u],c=f[0],a=n[c],l=f[1];if(i&&f[2]){if(a===Z&&!(c in n))return false;
}else if(f=new $n,c=e?e(a,l,c,n,t,f):Z,c===Z?!jt(l,a,e,3,f):!c)return false}return true}function At(n){var t=typeof n;return"function"==t?n:null==n?Ye:"object"==t?Zo(n)?It(n[0],n[1]):Et(n):nu(n)}function Ot(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function kt(n,t){var r=-1,e=ve(n)?Array(n.length):[];return Hu(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function Et(n){var t=Er(n);if(1==t.length&&t[0][2]){var r=t[0][0],e=t[0][1];return function(n){return null==n?false:n[r]===e&&(e!==Z||r in Object(n));
}}return function(r){return r===n||wt(r,n,t)}}function It(n,t){return function(r){var e=$e(r,n);return e===Z&&e===t?Ne(r,n):jt(t,e,Z,3)}}function St(n,t,r,e,o){if(n!==t){var i=Zo(t)||Re(t)?Z:Ze(t);u(i||t,function(u,f){if(i&&(f=u,u=t[f]),je(u)){o||(o=new $n);var c=f,a=o,l=n[c],s=t[c],h=a.get(s);if(!h){var h=e?e(l,s,c+"",n,t,a):Z,p=h===Z;p&&(h=s,Zo(s)||Re(s)?Zo(l)?h=l:de(l)?h=Xt(l):(p=false,h=ut(s,true)):ke(s)||ge(s)?ge(l)?h=Me(l):!je(l)||r&&be(l)?(p=false,h=ut(s,true)):h=l:p=false),a.set(s,h),p&&St(h,s,r,e,a)}
Gn(n,c,h)}else c=e?e(n[f],u,f+"",n,t,o):Z,c===Z&&(c=u),Gn(n,f,c)})}}function Rt(n,t,r){var e=-1,u=kr();return t=a(t.length?t:Array(1),function(n){return u(n)}),n=kt(n,function(n,r,u){return{a:a(t,function(t){return t(n)}),b:++e,c:n}}),b(n,function(n,t){var e;n:{e=-1;for(var u=n.a,o=t.a,i=u.length,f=r.length;++e<i;){var c=I(u[e],o[e]);if(c){if(e>=f){e=c;break n}e=c*("desc"==r[e]?-1:1);break n}}e=n.b-t.b}return e})}function Wt(n,t){return n=Object(n),s(t,function(t,r){return r in n&&(t[r]=n[r]),t},{});
}function Bt(n,t){var r={};return ht(n,function(n,e){t(n,e)&&(r[e]=n)}),r}function Ct(n){return function(t){return null==t?Z:t[n]}}function Ut(n){return function(t){return vt(t,n)}}function zt(n,t,r){var e=-1,u=t.length,o=n;for(r&&(o=a(n,function(n){return r(n)}));++e<u;)for(var i=0,f=t[e],f=r?r(f):f;-1<(i=d(o,f,i));)o!==n&&Iu.call(o,i,1),Iu.call(n,i,1);return n}function Mt(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];if(e==r||u!=o){var o=u;if(U(u))Iu.call(n,u,1);else if(Lr(u,n))delete n[u];else{
var u=rt(u),i=Zr(n,u);null!=i&&delete i[Vr(u)]}}}return n}function Lt(n,t){return n+Ru(Lu()*(t-n+1))}function $t(n,t,r,e){t=Lr(t,n)?[t+""]:rt(t);for(var u=-1,o=t.length,i=o-1,f=n;null!=f&&++u<o;){var c=t[u];if(je(f)){var a=r;if(u!=i){var l=f[c],a=e?e(l,c,f):Z;a===Z&&(a=null==l?U(t[u+1])?[]:{}:l)}Yn(f,c,a)}f=f[c]}return n}function Ft(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function Nt(n,t){var r;return Hu(n,function(n,e,u){
return r=t(n,e,u),!r}),!!r}function Dt(n,t,r){var e=0,u=n?n.length:e;if(typeof t=="number"&&t===t&&2147483647>=u){for(;u>e;){var o=e+u>>>1,i=n[o];(r?t>=i:t>i)&&null!==i?e=o+1:u=o}return u}return Zt(n,t,Ye,r)}function Zt(n,t,r,e){t=r(t);for(var u=0,o=n?n.length:0,i=t!==t,f=null===t,c=t===Z;o>u;){var a=Ru((u+o)/2),l=r(n[a]),s=l!==Z,h=l===l;(i?h||e:f?h&&s&&(e||null!=l):c?h&&(e||s):null==l?0:e?t>=l:t>l)?u=a+1:o=a}return zu(o,4294967294)}function qt(n,t){for(var r=0,e=n.length,u=n[0],o=t?t(u):u,i=o,f=0,c=[u];++r<e;)u=n[r],
o=t?t(u):u,pe(o,i)||(i=o,c[++f]=u);return c}function Pt(n,t,r){var e=-1,u=f,o=n.length,i=true,a=[],l=a;if(r)i=false,u=c;else if(o<200)l=t?[]:a;else{if(u=t?null:ro(n))return $(u);i=false,u=Ln,l=new Mn}n:for(;++e<o;){var s=n[e],h=t?t(s):s;if(i&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue n;t&&l.push(h),a.push(s)}else u(l,h,r)||(l!==a&&l.push(h),a.push(s))}return a}function Tt(n,t,r,e){for(var u=n.length,o=e?u:-1;(e?o--:++o<u)&&t(n[o],o,n););return r?Ft(n,e?0:o,e?o+1:u):Ft(n,e?o+1:0,e?u:o)}function Kt(n,t){
var r=n;return r instanceof An&&(r=r.value()),s(t,function(n,t){return t.func.apply(t.thisArg,l([n],t.args))},r)}function Gt(n,t,r){for(var e=-1,u=n.length;++e<u;)var o=o?l(ct(o,n[e],t,r),ct(n[e],o,t,r)):n[e];return o&&o.length?Pt(o,t,r):[]}function Vt(n,t,r){for(var e=-1,u=n.length,o=t.length,i={};++e<u;)r(i,n[e],o>e?t[e]:Z);return i}function Jt(n,t){if(t)return n.slice();var r=new n.constructor(n.length);return n.copy(r),r}function Yt(n){var t=new n.constructor(n.byteLength);return new bu(t).set(new bu(n)),
t}function Ht(n,t,r,e){var u=-1,o=n.length,i=r.length,f=-1,c=t.length,a=Uu(o-i,0),l=Array(c+a);for(e=!e;++f<c;)l[f]=t[f];for(;++u<i;)(e||o>u)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l}function Qt(n,t,r,e){var u=-1,o=n.length,i=-1,f=r.length,c=-1,a=t.length,l=Uu(o-f,0),s=Array(l+a);for(e=!e;++u<l;)s[u]=n[u];for(l=u;++c<a;)s[l+c]=t[c];for(;++i<f;)(e||o>u)&&(s[l+r[i]]=n[u++]);return s}function Xt(n,t){var r=-1,e=n.length;for(t||(t=Array(e));++r<e;)t[r]=n[r];return t}function nr(n,t,r){return tr(n,t,r);
}function tr(n,t,r,e){r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u],f=e?e(r[i],n[i],i,r,n):n[i];Yn(r,i,f)}return r}function rr(n,t){return nr(n,oo(n),t)}function er(n,t){return function(r,u){var o=Zo(r)?e:Hn,i=t?t():{};return o(r,n,kr(u),i)}}function ur(n){return he(function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:Z,i=u>2?r[2]:Z,o=typeof o=="function"?(u--,o):Z;for(i&&Mr(r[0],r[1],i)&&(o=3>u?Z:o,u=1),t=Object(t);++e<u;)(i=r[e])&&n(t,i,e,o);return t})}function or(n,t){return function(r,e){if(null==r)return r;
if(!ve(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}function ir(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var f=e[n?i:++u];if(false===r(o[f],f,o))break}return t}}function fr(n,t,r){function e(){return(this&&this!==Vn&&this instanceof e?o:n).apply(u?r:this,arguments)}var u=1&t,o=lr(n);return e}function cr(n){return function(t){t=Le(t);var r=En.test(t)?t.match(kn):Z,e=r?r[0]:t.charAt(0);return t=r?r.slice(1).join(""):t.slice(1),
e[n]()+t}}function ar(n){return function(t){return s(Ve(Ke(t)),n,"")}}function lr(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=it(n.prototype),t=n.apply(r,t);return je(t)?t:r}}function sr(n,t,e){
function u(){for(var i=arguments.length,f=Array(i),c=i,a=Sr(u);c--;)f[c]=arguments[c];return c=3>i&&f[0]!==a&&f[i-1]!==a?[]:L(f,a),i-=c.length,e>i?br(n,t,pr,u.placeholder,Z,f,c,Z,Z,e-i):r(this&&this!==Vn&&this instanceof u?o:n,this,f)}var o=lr(n);return u}function hr(n){return he(function(t){t=st(t,1);var r=t.length,e=r,u=wn.prototype.thru;for(n&&t.reverse();e--;){var o=t[e];if(typeof o!="function")throw new iu("Expected a function");if(u&&!i&&"wrapper"==Or(o))var i=new wn([],true)}for(e=i?e:r;++e<r;)var o=t[e],u=Or(o),f="wrapper"==u?eo(o):Z,i=f&&Fr(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?i[Or(f[0])].apply(i,f[3]):1==o.length&&Fr(o)?i[u]():i.thru(o);
return function(){var n=arguments,e=n[0];if(i&&1==n.length&&Zo(e)&&e.length>=200)return i.plant(e).value();for(var u=0,n=r?t[u].apply(this,n):e;++u<r;)n=t[u].call(this,n);return n}})}function pr(n,t,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,m=Sr(l),y=b.length;for(x=0;y--;)b[y]===m&&x++}if(e&&(b=Ht(b,e,u,_)),o&&(b=Qt(b,o,i,_)),d-=x,_&&a>d)return m=L(b,m),br(n,t,pr,l.placeholder,r,b,m,f,c,a-d);if(m=h?r:this,y=p?m[n]:n,d=b.length,f){x=b.length;
for(var j=zu(f.length,x),w=Xt(b);j--;){var A=f[j];b[j]=U(A,x)?w[A]:Z}}else g&&d>1&&b.reverse();return s&&d>c&&(b.length=c),this&&this!==Vn&&this instanceof l&&(y=v||lr(y)),y.apply(m,b)}var s=128&t,h=1&t,p=2&t,_=24&t,g=512&t,v=p?Z:lr(n);return l}function _r(n,t){return function(r,e){return xt(r,n,t(e),{})}}function gr(n){return he(function(t){return t=a(st(t,1),kr()),he(function(e){var u=this;return n(t,function(n){return r(n,u,e)})})})}function vr(n,t,r){return t=Ce(t),n=F(n),t&&t>n?(t-=n,r=r===Z?" ":r+"",
n=Ge(r,Su(t/F(r))),En.test(r)?n.match(kn).slice(0,t).join(""):n.slice(0,t)):""}function dr(n,t,e,u){function o(){for(var t=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==Vn&&this instanceof o?f:n;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++t];return r(h,i?e:this,s)}var i=1&t,f=lr(n);return o}function yr(n){return function(t,r,e){e&&typeof e!="number"&&Mr(t,r,e)&&(r=e=Z),t=ze(t),t=t===t?t:0,r===Z?(r=t,t=0):r=ze(r)||0,e=e===Z?r>t?1:-1:ze(e)||0;var u=-1;r=Uu(Su((r-t)/(e||1)),0);for(var o=Array(r);r--;)o[n?r:++u]=t,
t+=e;return o}}function br(n,t,r,e,u,o,i,f,c,a){var l=8&t;f=f?Xt(f):Z;var s=l?i:Z;i=l?Z:i;var h=l?o:Z;return o=l?Z:o,t=(t|(l?32:64))&~(l?64:32),4&t||(t&=-4),t=[n,t,u,h,s,o,i,f,c,a],r=r.apply(Z,t),Fr(n)&&io(r,t),r.placeholder=e,r}function xr(n){var t=uu[n];return function(n,r){if(n=ze(n),r=Ce(r)){var e=(Le(n)+"e").split("e"),e=t(e[0]+"e"+(+e[1]+r)),e=(Le(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return t(n)}}function mr(n,t,r,e,u,o,i,f){var c=2&t;if(!c&&typeof n!="function")throw new iu("Expected a function");
var a=e?e.length:0;if(a||(t&=-97,e=u=Z),i=i===Z?i:Uu(Ce(i),0),f=f===Z?f:Ce(f),a-=u?u.length:0,64&t){var l=e,s=u;e=u=Z}var h=c?Z:eo(n);return o=[n,t,r,e,u,l,s,o,i,f],h&&(r=o[1],n=h[1],t=r|n,e=128==n&&8==r||128==n&&256==r&&h[8]>=o[7].length||384==n&&h[8]>=h[7].length&&8==r,131>t||e)&&(1&n&&(o[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=o[3],o[3]=e?Ht(e,r,h[4]):Xt(r),o[4]=e?L(o[3],"__lodash_placeholder__"):Xt(h[4])),(r=h[5])&&(e=o[5],o[5]=e?Qt(e,r,h[6]):Xt(r),o[6]=e?L(o[5],"__lodash_placeholder__"):Xt(h[6])),(r=h[7])&&(o[7]=Xt(r)),
128&n&&(o[8]=null==o[8]?h[8]:zu(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=t),n=o[0],t=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:n.length:Uu(o[9]-a,0),!f&&24&t&&(t&=-25),c=t&&1!=t?8==t||16==t?sr(n,t,f):32!=t&&33!=t||u.length?pr.apply(Z,o):dr(n,t,r,e):fr(n,t,r),(h?to:io)(c,o)}function jr(n,t,r,e,u,o){var i=-1,f=2&u,c=1&u,a=n.length,l=t.length;if(!(a==l||f&&l>a))return false;if(l=o.get(n))return l==t;for(l=true,o.set(n,t);++i<a;){var s=n[i],h=t[i];if(e)var _=f?e(h,s,i,t,n,o):e(s,h,i,n,t,o);if(_!==Z){
if(_)continue;l=false;break}if(c){if(!p(t,function(n){return s===n||r(s,n,e,u,o)})){l=false;break}}else if(s!==h&&!r(s,h,e,u,o)){l=false;break}}return o["delete"](n),l}function wr(n,t,r,e,u,o){switch(r){case"[object ArrayBuffer]":if(n.byteLength!=t.byteLength||!e(new bu(n),new bu(t)))break;return true;case"[object Boolean]":case"[object Date]":return+n==+t;case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object Number]":return n!=+n?t!=+t:n==+t;case"[object RegExp]":case"[object String]":
return n==t+"";case"[object Map]":var i=M;case"[object Set]":return i||(i=$),(2&o||n.size==t.size)&&e(i(n),i(t),u,1|o);case"[object Symbol]":return!!yu&&Vu.call(n)==Vu.call(t)}return false}function Ar(n,t,r,e,u,o){var i=2&u,f=De(n),c=f.length,a=De(t).length;if(c!=a&&!i)return false;for(var l=c;l--;){var s=f[l];if(!(i?s in t:dt(t,s)))return false}if(a=o.get(n))return a==t;a=true,o.set(n,t);for(var h=i;++l<c;){var s=f[l],p=n[s],_=t[s];if(e)var g=i?e(_,p,s,t,n,o):e(p,_,s,n,t,o);if(g===Z?p!==_&&!r(p,_,e,u,o):!g){a=false;
break}h||(h="constructor"==s)}return a&&!h&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(a=false)),o["delete"](n),a}function Or(n){for(var t=n.name+"",r=Yu[t],e=lu.call(Yu,t)?r.length:0;e--;){var u=r[e],o=u.func;if(null==o||o==n)return u.name}return t}function kr(){var n=yn.iteratee||He,n=n===He?At:n;return arguments.length?n(arguments[0],arguments[1]):n}function Er(n){n=qe(n);for(var t=n.length;t--;){
var r,e=n[t];r=n[t][1],r=r===r&&!je(r),e[2]=r}return n}function Ir(n,t){var r=null==n?Z:n[t];return Ae(r)?r:Z}function Sr(n){return(lu.call(yn,"placeholder")?yn:n).placeholder}function Rr(n){return pu.call(n)}function Wr(n,t,r){if(null==n)return false;var e=r(n,t);return e||Lr(t)||(t=rt(t),n=Zr(n,t),null!=n&&(t=Vr(t),e=r(n,t))),r=n?n.length:Z,e||!!r&&me(r)&&U(t,r)&&(Zo(n)||Ie(n)||ge(n))}function Br(n){var t=n.length,r=n.constructor(t);return t&&"string"==typeof n[0]&&lu.call(n,"index")&&(r.index=n.index,
r.input=n.input),r}function Cr(n){return be(n.constructor)&&!Nr(n)?it(ju(n)):{}}function Ur(r,e,u){var o=r.constructor;switch(e){case"[object ArrayBuffer]":return Yt(r);case"[object Boolean]":case"[object Date]":return new o(+r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return e=r.buffer,u=u?Yt(e):e,
new r.constructor(u,r.byteOffset,r.length);case"[object Map]":return u=r.constructor,s(M(r),n,new u);case"[object Number]":case"[object String]":return new o(r);case"[object RegExp]":return u=new r.constructor(r.source,hn.exec(r)),u.lastIndex=r.lastIndex,u;case"[object Set]":return u=r.constructor,s($(r),t,new u);case"[object Symbol]":return yu?Object(Vu.call(r)):{}}}function zr(n){var t=n?n.length:Z;return me(t)&&(Zo(n)||Ie(n)||ge(n))?m(t,String):null}function Mr(n,t,r){if(!je(r))return false;var e=typeof t;
return("number"==e?ve(r)&&U(t,r.length):"string"==e&&t in r)?pe(r[t],n):false}function Lr(n,t){return typeof n=="number"?true:!Zo(n)&&(rn.test(n)||!tn.test(n)||null!=t&&n in Object(t))}function $r(n){var t=typeof n;return"number"==t||"boolean"==t||"string"==t&&"__proto__"!=n||null==n}function Fr(n){var t=Or(n),r=yn[t];return typeof r=="function"&&t in An.prototype?n===r?true:(t=eo(r),!!t&&n===t[0]):false}function Nr(n){var t=n&&n.constructor,t=be(t)&&t.prototype||cu;return n===t}function Dr(n,t,r,e,u,o){return je(n)&&je(t)&&(o.set(t,n),
St(n,t,Z,Dr,o)),n}function Zr(n,t){return 1==t.length?n:$e(n,Ft(t,0,-1))}function qr(n){var t=[];return Le(n).replace(en,function(n,r,e,u){t.push(e?u.replace(ln,"$1"):r||n)}),t}function Pr(n){if(n instanceof An)return n.clone();var t=new wn(n.__wrapped__,n.__chain__);return t.__actions__=Xt(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function Tr(n,t,r){var e=n?n.length:0;return e?(t=r||t===Z?1:Ce(t),Ft(n,0>t?0:t,e)):[]}function Kr(n,t,r){var e=n?n.length:0;return e?(t=r||t===Z?1:Ce(t),
t=e-t,Ft(n,0,0>t?0:t)):[]}function Gr(n){return n?n[0]:Z}function Vr(n){var t=n?n.length:0;return t?n[t-1]:Z}function Jr(n,t){return n&&n.length&&t&&t.length?zt(n,t):n}function Yr(n){return n?$u.call(n):n}function Hr(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){return de(n)?(t=Uu(n.length,t),true):void 0}),m(t,function(t){return a(n,Ct(t))})}function Qr(n,t){if(!n||!n.length)return[];var e=Hr(n);return null==t?e:a(e,function(n){return r(t,Z,n)})}function Xr(n){return n=yn(n),n.__chain__=true,
n}function ne(n,t){return t(n)}function te(){return this}function re(n,t){return typeof t=="function"&&Zo(n)?u(n,t):Hu(n,tt(t))}function ee(n,t){var r;if(typeof t=="function"&&Zo(n)){for(r=n.length;r--&&false!==t(n[r],r,n););r=n}else r=Qu(n,tt(t));return r}function ue(n,t){return(Zo(n)?a:kt)(n,kr(t,3))}function oe(n,t){var r=-1,e=Be(n),u=e.length,o=u-1;for(t=et(Ce(t),0,u);++r<t;){var u=Lt(r,o),i=e[u];e[u]=e[r],e[r]=i}return e.length=t,e}function ie(n,t,r){return t=r?Z:t,t=n&&null==t?n.length:t,mr(n,128,Z,Z,Z,Z,t);
}function fe(n,t){var r;if(typeof t!="function")throw new iu("Expected a function");return n=Ce(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=Z),r}}function ce(n,t,r){return t=r?Z:t,n=mr(n,8,Z,Z,Z,Z,Z,t),n.placeholder=ce.placeholder,n}function ae(n,t,r){return t=r?Z:t,n=mr(n,16,Z,Z,Z,Z,Z,t),n.placeholder=ae.placeholder,n}function le(n,t,r){function e(){p&&xu(p),a&&xu(a),g=0,c=a=h=p=_=Z}function u(t,r){r&&xu(r),a=p=_=Z,t&&(g=Co(),l=n.apply(h,c),p||a||(c=h=Z))}function o(){var n=t-(Co()-s);
0>=n||n>t?u(_,a):p=Eu(o,n)}function i(){u(y,p)}function f(){if(c=arguments,s=Co(),h=this,_=y&&(p||!v),false===d)var r=v&&!p;else{g||a||v||(g=s);var e=d-(s-g),u=(0>=e||e>d)&&(v||a);u?(a&&(a=xu(a)),g=s,l=n.apply(h,c)):a||(a=Eu(i,e))}return u&&p?p=xu(p):p||t===d||(p=Eu(o,t)),r&&(u=true,l=n.apply(h,c)),!u||p||a||(c=h=Z),l}var c,a,l,s,h,p,_,g=0,v=false,d=false,y=true;if(typeof n!="function")throw new iu("Expected a function");return t=ze(t)||0,je(r)&&(v=!!r.leading,d="maxWait"in r&&Uu(ze(r.maxWait)||0,t),y="trailing"in r?!!r.trailing:y),
f.cancel=e,f.flush=function(){return(p&&_||a&&y)&&(l=n.apply(h,c)),e(),l},f}function se(n,t){if(typeof n!="function"||t&&typeof t!="function")throw new iu("Expected a function");var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=n.apply(this,e),r.cache=o.set(u,e),e)};return r.cache=new se.Cache,r}function he(n,t){if(typeof n!="function")throw new iu("Expected a function");return t=Uu(t===Z?n.length-1:Ce(t),0),function(){for(var e=arguments,u=-1,o=Uu(e.length-t,0),i=Array(o);++u<o;)i[u]=e[t+u];
switch(t){case 0:return n.call(this,i);case 1:return n.call(this,e[0],i);case 2:return n.call(this,e[0],e[1],i)}for(o=Array(t+1),u=-1;++u<t;)o[u]=e[u];return o[t]=i,r(n,this,o)}}function pe(n,t){return n===t||n!==n&&t!==t}function _e(n,t){return n>t}function ge(n){return de(n)&&lu.call(n,"callee")&&(!ku.call(n,"callee")||"[object Arguments]"==pu.call(n))}function ve(n){return null!=n&&!(typeof n=="function"&&be(n))&&me(uo(n))}function de(n){return we(n)&&ve(n)}function ye(n){return we(n)?"[object Error]"==pu.call(n)||typeof n.message=="string"&&typeof n.name=="string":false;
}function be(n){return n=je(n)?pu.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function xe(n){return typeof n=="number"&&n==Ce(n)}function me(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n}function je(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function we(n){return!!n&&typeof n=="object"}function Ae(n){return null==n?false:be(n)?gu.test(au.call(n)):we(n)&&(C(n)?gu:vn).test(n)}function Oe(n){return typeof n=="number"||we(n)&&"[object Number]"==pu.call(n);
}function ke(n){return!we(n)||"[object Object]"!=pu.call(n)||C(n)?false:(n=ju(n),null===n?true:(n=n.constructor,typeof n=="function"&&n instanceof n&&au.call(n)==hu))}function Ee(n){return je(n)&&"[object RegExp]"==pu.call(n)}function Ie(n){return typeof n=="string"||!Zo(n)&&we(n)&&"[object String]"==pu.call(n)}function Se(n){return typeof n=="symbol"||we(n)&&"[object Symbol]"==pu.call(n)}function Re(n){return we(n)&&me(n.length)&&!!Bn[pu.call(n)]}function We(n,t){return t>n}function Be(n){if(!n)return[];
if(ve(n))return Ie(n)?n.match(kn):Xt(n);if(Au&&n[Au])return z(n[Au]());var t=Rr(n);return("[object Map]"==t?M:"[object Set]"==t?$:Pe)(n)}function Ce(n){if(!n)return 0===n?n:0;if(n=ze(n),n===q||n===-q)return 1.7976931348623157e308*(0>n?-1:1);var t=n%1;return n===n?t?n-t:n:0}function Ue(n){return n?et(Ce(n),0,4294967295):0}function ze(n){if(je(n)&&(n=be(n.valueOf)?n.valueOf():n,n=je(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(fn,"");var t=gn.test(n);return t||dn.test(n)?Nn(n.slice(2),t?2:8):_n.test(n)?P:+n;
}function Me(n){return nr(n,Ze(n))}function Le(n){if(typeof n=="string")return n;if(null==n)return"";if(Se(n))return yu?Ju.call(n):"";var t=n+"";return"0"==t&&1/n==-q?"-0":t}function $e(n,t,r){return n=null==n?Z:vt(n,t),n===Z?r:n}function Fe(n,t){return Wr(n,t,dt)}function Ne(n,t){return Wr(n,t,yt)}function De(n){var t=Nr(n);if(!t&&!ve(n))return Cu(Object(n));var r,e=zr(n),u=!!e,e=e||[],o=e.length;for(r in n)!dt(n,r)||u&&("length"==r||U(r,o))||t&&"constructor"==r||e.push(r);return e}function Ze(n){
for(var t=-1,r=Nr(n),e=Ot(n),u=e.length,o=zr(n),i=!!o,o=o||[],f=o.length;++t<u;){var c=e[t];i&&("length"==c||U(c,f))||"constructor"==c&&(r||!lu.call(n,c))||o.push(c)}return o}function qe(n){return j(n,De(n))}function Pe(n){return n?A(n,De(n)):[]}function Te(n){return ci(Le(n).toLowerCase())}function Ke(n){return(n=Le(n))&&n.replace(bn,S).replace(On,"")}function Ge(n,t){n=Le(n),t=Ce(t);var r="";if(!n||1>t||t>9007199254740991)return r;do t%2&&(r+=n),t=Ru(t/2),n+=n;while(t);return r}function Ve(n,t,r){
return n=Le(n),t=r?Z:t,t===Z&&(t=Rn.test(n)?Sn:In),n.match(t)||[]}function Je(n){return function(){return n}}function Ye(n){return n}function He(n){return At(typeof n=="function"?n:ut(n,true))}function Qe(n,t,r){var e=De(t),o=gt(t,e);null!=r||je(t)&&(o.length||!e.length)||(r=t,t=n,n=this,o=gt(t,De(t)));var i=je(r)&&"chain"in r?r.chain:true,f=be(n);return u(o,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=n(this.__wrapped__);return(r.__actions__=Xt(this.__actions__)).push({
func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,l([this.value()],arguments))})}),n}function Xe(){}function nu(n){return Lr(n)?Ct(n):Ut(n)}function tu(n){return n&&n.length?x(n,Ye):0}E=E?Jn.defaults({},E,Jn.pick(Vn,Wn)):Vn;var ru=E.Date,eu=E.Error,uu=E.Math,ou=E.RegExp,iu=E.TypeError,fu=E.Array.prototype,cu=E.Object.prototype,au=E.Function.prototype.toString,lu=cu.hasOwnProperty,su=0,hu=au.call(Object),pu=cu.toString,_u=Vn._,gu=ou("^"+au.call(lu).replace(un,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vu=qn?E.Buffer:Z,du=E.Reflect,yu=E.Symbol,bu=E.Uint8Array,xu=E.clearTimeout,mu=du?du.enumerate:Z,ju=Object.getPrototypeOf,wu=Object.getOwnPropertySymbols,Au=typeof(Au=yu&&yu.iterator)=="symbol"?Au:Z,Ou=Object.create,ku=cu.propertyIsEnumerable,Eu=E.setTimeout,Iu=fu.splice,Su=uu.ceil,Ru=uu.floor,Wu=E.isFinite,Bu=fu.join,Cu=Object.keys,Uu=uu.max,zu=uu.min,Mu=E.parseInt,Lu=uu.random,$u=fu.reverse,Fu=Ir(E,"Map"),Nu=Ir(E,"Set"),Du=Ir(E,"WeakMap"),Zu=Ir(Object,"create"),qu=Du&&new Du,Pu=Fu?au.call(Fu):"",Tu=Nu?au.call(Nu):"",Ku=Du?au.call(Du):"",Gu=yu?yu.prototype:Z,Vu=yu?Gu.valueOf:Z,Ju=yu?Gu.toString:Z,Yu={};
yn.templateSettings={escape:Q,evaluate:X,interpolate:nn,variable:"",imports:{_:yn}};var Hu=or(pt),Qu=or(_t,true),Xu=ir(),no=ir(true);mu&&!ku.call({valueOf:1},"valueOf")&&(Ot=function(n){return z(mu(n))});var to=qu?function(n,t){return qu.set(n,t),n}:Ye,ro=Nu&&2===new Nu([1,2]).size?function(n){return new Nu(n)}:Xe,eo=qu?function(n){return qu.get(n)}:Xe,uo=Ct("length"),oo=wu||function(){return[]};(Fu&&"[object Map]"!=Rr(new Fu)||Nu&&"[object Set]"!=Rr(new Nu)||Du&&"[object WeakMap]"!=Rr(new Du))&&(Rr=function(n){
var t=pu.call(n);if(n="[object Object]"==t?n.constructor:null,n=typeof n=="function"?au.call(n):"")switch(n){case Pu:return"[object Map]";case Tu:return"[object Set]";case Ku:return"[object WeakMap]"}return t});var io=function(){var n=0,t=0;return function(r,e){var u=Co(),o=16-(u-t);if(t=u,o>0){if(150<=++n)return r}else n=0;return to(r,e)}}(),fo=he(function(n,t){Zo(n)||(n=null==n?[]:[Object(n)]),t=st(t,1);for(var r=n,e=t,u=-1,o=r.length,i=-1,f=e.length,c=Array(o+f);++u<o;)c[u]=r[u];for(;++i<f;)c[u++]=e[i];
return c}),co=he(function(n,t){return de(n)?ct(n,st(t,1,true)):[]}),ao=he(function(n,t){var r=Vr(t);return de(r)&&(r=Z),de(n)?ct(n,st(t,1,true),kr(r)):[]}),lo=he(function(n,t){var r=Vr(t);return de(r)&&(r=Z),de(n)?ct(n,st(t,1,true),Z,r):[]}),so=he(function(n){var t=a(n,nt);return t.length&&t[0]===n[0]?bt(t):[]}),ho=he(function(n){var t=Vr(n),r=a(n,nt);return t===Vr(r)?t=Z:r.pop(),r.length&&r[0]===n[0]?bt(r,kr(t)):[]}),po=he(function(n){var t=Vr(n),r=a(n,nt);return t===Vr(r)?t=Z:r.pop(),r.length&&r[0]===n[0]?bt(r,Z,t):[];
}),_o=he(Jr),go=he(function(n,t){t=a(st(t,1),String);var r=Xn(n,t);return Mt(n,t.sort(I)),r}),vo=he(function(n){return Pt(st(n,1,true))}),yo=he(function(n){var t=Vr(n);return de(t)&&(t=Z),Pt(st(n,1,true),kr(t))}),bo=he(function(n){var t=Vr(n);return de(t)&&(t=Z),Pt(st(n,1,true),Z,t)}),xo=he(function(n,t){return de(n)?ct(n,t):[]}),mo=he(function(n){return Gt(i(n,de))}),jo=he(function(n){var t=Vr(n);return de(t)&&(t=Z),Gt(i(n,de),kr(t))}),wo=he(function(n){var t=Vr(n);return de(t)&&(t=Z),Gt(i(n,de),Z,t)}),Ao=he(Hr),Oo=he(function(n){
var t=n.length,t=t>1?n[t-1]:Z,t=typeof t=="function"?(n.pop(),t):Z;return Qr(n,t)}),ko=he(function(n){n=st(n,1);var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return Xn(t,n)};return 1>=t&&!this.__actions__.length&&e instanceof An&&U(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:ne,args:[u],thisArg:Z}),new wn(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(Z),n})):this.thru(u)}),Eo=er(function(n,t,r){lu.call(n,r)?++n[r]:n[r]=1}),Io=er(function(n,t,r){lu.call(n,r)?n[r].push(t):n[r]=[t];
}),So=he(function(n,t,e){var u=-1,o=typeof t=="function",i=Lr(t),f=ve(n)?Array(n.length):[];return Hu(n,function(n){var c=o?t:i&&null!=n?n[t]:Z;f[++u]=c?r(c,n,e):mt(n,t,e)}),f}),Ro=er(function(n,t,r){n[r]=t}),Wo=er(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),Bo=he(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Mr(n,t[0],t[1])?t=[]:r>2&&Mr(t[0],t[1],t[2])&&(t.length=1),Rt(n,st(t,1),[])}),Co=ru.now,Uo=he(function(n,t,r){var e=1;if(r.length)var u=L(r,Sr(Uo)),e=32|e;return mr(n,e,t,r,u);
}),zo=he(function(n,t,r){var e=3;if(r.length)var u=L(r,Sr(zo)),e=32|e;return mr(t,e,n,r,u)}),Mo=he(function(n,t){return ft(n,1,t)}),Lo=he(function(n,t,r){return ft(n,ze(t)||0,r)}),$o=he(function(n,t){t=a(st(t,1),kr());var e=t.length;return he(function(u){for(var o=-1,i=zu(u.length,e);++o<i;)u[o]=t[o].call(this,u[o]);return r(n,this,u)})}),Fo=he(function(n,t){var r=L(t,Sr(Fo));return mr(n,32,Z,t,r)}),No=he(function(n,t){var r=L(t,Sr(No));return mr(n,64,Z,t,r)}),Do=he(function(n,t){return mr(n,256,Z,Z,Z,st(t,1));
}),Zo=Array.isArray,qo=vu?function(n){return n instanceof vu}:Je(false),Po=ur(function(n,t){nr(t,De(t),n)}),To=ur(function(n,t){nr(t,Ze(t),n)}),Ko=ur(function(n,t,r,e){tr(t,Ze(t),n,e)}),Go=ur(function(n,t,r,e){tr(t,De(t),n,e)}),Vo=he(function(n,t){return Xn(n,st(t,1))}),Jo=he(function(n){return n.push(Z,Kn),r(Ko,Z,n)}),Yo=he(function(n){return n.push(Z,Dr),r(ti,Z,n)}),Ho=_r(function(n,t,r){n[t]=r},Je(Ye)),Qo=_r(function(n,t,r){lu.call(n,t)?n[t].push(r):n[t]=[r]},kr),Xo=he(mt),ni=ur(function(n,t,r){St(n,t,r);
}),ti=ur(function(n,t,r,e){St(n,t,r,e)}),ri=he(function(n,t){return null==n?{}:(t=a(st(t,1),String),Wt(n,ct(Ze(n),t)))}),ei=he(function(n,t){return null==n?{}:Wt(n,st(t,1))}),ui=ar(function(n,t,r){return t=t.toLowerCase(),n+(r?Te(t):t)}),oi=ar(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),ii=ar(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),fi=cr("toLowerCase"),ci=cr("toUpperCase"),ai=ar(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}),li=ar(function(n,t,r){return n+(r?" ":"")+Te(t);
}),si=ar(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),hi=he(function(n,t){try{return r(n,Z,t)}catch(e){return ye(e)?e:new eu(e)}}),pi=he(function(n,t){return u(st(t,1),function(t){n[t]=Uo(n[t],n)}),n}),_i=hr(),gi=hr(true),vi=he(function(n,t){return function(r){return mt(r,n,t)}}),di=he(function(n,t){return function(r){return mt(n,r,t)}}),yi=gr(a),bi=gr(o),xi=gr(p),mi=yr(),ji=yr(true),wi=xr("ceil"),Ai=xr("floor"),Oi=xr("round");return yn.prototype=jn.prototype,wn.prototype=it(jn.prototype),wn.prototype.constructor=wn,
An.prototype=it(jn.prototype),An.prototype.constructor=An,Un.prototype=Zu?Zu(null):cu,zn.prototype.clear=function(){this.__data__={hash:new Un,map:Fu?new Fu:[],string:new Un}},zn.prototype["delete"]=function(n){var t=this.__data__;return $r(n)?(t=typeof n=="string"?t.string:t.hash,(Zu?t[n]!==Z:lu.call(t,n))&&delete t[n]):Fu?t.map["delete"](n):Dn(t.map,n)},zn.prototype.get=function(n){var t=this.__data__;return $r(n)?(t=typeof n=="string"?t.string:t.hash,Zu?(n=t[n],n="__lodash_hash_undefined__"===n?Z:n):n=lu.call(t,n)?t[n]:Z,
n):Fu?t.map.get(n):Zn(t.map,n)},zn.prototype.has=function(n){var t=this.__data__;return $r(n)?(t=typeof n=="string"?t.string:t.hash,n=Zu?t[n]!==Z:lu.call(t,n)):n=Fu?t.map.has(n):-1<Pn(t.map,n),n},zn.prototype.set=function(n,t){var r=this.__data__;return $r(n)?(typeof n=="string"?r.string:r.hash)[n]=Zu&&t===Z?"__lodash_hash_undefined__":t:Fu?r.map.set(n,t):Tn(r.map,n,t),this},Mn.prototype.push=function(n){var t=this.__data__;$r(n)?(t=t.__data__,(typeof n=="string"?t.string:t.hash)[n]="__lodash_hash_undefined__"):t.set(n,"__lodash_hash_undefined__");
},$n.prototype.clear=function(){this.__data__={array:[],map:null}},$n.prototype["delete"]=function(n){var t=this.__data__,r=t.array;return r?Dn(r,n):t.map["delete"](n)},$n.prototype.get=function(n){var t=this.__data__,r=t.array;return r?Zn(r,n):t.map.get(n)},$n.prototype.has=function(n){var t=this.__data__,r=t.array;return r?-1<Pn(r,n):t.map.has(n)},$n.prototype.set=function(n,t){var r=this.__data__,e=r.array;return e&&(199>e.length?Tn(e,n,t):(r.array=null,r.map=new zn(e))),(r=r.map)&&r.set(n,t),
this},se.Cache=zn,yn.after=function(n,t){if(typeof t!="function")throw new iu("Expected a function");return n=Ce(n),function(){return 1>--n?t.apply(this,arguments):void 0}},yn.ary=ie,yn.assign=Po,yn.assignIn=To,yn.assignInWith=Ko,yn.assignWith=Go,yn.at=Vo,yn.before=fe,yn.bind=Uo,yn.bindAll=pi,yn.bindKey=zo,yn.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return Zo(n)?n:[n]},yn.chain=Xr,yn.chunk=function(n,t){t=Uu(Ce(t),0);var r=n?n.length:0;if(!r||1>t)return[];for(var e=0,u=-1,o=Array(Su(r/t));r>e;)o[++u]=Ft(n,e,e+=t);
return o},yn.compact=function(n){for(var t=-1,r=n?n.length:0,e=-1,u=[];++t<r;){var o=n[t];o&&(u[++e]=o)}return u},yn.concat=fo,yn.cond=function(n){var t=n?n.length:0,e=kr();return n=t?a(n,function(n){if("function"!=typeof n[1])throw new iu("Expected a function");return[e(n[0]),n[1]]}):[],he(function(e){for(var u=-1;++u<t;){var o=n[u];if(r(o[0],this,e))return r(o[1],this,e)}})},yn.conforms=function(n){return ot(ut(n,true))},yn.constant=Je,yn.countBy=Eo,yn.create=function(n,t){var r=it(n);return t?Qn(r,t):r;
},yn.curry=ce,yn.curryRight=ae,yn.debounce=le,yn.defaults=Jo,yn.defaultsDeep=Yo,yn.defer=Mo,yn.delay=Lo,yn.difference=co,yn.differenceBy=ao,yn.differenceWith=lo,yn.drop=Tr,yn.dropRight=Kr,yn.dropRightWhile=function(n,t){return n&&n.length?Tt(n,kr(t,3),true,true):[]},yn.dropWhile=function(n,t){return n&&n.length?Tt(n,kr(t,3),true):[]},yn.fill=function(n,t,r,e){var u=n?n.length:0;if(!u)return[];for(r&&typeof r!="number"&&Mr(n,t,r)&&(r=0,e=u),u=n.length,r=Ce(r),0>r&&(r=-r>u?0:u+r),e=e===Z||e>u?u:Ce(e),0>e&&(e+=u),
e=r>e?0:Ue(e);e>r;)n[r++]=t;return n},yn.filter=function(n,t){return(Zo(n)?i:lt)(n,kr(t,3))},yn.flatMap=function(n,t){return st(ue(n,t),1)},yn.flatten=function(n){return n&&n.length?st(n,1):[]},yn.flattenDeep=function(n){return n&&n.length?st(n,q):[]},yn.flattenDepth=function(n,t){return n&&n.length?(t=t===Z?1:Ce(t),st(n,t)):[]},yn.flip=function(n){return mr(n,512)},yn.flow=_i,yn.flowRight=gi,yn.fromPairs=function(n){for(var t=-1,r=n?n.length:0,e={};++t<r;){var u=n[t];e[u[0]]=u[1]}return e},yn.functions=function(n){
return null==n?[]:gt(n,De(n))},yn.functionsIn=function(n){return null==n?[]:gt(n,Ze(n))},yn.groupBy=Io,yn.initial=function(n){return Kr(n,1)},yn.intersection=so,yn.intersectionBy=ho,yn.intersectionWith=po,yn.invert=Ho,yn.invertBy=Qo,yn.invokeMap=So,yn.iteratee=He,yn.keyBy=Ro,yn.keys=De,yn.keysIn=Ze,yn.map=ue,yn.mapKeys=function(n,t){var r={};return t=kr(t,3),pt(n,function(n,e,u){r[t(n,e,u)]=n}),r},yn.mapValues=function(n,t){var r={};return t=kr(t,3),pt(n,function(n,e,u){r[e]=t(n,e,u)}),r},yn.matches=function(n){
return Et(ut(n,true))},yn.matchesProperty=function(n,t){return It(n,ut(t,true))},yn.memoize=se,yn.merge=ni,yn.mergeWith=ti,yn.method=vi,yn.methodOf=di,yn.mixin=Qe,yn.negate=function(n){if(typeof n!="function")throw new iu("Expected a function");return function(){return!n.apply(this,arguments)}},yn.nthArg=function(n){return n=Ce(n),function(){return arguments[n]}},yn.omit=ri,yn.omitBy=function(n,t){return t=kr(t),Bt(n,function(n,r){return!t(n,r)})},yn.once=function(n){return fe(2,n)},yn.orderBy=function(n,t,r,e){
return null==n?[]:(Zo(t)||(t=null==t?[]:[t]),r=e?Z:r,Zo(r)||(r=null==r?[]:[r]),Rt(n,t,r))},yn.over=yi,yn.overArgs=$o,yn.overEvery=bi,yn.overSome=xi,yn.partial=Fo,yn.partialRight=No,yn.partition=Wo,yn.pick=ei,yn.pickBy=function(n,t){return null==n?{}:Bt(n,kr(t))},yn.property=nu,yn.propertyOf=function(n){return function(t){return null==n?Z:vt(n,t)}},yn.pull=_o,yn.pullAll=Jr,yn.pullAllBy=function(n,t,r){return n&&n.length&&t&&t.length?zt(n,t,kr(r)):n},yn.pullAt=go,yn.range=mi,yn.rangeRight=ji,yn.rearg=Do,
yn.reject=function(n,t){var r=Zo(n)?i:lt;return t=kr(t,3),r(n,function(n,r,e){return!t(n,r,e)})},yn.remove=function(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],o=n.length;for(t=kr(t,3);++e<o;){var i=n[e];t(i,e,n)&&(r.push(i),u.push(e))}return Mt(n,u),r},yn.rest=he,yn.reverse=Yr,yn.sampleSize=oe,yn.set=function(n,t,r){return null==n?n:$t(n,t,r)},yn.setWith=function(n,t,r,e){return e=typeof e=="function"?e:Z,null==n?n:$t(n,t,r,e)},yn.shuffle=function(n){return oe(n,4294967295)},yn.slice=function(n,t,r){
var e=n?n.length:0;return e?(r&&typeof r!="number"&&Mr(n,t,r)?(t=0,r=e):(t=null==t?0:Ce(t),r=r===Z?e:Ce(r)),Ft(n,t,r)):[]},yn.sortBy=Bo,yn.sortedUniq=function(n){return n&&n.length?qt(n):[]},yn.sortedUniqBy=function(n,t){return n&&n.length?qt(n,kr(t)):[]},yn.split=function(n,t,r){return Le(n).split(t,r)},yn.spread=function(n,t){if(typeof n!="function")throw new iu("Expected a function");return t=t===Z?0:Uu(Ce(t),0),he(function(e){var u=e[t];return e=e.slice(0,t),u&&l(e,u),r(n,this,e)})},yn.tail=function(n){
return Tr(n,1)},yn.take=function(n,t,r){return n&&n.length?(t=r||t===Z?1:Ce(t),Ft(n,0,0>t?0:t)):[]},yn.takeRight=function(n,t,r){var e=n?n.length:0;return e?(t=r||t===Z?1:Ce(t),t=e-t,Ft(n,0>t?0:t,e)):[]},yn.takeRightWhile=function(n,t){return n&&n.length?Tt(n,kr(t,3),false,true):[]},yn.takeWhile=function(n,t){return n&&n.length?Tt(n,kr(t,3)):[]},yn.tap=function(n,t){return t(n),n},yn.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new iu("Expected a function");return je(r)&&(e="leading"in r?!!r.leading:e,
u="trailing"in r?!!r.trailing:u),le(n,t,{leading:e,maxWait:t,trailing:u})},yn.thru=ne,yn.toArray=Be,yn.toPairs=qe,yn.toPairsIn=function(n){return j(n,Ze(n))},yn.toPath=function(n){return Zo(n)?a(n,String):qr(n)},yn.toPlainObject=Me,yn.transform=function(n,t,r){var e=Zo(n)||Re(n);if(t=kr(t,4),null==r)if(e||je(n)){var o=n.constructor;r=e?Zo(n)?new o:[]:be(o)?it(ju(n)):{}}else r={};return(e?u:pt)(n,function(n,e,u){return t(r,n,e,u)}),r},yn.unary=function(n){return ie(n,1)},yn.union=vo,yn.unionBy=yo,
yn.unionWith=bo,yn.uniq=function(n){return n&&n.length?Pt(n):[]},yn.uniqBy=function(n,t){return n&&n.length?Pt(n,kr(t)):[]},yn.uniqWith=function(n,t){return n&&n.length?Pt(n,Z,t):[]},yn.unset=function(n,t){var r;if(null==n)r=true;else{r=n;var e=t,e=Lr(e,r)?[e+""]:rt(e);r=Zr(r,e),e=Vr(e),r=null!=r&&Fe(r,e)?delete r[e]:true}return r},yn.unzip=Hr,yn.unzipWith=Qr,yn.values=Pe,yn.valuesIn=function(n){return null==n?[]:A(n,Ze(n))},yn.without=xo,yn.words=Ve,yn.wrap=function(n,t){return t=null==t?Ye:t,Fo(t,n);
},yn.xor=mo,yn.xorBy=jo,yn.xorWith=wo,yn.zip=Ao,yn.zipObject=function(n,t){return Vt(n||[],t||[],Yn)},yn.zipObjectDeep=function(n,t){return Vt(n||[],t||[],$t)},yn.zipWith=Oo,yn.extend=To,yn.extendWith=Ko,Qe(yn,yn),yn.add=function(n,t){var r;return n===Z&&t===Z?0:(n!==Z&&(r=n),t!==Z&&(r=r===Z?t:r+t),r)},yn.attempt=hi,yn.camelCase=ui,yn.capitalize=Te,yn.ceil=wi,yn.clamp=function(n,t,r){return r===Z&&(r=t,t=Z),r!==Z&&(r=ze(r),r=r===r?r:0),t!==Z&&(t=ze(t),t=t===t?t:0),et(ze(n),t,r)},yn.clone=function(n){
return ut(n)},yn.cloneDeep=function(n){return ut(n,true)},yn.cloneDeepWith=function(n,t){return ut(n,true,t)},yn.cloneWith=function(n,t){return ut(n,false,t)},yn.deburr=Ke,yn.endsWith=function(n,t,r){n=Le(n),t=typeof t=="string"?t:t+"";var e=n.length;return r=r===Z?e:et(Ce(r),0,e),r-=t.length,r>=0&&n.indexOf(t,r)==r},yn.eq=pe,yn.escape=function(n){return(n=Le(n))&&H.test(n)?n.replace(J,R):n},yn.escapeRegExp=function(n){return(n=Le(n))&&on.test(n)?n.replace(un,"\\$&"):n},yn.every=function(n,t,r){var e=Zo(n)?o:at;
return r&&Mr(n,t,r)&&(t=Z),e(n,kr(t,3))},yn.find=function(n,t){if(t=kr(t,3),Zo(n)){var r=v(n,t);return r>-1?n[r]:Z}return g(n,t,Hu)},yn.findIndex=function(n,t){return n&&n.length?v(n,kr(t,3)):-1},yn.findKey=function(n,t){return g(n,kr(t,3),pt,true)},yn.findLast=function(n,t){if(t=kr(t,3),Zo(n)){var r=v(n,t,true);return r>-1?n[r]:Z}return g(n,t,Qu)},yn.findLastIndex=function(n,t){return n&&n.length?v(n,kr(t,3),true):-1},yn.findLastKey=function(n,t){return g(n,kr(t,3),_t,true)},yn.floor=Ai,yn.forEach=re,yn.forEachRight=ee,
yn.forIn=function(n,t){return null==n?n:Xu(n,tt(t),Ze)},yn.forInRight=function(n,t){return null==n?n:no(n,tt(t),Ze)},yn.forOwn=function(n,t){return n&&pt(n,tt(t))},yn.forOwnRight=function(n,t){return n&&_t(n,tt(t))},yn.get=$e,yn.gt=_e,yn.gte=function(n,t){return n>=t},yn.has=Fe,yn.hasIn=Ne,yn.head=Gr,yn.identity=Ye,yn.includes=function(n,t,r,e){return n=ve(n)?n:Pe(n),r=r&&!e?Ce(r):0,e=n.length,0>r&&(r=Uu(e+r,0)),Ie(n)?e>=r&&-1<n.indexOf(t,r):!!e&&-1<d(n,t,r)},yn.indexOf=function(n,t,r){var e=n?n.length:0;
return e?(r=Ce(r),0>r&&(r=Uu(e+r,0)),d(n,t,r)):-1},yn.inRange=function(n,t,r){return t=ze(t)||0,r===Z?(r=t,t=0):r=ze(r)||0,n=ze(n),n>=zu(t,r)&&n<Uu(t,r)},yn.invoke=Xo,yn.isArguments=ge,yn.isArray=Zo,yn.isArrayBuffer=function(n){return we(n)&&"[object ArrayBuffer]"==pu.call(n)},yn.isArrayLike=ve,yn.isArrayLikeObject=de,yn.isBoolean=function(n){return true===n||false===n||we(n)&&"[object Boolean]"==pu.call(n)},yn.isBuffer=qo,yn.isDate=function(n){return we(n)&&"[object Date]"==pu.call(n)},yn.isElement=function(n){
return!!n&&1===n.nodeType&&we(n)&&!ke(n)},yn.isEmpty=function(n){if(ve(n)&&(Zo(n)||Ie(n)||be(n.splice)||ge(n)))return!n.length;for(var t in n)if(lu.call(n,t))return false;return true},yn.isEqual=function(n,t){return jt(n,t)},yn.isEqualWith=function(n,t,r){var e=(r=typeof r=="function"?r:Z)?r(n,t):Z;return e===Z?jt(n,t,r):!!e},yn.isError=ye,yn.isFinite=function(n){return typeof n=="number"&&Wu(n)},yn.isFunction=be,yn.isInteger=xe,yn.isLength=me,yn.isMap=function(n){return we(n)&&"[object Map]"==Rr(n)},yn.isMatch=function(n,t){
return n===t||wt(n,t,Er(t))},yn.isMatchWith=function(n,t,r){return r=typeof r=="function"?r:Z,wt(n,t,Er(t),r)},yn.isNaN=function(n){return Oe(n)&&n!=+n},yn.isNative=Ae,yn.isNil=function(n){return null==n},yn.isNull=function(n){return null===n},yn.isNumber=Oe,yn.isObject=je,yn.isObjectLike=we,yn.isPlainObject=ke,yn.isRegExp=Ee,yn.isSafeInteger=function(n){return xe(n)&&n>=-9007199254740991&&9007199254740991>=n},yn.isSet=function(n){return we(n)&&"[object Set]"==Rr(n)},yn.isString=Ie,yn.isSymbol=Se,
yn.isTypedArray=Re,yn.isUndefined=function(n){return n===Z},yn.isWeakMap=function(n){return we(n)&&"[object WeakMap]"==Rr(n)},yn.isWeakSet=function(n){return we(n)&&"[object WeakSet]"==pu.call(n)},yn.join=function(n,t){return n?Bu.call(n,t):""},yn.kebabCase=oi,yn.last=Vr,yn.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(r!==Z&&(u=Ce(r),u=(0>u?Uu(e+u,0):zu(u,e-1))+1),t!==t)return B(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},yn.lowerCase=ii,yn.lowerFirst=fi,yn.lt=We,
yn.lte=function(n,t){return t>=n},yn.max=function(n){return n&&n.length?_(n,Ye,_e):Z},yn.maxBy=function(n,t){return n&&n.length?_(n,kr(t),_e):Z},yn.mean=function(n){return tu(n)/(n?n.length:0)},yn.min=function(n){return n&&n.length?_(n,Ye,We):Z},yn.minBy=function(n,t){return n&&n.length?_(n,kr(t),We):Z},yn.noConflict=function(){return Vn._===this&&(Vn._=_u),this},yn.noop=Xe,yn.now=Co,yn.pad=function(n,t,r){n=Le(n),t=Ce(t);var e=F(n);return t&&t>e?(e=(t-e)/2,t=Ru(e),e=Su(e),vr("",t,r)+n+vr("",e,r)):n;
},yn.padEnd=function(n,t,r){return n=Le(n),n+vr(n,t,r)},yn.padStart=function(n,t,r){return n=Le(n),vr(n,t,r)+n},yn.parseInt=function(n,t,r){return r||null==t?t=0:t&&(t=+t),n=Le(n).replace(fn,""),Mu(n,t||(pn.test(n)?16:10))},yn.random=function(n,t,r){if(r&&typeof r!="boolean"&&Mr(n,t,r)&&(t=r=Z),r===Z&&(typeof t=="boolean"?(r=t,t=Z):typeof n=="boolean"&&(r=n,n=Z)),n===Z&&t===Z?(n=0,t=1):(n=ze(n)||0,t===Z?(t=n,n=0):t=ze(t)||0),n>t){var e=n;n=t,t=e}return r||n%1||t%1?(r=Lu(),zu(n+r*(t-n+Fn("1e-"+((r+"").length-1))),t)):Lt(n,t);
},yn.reduce=function(n,t,r){var e=Zo(n)?s:y,u=3>arguments.length;return e(n,kr(t,4),r,u,Hu)},yn.reduceRight=function(n,t,r){var e=Zo(n)?h:y,u=3>arguments.length;return e(n,kr(t,4),r,u,Qu)},yn.repeat=Ge,yn.replace=function(){var n=arguments,t=Le(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},yn.result=function(n,t,r){if(Lr(t,n))e=null==n?Z:n[t];else{t=rt(t);var e=$e(n,t);n=Zr(n,t)}return e===Z&&(e=r),be(e)?e.call(n):e},yn.round=Oi,yn.runInContext=D,yn.sample=function(n){n=ve(n)?n:Pe(n);var t=n.length;
return t>0?n[Lt(0,t-1)]:Z},yn.size=function(n){if(null==n)return 0;if(ve(n)){var t=n.length;return t&&Ie(n)?F(n):t}return De(n).length},yn.snakeCase=ai,yn.some=function(n,t,r){var e=Zo(n)?p:Nt;return r&&Mr(n,t,r)&&(t=Z),e(n,kr(t,3))},yn.sortedIndex=function(n,t){return Dt(n,t)},yn.sortedIndexBy=function(n,t,r){return Zt(n,t,kr(r))},yn.sortedIndexOf=function(n,t){var r=n?n.length:0;if(r){var e=Dt(n,t);if(r>e&&pe(n[e],t))return e}return-1},yn.sortedLastIndex=function(n,t){return Dt(n,t,true)},yn.sortedLastIndexBy=function(n,t,r){
return Zt(n,t,kr(r),true)},yn.sortedLastIndexOf=function(n,t){if(n&&n.length){var r=Dt(n,t,true)-1;if(pe(n[r],t))return r}return-1},yn.startCase=li,yn.startsWith=function(n,t,r){return n=Le(n),r=et(Ce(r),0,n.length),n.lastIndexOf(t,r)==r},yn.subtract=function(n,t){var r;return n===Z&&t===Z?0:(n!==Z&&(r=n),t!==Z&&(r=r===Z?t:r-t),r)},yn.sum=tu,yn.sumBy=function(n,t){return n&&n.length?x(n,kr(t)):0},yn.template=function(n,t,r){var e=yn.templateSettings;r&&Mr(n,t,r)&&(t=Z),n=Le(n),t=Ko({},t,e,Kn),r=Ko({},t.imports,e.imports,Kn);
var u,o,i=De(r),f=A(r,i),c=0;r=t.interpolate||xn;var a="__p+='";r=ou((t.escape||xn).source+"|"+r.source+"|"+(r===nn?sn:xn).source+"|"+(t.evaluate||xn).source+"|$","g");var l="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,i,f,l){return e||(e=i),a+=n.slice(c,l).replace(mn,W),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+t.length,t}),a+="';",(t=t.variable)||(a="with(obj){"+a+"}"),a=(o?a.replace(T,""):a).replace(K,"$1").replace(G,"$1;"),
a="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",t=hi(function(){return Function(i,l+"return "+a).apply(Z,f)}),t.source=a,ye(t))throw t;return t},yn.times=function(n,t){if(n=Ce(n),1>n||n>9007199254740991)return[];var r=4294967295,e=zu(n,4294967295);for(t=tt(t),n-=4294967295,e=m(e,t);++r<n;)t(r);return e},yn.toInteger=Ce,yn.toLength=Ue,yn.toLower=function(n){
return Le(n).toLowerCase()},yn.toNumber=ze,yn.toSafeInteger=function(n){return et(Ce(n),-9007199254740991,9007199254740991)},yn.toString=Le,yn.toUpper=function(n){return Le(n).toUpperCase()},yn.trim=function(n,t,r){return(n=Le(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=Le(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=Le(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?Ce(t.length):r,e="omission"in t?Le(t.omission):e;n=Le(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),Ee(u)){if(n.slice(o).search(u)){var f=r;for(u.global||(u=ou(u.source,Le(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=Le(n))&&Y.test(n)?n.replace(V,N):n},yn.uniqueId=function(n){var t=++su;return Le(n)+t},yn.upperCase=si,yn.upperFirst=ci,yn.each=re,yn.eachRight=ee,yn.first=Gr,Qe(yn,function(){var n={};return pt(yn,function(t,r){lu.call(yn.prototype,r)||(n[r]=t)}),n}(),{chain:false}),yn.VERSION="4.5.1",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:Uu(Ce(r),0);var u=this.clone();return e?u.__takeCount__=zu(r,u.__takeCount__):u.__views__.push({size:zu(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(Ye)},An.prototype.find=function(n){return this.filter(n).head()},An.prototype.findLast=function(n){return this.reverse().find(n);
},An.prototype.invokeMap=he(function(n,t){return typeof n=="function"?new An(this):this.map(function(r){return mt(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=Ce(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=Ce(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(){var t=this.__wrapped__,i=e?[1]:arguments,f=t instanceof An,c=i[0],a=f||Zo(t),s=function(n){return n=u.apply(yn,l([n],i)),e&&h?n[0]:n};a&&r&&typeof c=="function"&&1!=c.length&&(f=a=false);var h=this.__chain__,p=!!this.__actions__.length,c=o&&!h,f=f&&!p;return!o&&a?(t=f?t:new An(this),
t=n.apply(t,i),t.__actions__.push({func:ne,args:[s],thisArg:Z}),new wn(t,h)):c&&f?n.apply(this,i):(t=this.thru(s),c?e?t.value()[0]:t.value():t)})}),u("pop push shift sort splice unshift".split(" "),function(n){var t=fu[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);yn.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),pt(An.prototype,function(n,t){var r=yn[t];if(r){var e=r.name+"";(Yu[e]||(Yu[e]=[])).push({
name:t,func:r})}}),Yu[pr(Z,2).name]=[{name:"wrapper",func:Z}],An.prototype.clone=function(){var n=new An(this.__wrapped__);return n.__actions__=Xt(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Xt(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Xt(this.__views__),n},An.prototype.reverse=function(){if(this.__filtered__){var n=new An(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},An.prototype.value=function(){
var n,t=this.__wrapped__.value(),r=this.__dir__,e=Zo(t),u=0>r,o=e?t.length:0;n=0;for(var i=o,f=this.__views__,c=-1,a=f.length;++c<a;){var l=f[c],s=l.size;switch(l.type){case"drop":n+=s;break;case"dropRight":i-=s;break;case"take":i=zu(i,n+s);break;case"takeRight":n=Uu(n,i-s)}}if(n={start:n,end:i},i=n.start,f=n.end,n=f-i,u=u?f:i-1,i=this.__iteratees__,f=i.length,c=0,a=zu(n,this.__takeCount__),!e||200>o||o==n&&a==n)return Kt(t,this.__actions__);e=[];n:for(;n--&&a>c;){for(u+=r,o=-1,l=t[u];++o<f;){var h=i[o],s=h.type,h=(0,
h.iteratee)(l);if(2==s)l=h;else if(!h){if(1==s)continue n;break n}}e[c++]=l}return e},yn.prototype.at=ko,yn.prototype.chain=function(){return Xr(this)},yn.prototype.commit=function(){return new wn(this.value(),this.__chain__)},yn.prototype.flatMap=function(n){return this.map(n).flatten()},yn.prototype.next=function(){this.__values__===Z&&(this.__values__=Be(this.value()));var n=this.__index__>=this.__values__.length,t=n?Z:this.__values__[this.__index__++];return{done:n,value:t}},yn.prototype.plant=function(n){
for(var t,r=this;r instanceof jn;){var e=Pr(r);e.__index__=0,e.__values__=Z,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},yn.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof An?(this.__actions__.length&&(n=new An(this)),n=n.reverse(),n.__actions__.push({func:ne,args:[Yr],thisArg:Z}),new wn(n,this.__chain__)):this.thru(Yr)},yn.prototype.toJSON=yn.prototype.valueOf=yn.prototype.value=function(){return Kt(this.__wrapped__,this.__actions__)},Au&&(yn.prototype[Au]=te),
yn}var Z,q=1/0,P=NaN,T=/\b__p\+='';/g,K=/\b(__p\+=)''\+/g,G=/(__e\(.*?\)|\b__t\))\+'';/g,V=/&(?:amp|lt|gt|quot|#39|#96);/g,J=/[&<>"'`]/g,Y=RegExp(V.source),H=RegExp(J.source),Q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,nn=/<%=([\s\S]+?)%>/g,tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rn=/^\w*$/,en=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,un=/[\\^$.*+?()[\]{}|]/g,on=RegExp(un.source),fn=/^\s+|\s+$/g,cn=/^\s+/,an=/\s+$/,ln=/\\(\\)?/g,sn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,hn=/\w*$/,pn=/^0x/i,_n=/^[-+]0x[0-9a-f]+$/i,gn=/^0b[01]+$/i,vn=/^\[object .+?Constructor\]$/,dn=/^0o[0-7]+$/i,yn=/^(?:0|[1-9]\d*)$/,bn=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,xn=/($^)/,mn=/['\n\r\u2028\u2029\\]/g,jn="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",wn="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+jn,An="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",On=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),kn=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+An+jn,"g"),En=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),In=/[a-zA-Z0-9]+/g,Sn=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|\\d+",wn].join("|"),"g"),Rn=/[a-z][A-Z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wn="Array Buffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Bn={};
Bn["[object Float32Array]"]=Bn["[object Float64Array]"]=Bn["[object Int8Array]"]=Bn["[object Int16Array]"]=Bn["[object Int32Array]"]=Bn["[object Uint8Array]"]=Bn["[object Uint8ClampedArray]"]=Bn["[object Uint16Array]"]=Bn["[object Uint32Array]"]=true,Bn["[object Arguments]"]=Bn["[object Array]"]=Bn["[object ArrayBuffer]"]=Bn["[object Boolean]"]=Bn["[object Date]"]=Bn["[object Error]"]=Bn["[object Function]"]=Bn["[object Map]"]=Bn["[object Number]"]=Bn["[object Object]"]=Bn["[object RegExp]"]=Bn["[object Set]"]=Bn["[object String]"]=Bn["[object WeakMap]"]=false;
var Cn={};Cn["[object Arguments]"]=Cn["[object Array]"]=Cn["[object ArrayBuffer]"]=Cn["[object Boolean]"]=Cn["[object Date]"]=Cn["[object Float32Array]"]=Cn["[object Float64Array]"]=Cn["[object Int8Array]"]=Cn["[object Int16Array]"]=Cn["[object Int32Array]"]=Cn["[object Map]"]=Cn["[object Number]"]=Cn["[object Object]"]=Cn["[object RegExp]"]=Cn["[object Set]"]=Cn["[object String]"]=Cn["[object Symbol]"]=Cn["[object Uint8Array]"]=Cn["[object Uint8ClampedArray]"]=Cn["[object Uint16Array]"]=Cn["[object Uint32Array]"]=true,
Cn["[object Error]"]=Cn["[object Function]"]=Cn["[object WeakMap]"]=false;var Un={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O",
"\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},zn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},Mn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},Ln={"function":true,object:true},$n={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"
},Fn=parseFloat,Nn=parseInt,Dn=Ln[typeof exports]&&exports&&!exports.nodeType?exports:Z,Zn=Ln[typeof module]&&module&&!module.nodeType?module:Z,qn=Zn&&Zn.exports===Dn?Dn:Z,Pn=E(Dn&&Zn&&typeof global=="object"&&global),Tn=E(Ln[typeof self]&&self),Kn=E(Ln[typeof window]&&window),Gn=E(Ln[typeof this]&&this),Vn=Pn||Kn!==(Gn&&Gn.window)&&Kn||Tn||Gn||Function("return this")(),Jn=D();(Kn||Tn||{})._=Jn,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return Jn}):Dn&&Zn?(qn&&((Zn.exports=Jn)._=Jn),
Dn._=Jn):Vn._=Jn}).call(this);

300
dist/mapping.fp.js vendored Normal file
View File

@@ -0,0 +1,300 @@
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["mapping"] = factory();
else
root["mapping"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports) {
/** Used to map aliases to their real names. */
exports.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'
};
/** Used to map ary to method names. */
exports.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', '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', 'orderBy', 'pullAllBy', 'reduce', 'reduceRight',
'replace', 'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform',
'unionBy', 'unionWith', 'xorBy', 'xorWith', 'zipWith'
],
'4': [
'fill', 'setWith'
]
};
/** Used to map ary to rearg configs. */
exports.aryRearg = {
'2': [1, 0],
'3': [2, 0, 1],
'4': [3, 2, 0, 1]
};
/** Used to map method names to their iteratee ary. */
exports.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
};
/** Used to map method names to iteratee rearg configs. */
exports.iterateeRearg = {
'mapKeys': [1]
};
/** Used to map method names to rearg configs. */
exports.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]
};
/** Used to map method names to spread configs. */
exports.methodSpread = {
'partial': 1,
'partialRight': 1
};
/** Used to identify methods which mutate arrays or objects. */
exports.mutate = {
'array': {
'fill': true,
'pull': true,
'pullAll': true,
'pullAllBy': true,
'pullAt': true,
'remove': true,
'reverse': true
},
'object': {
'assign': true,
'assignIn': true,
'assignInWith': true,
'assignWith': true,
'defaults': true,
'defaultsDeep': true,
'merge': true,
'mergeWith': true
},
'set': {
'set': true,
'setWith': true,
'unset': true
}
};
/** Used to track methods with placeholder support */
exports.placeholder = {
'bind': true,
'bindKey': true,
'curry': true,
'curryRight': true,
'partial': true,
'partialRight': true
};
/** Used to map real names to their aliases. */
exports.realToAlias = (function() {
var hasOwnProperty = Object.prototype.hasOwnProperty,
object = exports.aliasToReal,
result = {};
for (var key in object) {
var value = object[key];
if (hasOwnProperty.call(result, value)) {
result[value].push(key);
} else {
result[value] = [key];
}
}
return result;
}());
/** Used to map method names to other names. */
exports.remap = {
'curryN': 'curry',
'curryRightN': 'curryRight',
'getOr': 'get',
'trimChars': 'trim',
'trimCharsEnd': 'trimEnd',
'trimCharsStart': 'trimStart'
};
/** Used to track methods that skip `_.rearg`. */
exports.skipRearg = {
'add': true,
'assign': true,
'assignIn': true,
'concat': true,
'difference': true,
'gt': true,
'gte': true,
'lt': true,
'lte': true,
'matchesProperty': true,
'merge': true,
'partial': true,
'partialRight': true,
'random': true,
'range': true,
'rangeRight': true,
'subtract': true,
'zip': true,
'zipObject': true
};
/***/ }
/******/ ])
});
;

File diff suppressed because it is too large Load Diff

318
fp/_baseConvert.js Normal file
View File

@@ -0,0 +1,318 @@
var mapping = require('./_mapping'),
mutateMap = mapping.mutate,
placeholder = {};
/**
* The base implementation of `convert` which accepts a `util` object of methods
* required to perform conversions.
*
* @param {Object} util The util object.
* @param {string} name The name of the function to wrap.
* @param {Function} func The function to wrap.
* @param {Object} [options] The options object.
* @param {boolean} [options.cap=true] Specify capping iteratee arguments.
* @param {boolean} [options.curry=true] Specify currying.
* @param {boolean} [options.fixed=true] Specify fixed arity.
* @param {boolean} [options.immutable=true] Specify immutable operations.
* @param {boolean} [options.rearg=true] Specify rearranging arguments.
* @returns {Function|Object} Returns the converted function or object.
*/
function baseConvert(util, name, func, options) {
var setPlaceholder,
isLib = typeof name == 'function',
isObj = name === Object(name);
if (isObj) {
options = func;
func = name;
name = undefined;
}
if (func == null) {
throw new TypeError;
}
options || (options = {});
var config = {
'cap': 'cap' in options ? options.cap : true,
'curry': 'curry' in options ? options.curry : true,
'fixed': 'fixed' in options ? options.fixed : true,
'immutable': 'immutable' in options ? options.immutable : true,
'rearg': 'rearg' in options ? options.rearg : true
};
var forceRearg = ('rearg' in options) && options.rearg;
var helpers = isLib ? func : {
'ary': util.ary,
'clone': util.clone,
'curry': util.curry,
'forEach': util.forEach,
'isArray': util.isArray,
'isFunction': util.isFunction,
'iteratee': util.iteratee,
'keys': util.keys,
'rearg': util.rearg,
'spread': util.spread,
'toPath': util.toPath
};
var ary = helpers.ary,
clone = helpers.clone,
curry = helpers.curry,
each = helpers.forEach,
isArray = helpers.isArray,
isFunction = helpers.isFunction,
keys = helpers.keys,
rearg = helpers.rearg,
spread = helpers.spread,
toPath = helpers.toPath;
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); }
: function(a) { return func(a); };
};
var cloneArray = function(array) {
var length = array ? array.length : 0,
result = Array(length);
while (length--) {
result[length] = array[length];
}
return result;
};
var cloneByPath = function(object, path) {
path = toPath(path);
var index = -1,
length = path.length,
result = clone(Object(object)),
nested = result;
while (nested != null && ++index < length) {
var key = path[index],
value = nested[key];
if (value != null) {
nested[key] = clone(Object(value));
}
nested = nested[key];
}
return result;
};
var createCloner = function(func) {
return function(object) {
return func({}, object);
};
};
var immutWrap = function(func, cloner) {
return function() {
var length = arguments.length;
if (!length) {
return result;
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var result = args[0] = cloner.apply(undefined, args);
func.apply(undefined, args);
return result;
};
};
var iterateeAry = function(func, n) {
return overArg(func, function(func) {
return typeof func == 'function' ? baseAry(func, n) : func;
});
};
var iterateeRearg = function(func, indexes) {
return overArg(func, function(func) {
var n = indexes.length;
return baseArity(rearg(baseAry(func, n), indexes), n);
});
};
var overArg = function(func, iteratee, retArg) {
return function() {
var length = arguments.length;
if (!length) {
return func();
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var index = config.rearg ? 0 : (length - 1);
args[index] = iteratee(args[index]);
return func.apply(undefined, args);
};
};
var wrappers = {
'castArray': function(castArray) {
return function() {
var value = arguments[0];
return isArray(value)
? castArray(cloneArray(value))
: castArray.apply(undefined, arguments);
};
},
'iteratee': function(iteratee) {
return function() {
var func = arguments[0],
arity = arguments[1],
result = iteratee(func, arity),
length = result.length;
if (config.cap && typeof arity == 'number') {
arity = arity > 2 ? (arity - 2) : 1;
return (length && length <= arity) ? result : baseAry(result, arity);
}
return result;
};
},
'mixin': function(mixin) {
return function(source) {
var func = this;
if (!isFunction(func)) {
return mixin(func, Object(source));
}
var methods = [],
methodNames = [];
each(keys(source), function(key) {
var value = source[key];
if (isFunction(value)) {
methodNames.push(key);
methods.push(func.prototype[key]);
}
});
mixin(func, Object(source));
each(methodNames, function(methodName, index) {
var method = methods[index];
if (isFunction(method)) {
func.prototype[methodName] = method;
} else {
delete func.prototype[methodName];
}
});
return func;
};
},
'runInContext': function(runInContext) {
return function(context) {
return baseConvert(util, runInContext(context), options);
};
}
};
var wrap = function(name, func) {
name = mapping.aliasToReal[name] || name;
var wrapper = wrappers[name];
if (wrapper) {
return wrapper(func);
}
var wrapped = func;
if (config.immutable) {
if (mutateMap.array[name]) {
wrapped = immutWrap(func, cloneArray);
}
else if (mutateMap.object[name]) {
wrapped = immutWrap(func, createCloner(func));
}
else if (mutateMap.set[name]) {
wrapped = immutWrap(func, cloneByPath);
}
}
var result;
each(aryMethodKeys, function(aryKey) {
each(mapping.aryMethod[aryKey], function(otherName) {
if (name == otherName) {
var aryN = !isLib && mapping.iterateeAry[name],
reargIndexes = mapping.iterateeRearg[name],
spreadStart = mapping.methodSpread[name];
result = wrapped;
if (config.fixed) {
result = spreadStart === undefined
? ary(result, aryKey)
: spread(result, spreadStart);
}
if (config.rearg && aryKey > 1 && (forceRearg || !mapping.skipRearg[name])) {
result = rearg(result, mapping.methodRearg[name] || mapping.aryRearg[aryKey]);
}
if (config.cap) {
if (reargIndexes) {
result = iterateeRearg(result, reargIndexes);
} else if (aryN) {
result = iterateeAry(result, aryN);
}
}
if (config.curry && aryKey > 1) {
result = curry(result, aryKey);
}
return false;
}
});
return !result;
});
result || (result = wrapped);
if (mapping.placeholder[name]) {
setPlaceholder = true;
func.placeholder = result.placeholder = placeholder;
}
return result;
};
if (!isObj) {
return wrap(name, func);
}
var _ = func;
// Iterate over methods for the current ary cap.
var pairs = [];
each(aryMethodKeys, function(aryKey) {
each(mapping.aryMethod[aryKey], function(key) {
var func = _[mapping.remap[key] || key];
if (func) {
pairs.push([key, wrap(key, func)]);
}
});
});
// Assign to `_` leaving `_.prototype` unchanged to allow chaining.
each(pairs, function(pair) {
_[pair[0]] = pair[1];
});
if (setPlaceholder) {
_.placeholder = placeholder;
}
// Wrap the lodash method and its aliases.
each(keys(_), function(key) {
each(mapping.realToAlias[key] || [], function(alias) {
_[alias] = _[key];
});
});
return _;
}
module.exports = baseConvert;

17
fp/_convertBrowser.js Normal file
View File

@@ -0,0 +1,17 @@
var baseConvert = require('./_baseConvert');
/**
* Converts `lodash` to an immutable auto-curried iteratee-first data-last version.
*
* @param {Function} lodash The lodash function.
* @param {Object} [options] The options object. See `baseConvert` for more details.
* @returns {Function} Returns the converted `lodash`.
*/
function browserConvert(lodash, options) {
return baseConvert(lodash, lodash, options);
}
if (typeof _ == 'function') {
_ = browserConvert(_.runInContext());
}
module.exports = browserConvert;

238
fp/_mapping.js Normal file
View File

@@ -0,0 +1,238 @@
/** Used to map aliases to their real names. */
exports.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'
};
/** Used to map ary to method names. */
exports.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', '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', 'orderBy', 'pullAllBy', 'reduce', 'reduceRight',
'replace', 'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform',
'unionBy', 'unionWith', 'xorBy', 'xorWith', 'zipWith'
],
'4': [
'fill', 'setWith'
]
};
/** Used to map ary to rearg configs. */
exports.aryRearg = {
'2': [1, 0],
'3': [2, 0, 1],
'4': [3, 2, 0, 1]
};
/** Used to map method names to their iteratee ary. */
exports.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
};
/** Used to map method names to iteratee rearg configs. */
exports.iterateeRearg = {
'mapKeys': [1]
};
/** Used to map method names to rearg configs. */
exports.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]
};
/** Used to map method names to spread configs. */
exports.methodSpread = {
'partial': 1,
'partialRight': 1
};
/** Used to identify methods which mutate arrays or objects. */
exports.mutate = {
'array': {
'fill': true,
'pull': true,
'pullAll': true,
'pullAllBy': true,
'pullAt': true,
'remove': true,
'reverse': true
},
'object': {
'assign': true,
'assignIn': true,
'assignInWith': true,
'assignWith': true,
'defaults': true,
'defaultsDeep': true,
'merge': true,
'mergeWith': true
},
'set': {
'set': true,
'setWith': true,
'unset': true
}
};
/** Used to track methods with placeholder support */
exports.placeholder = {
'bind': true,
'bindKey': true,
'curry': true,
'curryRight': true,
'partial': true,
'partialRight': true
};
/** Used to map real names to their aliases. */
exports.realToAlias = (function() {
var hasOwnProperty = Object.prototype.hasOwnProperty,
object = exports.aliasToReal,
result = {};
for (var key in object) {
var value = object[key];
if (hasOwnProperty.call(result, value)) {
result[value].push(key);
} else {
result[value] = [key];
}
}
return result;
}());
/** Used to map method names to other names. */
exports.remap = {
'curryN': 'curry',
'curryRightN': 'curryRight',
'getOr': 'get',
'trimChars': 'trim',
'trimCharsEnd': 'trimEnd',
'trimCharsStart': 'trimStart'
};
/** Used to track methods that skip `_.rearg`. */
exports.skipRearg = {
'add': true,
'assign': true,
'assignIn': true,
'concat': true,
'difference': true,
'gt': true,
'gte': true,
'lt': true,
'lte': true,
'matchesProperty': true,
'merge': true,
'partial': true,
'partialRight': true,
'random': true,
'range': true,
'rangeRight': true,
'subtract': true,
'zip': true,
'zipObject': true
};

26
lib/common/minify.js Normal file
View File

@@ -0,0 +1,26 @@
'use strict';
var _ = require('lodash'),
fs = require('fs-extra'),
uglify = require('uglify-js');
var uglifyOptions = require('./uglify.options');
/*----------------------------------------------------------------------------*/
function minify(srcPath, destPath, callback, options) {
if (_.isFunction(destPath)) {
if (_.isObject(callback)) {
options = callback;
}
callback = destPath;
destPath = undefined;
}
if (!destPath) {
destPath = srcPath.replace(/(?=\.js$)/, '.min');
}
var output = uglify.minify(srcPath, _.defaults(options || {}, uglifyOptions));
fs.writeFile(destPath, output.code, 'utf-8', callback);
}
module.exports = minify;

View File

@@ -0,0 +1,16 @@
module.exports = {
'compress': {
'pure_getters': true,
'unsafe': true,
'unsafe_comps': true,
'warnings': false
},
'mangle': {
'except': ['define']
},
'output': {
'ascii_only': true,
'comments': /^!|@cc_on|@license|@preserve/i,
'max_line_len': 500
}
};

36
lib/common/util.js Normal file
View File

@@ -0,0 +1,36 @@
'use strict';
var _ = require('lodash'),
fs = require('fs-extra'),
glob = require('glob'),
path = require('path');
var minify = require('../common/minify.js');
/*----------------------------------------------------------------------------*/
function copyFile(srcPath, destPath) {
return _.partial(fs.copy, srcPath, destPath);
}
function globTemplate(pattern) {
return _.transform(glob.sync(pattern), function(result, filePath) {
var key = path.basename(filePath, path.extname(filePath));
result[key] = _.template(fs.readFileSync(filePath, 'utf8'));
}, {});
}
function minFile(srcPath, destPath) {
return _.partial(minify, srcPath, destPath);
}
function writeFile(filePath, data) {
return _.partial(fs.writeFile, filePath, data);
}
module.exports = {
'copyFile': copyFile,
'globTemplate': globTemplate,
'minFile': minFile,
'writeFile': writeFile
};

55
lib/fp/build-dist.js Normal file
View File

@@ -0,0 +1,55 @@
'use strict';
var _ = require('lodash'),
async = require('async'),
path = require('path'),
webpack = require('webpack');
var util = require('../common/util');
var basePath = path.join(__dirname, '..', '..'),
distPath = path.join(basePath, 'dist'),
fpPath = path.join(basePath, 'fp'),
filename = 'lodash.fp.js';
var fpConfig = {
'entry': path.join(fpPath, '_convertBrowser.js'),
'output': {
'path': distPath,
'filename': filename,
'library': 'fp',
'libraryTarget': 'umd'
},
'plugins': [
new webpack.optimize.OccurenceOrderPlugin,
new webpack.optimize.DedupePlugin
]
};
var mappingConfig = {
'entry': path.join(fpPath, '_mapping.js'),
'output': {
'path': distPath,
'filename': 'mapping.fp.js',
'library': 'mapping',
'libraryTarget': 'umd'
}
};
/*----------------------------------------------------------------------------*/
function onComplete(error) {
if (error) {
throw error;
}
}
function build() {
async.series([
_.partial(webpack, mappingConfig),
_.partial(webpack, fpConfig),
util.minFile(path.join(distPath, filename))
], onComplete);
}
build();

62
lib/fp/build-doc.js Normal file
View File

@@ -0,0 +1,62 @@
'use strict';
var _ = require('lodash'),
fs = require('fs-extra'),
path = require('path'),
util = require('../common/util');
var mapping = require('../../fp/_mapping'),
templatePath = path.join(__dirname, 'template/doc'),
template = util.globTemplate(path.join(templatePath, '*.jst'));
var argNames = ['a', 'b', 'c', 'd'];
var templateData = {
'mapping': mapping,
'toArgOrder': toArgOrder,
'toFuncList': toFuncList
};
function toArgOrder(array) {
return '`(' + _.map(array, function(value) {
return argNames[value];
}).join(', ') + ')`';
}
function toFuncList(array) {
var chunks = _.chunk(array.slice().sort(), 5),
lastChunk = _.last(chunks),
last = lastChunk ? lastChunk.pop() : undefined;
chunks = _.reject(chunks, _.isEmpty);
lastChunk = _.last(chunks);
var result = '`' + _.map(chunks, function(chunk) {
return chunk.join('`, `') + '`';
}).join(',\n`');
if (last == null) {
return result;
}
if (_.size(chunks) > 1 || _.size(lastChunk) > 1) {
result += ',';
}
result += ' &';
result += _.size(lastChunk) < 5 ? ' ' : '\n';
return result + '`' + last + '`';
}
/*----------------------------------------------------------------------------*/
function onComplete(error) {
if (error) {
throw error;
}
}
function build(target) {
target = path.resolve(target);
fs.writeFile(target, template.wiki(templateData), onComplete);
}
build(_.last(process.argv));

118
lib/fp/build-modules.js Normal file
View File

@@ -0,0 +1,118 @@
'use strict';
var _ = require('lodash'),
async = require('async'),
glob = require('glob'),
path = require('path');
var util = require('../common/util');
var mapping = require('../../fp/_mapping'),
templatePath = path.join(__dirname, 'template/modules'),
template = util.globTemplate(path.join(templatePath, '*.jst'));
var aryMethods = _.union(
mapping.aryMethod[1],
mapping.aryMethod[2],
mapping.aryMethod[3],
mapping.aryMethod[4]
);
var categories = [
'array',
'collection',
'date',
'function',
'lang',
'math',
'number',
'object',
'seq',
'string',
'util'
];
var ignored = [
'_*.js',
'core.js',
'fp.js',
'index.js',
'lodash.js'
];
function isAlias(funcName) {
return _.has(mapping.aliasToReal, funcName);
}
function isCategory(funcName) {
return _.includes(categories, funcName);
}
function isThru(funcName) {
return !_.includes(aryMethods, funcName);
}
function getTemplate(moduleName) {
var data = {
'name': _.result(mapping.aliasToReal, moduleName, moduleName),
'mapping': mapping
};
if (isAlias(moduleName)) {
return template.alias(data);
}
if (isCategory(moduleName)) {
return template.category(data);
}
if (isThru(moduleName)) {
return template.thru(data);
}
return template.module(data);
}
/*----------------------------------------------------------------------------*/
function onComplete(error) {
if (error) {
throw error;
}
}
function build(target) {
target = path.resolve(target);
var fpPath = path.join(target, 'fp');
// Glob existing lodash module paths.
var modulePaths = glob.sync(path.join(target, '*.js'), {
'nodir': true,
'ignore': ignored.map(function(filename) {
return path.join(target, filename);
})
});
// Add FP alias and remapped module paths.
_.each([mapping.aliasToReal, mapping.remap], function(data) {
_.forOwn(data, function(realName, alias) {
var modulePath = path.join(target, alias + '.js');
if (!_.startsWith(alias, '_') &&
!_.includes(modulePaths, modulePath)) {
modulePaths.push(modulePath);
}
});
});
var actions = modulePaths.map(function(modulePath) {
var moduleName = path.basename(modulePath, '.js');
return util.writeFile(path.join(fpPath, moduleName + '.js'), getTemplate(moduleName));
});
actions.unshift(util.copyFile(path.join(__dirname, '../../fp'), fpPath));
actions.push(util.writeFile(path.join(target, 'fp.js'), template.fp()));
actions.push(util.writeFile(path.join(fpPath, 'convert.js'), template.convert()));
actions.push(util.writeFile(path.join(fpPath, '_util.js'), template._util()));
async.series(actions, onComplete);
}
build(_.last(process.argv));

View File

@@ -0,0 +1,135 @@
## lodash/fp
The `lodash/fp` module is an instance of `lodash` with its methods wrapped to
produce immutable auto-curried iteratee-first data-last methods.
## Installation
In a browser:
```html
<script src='path/to/lodash.js'></script>
<script src='path/to/lodash.fp.js'></script>
```
In Node.js:
```js
// Load the fp build.
var _ = require('lodash/fp');
// Load a method category.
var object = require('lodash/fp/object');
// Load a single method for smaller builds with browserify/rollup/webpack.
var extend = require('lodash/fp/extend');
```
## Convert
Although `lodash/fp` & its method modules come pre-converted there are times when
you may want to convert another lodash package or create a customized conversion.
Thats when the `convert` module comes in handy.
```js
var convert = require('lodash/fp/convert');
// Convert by name.
var assign = convert('assign', require('lodash.assign'));
// Convert by object.
var fp = convert({
'assign': require('lodash.assign'),
'chunk': require('lodash.chunk')
});
// Convert by `lodash` instance.
var fp = convert(lodash.runInContext());
```
Its even customizable.
```js
// Every option is `true` by default.
var filter = convert('filter', _.filter, {
// Specify capping iteratee arguments.
'cap': true,
// Specify currying.
'curry': true,
// Specify fixed arity.
'fixed': true,
// Specify immutable operations.
'immutable': true,
// Specify rearranging arguments.
'rearg': true
});
// Specify `cap` of `false` to create a function that doesnt cap iteratee arguments.
var filter = convert('filter', _.filter, { 'cap': false });
filter(function(value, index) {
return index % 2 == 0;
})(['a', 'b', 'c']);
// => ['a', 'c']
```
## Mapping
Immutable auto-curried iteratee-first data-last methods sound great, but whats
that really mean for each method? Below is a breakdown of the mapping used to
convert each method.
#### Capped Iteratee Arguments
Methods that cap iteratees to one argument:<br>
<%= toFuncList(_.keys(_.pickBy(mapping.iterateeAry, _.partial(_.eq, _, 1)))) %>
Methods that cap iteratees to two arguments:<br>
<%= toFuncList(_.keys(_.pickBy(mapping.iterateeAry, _.partial(_.eq, _, 2)))) %>
The iteratee of `mapKeys` is invoked with one argument: (key)
#### Fixed Arity
Methods with a fixed arity of one:<br>
<%= toFuncList(mapping.aryMethod[1]) %>
Methods with a fixed arity of two:<br>
<%= toFuncList(mapping.aryMethod[2]) %>
Methods with a fixed arity of three:<br>
<%= toFuncList(mapping.aryMethod[3]) %>
Methods with a fixed arity of four:<br>
<%= toFuncList(mapping.aryMethod[4]) %>
#### Rearranged Arguments
Methods with a fixed arity of two have an argument order of:<br>
<%= toArgOrder(mapping.aryRearg[2]) %>
Methods with a fixed arity of three have an argument order of:<br>
<%= toArgOrder(mapping.aryRearg[3]) %>
Methods with a fixed arity of four have an argument order of:<br>
<%= toArgOrder(mapping.aryRearg[4]) %>
Methods with custom argument orders:<br>
<%= _.map(mapping.methodRearg, function(orders, methodName) {
return ' * `_.' + methodName + '` has an order of ' + toArgOrder(orders);
}).join('\n') %>
Methods with unchanged argument orders:<br>
<%= toFuncList(_.keys(mapping.skipRearg)) %>
The methods `partial` & `partialRight` accept an array of arguments to partially
apply as their second parameter.
#### New Methods
Methods created to accommodate Lodashs variadic methods:<br>
<%= toFuncList(_.keys(mapping.remap)) %>
#### Aliases
There are <%= _.size(mapping.aliasToReal) %> method aliases:<br>
<%= _.map(mapping.aliasToReal, function(realName, alias) {
return ' * Added `_.' + alias + '` as an alias of `_.' + realName + '`';
}).join('\n') %>

View File

@@ -0,0 +1,13 @@
module.exports = {
'ary': require('../ary'),
'clone': require('../clone'),
'curry': require('../curry'),
'forEach': require('../_arrayEach'),
'isArray': require('../isArray'),
'isFunction': require('../isFunction'),
'iteratee': require('../iteratee'),
'keys': require('../_baseKeys'),
'rearg': require('../rearg'),
'spread': require('../spread'),
'toPath': require('../toPath')
};

View File

@@ -0,0 +1 @@
module.exports = require('./<%= name %>');

View File

@@ -0,0 +1,2 @@
var convert = require('./convert');
module.exports = convert(require('../<%= name %>'));

View File

@@ -0,0 +1,17 @@
var baseConvert = require('./_baseConvert'),
util = require('./_util');
/**
* Converts `func` of `name` to an immutable auto-curried iteratee-first data-last
* version. If `name` is an object its methods will be converted.
*
* @param {string} name The name of the function to wrap.
* @param {Function} [func] The function to wrap.
* @param {Object} [options] The options object. See `baseConvert` for more details.
* @returns {Function|Object} Returns the converted function or object.
*/
function convert(name, func, options) {
return baseConvert(util, name, func, options);
}
module.exports = convert;

View File

@@ -0,0 +1,2 @@
var _ = require('./lodash.min').runInContext();
module.exports = require('./fp/_baseConvert')(_, _);

View File

@@ -0,0 +1,2 @@
var convert = require('./convert');
module.exports = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'));

View File

@@ -0,0 +1 @@
module.exports = require('../<%= name %>');

31
lib/main/build-dist.js Normal file
View File

@@ -0,0 +1,31 @@
'use strict';
var _ = require('lodash'),
async = require('async'),
path = require('path');
var util = require('../common/util');
var basePath = path.join(__dirname, '..', '..'),
distPath = path.join(basePath, 'dist'),
filename = 'lodash.js';
var baseLodash = path.join(basePath, filename),
distLodash = path.join(distPath, filename);
/*----------------------------------------------------------------------------*/
function onComplete(error) {
if (error) {
throw error;
}
}
function build() {
async.series([
util.copyFile(baseLodash, distLodash),
util.minFile(distLodash)
], onComplete);
}
build();

55
lib/main/build-doc.js Normal file
View File

@@ -0,0 +1,55 @@
'use strict';
var _ = require('lodash'),
docdown = require('docdown'),
fs = require('fs-extra'),
path = require('path');
var basePath = path.join(__dirname, '..', '..'),
docPath = path.join(basePath, 'doc'),
readmePath = path.join(docPath, 'README.md');
var pkg = require('../../package.json'),
version = pkg.version;
var config = {
'base': {
'entryLinks': [
'<% if (name == "templateSettings" || !/^(?:methods|properties|seq)$/i.test(category)) {' +
'print("[&#x24C3;](https://www.npmjs.com/package/lodash." + name.toLowerCase() + " \\"See the npm package\\")")' +
'} %>'
],
'path': path.join(basePath, 'lodash.js'),
'title': '<a href="https://lodash.com/">lodash</a> <span>v' + version + '</span>',
'toc': 'categories',
'url': 'https://github.com/lodash/lodash/blob/' + version + '/lodash.js'
},
'github': {
'hash': 'github'
},
'site': {
'tocLink': '#docs'
}
};
function postprocess(string) {
// Fix docdown bug by wrapping symbol property identifiers in brackets.
return string.replace(/\.(Symbol\.(?:[a-z]+[A-Z]?)+)/g, '[$1]');
}
/*----------------------------------------------------------------------------*/
function onComplete(error) {
if (error) {
throw error;
}
}
function build(type) {
var options = _.defaults({}, config.base, config[type]),
markdown = docdown(options);
fs.writeFile(readmePath, postprocess(markdown), onComplete);
}
build(_.last(process.argv));

34
lib/main/build-modules.js Normal file
View File

@@ -0,0 +1,34 @@
'use strict';
var _ = require('lodash'),
async = require('async'),
path = require('path');
var util = require('../common/util');
var basePath = path.join(__dirname, '..', '..'),
distPath = path.join(basePath, 'dist');
var filePairs = [
[path.join(distPath, 'lodash.core.js'), 'core.js'],
[path.join(distPath, 'lodash.core.min.js'), 'core.min.js'],
[path.join(distPath, 'lodash.min.js'), 'lodash.min.js']
];
/*----------------------------------------------------------------------------*/
function onComplete(error) {
if (error) {
throw error;
}
}
function build(target) {
var actions = _.map(filePairs, function(pair) {
return util.copyFile(pair[0], path.join(target, pair[1]));
});
async.series(actions, onComplete);
}
build(_.last(process.argv));

14004
lodash.js

File diff suppressed because it is too large Load Diff

85
lodash.min.js vendored
View File

@@ -1,85 +0,0 @@
/**
* @license
* lodash 3.1.0 (Custom Build) lodash.com/license | Underscore.js 1.7.0 underscorejs.org/LICENSE
* Build: `lodash modern -o ./lodash.js`
*/
;(function(){function n(n,t){if(n!==t){var r=n===n,e=t===t;if(n>t||!r||typeof n=="undefined"&&e)return 1;if(n<t||!e||typeof t=="undefined"&&r)return-1}return 0}function t(n,t,r){if(t!==t)return p(n,r);r=(r||0)-1;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function r(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}function e(n){return typeof n=="string"?n:null==n?"":n+""}function u(n){return n.charCodeAt(0)}function o(n,t){for(var r=-1,e=n.length;++r<e&&-1<t.indexOf(n.charAt(r)););return r
}function i(n,t){for(var r=n.length;r--&&-1<t.indexOf(n.charAt(r)););return r}function a(t,r){return n(t.a,r.a)||t.b-r.b}function f(t,r){for(var e=-1,u=t.a,o=r.a,i=u.length;++e<i;){var a=n(u[e],o[e]);if(a)return a}return t.b-r.b}function c(n){return Wt[n]}function l(n){return Nt[n]}function s(n){return"\\"+Lt[n]}function p(n,t,r){var e=n.length;for(t=r?t||e:(t||0)-1;r?t--:++t<e;){var u=n[t];if(u!==u)return t}return-1}function h(n){return n&&typeof n=="object"||false}function g(n){return 160>=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n)
}function v(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;)n[r]===t&&(n[r]=B,o[++u]=r);return o}function d(n){for(var t=-1,r=n.length;++t<r&&g(n.charCodeAt(t)););return t}function y(n){for(var t=n.length;t--&&g(n.charCodeAt(t)););return t}function _(n){return Ut[n]}function m(g){function Wt(n){if(h(n)&&!Co(n)){if(n instanceof Nt)return n;if(Wu.call(n,"__wrapped__"))return new Nt(n.__wrapped__,n.__chain__,zt(n.__actions__))}return new Nt(n)}function Nt(n,t,r){this.__actions__=r||[],this.__chain__=!!t,this.__wrapped__=n
}function Ut(n){this.actions=null,this.dir=1,this.dropCount=0,this.filtered=false,this.iteratees=null,this.takeCount=co,this.views=null,this.wrapped=n}function Ft(){this.__data__={}}function Lt(n){var t=n?n.length:0;for(this.data={hash:Qu(null),set:new Vu};t--;)this.push(n[t])}function Bt(n,t){var r=n.data;return(typeof t=="string"||Ge(t)?r.set.has(t):r.hash[t])?0:-1}function zt(n,t){var r=-1,e=n.length;for(t||(t=_u(e));++r<e;)t[r]=n[r];return t}function Mt(n,t){for(var r=-1,e=n.length;++r<e&&false!==t(n[r],r,n););return n
}function qt(n,t){for(var r=-1,e=n.length;++r<e;)if(!t(n[r],r,n))return false;return true}function Pt(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;){var i=n[r];t(i,r,n)&&(o[++u]=i)}return o}function Kt(n,t){for(var r=-1,e=n.length,u=_u(e);++r<e;)u[r]=t(n[r],r,n);return u}function Vt(n){for(var t=-1,r=n.length,e=fo;++t<r;){var u=n[t];u>e&&(e=u)}return e}function Yt(n,t,r,e){var u=-1,o=n.length;for(e&&o&&(r=n[++u]);++u<o;)r=t(r,n[u],u,n);return r}function Zt(n,t,r,e){var u=n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);
return r}function Gt(n,t){for(var r=-1,e=n.length;++r<e;)if(t(n[r],r,n))return true;return false}function Jt(n,t){return typeof n=="undefined"?t:n}function Xt(n,t,r,e){return typeof n!="undefined"&&Wu.call(e,r)?n:t}function Ht(n,t,r){var e=No(t);if(!r)return nr(t,n,e);for(var u=-1,o=e.length;++u<o;){var i=e[u],a=n[i],f=r(a,t[i],i,n,t);(f===f?f===a:a!==a)&&(typeof a!="undefined"||i in n)||(n[i]=f)}return n}function Qt(n,t){for(var r=-1,e=n.length,u=ue(e),o=t.length,i=_u(o);++r<o;){var a=t[r];u?(a=parseFloat(a),i[r]=re(a,e)?n[a]:b):i[r]=n[a]
}return i}function nr(n,t,r){r||(r=t,t={});for(var e=-1,u=r.length;++e<u;){var o=r[e];t[o]=n[o]}return t}function tr(n,t,r){var e=typeof n;if("function"==e){if(e=typeof t!="undefined"){var e=Wt.support,u=!(e.funcNames?n.name:e.funcDecomp);if(!u){var o=Tu.call(n);e.funcNames||(u=!_t.test(o)),u||(u=kt.test(o)||Je(n),mo(n,u))}e=u}n=e?Wr(n,t,r):n}else n=null==n?gu:"object"==e?wr(n):Ar(n+"");return n}function rr(n,t,r,e,u,o,i){var a;if(r&&(a=u?r(n,e,u):r(n)),typeof a!="undefined")return a;if(!Ge(n))return n;
if(e=Co(n)){if(a=Qr(n),!t)return zt(n,a)}else{var f=Uu.call(n),c=f==K;if(f!=Y&&f!=z&&(!c||u))return Tt[f]?te(n,f,t):u?n:{};if(a=ne(c?{}:n),!t)return nr(n,a,No(n))}for(o||(o=[]),i||(i=[]),u=o.length;u--;)if(o[u]==n)return i[u];return o.push(n),i.push(a),(e?Mt:gr)(n,function(e,u){a[u]=rr(e,t,r,u,n,o,i)}),a}function er(n,t,r,e){if(!Ze(n))throw new Ru($);return Yu(function(){n.apply(b,Er(r,e))},t)}function ur(n,r){var e=n?n.length:0,u=[];if(!e)return u;var o=-1,i=Hr(),a=i==t,f=a&&200<=r.length&&bo(r),c=r.length;
f&&(i=Bt,a=false,r=f);n:for(;++o<e;)if(f=n[o],a&&f===f){for(var l=c;l--;)if(r[l]===f)continue n;u.push(f)}else 0>i(r,f)&&u.push(f);return u}function or(n,t){var r=n?n.length:0;if(!ue(r))return gr(n,t);for(var e=-1,u=se(n);++e<r&&false!==t(u[e],e,u););return n}function ir(n,t){var r=n?n.length:0;if(!ue(r))return vr(n,t);for(var e=se(n);r--&&false!==t(e[r],r,e););return n}function ar(n,t){var r=true;return or(n,function(n,e,u){return r=!!t(n,e,u)}),r}function fr(n,t){var r=[];return or(n,function(n,e,u){t(n,e,u)&&r.push(n)
}),r}function cr(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,false):void 0}),u}function lr(n,t,r,e){e=(e||0)-1;for(var u=n.length,o=-1,i=[];++e<u;){var a=n[e];if(h(a)&&ue(a.length)&&(Co(a)||Ke(a))){t&&(a=lr(a,t,r));var f=-1,c=a.length;for(i.length+=c;++f<c;)i[++o]=a[f]}else r||(i[++o]=a)}return i}function sr(n,t,r){var e=-1,u=se(n);r=r(n);for(var o=r.length;++e<o;){var i=r[e];if(false===t(u[i],i,u))break}return n}function pr(n,t,r){var e=se(n);r=r(n);for(var u=r.length;u--;){var o=r[u];
if(false===t(e[o],o,e))break}return n}function hr(n,t){sr(n,t,eu)}function gr(n,t){return sr(n,t,No)}function vr(n,t){return pr(n,t,No)}function dr(n,t){for(var r=-1,e=t.length,u=-1,o=[];++r<e;){var i=t[r];Ze(n[i])&&(o[++u]=i)}return o}function yr(n,t,r){var e=-1,u=typeof t=="function",o=n?n.length:0,i=ue(o)?_u(o):[];return or(n,function(n){var o=u?t:null!=n&&n[t];i[++e]=o?o.apply(n,r):b}),i}function _r(n,t,r,e,u,o){if(n===t)return 0!==n||1/n==1/t;var i=typeof n,a=typeof t;if("function"!=i&&"object"!=i&&"function"!=a&&"object"!=a||null==n||null==t)n=n!==n&&t!==t;
else n:{var i=_r,a=Co(n),f=Co(t),c=D,l=D;a||(c=Uu.call(n),c==z?c=Y:c!=Y&&(a=nu(n))),f||(l=Uu.call(t),l==z?l=Y:l!=Y&&nu(t));var s=c==Y,f=l==Y,l=c==l;if(!l||a||s)if(c=s&&Wu.call(n,"__wrapped__"),f=f&&Wu.call(t,"__wrapped__"),c||f)n=i(c?n.value():n,f?t.value():t,r,e,u,o);else if(l){for(u||(u=[]),o||(o=[]),c=u.length;c--;)if(u[c]==n){n=o[c]==t;break n}u.push(n),o.push(t),n=(a?Yr:Gr)(n,t,i,r,e,u,o),u.pop(),o.pop()}else n=false;else n=Zr(n,t,c)}return n}function mr(n,t,r,e,u){var o=t.length;if(null==n)return!o;
for(var i=-1,a=!u;++i<o;)if(a&&e[i]?r[i]!==n[t[i]]:!Wu.call(n,t[i]))return false;for(i=-1;++i<o;){var f=t[i];if(a&&e[i])f=Wu.call(n,f);else{var c=n[f],l=r[i],f=u?u(c,l,f):b;typeof f=="undefined"&&(f=_r(l,c,u,true))}if(!f)return false}return true}function br(n,t){var r=[];return or(n,function(n,e,u){r.push(t(n,e,u))}),r}function wr(n){var t=No(n),r=t.length;if(1==r){var e=t[0],u=n[e];if(oe(u))return function(n){return null!=n&&u===n[e]&&Wu.call(n,e)}}for(var o=_u(r),i=_u(r);r--;)u=n[t[r]],o[r]=u,i[r]=oe(u);return function(n){return mr(n,t,o,i)
}}function xr(n,t,r,e,u){var o=ue(t.length)&&(Co(t)||nu(t));return(o?Mt:gr)(t,function(t,i,a){if(h(t)){e||(e=[]),u||(u=[]);n:{t=e;for(var f=u,c=t.length,l=a[i];c--;)if(t[c]==l){n[i]=f[c],i=void 0;break n}c=n[i],a=r?r(c,l,i,n,a):b;var s=typeof a=="undefined";s&&(a=l,ue(l.length)&&(Co(l)||nu(l))?a=Co(c)?c:c?zt(c):[]:So(l)||Ke(l)?a=Ke(c)?tu(c):So(c)?c:{}:s=false),t.push(l),f.push(a),s?n[i]=xr(a,l,r,t,f):(a===a?a!==c:c===c)&&(n[i]=a),i=void 0}return i}f=n[i],a=r?r(f,t,i,n,a):b,(l=typeof a=="undefined")&&(a=t),!o&&typeof a=="undefined"||!l&&(a===a?a===f:f!==f)||(n[i]=a)
}),n}function Ar(n){return function(t){return null==t?b:t[n]}}function jr(n,t){return n+Mu(ao()*(t-n+1))}function kr(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function Er(n,t,r){var e=-1,u=n.length;for(t=null==t?0:+t||0,0>t&&(t=-t>u?0:u+t),r=typeof r=="undefined"||r>u?u:+r||0,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=_u(u);++e<u;)r[e]=n[e+t];return r}function Rr(n,t){var r;return or(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function Ir(n,r){var e=-1,u=Hr(),o=n.length,i=u==t,a=i&&200<=o,f=a&&bo(),c=[];
f?(u=Bt,i=false):(a=false,f=r?[]:c);n:for(;++e<o;){var l=n[e],s=r?r(l,e,n):l;if(i&&l===l){for(var p=f.length;p--;)if(f[p]===s)continue n;r&&f.push(s),c.push(l)}else 0>u(f,s)&&((r||a)&&f.push(s),c.push(l))}return c}function Or(n,t){for(var r=-1,e=t.length,u=_u(e);++r<e;)u[r]=n[t[r]];return u}function Cr(n,t){var r=n;r instanceof Ut&&(r=r.value());for(var e=-1,u=t.length;++e<u;){var r=[r],o=t[e];Pu.apply(r,o.args),r=o.func.apply(o.thisArg,r)}return r}function Tr(n,t,r){var e=0,u=n?n.length:e;if(typeof t=="number"&&t===t&&u<=po){for(;e<u;){var o=e+u>>>1,i=n[o];
(r?i<=t:i<t)?e=o+1:u=o}return u}return Sr(n,t,gu,r)}function Sr(n,t,r,e){t=r(t);for(var u=0,o=n?n.length:0,i=t!==t,a=typeof t=="undefined";u<o;){var f=Mu((u+o)/2),c=r(n[f]),l=c===c;(i?l||e:a?l&&(e||typeof c!="undefined"):e?c<=t:c<t)?u=f+1:o=f}return eo(o,so)}function Wr(n,t,r){if(typeof n!="function")return gu;if(typeof t=="undefined")return n;switch(r){case 1:return function(r){return n.call(t,r)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,o){return n.call(t,r,e,u,o)
};case 5:return function(r,e,u,o,i){return n.call(t,r,e,u,o,i)}}return function(){return n.apply(t,arguments)}}function Nr(n){return Bu.call(n,0)}function Ur(n,t,r){for(var e=r.length,u=-1,o=ro(n.length-e,0),i=-1,a=t.length,f=_u(o+a);++i<a;)f[i]=t[i];for(;++u<e;)f[r[u]]=n[u];for(;o--;)f[i++]=n[u++];return f}function Fr(n,t,r){for(var e=-1,u=r.length,o=-1,i=ro(n.length-u,0),a=-1,f=t.length,c=_u(i+f);++o<i;)c[o]=n[o];for(i=o;++a<f;)c[i+a]=t[a];for(;++e<u;)c[i+r[e]]=n[o++];return c}function Lr(n,t){return function(r,e,u){var o=t?t():{};
if(e=Xr(e,u,3),Co(r)){u=-1;for(var i=r.length;++u<i;){var a=r[u];n(o,a,e(a,u,r),r)}}else or(r,function(t,r,u){n(o,t,e(t,r,u),u)});return o}}function $r(n){return function(){var t=arguments.length,r=arguments[0];if(2>t||null==r)return r;if(3<t&&ee(arguments[1],arguments[2],arguments[3])&&(t=2),3<t&&"function"==typeof arguments[t-2])var e=Wr(arguments[--t-1],arguments[t--],5);else 2<t&&"function"==typeof arguments[t-1]&&(e=arguments[--t]);for(var u=0;++u<t;){var o=arguments[u];o&&n(r,o,e)}return r}
}function Br(n,t){function r(){return(this instanceof r?e:n).apply(t,arguments)}var e=Dr(n);return r}function zr(n){return function(t){var r=-1;t=lu(ou(t));for(var e=t.length,u="";++r<e;)u=n(u,t[r],r);return u}}function Dr(n){return function(){var t=_o(n.prototype),r=n.apply(t,arguments);return Ge(r)?r:t}}function Mr(n,t){return function(r,e,o){o&&ee(r,e,o)&&(e=null);var i=Xr(),a=null==e;if(i===tr&&a||(a=false,e=i(e,o,3)),a){if(e=Co(r),e||!Qe(r))return n(e?r:le(r));e=u}return Jr(r,e,t)}}function qr(n,t,r,e,u,o,i,a,f,c){function l(){for(var w=arguments.length,j=w,k=_u(w);j--;)k[j]=arguments[j];
if(e&&(k=Ur(k,e,u)),o&&(k=Fr(k,o,i)),g||y){var j=l.placeholder,E=v(k,j),w=w-E.length;if(w<c){var O=a?zt(a):null,w=ro(c-w,0),C=g?E:null,E=g?null:E,T=g?k:null,k=g?null:k;return t|=g?R:I,t&=~(g?I:R),d||(t&=~(x|A)),k=qr(n,t,r,T,C,k,E,O,f,w),k.placeholder=j,k}}if(j=p?r:this,h&&(n=j[m]),a)for(O=k.length,w=eo(a.length,O),C=zt(k);w--;)E=a[w],k[w]=re(E,O)?C[E]:b;return s&&f<k.length&&(k.length=f),(this instanceof l?_||Dr(n):n).apply(j,k)}var s=t&C,p=t&x,h=t&A,g=t&k,d=t&j,y=t&E,_=!h&&Dr(n),m=n;return l}function Pr(n,t,r){return n=n.length,t=+t,n<t&&no(t)?(t-=n,r=null==r?" ":r+"",fu(r,zu(t/r.length)).slice(0,t)):""
}function Kr(n,t,r,e){function u(){for(var t=-1,a=arguments.length,f=-1,c=e.length,l=_u(a+c);++f<c;)l[f]=e[f];for(;a--;)l[f++]=arguments[++t];return(this instanceof u?i:n).apply(o?r:this,l)}var o=t&x,i=Dr(n);return u}function Vr(n,t,r,e,u,o,i,a){var f=t&A;if(!f&&!Ze(n))throw new Ru($);var c=e?e.length:0;if(c||(t&=~(R|I),e=u=null),c-=u?u.length:0,t&I){var l=e,s=u;e=u=null}var p=!f&&wo(n);if(r=[n,t,r,e,u,l,s,o,i,a],p&&true!==p){e=r[1],t=p[1],a=e|t,o=C|O,u=x|A,i=o|u|j|E;var l=e&C&&!(t&C),s=e&O&&!(t&O),h=(s?r:p)[7],g=(l?r:p)[8];
o=a>=o&&a<=i&&(e<O||(s||l)&&h.length<=g),(!(e>=O&&t>u||e>u&&t>=O)||o)&&(t&x&&(r[2]=p[2],a|=e&x?0:j),(e=p[3])&&(u=r[3],r[3]=u?Ur(u,e,p[4]):zt(e),r[4]=u?v(r[3],B):zt(p[4])),(e=p[5])&&(u=r[5],r[5]=u?Fr(u,e,p[6]):zt(e),r[6]=u?v(r[5],B):zt(p[6])),(e=p[7])&&(r[7]=zt(e)),t&C&&(r[8]=null==r[8]?p[8]:eo(r[8],p[8])),null==r[9]&&(r[9]=p[9]),r[0]=p[0],r[1]=a),t=r[1],a=r[9]}return r[9]=null==a?f?0:n.length:ro(a-c,0)||0,(p?mo:xo)(t==x?Br(r[0],r[2]):t!=R&&t!=(x|R)||r[4].length?qr.apply(null,r):Kr.apply(null,r),r)
}function Yr(n,t,r,e,u,o,i){var a=-1,f=n.length,c=t.length,l=true;if(f!=c&&(!u||c<=f))return false;for(;l&&++a<f;){var s=n[a],p=t[a],l=b;if(e&&(l=u?e(p,s,a):e(s,p,a)),typeof l=="undefined")if(u)for(var h=c;h--&&(p=t[h],!(l=s&&s===p||r(s,p,e,u,o,i))););else l=s&&s===p||r(s,p,e,u,o,i)}return!!l}function Zr(n,t,r){switch(r){case M:case q:return+n==+t;case P:return n.name==t.name&&n.message==t.message;case V:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case Z:case G:return n==t+""}return false}function Gr(n,t,r,e,u,o,i){var a=No(n),f=a.length,c=No(t).length;
if(f!=c&&!u)return false;for(var l,c=-1;++c<f;){var s=a[c],p=Wu.call(t,s);if(p){var h=n[s],g=t[s],p=b;e&&(p=u?e(g,h,s):e(h,g,s)),typeof p=="undefined"&&(p=h&&h===g||r(h,g,e,u,o,i))}if(!p)return false;l||(l="constructor"==s)}return l||(r=n.constructor,e=t.constructor,!(r!=e&&"constructor"in n&&"constructor"in t)||typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)?true:false}function Jr(n,t,r){var e=r?co:fo,u=e,o=u;return or(n,function(n,i,a){i=t(n,i,a),((r?i<u:i>u)||i===e&&i===o)&&(u=i,o=n)
}),o}function Xr(n,t,r){var e=Wt.callback||pu,e=e===pu?tr:e;return r?e(n,t,r):e}function Hr(n,r,e){var u=Wt.indexOf||de,u=u===de?t:u;return n?u(n,r,e):u}function Qr(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&Wu.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function ne(n){return n=n.constructor,typeof n=="function"&&n instanceof n||(n=ju),new n}function te(n,t,r){var e=n.constructor;switch(t){case J:return Nr(n);case M:case q:return new e(+n);case X:case H:case Q:case nt:case tt:case rt:case et:case ut:case ot:return t=n.buffer,new e(r?Nr(t):t,n.byteOffset,n.length);
case V:case G:return new e(n);case Z:var u=new e(n.source,yt.exec(n));u.lastIndex=n.lastIndex}return u}function re(n,t){return n=+n,t=null==t?go:t,-1<n&&0==n%1&&n<t}function ee(n,t,r){if(!Ge(r))return false;var e=typeof t;return"number"==e?(e=r.length,e=ue(e)&&re(t,e)):e="string"==e&&t in r,e&&r[t]===n}function ue(n){return typeof n=="number"&&-1<n&&0==n%1&&n<=go}function oe(n){return n===n&&(0===n?0<1/n:!Ge(n))}function ie(n,t){n=se(n);for(var r=-1,e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])
}return u}function ae(n,t){var r={};return hr(n,function(n,e,u){t(n,e,u)&&(r[e]=n)}),r}function fe(n){var t;if(!h(n)||Uu.call(n)!=Y||!(Wu.call(n,"constructor")||(t=n.constructor,typeof t!="function"||t instanceof t)))return false;var r;return hr(n,function(n,t){r=t}),typeof r=="undefined"||Wu.call(n,r)}function ce(n){for(var t=eu(n),r=t.length,e=r&&n.length,u=Wt.support,u=e&&ue(e)&&(Co(n)||u.nonEnumArgs&&Ke(n)),o=-1,i=[];++o<r;){var a=t[o];(u&&re(a,e)||Wu.call(n,a))&&i.push(a)}return i}function le(n){return null==n?[]:ue(n.length)?Ge(n)?n:ju(n):uu(n)
}function se(n){return Ge(n)?n:ju(n)}function pe(n,t,r){return n&&n.length?((r?ee(n,t,r):null==t)&&(t=1),Er(n,0>t?0:t)):[]}function he(n,t,r){var e=n?n.length:0;return e?((r?ee(n,t,r):null==t)&&(t=1),t=e-(+t||0),Er(n,0,0>t?0:t)):[]}function ge(n,t,r){var e=-1,u=n?n.length:0;for(t=Xr(t,r,3);++e<u;)if(t(n[e],e,n))return e;return-1}function ve(n){return n?n[0]:b}function de(n,r,e){var u=n?n.length:0;if(!u)return-1;if(typeof e=="number")e=0>e?ro(u+e,0):e||0;else if(e)return e=Tr(n,r),n=n[e],(r===r?r===n:n!==n)?e:-1;
return t(n,r,e)}function ye(n){return pe(n,1)}function _e(n,r,e,u){if(!n||!n.length)return[];typeof r!="boolean"&&null!=r&&(u=e,e=ee(n,r,u)?null:r,r=false);var o=Xr();if((o!==tr||null!=e)&&(e=o(e,u,3)),r&&Hr()==t){r=e;var i;e=-1,u=n.length;for(var o=-1,a=[];++e<u;){var f=n[e],c=r?r(f,e,n):f;e&&i===c||(i=c,a[++o]=f)}n=a}else n=Ir(n,e);return n}function me(n){for(var t=-1,r=(n&&n.length&&Vt(Kt(n,Su)))>>>0,e=_u(r);++t<r;)e[t]=Kt(n,Ar(t));return e}function be(n,t){var r=-1,e=n?n.length:0,u={};for(!e||t||Co(n[0])||(t=[]);++r<e;){var o=n[r];
t?u[o]=t[r]:o&&(u[o[0]]=o[1])}return u}function we(n){return n=Wt(n),n.__chain__=true,n}function xe(n,t,r){return t.call(r,n)}function Ae(n,t,r){var e=n?n.length:0;return ue(e)||(n=uu(n),e=n.length),e?(r=typeof r=="number"?0>r?ro(e+r,0):r||0:0,typeof n=="string"||!Co(n)&&Qe(n)?r<e&&-1<n.indexOf(t,r):-1<Hr(n,t,r)):false}function je(n,t,r){var e=Co(n)?qt:ar;return(typeof t!="function"||typeof r!="undefined")&&(t=Xr(t,r,3)),e(n,t)}function ke(n,t,r){var e=Co(n)?Pt:fr;return t=Xr(t,r,3),e(n,t)}function Ee(n,t,r){return Co(n)?(t=ge(n,t,r),-1<t?n[t]:b):(t=Xr(t,r,3),cr(n,t,or))
}function Re(n,t,r){return typeof t=="function"&&typeof r=="undefined"&&Co(n)?Mt(n,t):or(n,Wr(t,r,3))}function Ie(n,t,r){if(typeof t=="function"&&typeof r=="undefined"&&Co(n))for(r=n.length;r--&&false!==t(n[r],r,n););else n=ir(n,Wr(t,r,3));return n}function Oe(n,t,r){var e=Co(n)?Kt:br;return t=Xr(t,r,3),e(n,t)}function Ce(n,t,r,e){return(Co(n)?Yt:kr)(n,Xr(t,e,4),r,3>arguments.length,or)}function Te(n,t,r,e){return(Co(n)?Zt:kr)(n,Xr(t,e,4),r,3>arguments.length,ir)}function Se(n,t,r){return(r?ee(n,t,r):null==t)?(n=le(n),t=n.length,0<t?n[jr(0,t-1)]:b):(n=We(n),n.length=eo(0>t?0:+t||0,n.length),n)
}function We(n){n=le(n);for(var t=-1,r=n.length,e=_u(r);++t<r;){var u=jr(0,t);t!=u&&(e[t]=e[u]),e[u]=n[t]}return e}function Ne(n,t,r){var e=Co(n)?Gt:Rr;return(typeof t!="function"||typeof r!="undefined")&&(t=Xr(t,r,3)),e(n,t)}function Ue(n,t){var r;if(!Ze(t)){if(!Ze(n))throw new Ru($);var e=n;n=t,t=e}return function(){return 0<--n?r=t.apply(this,arguments):t=null,r}}function Fe(n,t){var r=x;if(2<arguments.length)var e=Er(arguments,2),u=v(e,Fe.placeholder),r=r|R;return Vr(n,r,t,e,u)}function Le(n,t){var r=x|A;
if(2<arguments.length)var e=Er(arguments,2),u=v(e,Le.placeholder),r=r|R;return Vr(t,r,n,e,u)}function $e(n,t,r){return r&&ee(n,t,r)&&(t=null),n=Vr(n,k,null,null,null,null,null,t),n.placeholder=$e.placeholder,n}function Be(n,t,r){return r&&ee(n,t,r)&&(t=null),n=Vr(n,E,null,null,null,null,null,t),n.placeholder=Be.placeholder,n}function ze(n,t,r){function e(){var r=t-(Oo()-c);0>=r||r>t?(a&&Du(a),r=p,a=s=p=b,r&&(h=Oo(),f=n.apply(l,i),s||a||(i=l=null))):s=Yu(e,r)}function u(){s&&Du(s),a=s=p=b,(v||g!==t)&&(h=Oo(),f=n.apply(l,i),s||a||(i=l=null))
}function o(){if(i=arguments,c=Oo(),l=this,p=v&&(s||!d),false===g)var r=d&&!s;else{a||d||(h=c);var o=g-(c-h),y=0>=o||o>g;y?(a&&(a=Du(a)),h=c,f=n.apply(l,i)):a||(a=Yu(u,o))}return y&&s?s=Du(s):s||t===g||(s=Yu(e,t)),r&&(y=true,f=n.apply(l,i)),!y||s||a||(i=l=null),f}var i,a,f,c,l,s,p,h=0,g=false,v=true;if(!Ze(n))throw new Ru($);if(t=0>t?0:t,true===r)var d=true,v=false;else Ge(r)&&(d=r.leading,g="maxWait"in r&&ro(+r.maxWait||0,t),v="trailing"in r?r.trailing:v);return o.cancel=function(){s&&Du(s),a&&Du(a),a=s=p=b},o}function De(){var n=arguments,t=n.length-1;
if(0>t)return function(){};if(!qt(n,Ze))throw new Ru($);return function(){for(var r=t,e=n[r].apply(this,arguments);r--;)e=n[r].call(this,e);return e}}function Me(n,t){function r(){var e=r.cache,u=t?t.apply(this,arguments):arguments[0];if(e.has(u))return e.get(u);var o=n.apply(this,arguments);return e.set(u,o),o}if(!Ze(n)||t&&!Ze(t))throw new Ru($);return r.cache=new Me.Cache,r}function qe(n){var t=Er(arguments,1),r=v(t,qe.placeholder);return Vr(n,R,null,t,r)}function Pe(n){var t=Er(arguments,1),r=v(t,Pe.placeholder);
return Vr(n,I,null,t,r)}function Ke(n){return ue(h(n)?n.length:b)&&Uu.call(n)==z||false}function Ve(n){return n&&1===n.nodeType&&h(n)&&-1<Uu.call(n).indexOf("Element")||false}function Ye(n){return h(n)&&typeof n.message=="string"&&Uu.call(n)==P||false}function Ze(n){return typeof n=="function"||false}function Ge(n){var t=typeof n;return"function"==t||n&&"object"==t||false}function Je(n){return null==n?false:Uu.call(n)==K?Lu.test(Tu.call(n)):h(n)&&bt.test(n)||false}function Xe(n){return typeof n=="number"||h(n)&&Uu.call(n)==V||false
}function He(n){return h(n)&&Uu.call(n)==Z||false}function Qe(n){return typeof n=="string"||h(n)&&Uu.call(n)==G||false}function nu(n){return h(n)&&ue(n.length)&&Ct[Uu.call(n)]||false}function tu(n){return nr(n,eu(n))}function ru(n){return dr(n,eu(n))}function eu(n){if(null==n)return[];Ge(n)||(n=ju(n));for(var t=n.length,t=t&&ue(t)&&(Co(n)||yo.nonEnumArgs&&Ke(n))&&t||0,r=n.constructor,e=-1,r=typeof r=="function"&&r.prototype==n,u=_u(t),o=0<t;++e<t;)u[e]=e+"";for(var i in n)o&&re(i,t)||"constructor"==i&&(r||!Wu.call(n,i))||u.push(i);
return u}function uu(n){return Or(n,No(n))}function ou(n){return(n=e(n))&&n.replace(wt,c)}function iu(n){return(n=e(n))&&jt.test(n)?n.replace(At,"\\$&"):n}function au(n,t,r){return r&&ee(n,t,r)&&(t=0),io(n,t)}function fu(n,t){var r="";if(n=e(n),t=+t,1>t||!n||!no(t))return r;do t%2&&(r+=n),t=Mu(t/2),n+=n;while(t);return r}function cu(n,t,r){var u=n;return(n=e(n))?(r?ee(u,t,r):null==t)?n.slice(d(n),y(n)+1):(t+="",n.slice(o(n,t),i(n,t)+1)):n}function lu(n,t,r){return r&&ee(n,t,r)&&(t=null),n=e(n),n.match(t||Rt)||[]
}function su(n){try{return n()}catch(t){return Ye(t)?t:bu(t)}}function pu(n,t,r){return r&&ee(n,t,r)&&(t=null),h(n)?vu(n):tr(n,t)}function hu(n){return function(){return n}}function gu(n){return n}function vu(n){return wr(rr(n,true))}function du(n,t,r){if(null==r){var e=Ge(t),u=e&&No(t);((u=u&&u.length&&dr(t,u))?u.length:e)||(u=false,r=t,t=n,n=this)}u||(u=dr(t,No(t)));var o=true,e=-1,i=Ze(n),a=u.length;false===r?o=false:Ge(r)&&"chain"in r&&(o=r.chain);for(;++e<a;){r=u[e];var f=t[r];n[r]=f,i&&(n.prototype[r]=function(t){return function(){var r=this.__chain__;
if(o||r){var e=n(this.__wrapped__);return(e.__actions__=zt(this.__actions__)).push({func:t,args:arguments,thisArg:n}),e.__chain__=r,e}return r=[this.value()],Pu.apply(r,arguments),t.apply(n,r)}}(f))}return n}function yu(){}g=g?Dt.defaults($t.Object(),g,Dt.pick($t,Ot)):$t;var _u=g.Array,mu=g.Date,bu=g.Error,wu=g.Function,xu=g.Math,Au=g.Number,ju=g.Object,ku=g.RegExp,Eu=g.String,Ru=g.TypeError,Iu=_u.prototype,Ou=ju.prototype,Cu=(Cu=g.window)&&Cu.document,Tu=wu.prototype.toString,Su=Ar("length"),Wu=Ou.hasOwnProperty,Nu=0,Uu=Ou.toString,Fu=g._,Lu=ku("^"+iu(Uu).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$u=Je($u=g.ArrayBuffer)&&$u,Bu=Je(Bu=$u&&new $u(0).slice)&&Bu,zu=xu.ceil,Du=g.clearTimeout,Mu=xu.floor,qu=Je(qu=ju.getPrototypeOf)&&qu,Pu=Iu.push,Ku=Ou.propertyIsEnumerable,Vu=Je(Vu=g.Set)&&Vu,Yu=g.setTimeout,Zu=Iu.splice,Gu=Je(Gu=g.Uint8Array)&&Gu,Ju=Je(Ju=g.WeakMap)&&Ju,Xu=function(){try{var n=Je(n=g.Float64Array)&&n,t=new n(new $u(10),0,1)&&n
}catch(r){}return t}(),Hu=Je(Hu=_u.isArray)&&Hu,Qu=Je(Qu=ju.create)&&Qu,no=g.isFinite,to=Je(to=ju.keys)&&to,ro=xu.max,eo=xu.min,uo=Je(uo=mu.now)&&uo,oo=Je(oo=Au.isFinite)&&oo,io=g.parseInt,ao=xu.random,fo=Au.NEGATIVE_INFINITY,co=Au.POSITIVE_INFINITY,lo=xu.pow(2,32)-1,so=lo-1,po=lo>>>1,ho=Xu?Xu.BYTES_PER_ELEMENT:0,go=xu.pow(2,53)-1,vo=Ju&&new Ju,yo=Wt.support={};!function(n){yo.funcDecomp=!Je(g.WinRTError)&&kt.test(m),yo.funcNames=typeof wu.name=="string";try{yo.dom=11===Cu.createDocumentFragment().nodeType
}catch(t){yo.dom=false}try{yo.nonEnumArgs=!Ku.call(arguments,1)}catch(r){yo.nonEnumArgs=true}}(0,0),Wt.templateSettings={escape:ht,evaluate:gt,interpolate:vt,variable:"",imports:{_:Wt}};var _o=function(){function n(){}return function(t){if(Ge(t)){n.prototype=t;var r=new n;n.prototype=null}return r||g.Object()}}(),mo=vo?function(n,t){return vo.set(n,t),n}:gu;Bu||(Nr=$u&&Gu?function(n){var t=n.byteLength,r=Xu?Mu(t/ho):0,e=r*ho,u=new $u(t);if(r){var o=new Xu(u,0,r);o.set(new Xu(n,0,r))}return t!=e&&(o=new Gu(u,e),o.set(new Gu(n,e))),u
}:hu(null));var bo=Qu&&Vu?function(n){return new Lt(n)}:hu(null),wo=vo?function(n){return vo.get(n)}:yu,xo=function(){var n=0,t=0;return function(r,e){var u=Oo(),o=N-(u-t);if(t=u,0<o){if(++n>=W)return r}else n=0;return mo(r,e)}}(),Ao=Lr(function(n,t,r){Wu.call(n,r)?++n[r]:n[r]=1}),jo=Lr(function(n,t,r){Wu.call(n,r)?n[r].push(t):n[r]=[t]}),ko=Lr(function(n,t,r){n[r]=t}),Eo=Mr(Vt),Ro=Mr(function(n){for(var t=-1,r=n.length,e=co;++t<r;){var u=n[t];u<e&&(e=u)}return e},true),Io=Lr(function(n,t,r){n[r?0:1].push(t)
},function(){return[[],[]]}),Oo=uo||function(){return(new mu).getTime()},Co=Hu||function(n){return h(n)&&ue(n.length)&&Uu.call(n)==D||false};yo.dom||(Ve=function(n){return n&&1===n.nodeType&&h(n)&&!So(n)||false});var To=oo||function(n){return typeof n=="number"&&no(n)};(Ze(/x/)||Gu&&!Ze(Gu))&&(Ze=function(n){return Uu.call(n)==K});var So=qu?function(n){if(!n||Uu.call(n)!=Y)return false;var t=n.valueOf,r=Je(t)&&(r=qu(t))&&qu(r);return r?n==r||qu(n)==r:fe(n)}:fe,Wo=$r(Ht),No=to?function(n){if(n)var t=n.constructor,r=n.length;
return typeof t=="function"&&t.prototype===n||typeof n!="function"&&r&&ue(r)?ce(n):Ge(n)?to(n):[]}:ce,Uo=$r(xr),Fo=zr(function(n,t,r){return t=t.toLowerCase(),n+(r?t.charAt(0).toUpperCase()+t.slice(1):t)}),Lo=zr(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()});8!=io(It+"08")&&(au=function(n,t,r){return(r?ee(n,t,r):null==t)?t=0:t&&(t=+t),n=cu(n),io(n,t||(mt.test(n)?16:10))});var $o=zr(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}),Bo=zr(function(n,t,r){return n+(r?" ":"")+(t.charAt(0).toUpperCase()+t.slice(1))
});return Nt.prototype=Wt.prototype,Ft.prototype["delete"]=function(n){return this.has(n)&&delete this.__data__[n]},Ft.prototype.get=function(n){return"__proto__"==n?b:this.__data__[n]},Ft.prototype.has=function(n){return"__proto__"!=n&&Wu.call(this.__data__,n)},Ft.prototype.set=function(n,t){return"__proto__"!=n&&(this.__data__[n]=t),this},Lt.prototype.push=function(n){var t=this.data;typeof n=="string"||Ge(n)?t.set.add(n):t.hash[n]=true},Me.Cache=Ft,Wt.after=function(n,t){if(!Ze(t)){if(!Ze(n))throw new Ru($);
var r=n;n=t,t=r}return n=no(n=+n)?n:0,function(){return 1>--n?t.apply(this,arguments):void 0}},Wt.ary=function(n,t,r){return r&&ee(n,t,r)&&(t=null),t=n&&null==t?n.length:ro(+t||0,0),Vr(n,C,null,null,null,null,t)},Wt.assign=Wo,Wt.at=function(n){return ue(n?n.length:0)&&(n=le(n)),Qt(n,lr(arguments,false,false,1))},Wt.before=Ue,Wt.bind=Fe,Wt.bindAll=function(n){for(var t=n,r=1<arguments.length?lr(arguments,false,false,1):ru(n),e=-1,u=r.length;++e<u;){var o=r[e];t[o]=Vr(t[o],x,t)}return t},Wt.bindKey=Le,Wt.callback=pu,Wt.chain=we,Wt.chunk=function(n,t,r){t=(r?ee(n,t,r):null==t)?1:ro(+t||1,1),r=0;
for(var e=n?n.length:0,u=-1,o=_u(zu(e/t));r<e;)o[++u]=Er(n,r,r+=t);return o},Wt.compact=function(n){for(var t=-1,r=n?n.length:0,e=-1,u=[];++t<r;){var o=n[t];o&&(u[++e]=o)}return u},Wt.constant=hu,Wt.countBy=Ao,Wt.create=function(n,t,r){var e=_o(n);return r&&ee(n,t,r)&&(t=null),t?nr(t,e,No(t)):e},Wt.curry=$e,Wt.curryRight=Be,Wt.debounce=ze,Wt.defaults=function(n){if(null==n)return n;var t=zt(arguments);return t.push(Jt),Wo.apply(b,t)},Wt.defer=function(n){return er(n,1,arguments,1)},Wt.delay=function(n,t){return er(n,t,arguments,2)
},Wt.difference=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];if(Co(r)||Ke(r))break}return ur(r,lr(arguments,false,true,++n))},Wt.drop=pe,Wt.dropRight=he,Wt.dropRightWhile=function(n,t,r){var e=n?n.length:0;if(!e)return[];for(t=Xr(t,r,3);e--&&t(n[e],e,n););return Er(n,0,e+1)},Wt.dropWhile=function(n,t,r){var e=n?n.length:0;if(!e)return[];var u=-1;for(t=Xr(t,r,3);++u<e&&t(n[u],u,n););return Er(n,u)},Wt.filter=ke,Wt.flatten=function(n,t,r){var e=n?n.length:0;return r&&ee(n,t,r)&&(t=false),e?lr(n,t):[]
},Wt.flattenDeep=function(n){return n&&n.length?lr(n,true):[]},Wt.flow=function(){var n=arguments,t=n.length;if(!t)return function(){};if(!qt(n,Ze))throw new Ru($);return function(){for(var r=0,e=n[r].apply(this,arguments);++r<t;)e=n[r].call(this,e);return e}},Wt.flowRight=De,Wt.forEach=Re,Wt.forEachRight=Ie,Wt.forIn=function(n,t,r){return(typeof t!="function"||typeof r!="undefined")&&(t=Wr(t,r,3)),sr(n,t,eu)},Wt.forInRight=function(n,t,r){return t=Wr(t,r,3),pr(n,t,eu)},Wt.forOwn=function(n,t,r){return(typeof t!="function"||typeof r!="undefined")&&(t=Wr(t,r,3)),gr(n,t)
},Wt.forOwnRight=function(n,t,r){return t=Wr(t,r,3),pr(n,t,No)},Wt.functions=ru,Wt.groupBy=jo,Wt.indexBy=ko,Wt.initial=function(n){return he(n,1)},Wt.intersection=function(){for(var n=[],r=-1,e=arguments.length,u=[],o=Hr(),i=o==t;++r<e;){var a=arguments[r];(Co(a)||Ke(a))&&(n.push(a),u.push(i&&120<=a.length&&bo(r&&a)))}var e=n.length,i=n[0],f=-1,c=i?i.length:0,l=[],s=u[0];n:for(;++f<c;)if(a=i[f],0>(s?Bt(s,a):o(l,a))){for(r=e;--r;){var p=u[r];if(0>(p?Bt(p,a):o(n[r],a)))continue n}s&&s.push(a),l.push(a)
}return l},Wt.invert=function(n,t,r){r&&ee(n,t,r)&&(t=null),r=-1;for(var e=No(n),u=e.length,o={};++r<u;){var i=e[r],a=n[i];t?Wu.call(o,a)?o[a].push(i):o[a]=[i]:o[a]=i}return o},Wt.invoke=function(n,t){return yr(n,t,Er(arguments,2))},Wt.keys=No,Wt.keysIn=eu,Wt.map=Oe,Wt.mapValues=function(n,t,r){var e={};return t=Xr(t,r,3),gr(n,function(n,r,u){e[r]=t(n,r,u)}),e},Wt.matches=vu,Wt.memoize=Me,Wt.merge=Uo,Wt.mixin=du,Wt.negate=function(n){if(!Ze(n))throw new Ru($);return function(){return!n.apply(this,arguments)
}},Wt.omit=function(n,t,r){if(null==n)return{};if(typeof t!="function"){var e=Kt(lr(arguments,false,false,1),Eu);return ie(n,ur(eu(n),e))}return t=Wr(t,r,3),ae(n,function(n,r,e){return!t(n,r,e)})},Wt.once=function(n){return Ue(n,2)},Wt.pairs=function(n){for(var t=-1,r=No(n),e=r.length,u=_u(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},Wt.partial=qe,Wt.partialRight=Pe,Wt.partition=Io,Wt.pick=function(n,t,r){return null==n?{}:typeof t=="function"?ae(n,Wr(t,r,3)):ie(n,lr(arguments,false,false,1))},Wt.pluck=function(n,t){return Oe(n,Ar(t+""))
},Wt.property=function(n){return Ar(n+"")},Wt.propertyOf=function(n){return function(t){return null==n?b:n[t]}},Wt.pull=function(){var n=arguments[0];if(!n||!n.length)return n;for(var t=0,r=Hr(),e=arguments.length;++t<e;)for(var u=0,o=arguments[t];-1<(u=r(n,o,u));)Zu.call(n,u,1);return n},Wt.pullAt=function(t){var r=t||[],e=lr(arguments,false,false,1),u=e.length,o=Qt(r,e);for(e.sort(n);u--;){var i=parseFloat(e[u]);if(i!=a&&re(i)){var a=i;Zu.call(r,i,1)}}return o},Wt.range=function(n,t,r){r&&ee(n,t,r)&&(t=r=null),n=+n||0,r=null==r?1:+r||0,null==t?(t=n,n=0):t=+t||0;
var e=-1;t=ro(zu((t-n)/(r||1)),0);for(var u=_u(t);++e<t;)u[e]=n,n+=r;return u},Wt.rearg=function(n){var t=lr(arguments,false,false,1);return Vr(n,O,null,null,null,t)},Wt.reject=function(n,t,r){var e=Co(n)?Pt:fr;return t=Xr(t,r,3),e(n,function(n,r,e){return!t(n,r,e)})},Wt.remove=function(n,t,r){var e=-1,u=n?n.length:0,o=[];for(t=Xr(t,r,3);++e<u;)r=n[e],t(r,e,n)&&(o.push(r),Zu.call(n,e--,1),u--);return o},Wt.rest=ye,Wt.shuffle=We,Wt.slice=function(n,t,r){var e=n?n.length:0;return e?(r&&typeof r!="number"&&ee(n,t,r)&&(t=0,r=e),Er(n,t,r)):[]
},Wt.sortBy=function(n,t,e){var u=-1,o=n?n.length:0,i=ue(o)?_u(o):[];return e&&ee(n,t,e)&&(t=null),t=Xr(t,e,3),or(n,function(n,r,e){i[++u]={a:t(n,r,e),b:u,c:n}}),r(i,a)},Wt.sortByAll=function(n){var t=arguments;3<t.length&&ee(t[1],t[2],t[3])&&(t=[n,t[1]]);var e=-1,u=n?n.length:0,o=lr(t,false,false,1),i=ue(u)?_u(u):[];return or(n,function(n){for(var t=o.length,r=_u(t);t--;)r[t]=null==n?b:n[o[t]];i[++e]={a:r,b:e,c:n}}),r(i,f)},Wt.take=function(n,t,r){return n&&n.length?((r?ee(n,t,r):null==t)&&(t=1),Er(n,0,0>t?0:t)):[]
},Wt.takeRight=function(n,t,r){var e=n?n.length:0;return e?((r?ee(n,t,r):null==t)&&(t=1),t=e-(+t||0),Er(n,0>t?0:t)):[]},Wt.takeRightWhile=function(n,t,r){var e=n?n.length:0;if(!e)return[];for(t=Xr(t,r,3);e--&&t(n[e],e,n););return Er(n,e+1)},Wt.takeWhile=function(n,t,r){var e=n?n.length:0;if(!e)return[];var u=-1;for(t=Xr(t,r,3);++u<e&&t(n[u],u,n););return Er(n,0,u)},Wt.tap=function(n,t,r){return t.call(r,n),n},Wt.throttle=function(n,t,r){var e=true,u=true;if(!Ze(n))throw new Ru($);return false===r?e=false:Ge(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),St.leading=e,St.maxWait=+t,St.trailing=u,ze(n,t,St)
},Wt.thru=xe,Wt.times=function(n,t,r){if(n=+n,1>n||!no(n))return[];var e=-1,u=_u(eo(n,lo));for(t=Wr(t,r,1);++e<n;)e<lo?u[e]=t(e):t(e);return u},Wt.toArray=function(n){var t=n?n.length:0;return ue(t)?t?zt(n):[]:uu(n)},Wt.toPlainObject=tu,Wt.transform=function(n,t,r,e){var u=Co(n)||nu(n);return t=Xr(t,e,4),null==r&&(u||Ge(n)?(e=n.constructor,r=u?Co(n)?new e:[]:_o(typeof e=="function"&&e.prototype)):r={}),(u?Mt:gr)(n,function(n,e,u){return t(r,n,e,u)}),r},Wt.union=function(){return Ir(lr(arguments,false,true))
},Wt.uniq=_e,Wt.unzip=me,Wt.values=uu,Wt.valuesIn=function(n){return Or(n,eu(n))},Wt.where=function(n,t){return ke(n,wr(t))},Wt.without=function(n){return ur(n,Er(arguments,1))},Wt.wrap=function(n,t){return t=null==t?gu:t,Vr(t,R,null,[n],[])},Wt.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];if(Co(r)||Ke(r))var e=e?ur(e,r).concat(ur(r,e)):r}return e?Ir(e):[]},Wt.zip=function(){for(var n=arguments.length,t=_u(n);n--;)t[n]=arguments[n];return me(t)},Wt.zipObject=be,Wt.backflow=De,Wt.collect=Oe,Wt.compose=De,Wt.each=Re,Wt.eachRight=Ie,Wt.extend=Wo,Wt.iteratee=pu,Wt.methods=ru,Wt.object=be,Wt.select=ke,Wt.tail=ye,Wt.unique=_e,du(Wt,Wt),Wt.attempt=su,Wt.camelCase=Fo,Wt.capitalize=function(n){return(n=e(n))&&n.charAt(0).toUpperCase()+n.slice(1)
},Wt.clone=function(n,t,r,e){return typeof t!="boolean"&&null!=t&&(e=r,r=ee(n,t,e)?null:t,t=false),r=typeof r=="function"&&Wr(r,e,1),rr(n,t,r)},Wt.cloneDeep=function(n,t,r){return t=typeof t=="function"&&Wr(t,r,1),rr(n,true,t)},Wt.deburr=ou,Wt.endsWith=function(n,t,r){n=e(n),t+="";var u=n.length;return r=(typeof r=="undefined"?u:eo(0>r?0:+r||0,u))-t.length,0<=r&&n.indexOf(t,r)==r},Wt.escape=function(n){return(n=e(n))&&pt.test(n)?n.replace(lt,l):n},Wt.escapeRegExp=iu,Wt.every=je,Wt.find=Ee,Wt.findIndex=ge,Wt.findKey=function(n,t,r){return t=Xr(t,r,3),cr(n,t,gr,true)
},Wt.findLast=function(n,t,r){return t=Xr(t,r,3),cr(n,t,ir)},Wt.findLastIndex=function(n,t,r){var e=n?n.length:0;for(t=Xr(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},Wt.findLastKey=function(n,t,r){return t=Xr(t,r,3),cr(n,t,vr,true)},Wt.findWhere=function(n,t){return Ee(n,wr(t))},Wt.first=ve,Wt.has=function(n,t){return n?Wu.call(n,t):false},Wt.identity=gu,Wt.includes=Ae,Wt.indexOf=de,Wt.isArguments=Ke,Wt.isArray=Co,Wt.isBoolean=function(n){return true===n||false===n||h(n)&&Uu.call(n)==M||false},Wt.isDate=function(n){return h(n)&&Uu.call(n)==q||false
},Wt.isElement=Ve,Wt.isEmpty=function(n){if(null==n)return true;var t=n.length;return ue(t)&&(Co(n)||Qe(n)||Ke(n)||h(n)&&Ze(n.splice))?!t:!No(n).length},Wt.isEqual=function(n,t,r,e){return r=typeof r=="function"&&Wr(r,e,3),!r&&oe(n)&&oe(t)?n===t:(e=r?r(n,t):b,typeof e=="undefined"?_r(n,t,r):!!e)},Wt.isError=Ye,Wt.isFinite=To,Wt.isFunction=Ze,Wt.isMatch=function(n,t,r,e){var u=No(t),o=u.length;if(r=typeof r=="function"&&Wr(r,e,3),!r&&1==o){var i=u[0];if(e=t[i],oe(e))return null!=n&&e===n[i]&&Wu.call(n,i)
}for(var i=_u(o),a=_u(o);o--;)e=i[o]=t[u[o]],a[o]=oe(e);return mr(n,u,i,a,r)},Wt.isNaN=function(n){return Xe(n)&&n!=+n},Wt.isNative=Je,Wt.isNull=function(n){return null===n},Wt.isNumber=Xe,Wt.isObject=Ge,Wt.isPlainObject=So,Wt.isRegExp=He,Wt.isString=Qe,Wt.isTypedArray=nu,Wt.isUndefined=function(n){return typeof n=="undefined"},Wt.kebabCase=Lo,Wt.last=function(n){var t=n?n.length:0;return t?n[t-1]:b},Wt.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(typeof r=="number")u=(0>r?ro(e+r,0):eo(r||0,e-1))+1;
else if(r)return u=Tr(n,t,true)-1,n=n[u],(t===t?t===n:n!==n)?u:-1;if(t!==t)return p(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},Wt.max=Eo,Wt.min=Ro,Wt.noConflict=function(){return g._=Fu,this},Wt.noop=yu,Wt.now=Oo,Wt.pad=function(n,t,r){n=e(n),t=+t;var u=n.length;return u<t&&no(t)?(u=(t-u)/2,t=Mu(u),u=zu(u),r=Pr("",u,r),r.slice(0,t)+n+r):n},Wt.padLeft=function(n,t,r){return(n=e(n))&&Pr(n,t,r)+n},Wt.padRight=function(n,t,r){return(n=e(n))&&n+Pr(n,t,r)},Wt.parseInt=au,Wt.random=function(n,t,r){r&&ee(n,t,r)&&(t=r=null);
var e=null==n,u=null==t;return null==r&&(u&&typeof n=="boolean"?(r=n,n=1):typeof t=="boolean"&&(r=t,u=true)),e&&u&&(t=1,u=false),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=ao(),eo(n+r*(t-n+parseFloat("1e-"+((r+"").length-1))),t)):jr(n,t)},Wt.reduce=Ce,Wt.reduceRight=Te,Wt.repeat=fu,Wt.result=function(n,t,r){return t=null==n?b:n[t],typeof t=="undefined"&&(t=r),Ze(t)?t.call(n):t},Wt.runInContext=m,Wt.size=function(n){var t=n?n.length:0;return ue(t)?t:No(n).length},Wt.snakeCase=$o,Wt.some=Ne,Wt.sortedIndex=function(n,t,r,e){var u=Xr(r);
return u===tr&&null==r?Tr(n,t):Sr(n,t,u(r,e,1))},Wt.sortedLastIndex=function(n,t,r,e){var u=Xr(r);return u===tr&&null==r?Tr(n,t,true):Sr(n,t,u(r,e,1),true)},Wt.startCase=Bo,Wt.startsWith=function(n,t,r){return n=e(n),r=null==r?0:eo(0>r?0:+r||0,n.length),n.lastIndexOf(t,r)==r},Wt.template=function(n,t,r){var u=Wt.templateSettings;r&&ee(n,t,r)&&(t=r=null),n=e(n),t=Ht(Ht({},r||t),u,Xt),r=Ht(Ht({},t.imports),u.imports,Xt);var o,i,a=No(r),f=Or(r,a),c=0;r=t.interpolate||xt;var l="__p+='";r=ku((t.escape||xt).source+"|"+r.source+"|"+(r===vt?dt:xt).source+"|"+(t.evaluate||xt).source+"|$","g");
var p="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,u,a,f){return e||(e=u),l+=n.slice(c,f).replace(Et,s),r&&(o=true,l+="'+__e("+r+")+'"),a&&(i=true,l+="';"+a+";\n__p+='"),e&&(l+="'+((__t=("+e+"))==null?'':__t)+'"),c=f+t.length,t}),l+="';",(t=t.variable)||(l="with(obj){"+l+"}"),l=(i?l.replace(it,""):l).replace(at,"$1").replace(ft,"$1;"),l="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}",t=su(function(){return wu(a,p+"return "+l).apply(b,f)
}),t.source=l,Ye(t))throw t;return t},Wt.trim=cu,Wt.trimLeft=function(n,t,r){var u=n;return(n=e(n))?n.slice((r?ee(u,t,r):null==t)?d(n):o(n,t+"")):n},Wt.trimRight=function(n,t,r){var u=n;return(n=e(n))?(r?ee(u,t,r):null==t)?n.slice(0,y(n)+1):n.slice(0,i(n,t+"")+1):n},Wt.trunc=function(n,t,r){r&&ee(n,t,r)&&(t=null);var u=T;if(r=S,null!=t)if(Ge(t)){var o="separator"in t?t.separator:o,u="length"in t?+t.length||0:u;r="omission"in t?e(t.omission):r}else u=+t||0;if(n=e(n),u>=n.length)return n;if(u-=r.length,1>u)return r;
if(t=n.slice(0,u),null==o)return t+r;if(He(o)){if(n.slice(u).search(o)){var i,a=n.slice(0,u);for(o.global||(o=ku(o.source,(yt.exec(o)||"")+"g")),o.lastIndex=0;n=o.exec(a);)i=n.index;t=t.slice(0,null==i?u:i)}}else n.indexOf(o,u)!=u&&(o=t.lastIndexOf(o),-1<o&&(t=t.slice(0,o)));return t+r},Wt.unescape=function(n){return(n=e(n))&&st.test(n)?n.replace(ct,_):n},Wt.uniqueId=function(n){var t=++Nu;return e(n)+t},Wt.words=lu,Wt.all=je,Wt.any=Ne,Wt.contains=Ae,Wt.detect=Ee,Wt.foldl=Ce,Wt.foldr=Te,Wt.head=ve,Wt.include=Ae,Wt.inject=Ce,du(Wt,function(){var n={};
return gr(Wt,function(t,r){Wt.prototype[r]||(n[r]=t)}),n}(),false),Wt.sample=Se,Wt.prototype.sample=function(n){return this.__chain__||null!=n?this.thru(function(t){return Se(t,n)}):Se(this.value())},Wt.VERSION=w,Mt("bind bindKey curry curryRight partial partialRight".split(" "),function(n){Wt[n].placeholder=Wt}),Mt(["filter","map","takeWhile"],function(n,t){var r=t==U;Ut.prototype[n]=function(n,e){var u=this.clone(),o=u.filtered,i=u.iteratees||(u.iteratees=[]);return u.filtered=o||r||t==L&&0>u.dir,i.push({iteratee:Xr(n,e,3),type:t}),u
}}),Mt(["drop","take"],function(n,t){var r=n+"Count",e=n+"While";Ut.prototype[n]=function(e){e=null==e?1:ro(+e||0,0);var u=this.clone();if(u.filtered){var o=u[r];u[r]=t?eo(o,e):o+e}else(u.views||(u.views=[])).push({size:e,type:n+(0>u.dir?"Right":"")});return u},Ut.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()},Ut.prototype[n+"RightWhile"]=function(n,t){return this.reverse()[e](n,t).reverse()}}),Mt(["first","last"],function(n,t){var r="take"+(t?"Right":"");Ut.prototype[n]=function(){return this[r](1).value()[0]
}}),Mt(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");Ut.prototype[n]=function(){return this[r](1)}}),Mt(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?wr:Ar;Ut.prototype[n]=function(n){return this[r](e(t?n:n+""))}}),Ut.prototype.dropWhile=function(n,t){var r,e,u=0>this.dir;return n=Xr(n,t,3),this.filter(function(t,o,i){return r=r&&(u?o<e:o>e),e=o,r||(r=!n(t,o,i))})},Ut.prototype.reject=function(n,t){return n=Xr(n,t,3),this.filter(function(t,r,e){return!n(t,r,e)})},Ut.prototype.slice=function(n,t){n=null==n?0:+n||0;
var r=0>n?this.takeRight(-n):this.drop(n);return typeof t!="undefined"&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r},gr(Ut.prototype,function(n,t){var r=Wt[t],e=/^(?:first|last)$/.test(t);Wt.prototype[t]=function(){function t(n){return n=[n],Pu.apply(n,o),r.apply(Wt,n)}var u=this.__wrapped__,o=arguments,i=this.__chain__,a=!!this.__actions__.length,f=u instanceof Ut,c=f&&!a;return e&&!i?c?n.call(u):r.call(Wt,this.value()):f||Co(u)?(u=n.apply(c?u:new Ut(this),o),e||!a&&!u.actions||(u.actions||(u.actions=[])).push({func:xe,args:[t],thisArg:Wt}),new Nt(u,i)):this.thru(t)
}}),Mt("concat join pop push shift sort splice unshift".split(" "),function(n){var t=Iu[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:join|pop|shift)$/.test(n);Wt.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),Ut.prototype.clone=function(){var n=this.actions,t=this.iteratees,r=this.views,e=new Ut(this.wrapped);return e.actions=n?zt(n):null,e.dir=this.dir,e.dropCount=this.dropCount,e.filtered=this.filtered,e.iteratees=t?zt(t):null,e.takeCount=this.takeCount,e.views=r?zt(r):null,e
},Ut.prototype.reverse=function(){if(this.filtered){var n=new Ut(this);n.dir=-1,n.filtered=true}else n=this.clone(),n.dir*=-1;return n},Ut.prototype.value=function(){var n=this.wrapped.value();if(!Co(n))return Cr(n,this.actions);var t,r=this.dir,e=0>r;t=n.length;for(var u=this.views,o=0,i=-1,a=u?u.length:0;++i<a;){var f=u[i],c=f.size;switch(f.type){case"drop":o+=c;break;case"dropRight":t-=c;break;case"take":t=eo(t,o+c);break;case"takeRight":o=ro(o,t-c)}}t={start:o,end:t},i=t.start,a=t.end,t=a-i,u=this.dropCount,o=eo(t,this.takeCount-u),e=e?a:i-1,a=(i=this.iteratees)?i.length:0,f=0,c=[];
n:for(;t--&&f<o;){for(var e=e+r,l=-1,s=n[e];++l<a;){var p=i[l],h=p.iteratee(s,e,n),p=p.type;if(p==F)s=h;else if(!h){if(p==U)continue n;break n}}u?u--:c[f++]=s}return c},Wt.prototype.chain=function(){return we(this)},Wt.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Ut?(this.__actions__.length&&(n=new Ut(this)),new Nt(n.reverse())):this.thru(function(n){return n.reverse()})},Wt.prototype.toString=function(){return this.value()+""},Wt.prototype.toJSON=Wt.prototype.valueOf=Wt.prototype.value=function(){return Cr(this.__wrapped__,this.__actions__)
},Wt.prototype.collect=Wt.prototype.map,Wt.prototype.head=Wt.prototype.first,Wt.prototype.select=Wt.prototype.filter,Wt.prototype.tail=Wt.prototype.rest,Wt}var b,w="3.1.0",x=1,A=2,j=4,k=8,E=16,R=32,I=64,O=128,C=256,T=30,S="...",W=150,N=16,U=0,F=1,L=2,$="Expected a function",B="__lodash_placeholder__",z="[object Arguments]",D="[object Array]",M="[object Boolean]",q="[object Date]",P="[object Error]",K="[object Function]",V="[object Number]",Y="[object Object]",Z="[object RegExp]",G="[object String]",J="[object ArrayBuffer]",X="[object Float32Array]",H="[object Float64Array]",Q="[object Int8Array]",nt="[object Int16Array]",tt="[object Int32Array]",rt="[object Uint8Array]",et="[object Uint8ClampedArray]",ut="[object Uint16Array]",ot="[object Uint32Array]",it=/\b__p\+='';/g,at=/\b(__p\+=)''\+/g,ft=/(__e\(.*?\)|\b__t\))\+'';/g,ct=/&(?:amp|lt|gt|quot|#39|#96);/g,lt=/[&<>"'`]/g,st=RegExp(ct.source),pt=RegExp(lt.source),ht=/<%-([\s\S]+?)%>/g,gt=/<%([\s\S]+?)%>/g,vt=/<%=([\s\S]+?)%>/g,dt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,yt=/\w*$/,_t=/^\s*function[ \n\r\t]+\w/,mt=/^0[xX]/,bt=/^\[object .+?Constructor\]$/,wt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,xt=/($^)/,At=/[.*+?^${}()|[\]\/\\]/g,jt=RegExp(At.source),kt=/\bthis\b/,Et=/['\n\r\u2028\u2029\\]/g,Rt=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]{2,}(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),It=" \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",Ot="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout document isFinite parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap window WinRTError".split(" "),Ct={};
Ct[X]=Ct[H]=Ct[Q]=Ct[nt]=Ct[tt]=Ct[rt]=Ct[et]=Ct[ut]=Ct[ot]=true,Ct[z]=Ct[D]=Ct[J]=Ct[M]=Ct[q]=Ct[P]=Ct[K]=Ct["[object Map]"]=Ct[V]=Ct[Y]=Ct[Z]=Ct["[object Set]"]=Ct[G]=Ct["[object WeakMap]"]=false;var Tt={};Tt[z]=Tt[D]=Tt[J]=Tt[M]=Tt[q]=Tt[X]=Tt[H]=Tt[Q]=Tt[nt]=Tt[tt]=Tt[V]=Tt[Y]=Tt[Z]=Tt[G]=Tt[rt]=Tt[et]=Tt[ut]=Tt[ot]=true,Tt[P]=Tt[K]=Tt["[object Map]"]=Tt["[object Set]"]=Tt["[object WeakMap]"]=false;var St={leading:false,maxWait:0,trailing:false},Wt={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Nt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},Ut={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},Ft={"function":true,object:true},Lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$t=Ft[typeof window]&&window!==(this&&this.window)?window:this,Bt=Ft[typeof exports]&&exports&&!exports.nodeType&&exports,Ft=Ft[typeof module]&&module&&!module.nodeType&&module,zt=Bt&&Ft&&typeof global=="object"&&global;
!zt||zt.global!==zt&&zt.window!==zt&&zt.self!==zt||($t=zt);var zt=Ft&&Ft.exports===Bt&&Bt,Dt=m();typeof define=="function"&&typeof define.amd=="object"&&define.amd?($t._=Dt, define(function(){return Dt})):Bt&&Ft?zt?(Ft.exports=Dt)._=Dt:Bt._=Dt:$t._=Dt}).call(this);

File diff suppressed because it is too large Load Diff

View File

@@ -1,33 +1,50 @@
{
"name": "lodash",
"version": "3.1.0",
"main": "lodash.src.js",
"version": "4.5.1",
"main": "lodash.js",
"private": true,
"devDependencies": {
"curl-amd": "0.8.12",
"dojo": "~1.10.2",
"jquery": "~1.11.2",
"platform": "~1.3.0",
"qunit-extras": "~1.4.0",
"qunitjs": "~1.16.0",
"requirejs": "~2.1.15"
"async": "^1.5.2",
"benchmark": "^2.1.0",
"chalk": "^1.1.1",
"codecov.io": "~0.1.6",
"coveralls": "^2.11.6",
"curl-amd": "~0.8.12",
"docdown": "~0.4.1",
"dojo": "^1.10.4",
"ecstatic": "^1.4.0",
"fs-extra": "~0.26.5",
"glob": "^7.0.0",
"istanbul": "0.4.2",
"jquery": "^2.2.0",
"jscs": "^2.10.1",
"lodash": "4.4.0",
"platform": "^1.3.1",
"qunit-extras": "^1.4.5",
"qunitjs": "~1.21.0",
"request": "^2.69.0",
"requirejs": "^2.1.22",
"sauce-tunnel": "^2.4.0",
"uglify-js": "2.6.1",
"webpack": "^1.12.13"
},
"volo": {
"type": "directory",
"ignore": [
".*",
"*.custom.*",
"*.log",
"*.map",
"*.md",
"lodash.src.js",
"bower.json",
"component.json",
"doc",
"node_modules",
"perf",
"test",
"vendor"
]
"scripts": {
"build": "npm run build:main & npm run build:fp",
"build:fp": "node lib/fp/build-dist.js",
"build:fp-modules": "node lib/fp/build-modules.js",
"build:main": "node lib/main/build-dist.js",
"build:main-modules": "node lib/main/build-modules.js",
"doc": "node lib/main/build-doc github",
"doc:fp": "node lib/fp/build-doc",
"doc:site": "node lib/main/build-doc site",
"pretest": "npm run build",
"style": "npm run style:main & npm run style:fp & npm run style:perf & npm run style:test",
"style:fp": "jscs fp/*.js lib/**/*.js",
"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",
"test:fp": "node test/test-fp",
"test:main": "node test/test"
}
}

View File

@@ -58,10 +58,7 @@
span1.innerHTML =
'<label for="perf-build">Build: </label>' +
'<select id="perf-build">' +
'<option value="lodash-compat">lodash (compat)</option>' +
'<option value="lodash-modern">lodash (modern)</option>' +
'<option value="lodash-custom-dev">lodash (custom development)</option>' +
'<option value="lodash-custom">lodash (custom production)</option>' +
'<option value="lodash">lodash</option>' +
'</select>';
var span2 = document.createElement('span');
@@ -71,10 +68,7 @@
'<select id="perf-other">' +
'<option value="underscore-dev">Underscore (development)</option>' +
'<option value="underscore">Underscore (production)</option>' +
'<option value="lodash-compat">lodash (compat)</option>' +
'<option value="lodash-modern">lodash (modern)</option>' +
'<option value="lodash-custom-dev">lodash (custom development)</option>' +
'<option value="lodash-custom">lodash (custom production)</option>' +
'<option value="lodash">lodash</option>' +
'</select>';
var buildList = span1.lastChild,
@@ -86,11 +80,8 @@
buildList.selectedIndex = (function() {
switch (build) {
case 'lodash-compat': return 0;
case 'lodash-custom-dev': return 2;
case 'lodash-custom': return 3;
case 'lodash-modern':
case null: return 1;
case 'lodash':
case null: return 0;
}
return -1;
}());
@@ -98,10 +89,7 @@
otherList.selectedIndex = (function() {
switch (other) {
case 'underscore-dev': return 0;
case 'lodash-compat': return 2;
case 'lodash-modern': return 3;
case 'lodash-custom-dev': return 4;
case 'lodash-custom': return 5;
case 'lodash': return 2;
case 'underscore':
case null: return 1;
}
@@ -116,11 +104,8 @@
ui.buildPath = (function() {
var result;
switch (build) {
case 'lodash-compat': result = 'lodash.compat.min.js'; break;
case 'lodash-custom-dev': result = 'lodash.custom.js'; break;
case 'lodash-custom': result = 'lodash.custom.min.js'; break;
case null: build = 'lodash-modern';
case 'lodash-modern': result = 'lodash.min.js'; break;
case null: build = 'lodash';
case 'lodash': result = 'dist/lodash.min.js'; break;
default: return build;
}
return basePath + result;
@@ -130,10 +115,7 @@
ui.otherPath = (function() {
var result;
switch (other) {
case 'lodash-compat': result = 'lodash.compat.min.js'; break;
case 'lodash-modern': result = 'lodash.min.js'; break;
case 'lodash-custom-dev': result = 'lodash.custom.js'; break;
case 'lodash-custom': result = 'lodash.custom.min.js'; break;
case 'lodash': result = 'dist/lodash.min.js'; break;
case 'underscore-dev': result = 'vendor/underscore/underscore.js'; break;
case null: other = 'underscore';
case 'underscore': result = 'vendor/underscore/underscore-min.js'; break;

View File

@@ -1,82 +1,69 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>lodash Performance Suite</title>
<style>
html, body {
margin: 0;
padding: 0;
height: 100%;
}
applet {
position: absolute;
left: -9999em;
}
#FirebugUI {
top: 2em;
}
#perf-toolbar {
background-color: #EEE;
color: #5E740B;
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
font-size: small;
padding: 0.5em 0 0.5em 2em;
overflow: hidden;
}
</style>
</head>
<body>
<div id="perf-toolbar"></div>
<script src="../node_modules/platform/platform.js"></script>
<script src="../lodash.src.js"></script>
<script src="../vendor/benchmark.js/benchmark.js"></script>
<script src="../vendor/firebug-lite/src/firebug-lite-debug.js"></script>
<script src="./asset/perf-ui.js"></script>
<script>
document.write('<script src="' + ui.buildPath + '"><\/script>');
</script>
<script>
var lodash = _.noConflict();
</script>
<script>
document.write('<script src="' + ui.otherPath + '"><\/script>');
</script>
<script src="perf.js"></script>
<script>
(function() {
var measured,
perfNow,
begin = new Date;
<head>
<meta charset="utf-8">
<title>lodash Performance Suite</title>
<style>
html, body {
margin: 0;
padding: 0;
height: 100%;
}
#FirebugUI {
top: 2em;
}
#perf-toolbar {
background-color: #EEE;
color: #5E740B;
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
font-size: small;
padding: 0.5em 0 0.5em 2em;
overflow: hidden;
}
</style>
</head>
<body>
<div id="perf-toolbar"></div>
<script src="../lodash.js"></script>
<script src="../node_modules/platform/platform.js"></script>
<script src="../node_modules/benchmark/benchmark.js"></script>
<script src="../vendor/firebug-lite/src/firebug-lite-debug.js"></script>
<script src="./asset/perf-ui.js"></script>
<script>
document.write('<script src="' + ui.buildPath + '"><\/script>');
</script>
<script>
var lodash = _.noConflict();
</script>
<script>
document.write('<script src="' + ui.otherPath + '"><\/script>');
</script>
<script src="perf.js"></script>
<script>
(function() {
var measured,
perfNow,
begin = new Date;
function init() {
var fbUI = document.getElementById('FirebugUI'),
fbDoc = fbUI && (fbDoc = fbUI.contentWindow || fbUI.contentDocument).document || fbDoc,
fbCommandLine = fbDoc && fbDoc.getElementById('fbCommandLine');
function init() {
var fbUI = document.getElementById('FirebugUI'),
fbDoc = fbUI && (fbDoc = fbUI.contentWindow || fbUI.contentDocument).document || fbDoc,
fbCommandLine = fbDoc && fbDoc.getElementById('fbCommandLine');
if (!fbCommandLine) {
return setTimeout(init, 15);
}
fbUI.style.height = (
Math.max(document.documentElement.clientHeight, document.body.clientHeight) -
document.getElementById('perf-toolbar').clientHeight
) + 'px';
if (!fbCommandLine) {
return setTimeout(init, 15);
}
fbUI.style.height = (
Math.max(document.documentElement.clientHeight, document.body.clientHeight) -
document.getElementById('perf-toolbar').clientHeight
) + 'px';
fbDoc.body.style.height = fbDoc.documentElement.style.height = '100%';
setTimeout(run, 15);
}
fbDoc.body.style.height = fbDoc.documentElement.style.height = '100%';
setTimeout(run, 15);
}
// is the applet permitted?
if (!/[?&]nojava=true(?:&|$)/.test(location.search)) {
// is the applet really needed?
while (!(measured = new Date - begin)) {}
if (measured > 1 && !((perfNow = window.performance) && typeof (perfNow.now || perfNow.webkitNow) == 'function')) {
// load applet
document.write('<applet code="nano" archive="../vendor/benchmark.js/nano.jar"></applet>');
}
}
window.onload = init;
}());
</script>
</body>
window.onload = init;
}());
</script>
</body>
</html>

View File

@@ -18,7 +18,7 @@
params = root.arguments,
system = root.system;
/** Add `console.log()` support for Narwhal, Rhino, and RingoJS. */
/** Add `console.log()` support for Rhino and RingoJS. */
var console = root.console || (root.console = { 'log': root.print });
/** The file path of the lodash file to test. */
@@ -38,16 +38,16 @@
result = params;
}
var last = result[result.length - 1];
result = (result.length > min && !/perf(?:\.js)?$/.test(last)) ? last : '../lodash.src.js';
result = (result.length > min && !/perf(?:\.js)?$/.test(last)) ? last : '../lodash.js';
if (!amd) {
try {
result = require('fs').realpathSync(result);
} catch(e) {}
} catch (e) {}
try {
result = require.resolve(result);
} catch(e) {}
} catch (e) {}
}
return result;
}());
@@ -88,13 +88,10 @@
/** Detect if in a browser environment. */
var isBrowser = isHostType(root, 'document') && isHostType(root, 'navigator');
/** Detect if in a Java environment. */
var isJava = !isBrowser && /Java/.test(toString.call(root.java));
/** Use a single "load" function. */
var load = (typeof require == 'function' && !amd)
? require
: (isJava && root.load) || noop;
: noop;
/** Load lodash. */
var lodash = root.lodash || (root.lodash = (
@@ -104,19 +101,19 @@
lodash.noConflict()
));
/** Load Benchmark.js. */
var Benchmark = root.Benchmark || (root.Benchmark = (
Benchmark = load('../vendor/benchmark.js/benchmark.js') || root.Benchmark,
Benchmark = Benchmark.Benchmark || Benchmark,
Benchmark.runInContext(lodash.extend({}, root, { '_': lodash }))
));
/** Load Underscore. */
var _ = root._ || (root._ = (
var _ = root.underscore || (root.underscore = (
_ = load('../vendor/underscore/underscore.js') || root._,
_._ || _
));
/** Load Benchmark.js. */
var Benchmark = root.Benchmark || (root.Benchmark = (
Benchmark = load('../node_modules/benchmark/benchmark.js') || root.Benchmark,
Benchmark = Benchmark.Benchmark || Benchmark,
Benchmark.runInContext(lodash.extend({}, root, { '_': lodash }))
));
/*--------------------------------------------------------------------------*/
/**
@@ -205,7 +202,7 @@
fbPanel.getElementById('fbPanel1');
log('\nSit back and relax, this may take a while.');
suites[0].run({ 'async': !isJava });
suites[0].run({ 'async': true });
}
/*--------------------------------------------------------------------------*/
@@ -258,7 +255,7 @@
if (suites.length) {
// Run next suite.
suites[0].run({ 'async': !isJava });
suites[0].run({ 'async': true });
}
else {
var aMeanHz = getGeometricMean(score.a),
@@ -284,7 +281,7 @@
lodash.extend(Benchmark.options, {
'async': true,
'setup': '\
var _ = global._,\
var _ = global.underscore,\
lodash = global.lodash,\
belt = this.name == buildName ? lodash : _;\
\
@@ -306,6 +303,10 @@
}\
var strNumbers = numbers + "";\
\
if (typeof assign != "undefined") {\
var _assign = _.assign || _.extend,\
lodashAssign = lodash.assign;\
}\
if (typeof bind != "undefined") {\
var thisArg = { "name": "fred" };\
\
@@ -347,8 +348,8 @@
square = function(v) { return v * v; };\
\
var largeArray = belt.range(10000),\
_chaining = _.chain ? _(largeArray).chain() : _(largeArray),\
lodashChaining = lodash(largeArray);\
_chaining = _(largeArray).chain(),\
lodashChaining = lodash(largeArray).chain();\
}\
if (typeof compact != "undefined") {\
var uncompacted = numbers.slice();\
@@ -356,13 +357,13 @@
uncompacted[6] = null;\
uncompacted[18] = "";\
}\
if (typeof compose != "undefined") {\
if (typeof flowRight != "undefined") {\
var compAddOne = function(n) { return n + 1; },\
compAddTwo = function(n) { return n + 2; },\
compAddThree = function(n) { return n + 3; };\
\
var _composed = _.compose(compAddThree, compAddTwo, compAddOne),\
lodashComposed = lodash.compose(compAddThree, compAddTwo, compAddOne);\
var _composed = _.flowRight && _.flowRight(compAddThree, compAddTwo, compAddOne),\
lodashComposed = lodash.flowRight && lodash.flowRight(compAddThree, compAddTwo, compAddOne);\
}\
if (typeof countBy != "undefined" || typeof omit != "undefined") {\
var wordToNumber = {\
@@ -412,7 +413,7 @@
}\
if (typeof flatten != "undefined") {\
var _flattenDeep = _.flatten([[1]])[0] !== 1,\
lodashFlattenDeep = lodash.flatten([[1]]) !== 1;\
lodashFlattenDeep = lodash.flatten([[1]])[0] !== 1;\
}\
if (typeof isEqual != "undefined") {\
var objectOfPrimitives = {\
@@ -457,11 +458,8 @@
if (typeof matches != "undefined") {\
var source = { "num": 9 };\
\
var _findWhere = _.findWhere || _.find,\
_match = (_.matches || _.createCallback || _.noop)(source);\
\
var lodashFindWhere = lodash.findWhere || lodash.find,\
lodashMatch = (lodash.matches || lodash.createCallback || lodash.noop)(source);\
var _matcher = (_.matches || _.noop)(source),\
lodashMatcher = (lodash.matches || lodash.noop)(source);\
}\
if (typeof multiArrays != "undefined") {\
var twentyValues = belt.shuffle(belt.range(20)),\
@@ -564,6 +562,32 @@
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.assign`')
.add(buildName, {
'fn': 'lodashAssign({}, object)',
'teardown': 'function assign(){}'
})
.add(otherName, {
'fn': '_assign({}, object)',
'teardown': 'function assign(){}'
})
);
suites.push(
Benchmark.Suite('`_.assign` with multiple sources')
.add(buildName, {
'fn': 'lodashAssign({}, object, object)',
'teardown': 'function assign(){}'
})
.add(otherName, {
'fn': '_assign({}, object, object)',
'teardown': 'function assign(){}'
})
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.bind` (slow path)')
.add(buildName, {
@@ -615,25 +639,13 @@
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.bindAll` iterating arguments')
Benchmark.Suite('`_.bindAll`')
.add(buildName, {
'fn': 'lodash.bindAll.apply(lodash, [bindAllObjects[++bindAllCount]].concat(funcNames))',
'fn': 'lodash.bindAll(bindAllObjects[++bindAllCount], funcNames)',
'teardown': 'function bindAll(){}'
})
.add(otherName, {
'fn': '_.bindAll.apply(_, [bindAllObjects[++bindAllCount]].concat(funcNames))',
'teardown': 'function bindAll(){}'
})
);
suites.push(
Benchmark.Suite('`_.bindAll` iterating the `object`')
.add(buildName, {
'fn': 'lodash.bindAll(bindAllObjects[++bindAllCount])',
'teardown': 'function bindAll(){}'
})
.add(otherName, {
'fn': '_.bindAll(bindAllObjects[++bindAllCount])',
'fn': '_.bindAll(bindAllObjects[++bindAllCount], funcNames)',
'teardown': 'function bindAll(){}'
})
);
@@ -676,32 +688,6 @@
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.compose`')
.add(buildName, {
'fn': 'lodash.compose(compAddThree, compAddTwo, compAddOne)',
'teardown': 'function compose(){}'
})
.add(otherName, {
'fn': '_.compose(compAddThree, compAddTwo, compAddOne)',
'teardown': 'function compose(){}'
})
);
suites.push(
Benchmark.Suite('composed call')
.add(buildName, {
'fn': 'lodashComposed(0)',
'teardown': 'function compose(){}'
})
.add(otherName, {
'fn': '_composed(0)',
'teardown': 'function compose(){}'
})
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.countBy` with `callback` iterating an array')
.add(buildName, '\
@@ -802,22 +788,6 @@
)
);
suites.push(
Benchmark.Suite('`_.each` iterating an array with `thisArg` (slow path)')
.add(buildName, '\
var result = [];\
lodash.each(numbers, function(num, index) {\
result.push(num + this["key" + index]);\
}, object)'
)
.add(otherName, '\
var result = [];\
_.each(numbers, function(num, index) {\
result.push(num + this["key" + index]);\
}, object)'
)
);
suites.push(
Benchmark.Suite('`_.each` iterating an object')
.add(buildName, '\
@@ -866,18 +836,6 @@
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.extend`')
.add(buildName, '\
lodash.extend({}, object)'
)
.add(otherName, '\
_.extend({}, object)'
)
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.filter` iterating an array')
.add(buildName, '\
@@ -892,20 +850,6 @@
)
);
suites.push(
Benchmark.Suite('`_.filter` iterating an array with `thisArg` (slow path)')
.add(buildName, '\
lodash.filter(numbers, function(num, index) {\
return this["key" + index] % 2;\
}, object)'
)
.add(otherName, '\
_.filter(numbers, function(num, index) {\
return this["key" + index] % 2;\
}, object)'
)
);
suites.push(
Benchmark.Suite('`_.filter` iterating an object')
.add(buildName, '\
@@ -920,6 +864,30 @@
)
);
suites.push(
Benchmark.Suite('`_.filter` with `_.matches` shorthand')
.add(buildName, {
'fn': 'lodash.filter(objects, source)',
'teardown': 'function matches(){}'
})
.add(otherName, {
'fn': '_.filter(objects, source)',
'teardown': 'function matches(){}'
})
);
suites.push(
Benchmark.Suite('`_.filter` with `_.matches` predicate')
.add(buildName, {
'fn': 'lodash.filter(objects, lodashMatcher)',
'teardown': 'function matches(){}'
})
.add(otherName, {
'fn': '_.filter(objects, _matcher)',
'teardown': 'function matches(){}'
})
);
/*--------------------------------------------------------------------------*/
suites.push(
@@ -950,20 +918,18 @@
)
);
// Avoid Underscore induced `OutOfMemoryError` in Rhino, Narwhal, and Ringo.
if (!isJava) {
suites.push(
Benchmark.Suite('`_.find` with `properties`')
.add(buildName, {
'fn': 'lodashFindWhere(objects, source)',
'teardown': 'function matches(){}'
})
.add(otherName, {
'fn': '_findWhere(objects, source)',
'teardown': 'function matches(){}'
})
);
}
// Avoid Underscore induced `OutOfMemoryError` in Rhino and Ringo.
suites.push(
Benchmark.Suite('`_.find` with `_.matches` shorthand')
.add(buildName, {
'fn': 'lodash.find(objects, source)',
'teardown': 'function matches(){}'
})
.add(otherName, {
'fn': '_.find(objects, source)',
'teardown': 'function matches(){}'
})
);
/*--------------------------------------------------------------------------*/
@@ -979,32 +945,60 @@
})
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.flatten` nested arrays of numbers with `isDeep`')
Benchmark.Suite('`_.flattenDeep` nested arrays of numbers')
.add(buildName, {
'fn': 'lodash.flatten(nestedNumbers, lodashFlattenDeep)',
'fn': 'lodash.flattenDeep(nestedNumbers)',
'teardown': 'function flatten(){}'
})
.add(otherName, {
'fn': '_.flatten(nestedNumbers, _flattenDeep)',
'fn': '_.flattenDeep(nestedNumbers)',
'teardown': 'function flatten(){}'
})
);
suites.push(
Benchmark.Suite('`_.flatten` nest arrays of objects with `isDeep`')
Benchmark.Suite('`_.flattenDeep` nest arrays of objects')
.add(buildName, {
'fn': 'lodash.flatten(nestedObjects, lodashFlattenDeep)',
'fn': 'lodash.flattenDeep(nestedObjects)',
'teardown': 'function flatten(){}'
})
.add(otherName, {
'fn': '_.flatten(nestedObjects, _flattenDeep)',
'fn': '_.flattenDeep(nestedObjects)',
'teardown': 'function flatten(){}'
})
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.flowRight`')
.add(buildName, {
'fn': 'lodash.flowRight(compAddThree, compAddTwo, compAddOne)',
'teardown': 'function flowRight(){}'
})
.add(otherName, {
'fn': '_.flowRight(compAddThree, compAddTwo, compAddOne)',
'teardown': 'function flowRight(){}'
})
);
suites.push(
Benchmark.Suite('composed call')
.add(buildName, {
'fn': 'lodashComposed(0)',
'teardown': 'function flowRight(){}'
})
.add(otherName, {
'fn': '_composed(0)',
'teardown': 'function flowRight(){}'
})
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.functions`')
.add(buildName, '\
@@ -1056,73 +1050,37 @@
suites.push(
Benchmark.Suite('`_.includes` searching an array')
.add(buildName, '\
lodash.include(numbers, limit - 1)'
lodash.includes(numbers, limit - 1)'
)
.add(otherName, '\
_.include(numbers, limit - 1)'
_.includes(numbers, limit - 1)'
)
);
suites.push(
Benchmark.Suite('`_.includes` searching an object')
.add(buildName, '\
lodash.include(object, limit - 1)'
lodash.includes(object, limit - 1)'
)
.add(otherName, '\
_.include(object, limit - 1)'
_.includes(object, limit - 1)'
)
);
if (lodash.include('ab', 'ab') && _.include('ab', 'ab')) {
if (lodash.includes('ab', 'ab') && _.includes('ab', 'ab')) {
suites.push(
Benchmark.Suite('`_.includes` searching a string')
.add(buildName, '\
lodash.include(strNumbers, "," + (limit - 1))'
lodash.includes(strNumbers, "," + (limit - 1))'
)
.add(otherName, '\
_.include(strNumbers, "," + (limit - 1))'
_.includes(strNumbers, "," + (limit - 1))'
)
);
}
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.indexBy` with `callback` iterating an array')
.add(buildName, '\
lodash.indexBy(numbers, function(num) { return num >> 1; })'
)
.add(otherName, '\
_.indexBy(numbers, function(num) { return num >> 1; })'
)
);
suites.push(
Benchmark.Suite('`_.indexBy` with `property` name iterating an array')
.add(buildName, {
'fn': 'lodash.indexBy(words, "length")',
'teardown': 'function countBy(){}'
})
.add(otherName, {
'fn': '_.indexBy(words, "length")',
'teardown': 'function countBy(){}'
})
);
suites.push(
Benchmark.Suite('`_.indexBy` with `callback` iterating an object')
.add(buildName, {
'fn': 'lodash.indexBy(wordToNumber, function(num) { return num >> 1; })',
'teardown': 'function countBy(){}'
})
.add(otherName, {
'fn': '_.indexBy(wordToNumber, function(num) { return num >> 1; })',
'teardown': 'function countBy(){}'
})
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.indexOf`')
.add(buildName, {
@@ -1135,18 +1093,6 @@
})
);
suites.push(
Benchmark.Suite('`_.indexOf` performing a binary search')
.add(buildName, {
'fn': 'lodash.indexOf(hundredSortedValues, 99, true)',
'teardown': 'function multiArrays(){}'
})
.add(otherName, {
'fn': '_.indexOf(hundredSortedValues, 99, true)',
'teardown': 'function multiArrays(){}'
})
);
/*--------------------------------------------------------------------------*/
suites.push(
@@ -1186,42 +1132,42 @@
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.invoke` iterating an array')
Benchmark.Suite('`_.invokeMap` iterating an array')
.add(buildName, '\
lodash.invoke(numbers, "toFixed")'
lodash.invokeMap(numbers, "toFixed")'
)
.add(otherName, '\
_.invoke(numbers, "toFixed")'
_.invokeMap(numbers, "toFixed")'
)
);
suites.push(
Benchmark.Suite('`_.invoke` with arguments iterating an array')
Benchmark.Suite('`_.invokeMap` with arguments iterating an array')
.add(buildName, '\
lodash.invoke(numbers, "toFixed", 1)'
lodash.invokeMap(numbers, "toFixed", 1)'
)
.add(otherName, '\
_.invoke(numbers, "toFixed", 1)'
_.invokeMap(numbers, "toFixed", 1)'
)
);
suites.push(
Benchmark.Suite('`_.invoke` with a function for `methodName` iterating an array')
Benchmark.Suite('`_.invokeMap` with a function for `path` iterating an array')
.add(buildName, '\
lodash.invoke(numbers, Number.prototype.toFixed, 1)'
lodash.invokeMap(numbers, Number.prototype.toFixed, 1)'
)
.add(otherName, '\
_.invoke(numbers, Number.prototype.toFixed, 1)'
_.invokeMap(numbers, Number.prototype.toFixed, 1)'
)
);
suites.push(
Benchmark.Suite('`_.invoke` iterating an object')
Benchmark.Suite('`_.invokeMap` iterating an object')
.add(buildName, '\
lodash.invoke(object, "toFixed", 1)'
lodash.invokeMap(object, "toFixed", 1)'
)
.add(otherName, '\
_.invoke(object, "toFixed", 1)'
_.invokeMap(object, "toFixed", 1)'
)
);
@@ -1383,18 +1329,6 @@
})
);
suites.push(
Benchmark.Suite('`_.lastIndexOf` performing a binary search')
.add(buildName, {
'fn': 'lodash.lastIndexOf(hundredSortedValues, 0, true)',
'teardown': 'function multiArrays(){}'
})
.add(otherName, {
'fn': '_.lastIndexOf(hundredSortedValues, 0, true)',
'teardown': 'function multiArrays(){}'
})
);
/*--------------------------------------------------------------------------*/
suites.push(
@@ -1411,20 +1345,6 @@
)
);
suites.push(
Benchmark.Suite('`_.map` with `thisArg` iterating an array (slow path)')
.add(buildName, '\
lodash.map(objects, function(value, index) {\
return this["key" + index] + value.num;\
}, object)'
)
.add(otherName, '\
_.map(objects, function(value, index) {\
return this["key" + index] + value.num;\
}, object)'
)
);
suites.push(
Benchmark.Suite('`_.map` iterating an object')
.add(buildName, '\
@@ -1439,18 +1359,14 @@
)
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.matches` predicate')
.add(buildName, {
'fn': 'lodash.filter(objects, lodashMatch)',
'teardown': 'function matches(){}'
})
.add(otherName, {
'fn': '_.filter(objects, _match)',
'teardown': 'function matches(){}'
})
Benchmark.Suite('`_.map` with `_.property` shorthand')
.add(buildName, '\
lodash.map(objects, "num")'
)
.add(otherName, '\
_.map(objects, "num")'
)
);
/*--------------------------------------------------------------------------*/
@@ -1503,18 +1419,6 @@
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.pairs`')
.add(buildName, '\
lodash.pairs(object)'
)
.add(otherName, '\
_.pairs(object)'
)
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.partial` (slow path)')
.add(buildName, {
@@ -1555,20 +1459,6 @@
)
);
suites.push(
Benchmark.Suite('`_.partition` iterating an array with `thisArg` (slow path)')
.add(buildName, '\
lodash.partition(numbers, function(num, index) {\
return this["key" + index] % 2;\
}, object)'
)
.add(otherName, '\
_.partition(numbers, function(num, index) {\
return this["key" + index] % 2;\
}, object)'
)
);
suites.push(
Benchmark.Suite('`_.partition` iterating an object')
.add(buildName, '\
@@ -1597,18 +1487,6 @@
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.pluck`')
.add(buildName, '\
lodash.pluck(objects, "num")'
)
.add(otherName, '\
_.pluck(objects, "num")'
)
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.reduce` iterating an array')
.add(buildName, '\
@@ -1691,20 +1569,6 @@
)
);
suites.push(
Benchmark.Suite('`_.reject` iterating an array with `thisArg` (slow path)')
.add(buildName, '\
lodash.reject(numbers, function(num, index) {\
return this["key" + index] % 2;\
}, object)'
)
.add(otherName, '\
_.reject(numbers, function(num, index) {\
return this["key" + index] % 2;\
}, object)'
)
);
suites.push(
Benchmark.Suite('`_.reject` iterating an object')
.add(buildName, '\
@@ -1722,12 +1586,12 @@
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.sample` with an `n`')
Benchmark.Suite('`_.sampleSize`')
.add(buildName, '\
lodash.sample(numbers, limit / 2)'
lodash.sampleSize(numbers, limit / 2)'
)
.add(otherName, '\
_.sample(numbers, limit / 2)'
_.sampleSize(numbers, limit / 2)'
)
);
@@ -1771,20 +1635,6 @@
)
);
suites.push(
Benchmark.Suite('`_.some` with `thisArg` iterating an array (slow path)')
.add(buildName, '\
lodash.some(objects, function(value, index) {\
return this["key" + index] == (limit - 1);\
}, object)'
)
.add(otherName, '\
_.some(objects, function(value, index) {\
return this["key" + index] == (limit - 1);\
}, object)'
)
);
suites.push(
Benchmark.Suite('`_.some` iterating an object')
.add(buildName, '\
@@ -1811,16 +1661,6 @@
)
);
suites.push(
Benchmark.Suite('`_.sortBy` with `callback` and `thisArg` (slow path)')
.add(buildName, '\
lodash.sortBy(numbers, function(num) { return this.sin(num); }, Math)'
)
.add(otherName, '\
_.sortBy(numbers, function(num) { return this.sin(num); }, Math)'
)
);
suites.push(
Benchmark.Suite('`_.sortBy` with `property` name')
.add(buildName, {
@@ -1845,18 +1685,20 @@
)
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.sortedIndex` with `callback`')
Benchmark.Suite('`_.sortedIndexBy`')
.add(buildName, {
'fn': '\
lodash.sortedIndex(words, "twenty-five", function(value) {\
lodash.sortedIndexBy(words, "twenty-five", function(value) {\
return wordToNumber[value];\
})',
'teardown': 'function countBy(){}'
})
.add(otherName, {
'fn': '\
_.sortedIndex(words, "twenty-five", function(value) {\
_.sortedIndexBy(words, "twenty-five", function(value) {\
return wordToNumber[value];\
})',
'teardown': 'function countBy(){}'
@@ -1865,6 +1707,46 @@
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.sortedIndexOf`')
.add(buildName, {
'fn': 'lodash.sortedIndexOf(hundredSortedValues, 99)',
'teardown': 'function multiArrays(){}'
})
.add(otherName, {
'fn': '_.sortedIndexOf(hundredSortedValues, 99)',
'teardown': 'function multiArrays(){}'
})
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.sortedLastIndexOf`')
.add(buildName, {
'fn': 'lodash.sortedLastIndexOf(hundredSortedValues, 0)',
'teardown': 'function multiArrays(){}'
})
.add(otherName, {
'fn': '_.sortedLastIndexOf(hundredSortedValues, 0)',
'teardown': 'function multiArrays(){}'
})
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.sum`')
.add(buildName, '\
lodash.sum(numbers)'
)
.add(otherName, '\
_.sum(numbers)'
)
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.template` (slow path)')
.add(buildName, {
@@ -1915,18 +1797,6 @@
)
);
suites.push(
Benchmark.Suite('`_.times` with `thisArg` (slow path)')
.add(buildName, '\
var result = [];\
lodash.times(limit, function(n) { result.push(this.sin(n)); }, Math)'
)
.add(otherName, '\
var result = [];\
_.times(limit, function(n) { result.push(this.sin(n)); }, Math)'
)
);
/*--------------------------------------------------------------------------*/
suites.push(
@@ -1951,6 +1821,18 @@
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.toPairs`')
.add(buildName, '\
lodash.toPairs(object)'
)
.add(otherName, '\
_.toPairs(object)'
)
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.unescape` string without html entities')
.add(buildName, '\
@@ -2007,20 +1889,6 @@
)
);
suites.push(
Benchmark.Suite('`_.uniq` with `callback`')
.add(buildName, '\
lodash.uniq(numbers.concat(twoNumbers, fourNumbers), function(num) {\
return num % 2;\
})'
)
.add(otherName, '\
_.uniq(numbers.concat(twoNumbers, fourNumbers), function(num) {\
return num % 2;\
})'
)
);
suites.push(
Benchmark.Suite('`_.uniq` iterating an array of 200 elements')
.add(buildName, {
@@ -2035,6 +1903,22 @@
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.uniqBy`')
.add(buildName, '\
lodash.uniqBy(numbers.concat(twoNumbers, fourNumbers), function(num) {\
return num % 2;\
})'
)
.add(otherName, '\
_.uniqBy(numbers.concat(twoNumbers, fourNumbers), function(num) {\
return num % 2;\
})'
)
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.values`')
.add(buildName, '\
@@ -2047,20 +1931,6 @@
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.where`')
.add(buildName, {
'fn': 'lodash.where(objects, source)',
'teardown': 'function matches(){}'
})
.add(otherName, {
'fn': '_.where(objects, source)',
'teardown': 'function matches(){}'
})
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.without`')
.add(buildName, '\

View File

@@ -1,14 +0,0 @@
cd "$(dirname "$0")"
echo "Running performance suite in node..."
node perf.js ../lodash.js && node perf.js ../lodash.min.js
for cmd in rhino "rhino -require" narwhal ringo phantomjs; do
echo ""
echo "Running performance suite in $cmd..."
$cmd perf.js ../lodash.src.js
done
echo ""
echo "Running performance suite in a browser..."
open index.html

View File

@@ -1,146 +0,0 @@
;(function() {
/** Used to determine if values are of the language type Object. */
var objectTypes = {
'function': true,
'object': true
};
/** Used as the `Set#toString` return value. */
var nativeString = String(Object.prototype.toString).replace(/toString/g, 'Set');
/** Used as a reference to the global object. */
var root = (objectTypes[typeof window] && window) || this;
/** Detect free variable `exports`. */
var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
/** Detect free variable `global` from Node.js or Browserified code and use it as `root`. */
var freeGlobal = objectTypes[typeof global] && global;
if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {
root = freeGlobal;
}
/*--------------------------------------------------------------------------*/
/**
* Installs `Set` on the given `context` object.
*
* @memberOf exports
* @param {Object} context The context object.
*/
function runInContext(context) {
/**
* Creates a `Set` object.
*/
function Set() {
this.__cache__ = {};
}
/**
* Gets the index at which the first occurrence of `value` is found using
* strict equality for comparisons, i.e. `===`.
*
* @private
* @param {Array} array The array to search.
* @param {*} value The value to search for.
* @returns {number} Returns the index of the matched value or `-1`.
*/
function indexOf(array, value) {
var index = -1,
length = array.length;
while (++index < length) {
if (array[index] === value) {
return index;
}
}
return -1;
}
/**
* Checks if `value` is in the set.
*
* @memberOf Set
* @param {*} value The value to search for.
* @returns {boolean} Returns `true` if `value` is found, else `false`.
*/
function has(value) {
var type = typeof value,
cache = this.__cache__;
if (type == 'boolean' || value == null) {
return cache[value] || false;
}
if (type != 'number' && type != 'string') {
type = 'object';
}
var key = type == 'number' ? value : '_' + value;
cache = (cache = cache[type]) && cache[key];
return type == 'object'
? (cache && indexOf(cache, value) > -1 ? true : false)
: (cache || false);
}
/**
* Adds `value` to the set.
*
* @memberOf Set
* @param {*} value The value to add.
*/
function add(value) {
var cache = this.__cache__,
type = typeof value;
if (type == 'boolean' || value == null) {
cache[value] = true;
} else {
if (type != 'number' && type != 'string') {
type = 'object';
}
var key = type == 'number' ? value : '_' + value,
typeCache = cache[type] || (cache[type] = {});
if (type == 'object') {
var array = typeCache[key];
if (array) {
array.push(value);
} else {
typeCache[key] = [value];
}
} else {
typeCache[key] = true;
}
}
}
/**
* Produces the `toString` result of `Set`.
*
* @static
* @memberOf Set
* @returns {string} Returns the string result.
*/
function toString() {
return nativeString;
}
Set.toString = toString;
Set.prototype.add = add;
Set.prototype.has = has;
if (!root.Set) {
context.Set = Set;
}
}
/*--------------------------------------------------------------------------*/
if (freeExports) {
freeExports.runInContext = runInContext;
} else {
runInContext(root);
}
}.call(this));

View File

@@ -64,12 +64,10 @@
buildList.selectedIndex = (function() {
switch (build) {
case 'lodash-compat': return 1;
case 'lodash-modern-dev': return 2;
case 'lodash-modern': return 3;
case 'lodash-custom-dev': return 4;
case 'lodash-custom': return 5;
case 'lodash-compat-dev':
case 'lodash': return 1;
case 'lodash-core-dev': return 2;
case 'lodash-core': return 3;
case 'lodash-dev':
case null: return 0;
}
return -1;
@@ -95,12 +93,10 @@
span1.innerHTML =
'<label for="qunit-build">Build: </label>' +
'<select id="qunit-build">' +
'<option value="lodash-compat-dev">lodash (compat development)</option>' +
'<option value="lodash-compat">lodash (compat production)</option>' +
'<option value="lodash-modern-dev">lodash (modern development)</option>' +
'<option value="lodash-modern">lodash (modern production)</option>' +
'<option value="lodash-custom-dev">lodash (custom development)</option>' +
'<option value="lodash-custom">lodash (custom production)</option>' +
'<option value="lodash-dev">lodash (development)</option>' +
'<option value="lodash">lodash (production)</option>' +
'<option value="lodash-core-dev">lodash-core (development)</option>' +
'<option value="lodash-core">lodash-core (production)</option>' +
'</select>';
var span2 = document.createElement('span');
@@ -124,29 +120,15 @@
init();
});
// Used to indicate testing a foreign file.
ui.isForeign = RegExp('^(\\w+:)?//').test(build);
// Used to indicate testing a modularized build.
ui.isModularize = /\b(?:amd|commonjs|es6?|node|npm|(index|main)\.js)\b/.test([location.pathname, location.search]);
// Used to indicate testing in Sauce Labs' automated test cloud.
ui.isSauceLabs = location.port == '9001';
// Used to indicate that lodash is in strict mode.
ui.isStrict = /\bes6?\b/.test([location.pathname, location.search]);
// The lodash build file path.
ui.buildPath = (function() {
var result;
switch (build) {
case 'lodash-compat': result = 'lodash.compat.min.js'; break;
case 'lodash-modern-dev': result = 'lodash.js'; break;
case 'lodash-modern': result = 'lodash.min.js'; break;
case 'lodash-custom-dev': result = 'lodash.custom.js'; break;
case 'lodash-custom': result = 'lodash.custom.min.js'; break;
case null: build = 'lodash-compat-dev';
case 'lodash-compat-dev': result = 'lodash.src.js'; break;
case 'lodash': result = 'dist/lodash.min.js'; break;
case 'lodash-core-dev': result = 'dist/lodash.core.js'; break;
case 'lodash-core': result = 'dist/lodash.core.min.js'; break;
case null: build = 'lodash-dev';
case 'lodash-dev': result = 'lodash.js'; break;
default: return build;
}
return basePath + result;
@@ -165,6 +147,21 @@
return basePath + result;
}());
// Used to indicate testing a core build.
ui.isCore = /\bcore(\.min)?\.js\b/.test(ui.buildPath);
// Used to indicate testing a foreign file.
ui.isForeign = RegExp('^(\\w+:)?//').test(build);
// Used to indicate testing a modularized build.
ui.isModularize = /\b(?:amd|commonjs|es|node|npm|(index|main)\.js)\b/.test([location.pathname, location.search]);
// Used to indicate testing in Sauce Labs' automated test cloud.
ui.isSauceLabs = location.port == '9001';
// Used to indicate that lodash is in strict mode.
ui.isStrict = /\bes\b/.test([location.pathname, location.search]);
ui.urlParams = { 'build': build, 'loader': loader };
ui.timing = { 'loadEventEnd': 0 };

View File

@@ -1,91 +0,0 @@
;(function() {
/** Used to determine if values are of the language type Object. */
var objectTypes = {
'function': true,
'object': true
};
/** Used as the `WeakMap#toString` return value. */
var nativeString = String(Object.prototype.toString).replace(/toString/g, 'WeakMap');
/** Used as a reference to the global object. */
var root = (objectTypes[typeof window] && window) || this;
/** Detect free variable `exports`. */
var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
/** Detect free variable `global` from Node.js or Browserified code and use it as `root`. */
var freeGlobal = objectTypes[typeof global] && global;
if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {
root = freeGlobal;
}
/*--------------------------------------------------------------------------*/
/**
* Installs `WeakMap` on the given `context` object.
*
* @memberOf exports
* @param {Object} context The context object.
*/
function runInContext(context) {
/**
* Creates a `WeakMap` object.
*/
function WeakMap() {
// No operation performed.
}
/**
* Gets the value associated with the given key.
*
* @memberOf WeakMap
* @param {Object} key The key object.
* @returns {*} Returns the associated value, else `undefined`.
*/
function get(key) {
return key.__weakmap__;
}
/**
* Sets a value for the given key.
*
* @memberOf WeakMap
* @param {Object} key The key object.
* @param {*} value The value to set.
*/
function set(key, value) {
key.__weakmap__ = value;
return this;
}
/**
* Produces the `toString` result of `WeakMap`.
*
* @static
* @memberOf WeakMap
* @returns {string} Returns the string result.
*/
function toString() {
return nativeString;
}
WeakMap.toString = toString;
WeakMap.prototype.get = get;
WeakMap.prototype.set = set;
if (!root.WeakMap) {
context.WeakMap = WeakMap;
}
}
/*--------------------------------------------------------------------------*/
if (freeExports) {
freeExports.runInContext = runInContext;
} else {
runInContext(root);
}
}.call(this));

View File

@@ -4,7 +4,7 @@ addEventListener('message', function(e) {
if (e.data) {
try {
importScripts('../' + e.data);
} catch(e) {
} catch (e) {
self._ = { 'VERSION': e.message };
}
postMessage(_.VERSION);

View File

@@ -1,146 +1,170 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Backbone Test Suite</title>
<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture">
<div id='testElement'>
<h1>Test</h1>
</div>
</div>
<script>
// avoid reporting tests to Sauce Labs when script errors occur
if (location.port == '9001') {
window.onerror = function(message) {
if (window.QUnit) {
QUnit.config.done.length = 0;
}
global_test_results = { 'message': message };
};
}
</script>
<script src="../node_modules/qunitjs/qunit/qunit.js"></script>
<script src="../node_modules/qunit-extras/qunit-extras.js"></script>
<script src="../vendor/json-js/json2.js"></script>
<script src="../node_modules/platform/platform.js"></script>
<script src="./asset/test-ui.js"></script>
<script src="../lodash.src.js"></script>
<script>
var mixinPrereqs = (function() {
var lodash = _.noConflict();
return function(_) {
_.mixin({
'debounce': _.debounce || lodash.debounce,
'defer': _.defer || lodash.defer,
'pluck': _.pluck || lodash.pluck
});
};
}());
<head>
<meta charset="utf-8">
<title>Backbone Test Suite</title>
<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
</head>
<body>
<script>
// Avoid reporting tests to Sauce Labs when script errors occur.
if (location.port == '9001') {
window.onerror = function(message) {
if (window.QUnit) {
QUnit.config.done.length = 0;
}
global_test_results = { 'message': message };
};
}
</script>
<script src="../node_modules/qunitjs/qunit/qunit.js"></script>
<script src="../node_modules/qunit-extras/qunit-extras.js"></script>
<script src="../vendor/json-js/json2.js"></script>
<script src="../node_modules/platform/platform.js"></script>
<script src="./asset/test-ui.js"></script>
<script src="../lodash.js"></script>
<script>
QUnit.config.asyncRetries = 10;
QUnit.config.hidepassed = true;
QUnit.config.asyncRetries = 10;
var mixinPrereqs = (function() {
var aliasToReal = {
'indexBy': 'keyBy',
'invoke': 'invokeMap'
};
QUnit.begin(function() {
QUnit.config.hidepassed = true;
document.getElementById('qunit-tests').className += ' hidepass';
document.getElementById('qunit-urlconfig-hidepassed').checked = true;
});
var keyMap = {
'rest': 'tail'
};
// load lodash
if (!ui.isModularize) {
document.write('<script src="' + ui.buildPath + '"><\/script>');
}
// load test scripts
document.write(ui.urlParams.loader != 'none'
? '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
: ([
'<script src="' + ui.buildPath + '"><\/script>',
'<script src="../node_modules/jquery/dist/jquery.js"><\/script>',
'<script src="../vendor/backbone/backbone.js"><\/script>',
'<script src="../vendor/backbone/test/environment.js"><\/script>',
'<script src="../vendor/backbone/test/noconflict.js"><\/script>',
'<script src="../vendor/backbone/test/events.js"><\/script>',
'<script src="../vendor/backbone/test/model.js"><\/script>',
'<script src="../vendor/backbone/test/collection.js"><\/script>',
'<script src="../vendor/backbone/test/router.js"><\/script>',
'<script src="../vendor/backbone/test/view.js"><\/script>',
'<script src="../vendor/backbone/test/sync.js"><\/script>'
].join('\n'))
);
</script>
<script>
(function() {
if (window.curl) {
curl.config({ 'apiName': 'require' });
}
if (!window.require) {
mixinPrereqs(_);
return;
}
var reBasename = /[\w.-]+$/,
basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
modulePath = ui.buildPath.replace(/\.js$/, ''),
locationPath = modulePath.replace(reBasename, '').replace(/^\/|\/$/g, ''),
moduleMain = modulePath.match(reBasename)[0],
uid = +new Date;
var lodash = _.noConflict();
function getConfig() {
var result = {
'baseUrl': './',
'urlArgs': 't=' + uid++,
'waitSeconds': 0,
'paths': {
'backbone': '../vendor/backbone/backbone',
'jquery': '../node_modules/jquery/dist/jquery'
},
'packages': [{
'name': 'test',
'location': '../vendor/backbone/test',
'config': {
// work around no global being exported
'exports': 'QUnit',
'loader': 'curl/loader/legacy'
}
}]
};
return function(_) {
lodash.defaultsDeep(_, { 'templateSettings': lodash.templateSettings });
lodash.mixin(_, lodash.pick(lodash, lodash.difference([
'countBy',
'debounce',
'difference',
'find',
'findIndex',
'findLastIndex',
'groupBy',
'includes',
'invert',
'invokeMap',
'keyBy',
'omit',
'partition',
'reduceRight',
'reject',
'sample',
'without'
], lodash.functions(_))));
if (ui.isModularize) {
result.packages.push({
'name': 'underscore',
'location': locationPath,
'main': moduleMain
});
} else {
result.paths.underscore = modulePath;
}
return result;
}
lodash.forOwn(keyMap, function(realName, otherName) {
_[otherName] = lodash[realName];
_.prototype[otherName] = lodash.prototype[realName];
});
QUnit.config.autostart = false;
lodash.forOwn(aliasToReal, function(realName, alias) {
_[alias] = _[realName];
_.prototype[alias] = _.prototype[realName];
});
};
}());
require(getConfig(), ['underscore', 'backbone'], function(lodash) {
mixinPrereqs(lodash);
// Load prerequisite scripts.
document.write(ui.urlParams.loader == 'none'
? '<script src="' + ui.buildPath + '"><\/script>'
: '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
);
</script>
<script>
if (ui.urlParams.loader == 'none') {
mixinPrereqs(_);
document.write([
'<script src="../node_modules/jquery/dist/jquery.js"><\/script>',
'<script src="../vendor/backbone/backbone.js"><\/script>',
'<script src="../vendor/backbone/test/setup/dom-setup.js"><\/script>',
'<script src="../vendor/backbone/test/setup/environment.js"><\/script>',
'<script src="../vendor/backbone/test/noconflict.js"><\/script>',
'<script src="../vendor/backbone/test/events.js"><\/script>',
'<script src="../vendor/backbone/test/model.js"><\/script>',
'<script src="../vendor/backbone/test/collection.js"><\/script>',
'<script src="../vendor/backbone/test/router.js"><\/script>',
'<script src="../vendor/backbone/test/view.js"><\/script>',
'<script src="../vendor/backbone/test/sync.js"><\/script>'
].join('\n'));
}
</script>
<script>
(function() {
if (window.curl) {
curl.config({ 'apiName': 'require' });
}
if (!window.require) {
return;
}
var reBasename = /[\w.-]+$/,
basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
modulePath = ui.buildPath.replace(/\.js$/, ''),
locationPath = modulePath.replace(reBasename, '').replace(/^\/|\/$/g, ''),
moduleMain = modulePath.match(reBasename)[0],
uid = +new Date;
if (ui.isModularize) {
window._ = lodash;
}
require(getConfig(), [
'test/environment',
'test/noconflict',
'test/events',
'test/model',
'test/collection',
'test/router',
'test/view',
'test/sync'
], function() {
QUnit.start();
});
});
}());
</script>
</body>
function getConfig() {
var result = {
'baseUrl': './',
'urlArgs': 't=' + uid++,
'waitSeconds': 0,
'paths': {
'backbone': '../vendor/backbone/backbone',
'jquery': '../node_modules/jquery/dist/jquery'
},
'packages': [{
'name': 'test',
'location': '../vendor/backbone/test',
'config': {
// Work around no global being exported.
'exports': 'QUnit',
'loader': 'curl/loader/legacy'
}
}]
};
if (ui.isModularize) {
result.packages.push({
'name': 'underscore',
'location': locationPath,
'main': moduleMain
});
} else {
result.paths.underscore = modulePath;
}
return result;
}
QUnit.config.autostart = false;
require(getConfig(), ['underscore'], function(lodash) {
mixinPrereqs(lodash);
require(getConfig(), ['backbone'], function() {
require(getConfig(), [
'test/setup/dom-setup',
'test/setup/environment',
'test/noconflict',
'test/events',
'test/model',
'test/collection',
'test/router',
'test/view',
'test/sync'
], function() {
QUnit.start();
});
});
});
}());
</script>
</body>
</html>

41
test/fp.html Normal file
View File

@@ -0,0 +1,41 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>lodash-fp Test Suite</title>
<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
</head>
<body>
<script>
// Avoid reporting tests to Sauce Labs when script errors occur.
if (location.port == '9001') {
window.onerror = function(message) {
if (window.QUnit) {
QUnit.config.done.length = 0;
}
global_test_results = { 'message': message };
};
}
</script>
<script src="../lodash.js"></script>
<script src="../dist/lodash.fp.js"></script>
<script src="../dist/mapping.fp.js"></script>
<script src="../node_modules/qunitjs/qunit/qunit.js"></script>
<script src="../node_modules/qunit-extras/qunit-extras.js"></script>
<script src="../node_modules/platform/platform.js"></script>
<script src="./test-fp.js"></script>
<div id="qunit"></div>
<script>
// Set a more readable browser name.
window.onload = function() {
var timeoutId = setInterval(function() {
var ua = document.getElementById('qunit-userAgent');
if (ua) {
ua.innerHTML = platform;
clearInterval(timeoutId);
}
}, 16);
};
</script>
</body>
</html>

View File

@@ -1,404 +1,342 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>lodash Test Suite</title>
<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
<style>
#exports {
display: none;
}
</style>
</head>
<body>
<script>
// avoid reporting tests to Sauce Labs when script errors occur
if (location.port == '9001') {
window.onerror = function(message) {
if (window.QUnit) {
QUnit.config.done.length = 0;
}
global_test_results = { 'message': message };
};
}
</script>
<script src="../node_modules/qunitjs/qunit/qunit.js"></script>
<script src="../node_modules/qunit-extras/qunit-extras.js"></script>
<script src="../node_modules/platform/platform.js"></script>
<script src="./asset/set.js"></script>
<script src="./asset/weakmap.js"></script>
<script src="./asset/test-ui.js"></script>
<div id="qunit"></div>
<div id="exports"></div>
<script>
var setProperty = (function() {
var _defineProperty = Object.defineProperty;
return function(object, key, value) {
try {
_defineProperty(object, key, {
'configurable': true,
'enumerable': false,
'writable': true,
'value': value
});
} catch(e) {
object[key] = value;
}
};
}());
<head>
<meta charset="utf-8">
<title>lodash Test Suite</title>
<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
<style>
#exports, #module {
display: none;
}
</style>
</head>
<body>
<script>
// Avoid reporting tests to Sauce Labs when script errors occur.
if (location.port == '9001') {
window.onerror = function(message) {
if (window.QUnit) {
QUnit.config.done.length = 0;
}
global_test_results = { 'message': message };
};
}
</script>
<script src="../node_modules/lodash/lodash.js"></script>
<script>var lodashStable = _.noConflict();</script>
<script src="../node_modules/qunitjs/qunit/qunit.js"></script>
<script src="../node_modules/qunit-extras/qunit-extras.js"></script>
<script src="../node_modules/platform/platform.js"></script>
<script src="./asset/test-ui.js"></script>
<div id="qunit"></div>
<div id="exports"></div>
<div id="module"></div>
<script>
function setProperty(object, key, value) {
try {
Object.defineProperty(object, key, {
'configurable': true,
'enumerable': false,
'writable': true,
'value': value
});
} catch (e) {
object[key] = value;
}
return object;
}
function addBizarroMethods() {
var funcProto = Function.prototype,
objectProto = Object.prototype,
stringProto = String.prototype;
function addBizarroMethods() {
var funcProto = Function.prototype,
objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty,
fnToString = funcProto.toString,
nativeString = fnToString.call(objectProto.toString),
noop = function() {},
propertyIsEnumerable = objectProto.propertyIsEnumerable,
reToString = /toString/g,
whitespace = ' \t\x0B\f\xA0\ufeff\n\r\u2028\u2029\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000';
var hasOwnProperty = objectProto.hasOwnProperty,
fnToString = funcProto.toString,
nativeString = fnToString.call(objectProto.toString),
noop = function() {},
propertyIsEnumerable = objectProto.propertyIsEnumerable,
reToString = /toString/g;
function constant(value) {
return function() {
return value;
};
}
function createToString(funcName) {
return constant(nativeString.replace(reToString, funcName));
}
// allow bypassing native checks
setProperty(funcProto, 'toString', (function() {
function wrapper() {
setProperty(funcProto, 'toString', fnToString);
var result = hasOwnProperty.call(this, 'toString') ? this.toString() : fnToString.call(this);
setProperty(funcProto, 'toString', wrapper);
return result;
}
return wrapper;
}()));
function constant(value) {
return function() {
return value;
};
}
// add extensions
funcProto._method = noop;
function createToString(funcName) {
return constant(nativeString.replace(reToString, funcName));
}
// set bad shims
setProperty(Array, '_isArray', Array.isArray);
setProperty(Array, 'isArray', noop);
// Allow bypassing native checks.
setProperty(funcProto, 'toString', (function() {
function wrapper() {
setProperty(funcProto, 'toString', fnToString);
var result = hasOwnProperty.call(this, 'toString') ? this.toString() : fnToString.call(this);
setProperty(funcProto, 'toString', wrapper);
return result;
}
return wrapper;
}()));
setProperty(Date, '_now', Date.now);
setProperty(Date, 'now', noop);
// Add prototype extensions.
funcProto._method = noop;
setProperty(Object, '_getPrototypeOf', Object.getPrototypeOf);
setProperty(Object, 'getPrototypeOf', noop);
// Set bad shims.
setProperty(Object, '_create', Object.create);
setProperty(Object, 'create', (function() {
function object() {}
return function(prototype) {
if (prototype === Object(prototype)) {
object.prototype = prototype;
var result = new object;
object.prototype = undefined;
}
return result || {};
};
}()));
setProperty(Object, '_keys', Object.keys);
setProperty(Object, 'keys', noop);
setProperty(Object, '_getOwnPropertySymbols', Object.getOwnPropertySymbols);
setProperty(Object, 'getOwnPropertySymbols', undefined);
setProperty(objectProto, '_propertyIsEnumerable', propertyIsEnumerable);
setProperty(objectProto, 'propertyIsEnumerable', function(key) {
if (key == '1' && this && typeof this == 'object' && this.length === 2 &&
hasOwnProperty.call(this, 'callee') &&
!propertyIsEnumerable.call(this, 'callee') &&
this[0] === 0 && this[1] === 0) {
throw new Error;
}
return propertyIsEnumerable.call(this, key);
});
setProperty(objectProto, '_propertyIsEnumerable', propertyIsEnumerable);
setProperty(objectProto, 'propertyIsEnumerable', function(key) {
return !(key == 'valueOf' && this && this.valueOf === 1) && _propertyIsEnumerable.call(this, key);
});
setProperty(Number, '_isFinite', Number.isFinite);
setProperty(Number, 'isFinite', noop);
setProperty(window, '_Map', window.Map);
if (_Map) {
setProperty(window, 'Map', (function(Map) {
var count = 0;
return function() {
if (count++) {
return new Map;
}
var result = {};
setProperty(window, 'Map', Map);
return result;
};
}(_Map)));
setProperty(window, '_ArrayBuffer', window.ArrayBuffer);
if (window.ArrayBuffer && window.Uint8Array) {
ArrayBuffer = (function(_ArrayBuffer) {
function ArrayBuffer(byteLength) {
var buffer = new _ArrayBuffer(byteLength);
if (!byteLength) {
setProperty(buffer, 'slice', buffer.slice ? null : bufferSlice);
}
return buffer;
}
function bufferSlice() {
var newBuffer = new _ArrayBuffer(this.byteLength),
view = new Uint8Array(newBuffer);
setProperty(Map, 'toString', createToString('Map'));
}
setProperty(window, '_Set', window.Set);
setProperty(window, 'Set', noop);
view.set(new Uint8Array(this));
return newBuffer;
}
setProperty(ArrayBuffer, 'toString', createToString('ArrayBuffer'));
setProperty(bufferSlice, 'toString', createToString('slice'));
return ArrayBuffer;
}(_ArrayBuffer));
}
if (!window.Float64Array && window.Uint8Array) {
Float64Array = (function() {
function Float64Array(buffer, byteOffset, length) {
return arguments.length == 1
? new Uint8Array(buffer)
: new Uint8Array(buffer, byteOffset || 0, length || buffer.byteLength);
}
setProperty(Float64Array, 'BYTES_PER_ELEMENT', 8);
setProperty(Float64Array, 'toString', createToString('Float64Array'));
return Float64Array;
}());
}
setProperty(window, '_Set', window.Set);
setProperty(window, 'Set', noop);
setProperty(window, '_Symbol', window.Symbol);
setProperty(window, 'Symbol', undefined);
setProperty(window, '_WeakMap', window.WeakMap);
setProperty(window, 'WeakMap', noop);
setProperty(window, '_WeakMap', window.WeakMap);
setProperty(window, 'WeakMap', noop);
setProperty(window, '_parseInt', parseInt);
setProperty(window, 'parseInt', (function(_parseInt) {
var checkStr = whitespace + '08',
isFaked = _parseInt(checkStr) != 8,
reHexPrefix = /^0[xX]/,
reTrim = RegExp('^[' + whitespace + ']+|[' + whitespace + ']+$');
// Fake `WinRTError`.
setProperty(window, 'WinRTError', Error);
return function(value, radix) {
if (value == checkStr && !isFaked) {
isFaked = true;
return 0;
}
value = String(value == null ? '' : value).replace(reTrim, '');
return _parseInt(value, +radix || (reHexPrefix.test(value) ? 16 : 10));
};
}(_parseInt)));
// Fake free variable `global`.
setProperty(window, 'exports', window);
setProperty(window, 'global', window);
setProperty(window, 'module', {});
}
// fake lack of DOM support
setProperty(document, '_createDocumentFragment', document.createDocumentFragment);
document.createDocumentFragment = noop;
function removeBizarroMethods() {
var funcProto = Function.prototype,
objectProto = Object.prototype;
// fake `WinRTError`
setProperty(window, 'WinRTError', Error);
setProperty(objectProto, 'propertyIsEnumerable', objectProto._propertyIsEnumerable);
// fake free variable `global`
setProperty(window, 'exports', window);
setProperty(window, 'global', window);
setProperty(window, 'module', {});
}
if (Object._create) {
Object.create = Object._create;
} else {
delete Object.create;
}
if (Object._getOwnPropertySymbols) {
Object.getOwnPropertySymbols = Object._getOwnPropertySymbols;
} else {
delete Object.getOwnPropertySymbols;
}
if (_Map) {
Map = _Map;
} else {
setProperty(window, 'Map', undefined);
}
if (_Set) {
Set = _Set;
} else {
setProperty(window, 'Set', undefined);
}
if (_Symbol) {
Symbol = _Symbol;
}
if (_WeakMap) {
WeakMap = _WeakMap;
} else {
setProperty(window, 'WeakMap', undefined);
}
setProperty(window, '_Map', undefined);
setProperty(window, '_Set', undefined);
setProperty(window, '_Symbol', undefined);
setProperty(window, '_WeakMap', undefined);
function removeBizarroMethods() {
var funcProto = Function.prototype,
objectProto = Object.prototype,
stringProto = String.prototype;
setProperty(window, 'WinRTError', undefined);
if (Array._isArray) {
setProperty(Array, 'isArray', Array._isArray);
} else {
delete Array.isArray;
}
if (Date._now) {
setProperty(Date, 'now', Date._now);
} else {
delete Date.now;
}
if (Object._getPrototypeOf) {
setProperty(Object, 'getPrototypeOf', Object._getPrototypeOf);
} else {
delete Object.getPrototypeOf;
}
if (Object._keys) {
setProperty(Object, 'keys', Object._keys);
} else {
delete Object.keys;
}
if (Number._isFinite) {
setProperty(Number, 'isFinite', Number._isFinite);
} else {
delete Number.isFinite;
}
if (window._ArrayBuffer) {
ArrayBuffer = _ArrayBuffer;
}
setProperty(window, '_ArrayBuffer', undefined);
setProperty(window, 'exports', document.getElementById('exports'));
setProperty(window, 'global', undefined);
setProperty(window, 'module', document.getElementById('module'));
if (window._Set) {
Set = _Set;
}
setProperty(window, '_Set', undefined);
delete funcProto._method;
delete Object._create;
delete Object._getOwnPropertySymbols;
delete objectProto._propertyIsEnumerable;
}
if (window._WeakMap) {
WeakMap = _WeakMap;
}
setProperty(window, '_WeakMap', undefined);
// Load lodash to expose it to the bad extensions/shims.
if (!ui.isModularize) {
addBizarroMethods();
document.write('<script src="' + ui.buildPath + '"><\/script>');
}
</script>
<script>
// Store lodash to test for bad extensions/shims.
if (!ui.isModularize) {
var lodashBizarro = window._;
window._ = undefined;
removeBizarroMethods();
}
// Load test scripts.
document.write((ui.isForeign || ui.urlParams.loader == 'none')
? '<script src="' + ui.buildPath + '"><\/script><script src="test.js"><\/script>'
: '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
);
</script>
<script>
var lodashModule,
shimmedModule,
underscoreModule;
setProperty(window, 'parseInt', window._parseInt);
setProperty(window, '_parseInt', undefined);
(function() {
if (window.curl) {
curl.config({ 'apiName': 'require' });
}
if (ui.isForeign || !window.require) {
return;
}
var reBasename = /[\w.-]+$/,
basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
modulePath = ui.buildPath.replace(/\.js$/, ''),
moduleMain = modulePath.match(reBasename)[0],
locationPath = modulePath.replace(reBasename, '').replace(/^\/|\/$/g, ''),
shimmedLocationPath = './abc/../' + locationPath,
underscoreLocationPath = './xyz/../' + locationPath,
uid = +new Date;
document.createDocumentFragment = document._createDocumentFragment;
setProperty(document, '_createDocumentFragment', undefined);
function getConfig() {
var result = {
'baseUrl': './',
'urlArgs': 't=' + uid++,
'waitSeconds': 0,
'paths': {},
'packages': [{
'name': 'test',
'location': basePath + 'test',
'main': 'test',
'config': {
// Work around no global being exported.
'exports': 'QUnit',
'loader': 'curl/loader/legacy'
}
}],
'shim': {
'shimmed': {
'exports': '_'
}
}
};
setProperty(window, 'WinRTError', undefined);
if (ui.isModularize) {
result.packages.push({
'name': 'lodash',
'location': locationPath,
'main': moduleMain
}, {
'name': 'shimmed',
'location': shimmedLocationPath,
'main': moduleMain
}, {
'name': 'underscore',
'location': underscoreLocationPath,
'main': moduleMain
});
} else {
result.paths.lodash = modulePath;
result.paths.shimmed = shimmedLocationPath + '/' + moduleMain;
result.paths.underscore = underscoreLocationPath + '/' + moduleMain;
}
return result;
}
setProperty(window, 'exports', undefined);
setProperty(window, 'global', undefined);
setProperty(window, 'module', undefined);
function loadTests() {
require(getConfig(), ['test'], function() {
QUnit.start();
});
}
setProperty(objectProto, 'propertyIsEnumerable', objectProto._propertyIsEnumerable);
function loadModulesAndTests() {
require(getConfig(), ['lodash', 'shimmed', 'underscore'], function(lodash, shimmed, underscore) {
lodashModule = lodash;
lodashModule.moduleName = 'lodash';
delete Array._isArray;
delete Date._now;
delete funcProto._method;
delete Object._create;
delete Object._getPrototypeOf;
delete Object._keys;
delete objectProto._propertyIsEnumerable;
}
if (shimmed) {
shimmedModule = shimmed.result(shimmed, 'noConflict') || shimmed;
shimmedModule.moduleName = 'shimmed';
}
if (underscore) {
underscoreModule = underscore.result(underscore, 'noConflict') || underscore;
underscoreModule.moduleName = 'underscore';
}
window._ = lodash;
// load lodash and expose it to the bad extensions/shims
if (!ui.isModularize) {
addBizarroMethods();
document.write('<script src="' + ui.buildPath + '"><\/script>');
}
</script>
<script>
// store lodash to test for bad extensions/shims
if (!ui.isModularize) {
var lodashBizarro = window._;
window._ = undefined;
removeBizarroMethods();
}
// load test scripts
document.write((ui.isForeign || ui.urlParams.loader == 'none')
? '<script src="' + ui.buildPath + '"><\/script><script src="test.js"><\/script>'
: '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
);
</script>
<script>
var lodashModule,
shimmedModule,
underscoreModule;
if (ui.isModularize) {
require(getConfig(), [
'lodash/_baseEach',
'lodash/_isIndex',
'lodash/_isIterateeCall'
], function(baseEach, isIndex, isIterateeCall) {
lodash._baseEach = baseEach;
lodash._isIndex = isIndex;
lodash._isIterateeCall = isIterateeCall;
loadTests();
});
} else {
loadTests();
}
});
}
(function() {
if (window.curl) {
curl.config({ 'apiName': 'require' });
}
if (ui.isForeign || !window.require) {
return;
}
var reBasename = /[\w.-]+$/,
basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
modulePath = ui.buildPath.replace(/\.js$/, ''),
moduleMain = modulePath.match(reBasename)[0],
locationPath = modulePath.replace(reBasename, '').replace(/^\/|\/$/g, ''),
shimmedLocationPath = './abc/../' + locationPath,
underscoreLocationPath = './xyz/../' + locationPath,
uid = +new Date;
QUnit.config.autostart = false;
function getConfig() {
var result = {
'baseUrl': './',
'urlArgs': 't=' + uid++,
'waitSeconds': 0,
'paths': {},
'packages': [{
'name': 'test',
'location': basePath + 'test',
'main': 'test',
'config': {
// work around no global being exported
'exports': 'QUnit',
'loader': 'curl/loader/legacy'
}
}],
'shim': {
'shimmed': {
'exports': '_'
}
}
};
if (window.requirejs) {
addBizarroMethods();
require(getConfig(), ['lodash'], function(lodash) {
lodashBizarro = lodash.result(lodash, 'noConflict') || lodash;
delete requirejs.s.contexts._;
if (ui.isModularize) {
result.packages.push({
'name': 'lodash',
'location': locationPath,
'main': moduleMain
}, {
'name': 'shimmed',
'location': shimmedLocationPath,
'main': moduleMain
}, {
'name': 'underscore',
'location': underscoreLocationPath,
'main': moduleMain
});
} else {
result.paths.lodash = modulePath;
result.paths.shimmed = shimmedLocationPath + '/' + moduleMain;
result.paths.underscore = underscoreLocationPath + '/' + moduleMain;
}
return result;
}
removeBizarroMethods();
loadModulesAndTests();
});
} else {
loadModulesAndTests();
}
}());
function loadTests() {
require(getConfig(), ['test'], function() {
QUnit.start();
});
}
function loadModulesAndTests() {
require(getConfig(), ['lodash', 'shimmed', 'underscore'], function(lodash, shimmed, underscore) {
lodashModule = lodash;
lodashModule.moduleName = 'lodash';
if (shimmed) {
shimmedModule = shimmed.result(shimmed, 'noConflict') || shimmed;
shimmedModule.moduleName = 'shimmed';
}
if (underscore) {
underscoreModule = underscore.result(underscore, 'noConflict') || underscore;
underscoreModule.moduleName = 'underscore';
}
if (ui.isModularize) {
window._ = lodash;
}
if (ui.isModularize) {
require(getConfig(), [
'lodash/internal/baseEach',
'lodash/internal/isIndex',
'lodash/internal/isIterateeCall',
'lodash/internal/isLength'
], function(baseEach, isIndex, isIterateeCall, isLength) {
lodash._baseEach = baseEach;
lodash._isIndex = isIndex;
lodash._isIterateeCall = isIterateeCall;
lodash._isLength = isLength;
loadTests();
});
} else {
loadTests();
}
});
}
QUnit.config.autostart = false;
if (window.requirejs) {
addBizarroMethods();
require(getConfig(), ['lodash'], function(lodash) {
lodashBizarro = lodash.result(lodash, 'noConflict') || lodash;
delete requirejs.s.contexts._;
removeBizarroMethods();
loadModulesAndTests();
});
} else {
loadModulesAndTests();
}
}());
// set a more readable browser name
window.onload = function() {
var timeoutId = setInterval(function() {
var ua = document.getElementById('qunit-userAgent');
if (ua) {
ua.innerHTML = platform;
clearInterval(timeoutId);
}
}, 16);
};
</script>
</body>
// Set a more readable browser name.
window.onload = function() {
var timeoutId = setInterval(function() {
var ua = document.getElementById('qunit-userAgent');
if (ua) {
ua.innerHTML = platform;
clearInterval(timeoutId);
}
}, 16);
};
</script>
</body>
</html>

27
test/remove.js Normal file
View File

@@ -0,0 +1,27 @@
#!/usr/bin/env node
'use strict';
var _ = require('../lodash'),
fs = require('fs'),
path = require('path');
var args = (args = process.argv)
.slice((args[0] === process.execPath || args[0] === 'node') ? 2 : 0);
var filePath = path.resolve(args[1]),
reLine = /.*/gm;
var pattern = (function() {
var result = args[0],
delimiter = result.charAt(0),
lastIndex = result.lastIndexOf(delimiter);
return RegExp(result.slice(1, lastIndex), result.slice(lastIndex + 1));
}());
/*----------------------------------------------------------------------------*/
fs.writeFileSync(filePath, fs.readFileSync(filePath, 'utf8').replace(pattern, function(match) {
var snippet = _.slice(arguments, -3, -2)[0];
return match.replace(snippet, snippet.replace(reLine, ''));
}));

View File

@@ -1,14 +0,0 @@
cd "$(dirname "$0")"
echo "Testing in node..."
node test.js ../lodash.src.js
for cmd in rhino "rhino -require" ringo phantomjs; do
echo ""
echo "Testing in $cmd..."
$cmd test.js ../lodash.src.js
done
echo ""
echo "Testing in a browser..."
open index.html

View File

@@ -17,7 +17,7 @@ var EventEmitter = require('events').EventEmitter,
util = require('util');
/** Load other modules. */
var _ = require('../lodash.src.js'),
var _ = require('../lodash.js'),
chalk = require('chalk'),
ecstatic = require('ecstatic'),
request = require('request'),
@@ -76,7 +76,7 @@ var advisor = getOption('advisor', false),
framework = getOption('framework', 'qunit'),
idleTimeout = getOption('idleTimeout', 60),
jobName = getOption('name', 'unit tests'),
maxDuration = getOption('maxDuration', 120),
maxDuration = getOption('maxDuration', 180),
port = ports[Math.min(_.sortedIndex(ports, getOption('port', 9001)), ports.length - 1)],
publicAccess = getOption('public', true),
queueTimeout = getOption('queueTimeout', 240),
@@ -102,27 +102,18 @@ var browserNameMap = {
/** List of platforms to load the runner on. */
var platforms = [
['Linux', 'android', '4.3'],
['Linux', 'android', '4.0'],
['Windows 8.1', 'firefox', '35'],
['Windows 8.1', 'firefox', '34'],
['Windows 8.1', 'firefox', '20'],
['Windows 8.1', 'chrome', '39'],
['Windows 8.1', 'chrome', '38'],
['Windows 8.1', 'internet explorer', '11'],
['Linux', 'android', '5.1'],
['Windows 10', 'chrome', '48'],
['Windows 10', 'chrome', '47'],
['Windows 10', 'firefox', '44'],
['Windows 10', 'firefox', '43'],
['Windows 10', 'microsoftedge', '20.10240'],
['Windows 10', 'internet explorer', '11'],
['Windows 8', 'internet explorer', '10'],
['Windows 7', 'internet explorer', '9'],
['Windows 7', 'internet explorer', '8'],
['Windows XP', 'internet explorer', '7'],
['Windows XP', 'internet explorer', '6'],
['Windows 7', 'opera', '12'],
['Windows 7', 'opera', '11'],
['OS X 10.9', 'ipad', '8.1'],
['OS X 10.6', 'ipad', '4'],
['OS X 10.10', 'safari', '8'],
['OS X 10.9', 'safari', '7'],
['OS X 10.8', 'safari', '6'],
['OS X 10.6', 'safari', '5']
// ['OS X 10.10', 'ipad', '9.1'],
['OS X 10.11', 'safari', '9'],
['OS X 10.10', 'safari', '8']
];
/** Used to tailor the `platforms` array. */
@@ -133,7 +124,7 @@ var isAMD = _.includes(tags, 'amd'),
// The platforms to test IE compatibility modes.
if (compatMode) {
platforms = [
['Windows 8.1', 'internet explorer', '11'],
['Windows 10', 'internet explorer', '11'],
['Windows 8', 'internet explorer', '10'],
['Windows 7', 'internet explorer', '9'],
['Windows 7', 'internet explorer', '8']
@@ -160,6 +151,7 @@ if (isBackbone) {
switch (browser) {
case 'Firefox': return version >= 4;
case 'Internet Explorer': return version >= 7;
case 'iPad': return version >= 5;
case 'Opera': return version >= 12;
}
@@ -276,7 +268,7 @@ function isJobId(value) {
*/
function logInline(text) {
var blankLine = _.repeat(' ', _.size(prevLine));
prevLine = text = _.trunc(text, 40);
prevLine = text = _.truncate(text, { 'length': 40 });
process.stdout.write(text + blankLine.slice(text.length) + '\r');
}
@@ -298,7 +290,7 @@ function logThrobber() {
* @returns {Array} Returns the new converted array.
*/
function optionToArray(name, string) {
return _.compact(_.invoke((optionToValue(name, string) || '').split(/, */), 'trim'));
return _.compact(_.invokeMap((optionToValue(name, string) || '').split(/, */), 'trim'));
}
/**
@@ -542,9 +534,6 @@ function Job(properties) {
EventEmitter.call(this);
this.options = {};
this.retries = maxJobRetries;
this.statusInterval = statusInterval;
_.merge(this, properties);
_.defaults(this.options, _.cloneDeep(jobOptions));
@@ -563,7 +552,7 @@ util.inherits(Job, EventEmitter);
* @param {Object} Returns the job instance.
*/
Job.prototype.remove = function(callback) {
this.once('remove', _.callback(callback));
this.once('remove', _.iteratee(callback));
if (this.removing) {
return this;
}
@@ -588,7 +577,7 @@ Job.prototype.remove = function(callback) {
* @param {Object} Returns the job instance.
*/
Job.prototype.reset = function(callback) {
this.once('reset', _.callback(callback));
this.once('reset', _.iteratee(callback));
if (this.resetting) {
return this;
}
@@ -604,7 +593,7 @@ Job.prototype.reset = function(callback) {
* @param {Object} Returns the job instance.
*/
Job.prototype.restart = function(callback) {
this.once('restart', _.callback(callback));
this.once('restart', _.iteratee(callback));
if (this.restarting) {
return this;
}
@@ -629,7 +618,7 @@ Job.prototype.restart = function(callback) {
* @param {Object} Returns the job instance.
*/
Job.prototype.start = function(callback) {
this.once('start', _.callback(callback));
this.once('start', _.iteratee(callback));
if (this.starting || this.running) {
return this;
}
@@ -650,7 +639,7 @@ Job.prototype.start = function(callback) {
* @param {Object} Returns the job instance.
*/
Job.prototype.status = function(callback) {
this.once('status', _.callback(callback));
this.once('status', _.iteratee(callback));
if (this.checking || this.removing || this.resetting || this.restarting || this.starting || this.stopping) {
return this;
}
@@ -672,7 +661,7 @@ Job.prototype.status = function(callback) {
* @param {Object} Returns the job instance.
*/
Job.prototype.stop = function(callback) {
this.once('stop', _.callback(callback));
this.once('stop', _.iteratee(callback));
if (this.stopping) {
return this;
}
@@ -705,20 +694,19 @@ Job.prototype.stop = function(callback) {
function Tunnel(properties) {
EventEmitter.call(this);
this.retries = maxTunnelRetries;
_.merge(this, properties);
var active = [],
queue = [];
var all = _.map(this.platforms, function(platform) {
var all = _.map(this.platforms, _.bind(function(platform) {
return new Job(_.merge({
'user': this.user,
'pass': this.pass,
'tunnel': this,
'options': { 'platforms': [platform] }
}, this.job));
}, this);
}, this));
var completed = 0,
restarted = [],
@@ -726,7 +714,7 @@ function Tunnel(properties) {
total = all.length,
tunnel = this;
_.invoke(all, 'on', 'complete', function() {
_.invokeMap(all, 'on', 'complete', function() {
_.pull(active, this);
if (success) {
success = !this.failed;
@@ -738,7 +726,7 @@ function Tunnel(properties) {
tunnel.dequeue();
});
_.invoke(all, 'on', 'restart', function() {
_.invokeMap(all, 'on', 'restart', function() {
if (!_.includes(restarted, this)) {
restarted.push(this);
}
@@ -772,7 +760,7 @@ util.inherits(Tunnel, EventEmitter);
* @param {Function} callback The function called once the tunnel is restarted.
*/
Tunnel.prototype.restart = function(callback) {
this.once('restart', _.callback(callback));
this.once('restart', _.iteratee(callback));
if (this.restarting) {
return this;
}
@@ -786,7 +774,7 @@ Tunnel.prototype.restart = function(callback) {
all = jobs.all;
var reset = _.after(all.length, _.bind(this.stop, this, onGenericRestart)),
stop = _.after(active.length, _.partial(_.invoke, all, 'reset', reset));
stop = _.after(active.length, _.partial(_.invokeMap, all, 'reset', reset));
if (_.isEmpty(active)) {
_.defer(stop);
@@ -794,7 +782,7 @@ Tunnel.prototype.restart = function(callback) {
if (_.isEmpty(all)) {
_.defer(reset);
}
_.invoke(active, 'stop', function() {
_.invokeMap(active, 'stop', function() {
_.pull(active, this);
stop();
});
@@ -814,7 +802,7 @@ Tunnel.prototype.restart = function(callback) {
* @param {Object} Returns the tunnel instance.
*/
Tunnel.prototype.start = function(callback) {
this.once('start', _.callback(callback));
this.once('start', _.iteratee(callback));
if (this.starting || this.running) {
return this;
}
@@ -857,7 +845,7 @@ Tunnel.prototype.dequeue = function() {
* @param {Object} Returns the tunnel instance.
*/
Tunnel.prototype.stop = function(callback) {
this.once('stop', _.callback(callback));
this.once('stop', _.iteratee(callback));
if (this.stopping) {
return this;
}
@@ -882,7 +870,7 @@ Tunnel.prototype.stop = function(callback) {
if (_.isEmpty(active)) {
_.defer(stop);
}
_.invoke(active, 'stop', function() {
_.invokeMap(active, 'stop', function() {
_.pull(active, this);
stop();
});

1473
test/test-fp.js Normal file

File diff suppressed because it is too large Load Diff

25785
test/test.js

File diff suppressed because it is too large Load Diff

View File

@@ -1,266 +1,480 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Underscore Test Suite</title>
<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
<style>
iframe {
display: none;
}
</style>
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture">
<div id="map-test">
<div id="id1"></div>
<div id="id2"></div>
</div>
<img id="chart_image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==">
</div>
<script>
// avoid reporting tests to Sauce Labs when script errors occur
if (location.port == '9001') {
window.onerror = function(message) {
if (window.QUnit) {
QUnit.config.done.length = 0;
}
global_test_results = { 'message': message };
};
}
</script>
<script src="../node_modules/qunitjs/qunit/qunit.js"></script>
<script src="../node_modules/qunit-extras/qunit-extras.js"></script>
<script src="../node_modules/jquery/dist/jquery.js"></script>
<script src="../node_modules/platform/platform.js"></script>
<script src="./asset/test-ui.js"></script>
<script>
QUnit.config.asyncRetries = 10;
<head>
<meta charset="utf-8">
<title>Underscore Test Suite</title>
<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
</head>
<body>
<div id="qunit"></div>
<script>
// Avoid reporting tests to Sauce Labs when script errors occur.
if (location.port == '9001') {
window.onerror = function(message) {
if (window.QUnit) {
QUnit.config.done.length = 0;
}
global_test_results = { 'message': message };
};
}
</script>
<script src="../node_modules/qunitjs/qunit/qunit.js"></script>
<script src="../node_modules/qunit-extras/qunit-extras.js"></script>
<script src="../node_modules/jquery/dist/jquery.js"></script>
<script src="../node_modules/platform/platform.js"></script>
<script src="./asset/test-ui.js"></script>
<script src="../lodash.js"></script>
<script>
QUnit.config.asyncRetries = 10;
QUnit.config.hidepassed = true;
QUnit.config.excused = {
'Arrays': {
'difference': [
'can perform an OO-style difference'
],
'drop': [
'is an alias for rest'
],
'first': [
'returns an empty array when n <= 0 (0 case)',
'returns an empty array when n <= 0 (negative case)',
'can fetch the first n elements',
'returns the whole array if n > length'
],
'findIndex': [
'called with context'
],
'findLastIndex': [
'called with context'
],
'flatten': [
'supports empty arrays',
'can flatten nested arrays',
'works on an arguments object',
'can handle very deep arrays'
],
'head': [
'is an alias for first'
],
'indexOf': [
"sorted indexOf doesn't uses binary search",
'0'
],
'initial': [
'returns all but the last n elements',
'returns an empty array when n > length',
'works on an arguments object'
],
'intersection': [
'can perform an OO-style intersection'
],
'last': [
'returns an empty array when n <= 0 (0 case)',
'returns an empty array when n <= 0 (negative case)',
'can fetch the last n elements',
'returns the whole array if n > length'
],
'lastIndexOf': [
'should treat falsey `fromIndex` values, except `0` and `NaN`, as `array.length`',
'should treat non-number `fromIndex` values as `array.length`',
'[0,-1,-1]'
],
'object': [
'an array of pairs zipped together into an object',
'an object converted to pairs and back to an object'
],
'range': [
'range with two arguments a &amp; b, b&lt;a generates an empty array'
],
'rest': [
'returns the whole array when index is 0',
'returns elements starting at the given index',
'works on an arguments object'
],
'sortedIndex': [
'2',
'3'
],
'tail': [
'is an alias for rest'
],
'take': [
'is an alias for first'
],
'uniq': [
'uses the result of `iterator` for uniqueness comparisons (unsorted case)',
'`sorted` argument defaults to false when omitted',
'when `iterator` is a string, uses that key for comparisons (unsorted case)',
'uses the result of `iterator` for uniqueness comparisons (sorted case)',
'when `iterator` is a string, uses that key for comparisons (sorted case)',
'can use falsey pluck like iterator'
],
'union': [
'can perform an OO-style union'
]
},
'Chaining': {
'pop': true,
'shift': true,
'splice': true,
'reverse/concat/unshift/pop/map': [
'can chain together array functions.'
]
},
'Collections': {
'lookupIterator with contexts': true,
'Iterating objects with sketchy length properties': true,
'Resistant to collection length and properties changing while iterating': true,
'countBy': [
'true'
],
'each': [
'context object property accessed'
],
'every': [
'Can be called with object',
'Died on test #15',
'context works'
],
'filter': [
'given context',
'[{"a":1,"b":2},{"a":1,"b":3},{"a":1,"b":4}]',
'[{"a":1,"b":2},{"a":2,"b":2}]',
'Empty object accepts all items',
'OO-filter'
],
'find': [
'{"a":1,"b":4}',
'undefined when not found',
'undefined when searching empty list',
'works on objects',
'undefined',
'called with context'
],
'findWhere': [
'checks properties given function'
],
'groupBy': [
'true'
],
'includes': [
"doesn't delegate to binary search"
],
'invoke': [
'handles null & undefined'
],
'map': [
'tripled numbers with context',
'OO-style doubled numbers'
],
'max': [
'can handle null/undefined',
'can perform a computation-based max',
'Maximum value of an empty object',
'Maximum value of an empty array',
'Maximum value of a non-numeric collection',
'Finds correct max in array starting with num and containing a NaN',
'Finds correct max in array starting with NaN',
'Respects iterator return value of -Infinity',
'String keys use property iterator',
'Iterator context',
'Lookup falsy iterator'
],
'min': [
'can handle null/undefined',
'can perform a computation-based min',
'Minimum value of an empty object',
'Minimum value of an empty array',
'Minimum value of a non-numeric collection',
'Finds correct min in array starting with NaN',
'Respects iterator return value of Infinity',
'String keys use property iterator',
'Iterator context',
'Lookup falsy iterator'
],
'partition': [
'can reference the array index',
'Died on test #8',
'partition takes a context argument',
'function(a){[code]}'
],
'pluck': [
'[1]'
],
'reduce': [
'can reduce with a context object'
],
'reject': [
'Returns empty list given empty array'
],
'sample': [
'behaves correctly on negative n',
'Died on test #3'
],
'some': [
'Can be called with object',
'Died on test #17',
'context works'
],
'where': [
'checks properties given function'
],
'Can use various collection methods on NodeLists': [
'<span id="id2"></span>',
'<span id="id1"></span>'
]
},
'Functions': {
'debounce asap': true,
'debounce asap cancel': true,
'debounce after system time is set backwards': true,
'debounce asap recursively': true,
'throttle repeatedly with results': true,
'more throttle does not trigger leading call when leading is set to false': true,
'throttle does not trigger trailing call when trailing is set to false': true,
'before': [
'stores a memo to the last value',
'provides context'
],
'bind': [
'Died on test #2'
],
'bindAll': [
'throws an error for bindAll with no functions named'
],
'memoize': [
'{"bar":"BAR","foo":"FOO"}',
'Died on test #8'
],
'partial':[
'can partially apply with placeholders',
'accepts more arguments than the number of placeholders',
'accepts fewer arguments than the number of placeholders',
'unfilled placeholders are undefined',
'keeps prototype',
'allows the placeholder to be swapped out'
]
},
'Objects': {
'#1929 Typed Array constructors are functions': true,
'allKeys': [
'is not fooled by sparse arrays; see issue #95',
'is not fooled by sparse arrays with additional properties',
'[]'
],
'defaults': [
'defaults skips nulls',
'defaults skips undefined'
],
'extend': [
'extending null results in null',
'extending undefined results in undefined'
],
'extendOwn': [
'extending non-objects results in returning the non-object value',
'extending undefined results in undefined'
],
'functions': [
'also looks up functions on the prototype'
],
'isEqual': [
'`0` is not equal to `-0`',
'Commutative equality is implemented for `0` and `-0`',
'`new Number(0)` and `-0` are not equal',
'Commutative equality is implemented for `new Number(0)` and `-0`',
'false'
],
'isFinite': [
'Numeric strings are numbers',
'Number instances can be finite'
],
'isMatch': [
'doesnt falsey match constructor on undefined/null'
],
'findKey': [
'called with context'
],
'keys': [
'is not fooled by sparse arrays; see issue #95',
'[]'
],
'mapObject': [
'keep context',
'called with context',
'mapValue identity'
],
'matcher': [
'null matches null',
'treats primitives as empty'
],
'omit': [
'can accept a predicate',
'function is given context'
],
'pick': [
'can accept a predicate and context',
'function is given context'
]
},
'Utility': {
'noConflict (node vm)': true,
'now': [
'Produces the correct time in milliseconds'
],
'times': [
'works as a wrapper'
]
}
};
QUnit.begin(function() {
QUnit.config.hidepassed = true;
$('#qunit-tests').addClass('hidepass');
$('#qunit-urlconfig-hidepassed').prop('checked', true);
});
var mixinPrereqs = (function() {
var aliasToReal = {
'all': 'every',
'allKeys': 'keysIn',
'any': 'some',
'collect': 'map',
'compose': 'flowRight',
'contains': 'includes',
'detect': 'find',
'extendOwn': 'assign',
'findWhere': 'find',
'foldl': 'reduce',
'foldr': 'reduceRight',
'include': 'includes',
'indexBy': 'keyBy',
'inject': 'reduce',
'invoke': 'invokeMap',
'mapObject': 'mapValues',
'matcher': 'matches',
'methods': 'functions',
'object': 'zipObject',
'pairs': 'toPairs',
'pluck': 'map',
'restParam': 'restArgs',
'select': 'filter',
'unique': 'uniq',
'where': 'filter'
};
// excuse tests we intentionally fail or those with problems
QUnit.config.excused = {
'Arrays': {
'drop': [
'alias for rest'
],
'first': [
'can pass an index to first',
'[1,2]',
'0'
],
'flatten': [
'can flatten nested arrays',
'can shallowly flatten nested arrays',
'works on an arguments object',
'can shallowly flatten arrays containing only other arrays'
],
'initial': [
'initial can take an index',
'initial can take a large index',
'initial works on arguments object'
],
'intersection': [
'can perform an OO-style intersection',
'returns an empty array when passed null as first argument',
'returns an empty array when passed null as argument beyond the first'
],
'last': [
'can pass an index to last',
'0'
],
'lastIndexOf': [
'[0,-1,-1]'
],
'rest': [
'working rest(0)',
'rest can take an index',
'works on arguments object'
],
'take': [
'alias for first'
]
},
'Chaining': {
'select/reject/sortBy': [
'Died on test #1'
],
'select/reject/sortBy in functional style': [
'Died on test #1'
],
'reverse/concat/unshift/pop/map': [
'can chain together array functions.'
]
},
'Collections': {
'filter': [
'OO-filter'
],
'map': [
'OO-style doubled numbers'
],
'reduce': [
'handles a null (without initial value) properly',
'throws an error for empty arrays with no initial value'
],
'reduceRight': [
'handles a null (without initial value) properly',
'throws an error for empty arrays with no initial value'
]
},
'Functions': {
'bind': [
'can bind without specifying a context',
'Died on test #2'
],
'bindAll': [
'throws an error for bindAll with no functions named'
],
'memoize': [
'{"bar":"BAR","foo":"FOO"}',
'Died on test #8'
],
'throttle repeatedly with results': true,
'more throttle does not trigger leading call when leading is set to false': true,
'throttle does not trigger trailing call when trailing is set to false': true,
'debounce asap': true
},
'Objects': {
'isEqual': [
'Died on test #60',
'Died on test #63'
],
'isFinite': [
'Numeric strings are numbers',
'Number instances can be finite'
],
'keys': [
'is not fooled by sparse arrays; see issue #95',
'[]'
],
'matches': [
'inherited and own properties are checked on the test object',
'doesnt fasley match constructor on undefined/null'
]
},
'Utility': {
'now': [
'Produces the correct time in milliseconds'
],
'_.templateSettings.variable': [
'"x"'
],
'times': [
'Died on test #1',
'works as a wrapper'
],
'uniqueId': [
'Died on test #1'
]
}
};
var keyMap = {
'rest': 'tail',
'restArgs': 'rest'
};
// only excuse in Sauce Labs (buggy Safari and timers)
if (!ui.isSauceLabs) {
QUnit.config.excused.Utility.times.shift();
delete QUnit.config.excused.Chaining['select/reject/sortBy'];
delete QUnit.config.excused.Chaining['select/reject/sortBy in functional style'];
delete QUnit.config.excused.Functions['throttle repeatedly with results'];
delete QUnit.config.excused.Functions['more throttle does not trigger leading call when leading is set to false'];
delete QUnit.config.excused.Functions['throttle does not trigger trailing call when trailing is set to false'];
delete QUnit.config.excused.Functions['debounce asap'];
delete QUnit.config.excused.Objects.isEqual;
delete QUnit.config.excused.Utility.uniqueId;
}
// load test scripts
document.write(ui.urlParams.loader != 'none'
? '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
: ([
'<script src="' + ui.buildPath + '"><\/script>',
'<script src="../vendor/underscore/test/collections.js"><\/script>',
'<script src="../vendor/underscore/test/arrays.js"><\/script>',
'<script src="../vendor/underscore/test/functions.js"><\/script>',
'<script src="../vendor/underscore/test/objects.js"><\/script>',
'<script src="../vendor/underscore/test/utility.js"><\/script>',
'<script src="../vendor/underscore/test/chaining.js"><\/script>'
].join('\n'))
);
</script>
<script>
(function() {
if (window.curl) {
curl.config({ 'apiName': 'require' });
}
if (!window.require) {
return;
}
var reBasename = /[\w.-]+$/,
basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
modulePath = ui.buildPath.replace(/\.js$/, ''),
locationPath = modulePath.replace(reBasename, '').replace(/^\/|\/$/g, ''),
moduleId = /\bunderscore\b/i.test(ui.buildPath) ? 'underscore' : 'lodash',
moduleMain = modulePath.match(reBasename)[0],
uid = +new Date;
var lodash = _.noConflict();
function getConfig() {
var result = {
'baseUrl': './',
'urlArgs': 't=' + uid++,
'waitSeconds': 0,
'paths': {},
'packages': [{
'name': 'test',
'location': '../vendor/underscore/test',
'config': {
// work around no global being exported
'exports': 'QUnit',
'loader': 'curl/loader/legacy'
}
}]
};
return function(_) {
lodash.defaultsDeep(_, { 'templateSettings': lodash.templateSettings });
lodash.mixin(_, lodash.pick(lodash, lodash.difference(lodash.functions(lodash), lodash.functions(_))));
if (ui.isModularize) {
result.packages.push({
'name': moduleId,
'location': locationPath,
'main': moduleMain
});
} else {
result.paths[moduleId] = modulePath;
}
return result;
}
lodash.forOwn(keyMap, function(realName, otherName) {
_[otherName] = lodash[realName];
_.prototype[otherName] = lodash.prototype[realName];
});
QUnit.config.autostart = false;
lodash.forOwn(aliasToReal, function(realName, alias) {
_[alias] = _[realName];
_.prototype[alias] = _.prototype[realName];
});
};
}());
require(getConfig(), [moduleId], function(lodash) {
if (ui.isModularize) {
window._ = lodash;
}
require(getConfig(), [
'test/collections',
'test/arrays',
'test/functions',
'test/objects',
'test/utility',
'test/chaining'
], function() {
QUnit.start();
});
});
}());
</script>
<script type="text/html" id="template">
<%
// a comment
if (data) { data += 12345; }; %>
<li><%= data %></li>
</script>
</body>
// Only excuse in Sauce Labs.
if (!ui.isSauceLabs) {
delete QUnit.config.excused.Functions['throttle repeatedly with results'];
delete QUnit.config.excused.Functions['more throttle does not trigger leading call when leading is set to false'];
delete QUnit.config.excused.Functions['throttle does not trigger trailing call when trailing is set to false'];
delete QUnit.config.excused.Utility.now;
}
// Load prerequisite scripts.
document.write(ui.urlParams.loader == 'none'
? '<script src="' + ui.buildPath + '"><\/script>'
: '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
);
</script>
<script>
if (ui.urlParams.loader == 'none') {
mixinPrereqs(_);
document.write([
'<script src="../vendor/underscore/test/collections.js"><\/script>',
'<script src="../vendor/underscore/test/arrays.js"><\/script>',
'<script src="../vendor/underscore/test/functions.js"><\/script>',
'<script src="../vendor/underscore/test/objects.js"><\/script>',
'<script src="../vendor/underscore/test/cross-document.js"><\/script>',
'<script src="../vendor/underscore/test/utility.js"><\/script>',
'<script src="../vendor/underscore/test/chaining.js"><\/script>'
].join('\n'));
}
</script>
<script>
(function() {
if (window.curl) {
curl.config({ 'apiName': 'require' });
}
if (!window.require) {
return;
}
// Wrap to work around tests assuming Node `require` use.
require = (function(func) {
return function() {
return arguments[0] === '..' ? window._ : func.apply(null, arguments);
};
}(require));
var reBasename = /[\w.-]+$/,
basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
modulePath = ui.buildPath.replace(/\.js$/, ''),
locationPath = modulePath.replace(reBasename, '').replace(/^\/|\/$/g, ''),
moduleId = /\bunderscore\b/i.test(ui.buildPath) ? 'underscore' : 'lodash',
moduleMain = modulePath.match(reBasename)[0],
uid = +new Date;
function getConfig() {
var result = {
'baseUrl': './',
'urlArgs': 't=' + uid++,
'waitSeconds': 0,
'paths': {},
'packages': [{
'name': 'test',
'location': '../vendor/underscore/test',
'config': {
// Work around no global being exported.
'exports': 'QUnit',
'loader': 'curl/loader/legacy'
}
}]
};
if (ui.isModularize) {
result.packages.push({
'name': moduleId,
'location': locationPath,
'main': moduleMain
});
} else {
result.paths[moduleId] = modulePath;
}
return result;
}
QUnit.config.autostart = false;
require(getConfig(), [moduleId], function(lodash) {
mixinPrereqs(lodash);
require(getConfig(), [
'test/collections',
'test/arrays',
'test/functions',
'test/objects',
'test/cross-document',
'test/utility',
'test/chaining'
], function() {
QUnit.start();
});
});
}());
</script>
</body>
</html>

View File

@@ -1,4 +1,4 @@
Copyright (c) 2010-2014 Jeremy Ashkenas, DocumentCloud
Copyright (c) 2010-2016 Jeremy Ashkenas, DocumentCloud
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,42 +1,44 @@
(function() {
module("Backbone.Events");
QUnit.module('Backbone.Events');
test("on and trigger", 2, function() {
var obj = { counter: 0 };
_.extend(obj,Backbone.Events);
QUnit.test('on and trigger', function(assert) {
assert.expect(2);
var obj = {counter: 0};
_.extend(obj, Backbone.Events);
obj.on('event', function() { obj.counter += 1; });
obj.trigger('event');
equal(obj.counter,1,'counter should be incremented.');
assert.equal(obj.counter, 1, 'counter should be incremented.');
obj.trigger('event');
obj.trigger('event');
obj.trigger('event');
obj.trigger('event');
equal(obj.counter, 5, 'counter should be incremented five times.');
assert.equal(obj.counter, 5, 'counter should be incremented five times.');
});
test("binding and triggering multiple events", 4, function() {
var obj = { counter: 0 };
QUnit.test('binding and triggering multiple events', function(assert) {
assert.expect(4);
var obj = {counter: 0};
_.extend(obj, Backbone.Events);
obj.on('a b c', function() { obj.counter += 1; });
obj.trigger('a');
equal(obj.counter, 1);
assert.equal(obj.counter, 1);
obj.trigger('a b');
equal(obj.counter, 3);
assert.equal(obj.counter, 3);
obj.trigger('c');
equal(obj.counter, 4);
assert.equal(obj.counter, 4);
obj.off('a c');
obj.trigger('a b c');
equal(obj.counter, 5);
assert.equal(obj.counter, 5);
});
test("binding and triggering with event maps", function() {
var obj = { counter: 0 };
QUnit.test('binding and triggering with event maps', function(assert) {
var obj = {counter: 0};
_.extend(obj, Backbone.Events);
var increment = function() {
@@ -50,36 +52,85 @@
}, obj);
obj.trigger('a');
equal(obj.counter, 1);
assert.equal(obj.counter, 1);
obj.trigger('a b');
equal(obj.counter, 3);
assert.equal(obj.counter, 3);
obj.trigger('c');
equal(obj.counter, 4);
assert.equal(obj.counter, 4);
obj.off({
a: increment,
c: increment
}, obj);
obj.trigger('a b c');
equal(obj.counter, 5);
assert.equal(obj.counter, 5);
});
test("listenTo and stopListening", 1, function() {
QUnit.test('binding and triggering multiple event names with event maps', function(assert) {
var obj = {counter: 0};
_.extend(obj, Backbone.Events);
var increment = function() {
this.counter += 1;
};
obj.on({
'a b c': increment
});
obj.trigger('a');
assert.equal(obj.counter, 1);
obj.trigger('a b');
assert.equal(obj.counter, 3);
obj.trigger('c');
assert.equal(obj.counter, 4);
obj.off({
'a c': increment
});
obj.trigger('a b c');
assert.equal(obj.counter, 5);
});
QUnit.test('binding and trigger with event maps context', function(assert) {
assert.expect(2);
var obj = {counter: 0};
var context = {};
_.extend(obj, Backbone.Events);
obj.on({
a: function() {
assert.strictEqual(this, context, 'defaults `context` to `callback` param');
}
}, context).trigger('a');
obj.off().on({
a: function() {
assert.strictEqual(this, context, 'will not override explicit `context` param');
}
}, this, context).trigger('a');
});
QUnit.test('listenTo and stopListening', function(assert) {
assert.expect(1);
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
a.listenTo(b, 'all', function(){ ok(true); });
a.listenTo(b, 'all', function(){ assert.ok(true); });
b.trigger('anything');
a.listenTo(b, 'all', function(){ ok(false); });
a.listenTo(b, 'all', function(){ assert.ok(false); });
a.stopListening();
b.trigger('anything');
});
test("listenTo and stopListening with event maps", 4, function() {
QUnit.test('listenTo and stopListening with event maps', function(assert) {
assert.expect(4);
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
var cb = function(){ ok(true); };
var cb = function(){ assert.ok(true); };
a.listenTo(b, {event: cb});
b.trigger('event');
a.listenTo(b, {event2: cb});
@@ -90,10 +141,11 @@
b.trigger('event event2');
});
test("stopListening with omitted args", 2, function () {
QUnit.test('stopListening with omitted args', function(assert) {
assert.expect(2);
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
var cb = function () { ok(true); };
var cb = function() { assert.ok(true); };
a.listenTo(b, 'event', cb);
b.on('event', cb);
a.listenTo(b, 'event2', cb);
@@ -106,123 +158,237 @@
b.trigger('event2');
});
test("listenToOnce and stopListening", 1, function() {
QUnit.test('listenToOnce', function(assert) {
assert.expect(2);
// Same as the previous test, but we use once rather than having to explicitly unbind
var obj = {counterA: 0, counterB: 0};
_.extend(obj, Backbone.Events);
var incrA = function(){ obj.counterA += 1; obj.trigger('event'); };
var incrB = function(){ obj.counterB += 1; };
obj.listenToOnce(obj, 'event', incrA);
obj.listenToOnce(obj, 'event', incrB);
obj.trigger('event');
assert.equal(obj.counterA, 1, 'counterA should have only been incremented once.');
assert.equal(obj.counterB, 1, 'counterB should have only been incremented once.');
});
QUnit.test('listenToOnce and stopListening', function(assert) {
assert.expect(1);
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
a.listenToOnce(b, 'all', function() { ok(true); });
a.listenToOnce(b, 'all', function() { assert.ok(true); });
b.trigger('anything');
b.trigger('anything');
a.listenToOnce(b, 'all', function() { ok(false); });
a.listenToOnce(b, 'all', function() { assert.ok(false); });
a.stopListening();
b.trigger('anything');
});
test("listenTo, listenToOnce and stopListening", 1, function() {
QUnit.test('listenTo, listenToOnce and stopListening', function(assert) {
assert.expect(1);
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
a.listenToOnce(b, 'all', function() { ok(true); });
a.listenToOnce(b, 'all', function() { assert.ok(true); });
b.trigger('anything');
b.trigger('anything');
a.listenTo(b, 'all', function() { ok(false); });
a.listenTo(b, 'all', function() { assert.ok(false); });
a.stopListening();
b.trigger('anything');
});
test("listenTo and stopListening with event maps", 1, function() {
QUnit.test('listenTo and stopListening with event maps', function(assert) {
assert.expect(1);
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
a.listenTo(b, {change: function(){ ok(true); }});
a.listenTo(b, {change: function(){ assert.ok(true); }});
b.trigger('change');
a.listenTo(b, {change: function(){ ok(false); }});
a.listenTo(b, {change: function(){ assert.ok(false); }});
a.stopListening();
b.trigger('change');
});
test("listenTo yourself", 1, function(){
QUnit.test('listenTo yourself', function(assert) {
assert.expect(1);
var e = _.extend({}, Backbone.Events);
e.listenTo(e, "foo", function(){ ok(true); });
e.trigger("foo");
e.listenTo(e, 'foo', function(){ assert.ok(true); });
e.trigger('foo');
});
test("listenTo yourself cleans yourself up with stopListening", 1, function(){
QUnit.test('listenTo yourself cleans yourself up with stopListening', function(assert) {
assert.expect(1);
var e = _.extend({}, Backbone.Events);
e.listenTo(e, "foo", function(){ ok(true); });
e.trigger("foo");
e.listenTo(e, 'foo', function(){ assert.ok(true); });
e.trigger('foo');
e.stopListening();
e.trigger("foo");
e.trigger('foo');
});
test("stopListening cleans up references", 4, function() {
QUnit.test('stopListening cleans up references', function(assert) {
assert.expect(12);
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
var fn = function() {};
a.listenTo(b, 'all', fn).stopListening();
equal(_.size(a._listeningTo), 0);
a.listenTo(b, 'all', fn).stopListening(b);
equal(_.size(a._listeningTo), 0);
a.listenTo(b, 'all', fn).stopListening(null, 'all');
equal(_.size(a._listeningTo), 0);
a.listenTo(b, 'all', fn).stopListening(null, null, fn);
equal(_.size(a._listeningTo), 0);
b.on('event', fn);
a.listenTo(b, 'event', fn).stopListening();
assert.equal(_.size(a._listeningTo), 0);
assert.equal(_.size(b._events.event), 1);
assert.equal(_.size(b._listeners), 0);
a.listenTo(b, 'event', fn).stopListening(b);
assert.equal(_.size(a._listeningTo), 0);
assert.equal(_.size(b._events.event), 1);
assert.equal(_.size(b._listeners), 0);
a.listenTo(b, 'event', fn).stopListening(b, 'event');
assert.equal(_.size(a._listeningTo), 0);
assert.equal(_.size(b._events.event), 1);
assert.equal(_.size(b._listeners), 0);
a.listenTo(b, 'event', fn).stopListening(b, 'event', fn);
assert.equal(_.size(a._listeningTo), 0);
assert.equal(_.size(b._events.event), 1);
assert.equal(_.size(b._listeners), 0);
});
test("listenTo and stopListening cleaning up references", 2, function() {
QUnit.test('stopListening cleans up references from listenToOnce', function(assert) {
assert.expect(12);
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
a.listenTo(b, 'all', function(){ ok(true); });
var fn = function() {};
b.on('event', fn);
a.listenToOnce(b, 'event', fn).stopListening();
assert.equal(_.size(a._listeningTo), 0);
assert.equal(_.size(b._events.event), 1);
assert.equal(_.size(b._listeners), 0);
a.listenToOnce(b, 'event', fn).stopListening(b);
assert.equal(_.size(a._listeningTo), 0);
assert.equal(_.size(b._events.event), 1);
assert.equal(_.size(b._listeners), 0);
a.listenToOnce(b, 'event', fn).stopListening(b, 'event');
assert.equal(_.size(a._listeningTo), 0);
assert.equal(_.size(b._events.event), 1);
assert.equal(_.size(b._listeners), 0);
a.listenToOnce(b, 'event', fn).stopListening(b, 'event', fn);
assert.equal(_.size(a._listeningTo), 0);
assert.equal(_.size(b._events.event), 1);
assert.equal(_.size(b._listeners), 0);
});
QUnit.test('listenTo and off cleaning up references', function(assert) {
assert.expect(8);
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
var fn = function() {};
a.listenTo(b, 'event', fn);
b.off();
assert.equal(_.size(a._listeningTo), 0);
assert.equal(_.size(b._listeners), 0);
a.listenTo(b, 'event', fn);
b.off('event');
assert.equal(_.size(a._listeningTo), 0);
assert.equal(_.size(b._listeners), 0);
a.listenTo(b, 'event', fn);
b.off(null, fn);
assert.equal(_.size(a._listeningTo), 0);
assert.equal(_.size(b._listeners), 0);
a.listenTo(b, 'event', fn);
b.off(null, null, a);
assert.equal(_.size(a._listeningTo), 0);
assert.equal(_.size(b._listeners), 0);
});
QUnit.test('listenTo and stopListening cleaning up references', function(assert) {
assert.expect(2);
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
a.listenTo(b, 'all', function(){ assert.ok(true); });
b.trigger('anything');
a.listenTo(b, 'other', function(){ ok(false); });
a.listenTo(b, 'other', function(){ assert.ok(false); });
a.stopListening(b, 'other');
a.stopListening(b, 'all');
equal(_.keys(a._listeningTo).length, 0);
assert.equal(_.size(a._listeningTo), 0);
});
test("listenTo with empty callback doesn't throw an error", 1, function(){
QUnit.test('listenToOnce without context cleans up references after the event has fired', function(assert) {
assert.expect(2);
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
a.listenToOnce(b, 'all', function(){ assert.ok(true); });
b.trigger('anything');
assert.equal(_.size(a._listeningTo), 0);
});
QUnit.test('listenToOnce with event maps cleans up references', function(assert) {
assert.expect(2);
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
a.listenToOnce(b, {
one: function() { assert.ok(true); },
two: function() { assert.ok(false); }
});
b.trigger('one');
assert.equal(_.size(a._listeningTo), 1);
});
QUnit.test('listenToOnce with event maps binds the correct `this`', function(assert) {
assert.expect(1);
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
a.listenToOnce(b, {
one: function() { assert.ok(this === a); },
two: function() { assert.ok(false); }
});
b.trigger('one');
});
QUnit.test("listenTo with empty callback doesn't throw an error", function(assert) {
assert.expect(1);
var e = _.extend({}, Backbone.Events);
e.listenTo(e, "foo", null);
e.trigger("foo");
ok(true);
e.listenTo(e, 'foo', null);
e.trigger('foo');
assert.ok(true);
});
test("trigger all for each event", 3, function() {
var a, b, obj = { counter: 0 };
QUnit.test('trigger all for each event', function(assert) {
assert.expect(3);
var a, b, obj = {counter: 0};
_.extend(obj, Backbone.Events);
obj.on('all', function(event) {
obj.counter++;
if (event == 'a') a = true;
if (event == 'b') b = true;
if (event === 'a') a = true;
if (event === 'b') b = true;
})
.trigger('a b');
ok(a);
ok(b);
equal(obj.counter, 2);
assert.ok(a);
assert.ok(b);
assert.equal(obj.counter, 2);
});
test("on, then unbind all functions", 1, function() {
var obj = { counter: 0 };
_.extend(obj,Backbone.Events);
QUnit.test('on, then unbind all functions', function(assert) {
assert.expect(1);
var obj = {counter: 0};
_.extend(obj, Backbone.Events);
var callback = function() { obj.counter += 1; };
obj.on('event', callback);
obj.trigger('event');
obj.off('event');
obj.trigger('event');
equal(obj.counter, 1, 'counter should have only been incremented once.');
assert.equal(obj.counter, 1, 'counter should have only been incremented once.');
});
test("bind two callbacks, unbind only one", 2, function() {
var obj = { counterA: 0, counterB: 0 };
_.extend(obj,Backbone.Events);
QUnit.test('bind two callbacks, unbind only one', function(assert) {
assert.expect(2);
var obj = {counterA: 0, counterB: 0};
_.extend(obj, Backbone.Events);
var callback = function() { obj.counterA += 1; };
obj.on('event', callback);
obj.on('event', function() { obj.counterB += 1; });
obj.trigger('event');
obj.off('event', callback);
obj.trigger('event');
equal(obj.counterA, 1, 'counterA should have only been incremented once.');
equal(obj.counterB, 2, 'counterB should have been incremented twice.');
assert.equal(obj.counterA, 1, 'counterA should have only been incremented once.');
assert.equal(obj.counterB, 2, 'counterB should have been incremented twice.');
});
test("unbind a callback in the midst of it firing", 1, function() {
QUnit.test('unbind a callback in the midst of it firing', function(assert) {
assert.expect(1);
var obj = {counter: 0};
_.extend(obj, Backbone.Events);
var callback = function() {
@@ -233,12 +399,13 @@
obj.trigger('event');
obj.trigger('event');
obj.trigger('event');
equal(obj.counter, 1, 'the callback should have been unbound.');
assert.equal(obj.counter, 1, 'the callback should have been unbound.');
});
test("two binds that unbind themeselves", 2, function() {
var obj = { counterA: 0, counterB: 0 };
_.extend(obj,Backbone.Events);
QUnit.test('two binds that unbind themeselves', function(assert) {
assert.expect(2);
var obj = {counterA: 0, counterB: 0};
_.extend(obj, Backbone.Events);
var incrA = function(){ obj.counterA += 1; obj.off('event', incrA); };
var incrB = function(){ obj.counterB += 1; obj.off('event', incrB); };
obj.on('event', incrA);
@@ -246,49 +413,52 @@
obj.trigger('event');
obj.trigger('event');
obj.trigger('event');
equal(obj.counterA, 1, 'counterA should have only been incremented once.');
equal(obj.counterB, 1, 'counterB should have only been incremented once.');
assert.equal(obj.counterA, 1, 'counterA should have only been incremented once.');
assert.equal(obj.counterB, 1, 'counterB should have only been incremented once.');
});
test("bind a callback with a supplied context", 1, function () {
var TestClass = function () {
QUnit.test('bind a callback with a supplied context', function(assert) {
assert.expect(1);
var TestClass = function() {
return this;
};
TestClass.prototype.assertTrue = function () {
ok(true, '`this` was bound to the callback');
TestClass.prototype.assertTrue = function() {
assert.ok(true, '`this` was bound to the callback');
};
var obj = _.extend({},Backbone.Events);
obj.on('event', function () { this.assertTrue(); }, (new TestClass));
var obj = _.extend({}, Backbone.Events);
obj.on('event', function() { this.assertTrue(); }, new TestClass);
obj.trigger('event');
});
test("nested trigger with unbind", 1, function () {
var obj = { counter: 0 };
QUnit.test('nested trigger with unbind', function(assert) {
assert.expect(1);
var obj = {counter: 0};
_.extend(obj, Backbone.Events);
var incr1 = function(){ obj.counter += 1; obj.off('event', incr1); obj.trigger('event'); };
var incr2 = function(){ obj.counter += 1; };
obj.on('event', incr1);
obj.on('event', incr2);
obj.trigger('event');
equal(obj.counter, 3, 'counter should have been incremented three times');
assert.equal(obj.counter, 3, 'counter should have been incremented three times');
});
test("callback list is not altered during trigger", 2, function () {
QUnit.test('callback list is not altered during trigger', function(assert) {
assert.expect(2);
var counter = 0, obj = _.extend({}, Backbone.Events);
var incr = function(){ counter++; };
obj.on('event', function(){ obj.on('event', incr).on('all', incr); })
.trigger('event');
equal(counter, 0, 'bind does not alter callback list');
obj.off()
.on('event', function(){ obj.off('event', incr).off('all', incr); })
.on('event', incr)
.on('all', incr)
.trigger('event');
equal(counter, 2, 'unbind does not alter callback list');
var incrOn = function(){ obj.on('event all', incr); };
var incrOff = function(){ obj.off('event all', incr); };
obj.on('event all', incrOn).trigger('event');
assert.equal(counter, 0, 'on does not alter callback list');
obj.off().on('event', incrOff).on('event all', incr).trigger('event');
assert.equal(counter, 2, 'off does not alter callback list');
});
test("#1282 - 'all' callback list is retrieved after each event.", 1, function() {
QUnit.test("#1282 - 'all' callback list is retrieved after each event.", function(assert) {
assert.expect(1);
var counter = 0;
var obj = _.extend({}, Backbone.Events);
var incr = function(){ counter++; };
@@ -296,61 +466,68 @@
obj.on('y', incr).on('all', incr);
})
.trigger('x y');
strictEqual(counter, 2);
assert.strictEqual(counter, 2);
});
test("if no callback is provided, `on` is a noop", 0, function() {
QUnit.test('if no callback is provided, `on` is a noop', function(assert) {
assert.expect(0);
_.extend({}, Backbone.Events).on('test').trigger('test');
});
test("if callback is truthy but not a function, `on` should throw an error just like jQuery", 1, function() {
QUnit.test('if callback is truthy but not a function, `on` should throw an error just like jQuery', function(assert) {
assert.expect(1);
var view = _.extend({}, Backbone.Events).on('test', 'noop');
raises(function() {
assert.raises(function() {
view.trigger('test');
});
});
test("remove all events for a specific context", 4, function() {
QUnit.test('remove all events for a specific context', function(assert) {
assert.expect(4);
var obj = _.extend({}, Backbone.Events);
obj.on('x y all', function() { ok(true); });
obj.on('x y all', function() { ok(false); }, obj);
obj.on('x y all', function() { assert.ok(true); });
obj.on('x y all', function() { assert.ok(false); }, obj);
obj.off(null, null, obj);
obj.trigger('x y');
});
test("remove all events for a specific callback", 4, function() {
QUnit.test('remove all events for a specific callback', function(assert) {
assert.expect(4);
var obj = _.extend({}, Backbone.Events);
var success = function() { ok(true); };
var fail = function() { ok(false); };
var success = function() { assert.ok(true); };
var fail = function() { assert.ok(false); };
obj.on('x y all', success);
obj.on('x y all', fail);
obj.off(null, fail);
obj.trigger('x y');
});
test("#1310 - off does not skip consecutive events", 0, function() {
QUnit.test('#1310 - off does not skip consecutive events', function(assert) {
assert.expect(0);
var obj = _.extend({}, Backbone.Events);
obj.on('event', function() { ok(false); }, obj);
obj.on('event', function() { ok(false); }, obj);
obj.on('event', function() { assert.ok(false); }, obj);
obj.on('event', function() { assert.ok(false); }, obj);
obj.off(null, null, obj);
obj.trigger('event');
});
test("once", 2, function() {
QUnit.test('once', function(assert) {
assert.expect(2);
// Same as the previous test, but we use once rather than having to explicitly unbind
var obj = { counterA: 0, counterB: 0 };
var obj = {counterA: 0, counterB: 0};
_.extend(obj, Backbone.Events);
var incrA = function(){ obj.counterA += 1; obj.trigger('event'); };
var incrB = function(){ obj.counterB += 1; };
obj.once('event', incrA);
obj.once('event', incrB);
obj.trigger('event');
equal(obj.counterA, 1, 'counterA should have only been incremented once.');
equal(obj.counterB, 1, 'counterB should have only been incremented once.');
assert.equal(obj.counterA, 1, 'counterA should have only been incremented once.');
assert.equal(obj.counterB, 1, 'counterB should have only been incremented once.');
});
test("once variant one", 3, function() {
var f = function(){ ok(true); };
QUnit.test('once variant one', function(assert) {
assert.expect(3);
var f = function(){ assert.ok(true); };
var a = _.extend({}, Backbone.Events).once('event', f);
var b = _.extend({}, Backbone.Events).on('event', f);
@@ -361,8 +538,9 @@
b.trigger('event');
});
test("once variant two", 3, function() {
var f = function(){ ok(true); };
QUnit.test('once variant two', function(assert) {
assert.expect(3);
var f = function(){ assert.ok(true); };
var obj = _.extend({}, Backbone.Events);
obj
@@ -372,8 +550,9 @@
.trigger('event');
});
test("once with off", 0, function() {
var f = function(){ ok(true); };
QUnit.test('once with off', function(assert) {
assert.expect(0);
var f = function(){ assert.ok(true); };
var obj = _.extend({}, Backbone.Events);
obj.once('event', f);
@@ -381,8 +560,8 @@
obj.trigger('event');
});
test("once with event maps", function() {
var obj = { counter: 0 };
QUnit.test('once with event maps', function(assert) {
var obj = {counter: 0};
_.extend(obj, Backbone.Events);
var increment = function() {
@@ -396,82 +575,107 @@
}, obj);
obj.trigger('a');
equal(obj.counter, 1);
assert.equal(obj.counter, 1);
obj.trigger('a b');
equal(obj.counter, 2);
assert.equal(obj.counter, 2);
obj.trigger('c');
equal(obj.counter, 3);
assert.equal(obj.counter, 3);
obj.trigger('a b c');
equal(obj.counter, 3);
assert.equal(obj.counter, 3);
});
test("once with off only by context", 0, function() {
QUnit.test('once with off only by context', function(assert) {
assert.expect(0);
var context = {};
var obj = _.extend({}, Backbone.Events);
obj.once('event', function(){ ok(false); }, context);
obj.once('event', function(){ assert.ok(false); }, context);
obj.off(null, null, context);
obj.trigger('event');
});
test("Backbone object inherits Events", function() {
ok(Backbone.on === Backbone.Events.on);
QUnit.test('Backbone object inherits Events', function(assert) {
assert.ok(Backbone.on === Backbone.Events.on);
});
asyncTest("once with asynchronous events", 1, function() {
var func = _.debounce(function() { ok(true); start(); }, 50);
QUnit.test('once with asynchronous events', function(assert) {
var done = assert.async();
assert.expect(1);
var func = _.debounce(function() { assert.ok(true); done(); }, 50);
var obj = _.extend({}, Backbone.Events).once('async', func);
obj.trigger('async');
obj.trigger('async');
});
test("once with multiple events.", 2, function() {
QUnit.test('once with multiple events.', function(assert) {
assert.expect(2);
var obj = _.extend({}, Backbone.Events);
obj.once('x y', function() { ok(true); });
obj.once('x y', function() { assert.ok(true); });
obj.trigger('x y');
});
test("Off during iteration with once.", 2, function() {
QUnit.test('Off during iteration with once.', function(assert) {
assert.expect(2);
var obj = _.extend({}, Backbone.Events);
var f = function(){ this.off('event', f); };
obj.on('event', f);
obj.once('event', function(){});
obj.on('event', function(){ ok(true); });
obj.on('event', function(){ assert.ok(true); });
obj.trigger('event');
obj.trigger('event');
});
test("`once` on `all` should work as expected", 1, function() {
QUnit.test('`once` on `all` should work as expected', function(assert) {
assert.expect(1);
Backbone.once('all', function() {
ok(true);
assert.ok(true);
Backbone.trigger('all');
});
Backbone.trigger('all');
});
test("once without a callback is a noop", 0, function() {
QUnit.test('once without a callback is a noop', function(assert) {
assert.expect(0);
_.extend({}, Backbone.Events).once('event').trigger('event');
});
test("event functions are chainable", function() {
QUnit.test('listenToOnce without a callback is a noop', function(assert) {
assert.expect(0);
var obj = _.extend({}, Backbone.Events);
obj.listenToOnce(obj, 'event').trigger('event');
});
QUnit.test('event functions are chainable', function(assert) {
var obj = _.extend({}, Backbone.Events);
var obj2 = _.extend({}, Backbone.Events);
var fn = function() {};
equal(obj, obj.trigger('noeventssetyet'));
equal(obj, obj.off('noeventssetyet'));
equal(obj, obj.stopListening('noeventssetyet'));
equal(obj, obj.on('a', fn));
equal(obj, obj.once('c', fn));
equal(obj, obj.trigger('a'));
equal(obj, obj.listenTo(obj2, 'a', fn));
equal(obj, obj.listenToOnce(obj2, 'b', fn));
equal(obj, obj.off('a c'));
equal(obj, obj.stopListening(obj2, 'a'));
equal(obj, obj.stopListening());
assert.equal(obj, obj.trigger('noeventssetyet'));
assert.equal(obj, obj.off('noeventssetyet'));
assert.equal(obj, obj.stopListening('noeventssetyet'));
assert.equal(obj, obj.on('a', fn));
assert.equal(obj, obj.once('c', fn));
assert.equal(obj, obj.trigger('a'));
assert.equal(obj, obj.listenTo(obj2, 'a', fn));
assert.equal(obj, obj.listenToOnce(obj2, 'b', fn));
assert.equal(obj, obj.off('a c'));
assert.equal(obj, obj.stopListening(obj2, 'a'));
assert.equal(obj, obj.stopListening());
});
QUnit.test('#3448 - listenToOnce with space-separated events', function(assert) {
assert.expect(2);
var one = _.extend({}, Backbone.Events);
var two = _.extend({}, Backbone.Events);
var count = 1;
one.listenToOnce(two, 'x y', function(n) { assert.ok(n === count++); });
two.trigger('x', 1);
two.trigger('x', 1);
two.trigger('y', 2);
two.trigger('y', 2);
});
})();

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,13 @@
(function() {
module("Backbone.noConflict");
QUnit.module('Backbone.noConflict');
test('noConflict', 2, function() {
QUnit.test('noConflict', function(assert) {
assert.expect(2);
var noconflictBackbone = Backbone.noConflict();
equal(window.Backbone, undefined, 'Returned window.Backbone');
assert.equal(window.Backbone, undefined, 'Returned window.Backbone');
window.Backbone = noconflictBackbone;
equal(window.Backbone, noconflictBackbone, 'Backbone is still pointing to the original Backbone');
assert.equal(window.Backbone, noconflictBackbone, 'Backbone is still pointing to the original Backbone');
});
})();

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
$('body').append(
'<div id="qunit"></div>' +
'<div id="qunit-fixture"></div>'
);

View File

@@ -8,6 +8,8 @@
var pushState = history.pushState;
var replaceState = history.replaceState;
QUnit.config.noglobals = true;
QUnit.testStart(function() {
var env = QUnit.config.current.testEnvironment;

View File

@@ -1,210 +1,239 @@
(function() {
var Library = Backbone.Collection.extend({
url : function() { return '/library'; }
url: function() { return '/library'; }
});
var library;
var attrs = {
title : "The Tempest",
author : "Bill Shakespeare",
length : 123
title: 'The Tempest',
author: 'Bill Shakespeare',
length: 123
};
module("Backbone.sync", {
QUnit.module('Backbone.sync', {
setup : function() {
beforeEach: function(assert) {
library = new Library;
library.create(attrs, {wait: false});
},
teardown: function() {
afterEach: function(assert) {
Backbone.emulateHTTP = false;
}
});
test("read", 4, function() {
QUnit.test('read', function(assert) {
assert.expect(4);
library.fetch();
equal(this.ajaxSettings.url, '/library');
equal(this.ajaxSettings.type, 'GET');
equal(this.ajaxSettings.dataType, 'json');
ok(_.isEmpty(this.ajaxSettings.data));
assert.equal(this.ajaxSettings.url, '/library');
assert.equal(this.ajaxSettings.type, 'GET');
assert.equal(this.ajaxSettings.dataType, 'json');
assert.ok(_.isEmpty(this.ajaxSettings.data));
});
test("passing data", 3, function() {
QUnit.test('passing data', function(assert) {
assert.expect(3);
library.fetch({data: {a: 'a', one: 1}});
equal(this.ajaxSettings.url, '/library');
equal(this.ajaxSettings.data.a, 'a');
equal(this.ajaxSettings.data.one, 1);
assert.equal(this.ajaxSettings.url, '/library');
assert.equal(this.ajaxSettings.data.a, 'a');
assert.equal(this.ajaxSettings.data.one, 1);
});
test("create", 6, function() {
equal(this.ajaxSettings.url, '/library');
equal(this.ajaxSettings.type, 'POST');
equal(this.ajaxSettings.dataType, 'json');
QUnit.test('create', function(assert) {
assert.expect(6);
assert.equal(this.ajaxSettings.url, '/library');
assert.equal(this.ajaxSettings.type, 'POST');
assert.equal(this.ajaxSettings.dataType, 'json');
var data = JSON.parse(this.ajaxSettings.data);
equal(data.title, 'The Tempest');
equal(data.author, 'Bill Shakespeare');
equal(data.length, 123);
assert.equal(data.title, 'The Tempest');
assert.equal(data.author, 'Bill Shakespeare');
assert.equal(data.length, 123);
});
test("update", 7, function() {
QUnit.test('update', function(assert) {
assert.expect(7);
library.first().save({id: '1-the-tempest', author: 'William Shakespeare'});
equal(this.ajaxSettings.url, '/library/1-the-tempest');
equal(this.ajaxSettings.type, 'PUT');
equal(this.ajaxSettings.dataType, 'json');
assert.equal(this.ajaxSettings.url, '/library/1-the-tempest');
assert.equal(this.ajaxSettings.type, 'PUT');
assert.equal(this.ajaxSettings.dataType, 'json');
var data = JSON.parse(this.ajaxSettings.data);
equal(data.id, '1-the-tempest');
equal(data.title, 'The Tempest');
equal(data.author, 'William Shakespeare');
equal(data.length, 123);
assert.equal(data.id, '1-the-tempest');
assert.equal(data.title, 'The Tempest');
assert.equal(data.author, 'William Shakespeare');
assert.equal(data.length, 123);
});
test("update with emulateHTTP and emulateJSON", 7, function() {
QUnit.test('update with emulateHTTP and emulateJSON', function(assert) {
assert.expect(7);
library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'}, {
emulateHTTP: true,
emulateJSON: true
});
equal(this.ajaxSettings.url, '/library/2-the-tempest');
equal(this.ajaxSettings.type, 'POST');
equal(this.ajaxSettings.dataType, 'json');
equal(this.ajaxSettings.data._method, 'PUT');
assert.equal(this.ajaxSettings.url, '/library/2-the-tempest');
assert.equal(this.ajaxSettings.type, 'POST');
assert.equal(this.ajaxSettings.dataType, 'json');
assert.equal(this.ajaxSettings.data._method, 'PUT');
var data = JSON.parse(this.ajaxSettings.data.model);
equal(data.id, '2-the-tempest');
equal(data.author, 'Tim Shakespeare');
equal(data.length, 123);
assert.equal(data.id, '2-the-tempest');
assert.equal(data.author, 'Tim Shakespeare');
assert.equal(data.length, 123);
});
test("update with just emulateHTTP", 6, function() {
QUnit.test('update with just emulateHTTP', function(assert) {
assert.expect(6);
library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'}, {
emulateHTTP: true
});
equal(this.ajaxSettings.url, '/library/2-the-tempest');
equal(this.ajaxSettings.type, 'POST');
equal(this.ajaxSettings.contentType, 'application/json');
assert.equal(this.ajaxSettings.url, '/library/2-the-tempest');
assert.equal(this.ajaxSettings.type, 'POST');
assert.equal(this.ajaxSettings.contentType, 'application/json');
var data = JSON.parse(this.ajaxSettings.data);
equal(data.id, '2-the-tempest');
equal(data.author, 'Tim Shakespeare');
equal(data.length, 123);
assert.equal(data.id, '2-the-tempest');
assert.equal(data.author, 'Tim Shakespeare');
assert.equal(data.length, 123);
});
test("update with just emulateJSON", 6, function() {
QUnit.test('update with just emulateJSON', function(assert) {
assert.expect(6);
library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'}, {
emulateJSON: true
});
equal(this.ajaxSettings.url, '/library/2-the-tempest');
equal(this.ajaxSettings.type, 'PUT');
equal(this.ajaxSettings.contentType, 'application/x-www-form-urlencoded');
assert.equal(this.ajaxSettings.url, '/library/2-the-tempest');
assert.equal(this.ajaxSettings.type, 'PUT');
assert.equal(this.ajaxSettings.contentType, 'application/x-www-form-urlencoded');
var data = JSON.parse(this.ajaxSettings.data.model);
equal(data.id, '2-the-tempest');
equal(data.author, 'Tim Shakespeare');
equal(data.length, 123);
assert.equal(data.id, '2-the-tempest');
assert.equal(data.author, 'Tim Shakespeare');
assert.equal(data.length, 123);
});
test("read model", 3, function() {
QUnit.test('read model', function(assert) {
assert.expect(3);
library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'});
library.first().fetch();
equal(this.ajaxSettings.url, '/library/2-the-tempest');
equal(this.ajaxSettings.type, 'GET');
ok(_.isEmpty(this.ajaxSettings.data));
assert.equal(this.ajaxSettings.url, '/library/2-the-tempest');
assert.equal(this.ajaxSettings.type, 'GET');
assert.ok(_.isEmpty(this.ajaxSettings.data));
});
test("destroy", 3, function() {
QUnit.test('destroy', function(assert) {
assert.expect(3);
library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'});
library.first().destroy({wait: true});
equal(this.ajaxSettings.url, '/library/2-the-tempest');
equal(this.ajaxSettings.type, 'DELETE');
equal(this.ajaxSettings.data, null);
assert.equal(this.ajaxSettings.url, '/library/2-the-tempest');
assert.equal(this.ajaxSettings.type, 'DELETE');
assert.equal(this.ajaxSettings.data, null);
});
test("destroy with emulateHTTP", 3, function() {
QUnit.test('destroy with emulateHTTP', function(assert) {
assert.expect(3);
library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'});
library.first().destroy({
emulateHTTP: true,
emulateJSON: true
});
equal(this.ajaxSettings.url, '/library/2-the-tempest');
equal(this.ajaxSettings.type, 'POST');
equal(JSON.stringify(this.ajaxSettings.data), '{"_method":"DELETE"}');
assert.equal(this.ajaxSettings.url, '/library/2-the-tempest');
assert.equal(this.ajaxSettings.type, 'POST');
assert.equal(JSON.stringify(this.ajaxSettings.data), '{"_method":"DELETE"}');
});
test("urlError", 2, function() {
QUnit.test('urlError', function(assert) {
assert.expect(2);
var model = new Backbone.Model();
raises(function() {
assert.raises(function() {
model.fetch();
});
model.fetch({url: '/one/two'});
equal(this.ajaxSettings.url, '/one/two');
assert.equal(this.ajaxSettings.url, '/one/two');
});
test("#1052 - `options` is optional.", 0, function() {
QUnit.test('#1052 - `options` is optional.', function(assert) {
assert.expect(0);
var model = new Backbone.Model();
model.url = '/test';
Backbone.sync('create', model);
});
test("Backbone.ajax", 1, function() {
QUnit.test('Backbone.ajax', function(assert) {
assert.expect(1);
Backbone.ajax = function(settings){
strictEqual(settings.url, '/test');
assert.strictEqual(settings.url, '/test');
};
var model = new Backbone.Model();
model.url = '/test';
Backbone.sync('create', model);
});
test("Call provided error callback on error.", 1, function() {
QUnit.test('Call provided error callback on error.', function(assert) {
assert.expect(1);
var model = new Backbone.Model;
model.url = '/test';
Backbone.sync('read', model, {
error: function() { ok(true); }
error: function() { assert.ok(true); }
});
this.ajaxSettings.error();
});
test('Use Backbone.emulateHTTP as default.', 2, function() {
QUnit.test('Use Backbone.emulateHTTP as default.', function(assert) {
assert.expect(2);
var model = new Backbone.Model;
model.url = '/test';
Backbone.emulateHTTP = true;
model.sync('create', model);
strictEqual(this.ajaxSettings.emulateHTTP, true);
assert.strictEqual(this.ajaxSettings.emulateHTTP, true);
Backbone.emulateHTTP = false;
model.sync('create', model);
strictEqual(this.ajaxSettings.emulateHTTP, false);
assert.strictEqual(this.ajaxSettings.emulateHTTP, false);
});
test('Use Backbone.emulateJSON as default.', 2, function() {
QUnit.test('Use Backbone.emulateJSON as default.', function(assert) {
assert.expect(2);
var model = new Backbone.Model;
model.url = '/test';
Backbone.emulateJSON = true;
model.sync('create', model);
strictEqual(this.ajaxSettings.emulateJSON, true);
assert.strictEqual(this.ajaxSettings.emulateJSON, true);
Backbone.emulateJSON = false;
model.sync('create', model);
strictEqual(this.ajaxSettings.emulateJSON, false);
assert.strictEqual(this.ajaxSettings.emulateJSON, false);
});
test("#1756 - Call user provided beforeSend function.", 4, function() {
QUnit.test('#1756 - Call user provided beforeSend function.', function(assert) {
assert.expect(4);
Backbone.emulateHTTP = true;
var model = new Backbone.Model;
model.url = '/test';
var xhr = {
setRequestHeader: function(header, value) {
strictEqual(header, 'X-HTTP-Method-Override');
strictEqual(value, 'DELETE');
assert.strictEqual(header, 'X-HTTP-Method-Override');
assert.strictEqual(value, 'DELETE');
}
};
model.sync('delete', model, {
beforeSend: function(_xhr) {
ok(_xhr === xhr);
assert.ok(_xhr === xhr);
return false;
}
});
strictEqual(this.ajaxSettings.beforeSend(xhr), false);
assert.strictEqual(this.ajaxSettings.beforeSend(xhr), false);
});
QUnit.test('#2928 - Pass along `textStatus` and `errorThrown`.', function(assert) {
assert.expect(2);
var model = new Backbone.Model;
model.url = '/test';
model.on('error', function(m, xhr, options) {
assert.strictEqual(options.textStatus, 'textStatus');
assert.strictEqual(options.errorThrown, 'errorThrown');
});
model.fetch();
this.ajaxSettings.error({}, 'textStatus', 'errorThrown');
});
})();

View File

@@ -2,67 +2,109 @@
var view;
module("Backbone.View", {
QUnit.module('Backbone.View', {
beforeEach: function(assert) {
$('#qunit-fixture').append(
'<div id="testElement"><h1>Test</h1></div>'
);
setup: function() {
view = new Backbone.View({
id : 'test-view',
className : 'test-view',
other : 'non-special-option'
id: 'test-view',
className: 'test-view',
other: 'non-special-option'
});
}
});
test("constructor", 3, function() {
equal(view.el.id, 'test-view');
equal(view.el.className, 'test-view');
equal(view.el.other, void 0);
QUnit.test('constructor', function(assert) {
assert.expect(3);
assert.equal(view.el.id, 'test-view');
assert.equal(view.el.className, 'test-view');
assert.equal(view.el.other, void 0);
});
test("jQuery", 1, function() {
var view = new Backbone.View;
view.setElement('<p><a><b>test</b></a></p>');
strictEqual(view.$('a b').html(), 'test');
QUnit.test('$', function(assert) {
assert.expect(2);
var myView = new Backbone.View;
myView.setElement('<p><a><b>test</b></a></p>');
var result = myView.$('a b');
assert.strictEqual(result[0].innerHTML, 'test');
assert.ok(result.length === +result.length);
});
test("initialize", 1, function() {
QUnit.test('$el', function(assert) {
assert.expect(3);
var myView = new Backbone.View;
myView.setElement('<p><a><b>test</b></a></p>');
assert.strictEqual(myView.el.nodeType, 1);
assert.ok(myView.$el instanceof Backbone.$);
assert.strictEqual(myView.$el[0], myView.el);
});
QUnit.test('initialize', function(assert) {
assert.expect(1);
var View = Backbone.View.extend({
initialize: function() {
this.one = 1;
}
});
strictEqual(new View().one, 1);
assert.strictEqual(new View().one, 1);
});
test("delegateEvents", 6, function() {
QUnit.test('render', function(assert) {
assert.expect(1);
var myView = new Backbone.View;
assert.equal(myView.render(), myView, '#render returns the view instance');
});
QUnit.test('delegateEvents', function(assert) {
assert.expect(6);
var counter1 = 0, counter2 = 0;
var view = new Backbone.View({el: '#testElement'});
view.increment = function(){ counter1++; };
view.$el.on('click', function(){ counter2++; });
var myView = new Backbone.View({el: '#testElement'});
myView.increment = function(){ counter1++; };
myView.$el.on('click', function(){ counter2++; });
var events = {'click h1': 'increment'};
view.delegateEvents(events);
view.$('h1').trigger('click');
equal(counter1, 1);
equal(counter2, 1);
myView.delegateEvents(events);
myView.$('h1').trigger('click');
assert.equal(counter1, 1);
assert.equal(counter2, 1);
view.$('h1').trigger('click');
equal(counter1, 2);
equal(counter2, 2);
myView.$('h1').trigger('click');
assert.equal(counter1, 2);
assert.equal(counter2, 2);
view.delegateEvents(events);
view.$('h1').trigger('click');
equal(counter1, 3);
equal(counter2, 3);
myView.delegateEvents(events);
myView.$('h1').trigger('click');
assert.equal(counter1, 3);
assert.equal(counter2, 3);
});
test("delegateEvents allows functions for callbacks", 3, function() {
var view = new Backbone.View({el: '<p></p>'});
view.counter = 0;
QUnit.test('delegate', function(assert) {
assert.expect(3);
var myView = new Backbone.View({el: '#testElement'});
myView.delegate('click', 'h1', function() {
assert.ok(true);
});
myView.delegate('click', function() {
assert.ok(true);
});
myView.$('h1').trigger('click');
assert.equal(myView.delegate(), myView, '#delegate returns the view instance');
});
QUnit.test('delegateEvents allows functions for callbacks', function(assert) {
assert.expect(3);
var myView = new Backbone.View({el: '<p></p>'});
myView.counter = 0;
var events = {
click: function() {
@@ -70,76 +112,148 @@
}
};
view.delegateEvents(events);
view.$el.trigger('click');
equal(view.counter, 1);
myView.delegateEvents(events);
myView.$el.trigger('click');
assert.equal(myView.counter, 1);
view.$el.trigger('click');
equal(view.counter, 2);
myView.$el.trigger('click');
assert.equal(myView.counter, 2);
view.delegateEvents(events);
view.$el.trigger('click');
equal(view.counter, 3);
myView.delegateEvents(events);
myView.$el.trigger('click');
assert.equal(myView.counter, 3);
});
test("delegateEvents ignore undefined methods", 0, function() {
var view = new Backbone.View({el: '<p></p>'});
view.delegateEvents({'click': 'undefinedMethod'});
view.$el.trigger('click');
QUnit.test('delegateEvents ignore undefined methods', function(assert) {
assert.expect(0);
var myView = new Backbone.View({el: '<p></p>'});
myView.delegateEvents({'click': 'undefinedMethod'});
myView.$el.trigger('click');
});
test("undelegateEvents", 6, function() {
QUnit.test('undelegateEvents', function(assert) {
assert.expect(7);
var counter1 = 0, counter2 = 0;
var view = new Backbone.View({el: '#testElement'});
view.increment = function(){ counter1++; };
view.$el.on('click', function(){ counter2++; });
var myView = new Backbone.View({el: '#testElement'});
myView.increment = function(){ counter1++; };
myView.$el.on('click', function(){ counter2++; });
var events = {'click h1': 'increment'};
view.delegateEvents(events);
view.$('h1').trigger('click');
equal(counter1, 1);
equal(counter2, 1);
myView.delegateEvents(events);
myView.$('h1').trigger('click');
assert.equal(counter1, 1);
assert.equal(counter2, 1);
view.undelegateEvents();
view.$('h1').trigger('click');
equal(counter1, 1);
equal(counter2, 2);
myView.undelegateEvents();
myView.$('h1').trigger('click');
assert.equal(counter1, 1);
assert.equal(counter2, 2);
view.delegateEvents(events);
view.$('h1').trigger('click');
equal(counter1, 2);
equal(counter2, 3);
myView.delegateEvents(events);
myView.$('h1').trigger('click');
assert.equal(counter1, 2);
assert.equal(counter2, 3);
assert.equal(myView.undelegateEvents(), myView, '#undelegateEvents returns the view instance');
});
test("_ensureElement with DOM node el", 1, function() {
QUnit.test('undelegate', function(assert) {
assert.expect(1);
var myView = new Backbone.View({el: '#testElement'});
myView.delegate('click', function() { assert.ok(false); });
myView.delegate('click', 'h1', function() { assert.ok(false); });
myView.undelegate('click');
myView.$('h1').trigger('click');
myView.$el.trigger('click');
assert.equal(myView.undelegate(), myView, '#undelegate returns the view instance');
});
QUnit.test('undelegate with passed handler', function(assert) {
assert.expect(1);
var myView = new Backbone.View({el: '#testElement'});
var listener = function() { assert.ok(false); };
myView.delegate('click', listener);
myView.delegate('click', function() { assert.ok(true); });
myView.undelegate('click', listener);
myView.$el.trigger('click');
});
QUnit.test('undelegate with selector', function(assert) {
assert.expect(2);
var myView = new Backbone.View({el: '#testElement'});
myView.delegate('click', function() { assert.ok(true); });
myView.delegate('click', 'h1', function() { assert.ok(false); });
myView.undelegate('click', 'h1');
myView.$('h1').trigger('click');
myView.$el.trigger('click');
});
QUnit.test('undelegate with handler and selector', function(assert) {
assert.expect(2);
var myView = new Backbone.View({el: '#testElement'});
myView.delegate('click', function() { assert.ok(true); });
var handler = function(){ assert.ok(false); };
myView.delegate('click', 'h1', handler);
myView.undelegate('click', 'h1', handler);
myView.$('h1').trigger('click');
myView.$el.trigger('click');
});
QUnit.test('tagName can be provided as a string', function(assert) {
assert.expect(1);
var View = Backbone.View.extend({
tagName: 'span'
});
assert.equal(new View().el.tagName, 'SPAN');
});
QUnit.test('tagName can be provided as a function', function(assert) {
assert.expect(1);
var View = Backbone.View.extend({
tagName: function() {
return 'p';
}
});
assert.ok(new View().$el.is('p'));
});
QUnit.test('_ensureElement with DOM node el', function(assert) {
assert.expect(1);
var View = Backbone.View.extend({
el: document.body
});
equal(new View().el, document.body);
assert.equal(new View().el, document.body);
});
test("_ensureElement with string el", 3, function() {
QUnit.test('_ensureElement with string el', function(assert) {
assert.expect(3);
var View = Backbone.View.extend({
el: "body"
el: 'body'
});
strictEqual(new View().el, document.body);
assert.strictEqual(new View().el, document.body);
View = Backbone.View.extend({
el: "#testElement > h1"
el: '#testElement > h1'
});
strictEqual(new View().el, $("#testElement > h1").get(0));
assert.strictEqual(new View().el, $('#testElement > h1').get(0));
View = Backbone.View.extend({
el: "#nonexistent"
el: '#nonexistent'
});
ok(!new View().el);
assert.ok(!new View().el);
});
test("with className and id functions", 2, function() {
QUnit.test('with className and id functions', function(assert) {
assert.expect(2);
var View = Backbone.View.extend({
className: function() {
return 'className';
@@ -149,33 +263,54 @@
}
});
strictEqual(new View().el.className, 'className');
strictEqual(new View().el.id, 'id');
assert.strictEqual(new View().el.className, 'className');
assert.strictEqual(new View().el.id, 'id');
});
test("with attributes", 2, function() {
QUnit.test('with attributes', function(assert) {
assert.expect(2);
var View = Backbone.View.extend({
attributes: {
id: 'id',
'id': 'id',
'class': 'class'
}
});
strictEqual(new View().el.className, 'class');
strictEqual(new View().el.id, 'id');
assert.strictEqual(new View().el.className, 'class');
assert.strictEqual(new View().el.id, 'id');
});
test("with attributes as a function", 1, function() {
QUnit.test('with attributes as a function', function(assert) {
assert.expect(1);
var View = Backbone.View.extend({
attributes: function() {
return {'class': 'dynamic'};
}
});
strictEqual(new View().el.className, 'dynamic');
assert.strictEqual(new View().el.className, 'dynamic');
});
test("multiple views per element", 3, function() {
QUnit.test('should default to className/id properties', function(assert) {
assert.expect(4);
var View = Backbone.View.extend({
className: 'backboneClass',
id: 'backboneId',
attributes: {
'class': 'attributeClass',
'id': 'attributeId'
}
});
var myView = new View;
assert.strictEqual(myView.el.className, 'backboneClass');
assert.strictEqual(myView.el.id, 'backboneId');
assert.strictEqual(myView.$el.attr('class'), 'backboneClass');
assert.strictEqual(myView.$el.attr('id'), 'backboneId');
});
QUnit.test('multiple views per element', function(assert) {
assert.expect(3);
var count = 0;
var $el = $('<p></p>');
@@ -189,122 +324,112 @@
});
var view1 = new View;
$el.trigger("click");
equal(1, count);
$el.trigger('click');
assert.equal(1, count);
var view2 = new View;
$el.trigger("click");
equal(3, count);
$el.trigger('click');
assert.equal(3, count);
view1.delegateEvents();
$el.trigger("click");
equal(5, count);
$el.trigger('click');
assert.equal(5, count);
});
test("custom events, with namespaces", 2, function() {
var count = 0;
QUnit.test('custom events', function(assert) {
assert.expect(2);
var View = Backbone.View.extend({
el: $('body'),
events: function() {
return {"fake$event.namespaced": "run"};
},
run: function() {
count++;
events: {
fake$event: function() { assert.ok(true); }
}
});
var view = new View;
var myView = new View;
$('body').trigger('fake$event').trigger('fake$event');
equal(count, 2);
$('body').off('.namespaced');
$('body').off('fake$event');
$('body').trigger('fake$event');
equal(count, 2);
});
test("#1048 - setElement uses provided object.", 2, function() {
QUnit.test('#1048 - setElement uses provided object.', function(assert) {
assert.expect(2);
var $el = $('body');
var view = new Backbone.View({el: $el});
ok(view.$el === $el);
var myView = new Backbone.View({el: $el});
assert.ok(myView.$el === $el);
view.setElement($el = $($el));
ok(view.$el === $el);
myView.setElement($el = $($el));
assert.ok(myView.$el === $el);
});
test("#986 - Undelegate before changing element.", 1, function() {
QUnit.test('#986 - Undelegate before changing element.', function(assert) {
assert.expect(1);
var button1 = $('<button></button>');
var button2 = $('<button></button>');
var View = Backbone.View.extend({
events: {
click: function(e) {
ok(view.el === e.target);
assert.ok(myView.el === e.target);
}
}
});
var view = new View({el: button1});
view.setElement(button2);
var myView = new View({el: button1});
myView.setElement(button2);
button1.trigger('click');
button2.trigger('click');
});
test("#1172 - Clone attributes object", 2, function() {
QUnit.test('#1172 - Clone attributes object', function(assert) {
assert.expect(2);
var View = Backbone.View.extend({
attributes: {foo: 'bar'}
});
var view1 = new View({id: 'foo'});
strictEqual(view1.el.id, 'foo');
assert.strictEqual(view1.el.id, 'foo');
var view2 = new View();
ok(!view2.el.id);
assert.ok(!view2.el.id);
});
test("#1228 - tagName can be provided as a function", 1, function() {
var View = Backbone.View.extend({
tagName: function() {
return 'p';
}
});
ok(new View().$el.is('p'));
});
test("views stopListening", 0, function() {
QUnit.test('views stopListening', function(assert) {
assert.expect(0);
var View = Backbone.View.extend({
initialize: function() {
this.listenTo(this.model, 'all x', function(){ ok(false); }, this);
this.listenTo(this.collection, 'all x', function(){ ok(false); }, this);
this.listenTo(this.model, 'all x', function(){ assert.ok(false); });
this.listenTo(this.collection, 'all x', function(){ assert.ok(false); });
}
});
var view = new View({
var myView = new View({
model: new Backbone.Model,
collection: new Backbone.Collection
});
view.stopListening();
view.model.trigger('x');
view.collection.trigger('x');
myView.stopListening();
myView.model.trigger('x');
myView.collection.trigger('x');
});
test("Provide function for el.", 2, function() {
QUnit.test('Provide function for el.', function(assert) {
assert.expect(2);
var View = Backbone.View.extend({
el: function() {
return "<p><a></a></p>";
return '<p><a></a></p>';
}
});
var view = new View;
ok(view.$el.is('p'));
ok(view.$el.has('a'));
var myView = new View;
assert.ok(myView.$el.is('p'));
assert.ok(myView.$el.has('a'));
});
test("events passed in options", 1, function() {
QUnit.test('events passed in options', function(assert) {
assert.expect(1);
var counter = 0;
var View = Backbone.View.extend({
@@ -314,14 +439,52 @@
}
});
var view = new View({
var myView = new View({
events: {
'click h1': 'increment'
}
});
view.$('h1').trigger('click').trigger('click');
equal(counter, 2);
myView.$('h1').trigger('click').trigger('click');
assert.equal(counter, 2);
});
QUnit.test('remove', function(assert) {
assert.expect(2);
var myView = new Backbone.View;
document.body.appendChild(view.el);
myView.delegate('click', function() { assert.ok(false); });
myView.listenTo(myView, 'all x', function() { assert.ok(false); });
assert.equal(myView.remove(), myView, '#remove returns the view instance');
myView.$el.trigger('click');
myView.trigger('x');
// In IE8 and below, parentNode still exists but is not document.body.
assert.notEqual(myView.el.parentNode, document.body);
});
QUnit.test('setElement', function(assert) {
assert.expect(3);
var myView = new Backbone.View({
events: {
click: function() { assert.ok(false); }
}
});
myView.events = {
click: function() { assert.ok(true); }
};
var oldEl = myView.el;
var $oldEl = myView.$el;
myView.setElement(document.createElement('div'));
$oldEl.click();
myView.$el.click();
assert.notEqual(oldEl, myView.el);
assert.notEqual($oldEl, myView.$el);
});
})();

View File

@@ -1,22 +0,0 @@
Copyright 2010-2015 Mathias Bynens <http://mathiasbynens.be/>
Based on JSLitmus.js, copyright Robert Kieffer <http://broofa.com/>
Modified by John-David Dalton <http://allyoucanleet.com/>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

File diff suppressed because it is too large Load Diff

Binary file not shown.

0
vendor/firebug-lite/license.txt vendored Executable file → Normal file
View File

0
vendor/firebug-lite/skin/xp/blank.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 43 B

After

Width:  |  Height:  |  Size: 43 B

0
vendor/firebug-lite/skin/xp/buttonBg.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 167 B

After

Width:  |  Height:  |  Size: 167 B

0
vendor/firebug-lite/skin/xp/buttonBgHover.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 171 B

After

Width:  |  Height:  |  Size: 171 B

0
vendor/firebug-lite/skin/xp/debugger.css vendored Executable file → Normal file
View File

0
vendor/firebug-lite/skin/xp/detach.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 655 B

After

Width:  |  Height:  |  Size: 655 B

0
vendor/firebug-lite/skin/xp/detachHover.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 586 B

After

Width:  |  Height:  |  Size: 586 B

0
vendor/firebug-lite/skin/xp/disable.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 340 B

After

Width:  |  Height:  |  Size: 340 B

0
vendor/firebug-lite/skin/xp/disable.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 543 B

After

Width:  |  Height:  |  Size: 543 B

0
vendor/firebug-lite/skin/xp/disableHover.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 344 B

After

Width:  |  Height:  |  Size: 344 B

0
vendor/firebug-lite/skin/xp/disableHover.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 512 B

After

Width:  |  Height:  |  Size: 512 B

0
vendor/firebug-lite/skin/xp/down.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 637 B

After

Width:  |  Height:  |  Size: 637 B

0
vendor/firebug-lite/skin/xp/downActive.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 543 B

After

Width:  |  Height:  |  Size: 543 B

0
vendor/firebug-lite/skin/xp/downHover.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 526 B

After

Width:  |  Height:  |  Size: 526 B

0
vendor/firebug-lite/skin/xp/errorIcon-sm.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 447 B

After

Width:  |  Height:  |  Size: 447 B

0
vendor/firebug-lite/skin/xp/errorIcon.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 365 B

After

Width:  |  Height:  |  Size: 365 B

0
vendor/firebug-lite/skin/xp/errorIcon.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 457 B

After

Width:  |  Height:  |  Size: 457 B

28
vendor/firebug-lite/skin/xp/firebug-1.3a2.css vendored Executable file → Normal file
View File

@@ -70,7 +70,7 @@ html, body {
body {
font-family: Lucida Grande, Tahoma, sans-serif;
font-size: 11px;
background: #fff;
background: #fff;
}
.clear {
@@ -103,7 +103,7 @@ body {
border: 1px solid #ccc;
margin: 0 5px 0 0;
background: #fff url(search.png) no-repeat 4px 2px;
padding-left: 20px;
padding-left: 20px;
font-size: 11px;
}
@@ -124,7 +124,7 @@ body {
height: 14px;
background: url(errorIcon.png) no-repeat;
color: #f00;
font-weight: bold;
font-weight: bold;
}
#fbMiniErrors {
@@ -139,7 +139,7 @@ body {
margin: 3px 4px 0;
height: 20px;
width: 20px;
float: right;
float: right;
background: url(sprite.png) 0 -135px;
cursor: pointer;
}
@@ -192,10 +192,10 @@ body {
}
/************************************************************************************************
Sub-Layout
Sub-Layout
*************************************************************************************************/
/* fbToolbar
/* fbToolbar
*************************************************************************************************/
#fbToolbarIcon {
float: left;
@@ -237,7 +237,7 @@ body {
position: relative;
top: 5px;
line-height: 19px;
cursor: default;
cursor: default;
}
.fbToolbarSeparator{
@@ -262,7 +262,7 @@ body {
.fbStatusBar span a:hover {
color: blue;
cursor: pointer;
cursor: pointer;
}
@@ -307,7 +307,7 @@ body {
padding-left: 10px;
}
/* body
/* body
*************************************************************************************************/
.fbPanel {
display: none;
@@ -340,7 +340,7 @@ body {
visibility: hidden !important;
}
/* fbBottom
/* fbBottom
*************************************************************************************************/
#fbCommand {
@@ -391,7 +391,7 @@ div.fbFitHeight {
Layout Controls
*************************************************************************************************/
/* fbToolbar buttons
/* fbToolbar buttons
*************************************************************************************************/
#fbWindowButtons a {
font-size: 1px;
@@ -420,7 +420,7 @@ div.fbFitHeight {
background: url(sprite.png) -48px -119px;
}
/* fbPanelBarBox tabs
/* fbPanelBarBox tabs
*************************************************************************************************/
.fbTab {
text-decoration: none;
@@ -475,7 +475,7 @@ a.fbTab:hover .fbTabR {
background: url(sprite.png) -8px -96px !important;
}
/* splitters
/* splitters
*************************************************************************************************/
#fbHSplitter {
position: absolute;
@@ -571,7 +571,7 @@ div.objectBox-element {
color: #fff !important;
}
/* Webkit CSS Hack - bug in "highlight" named color */
/* Webkit CSS Hack - bug in "highlight" named color */
@media screen and (-webkit-min-device-pixel-ratio:0) {
.selectedElement{
background: #316AC5;

0
vendor/firebug-lite/skin/xp/firebug.IE6.css vendored Executable file → Normal file
View File

68
vendor/firebug-lite/skin/xp/firebug.css vendored Executable file → Normal file
View File

@@ -136,10 +136,10 @@ h1.groupHeader {
position: relative;
top: -7px;
left: -5px;
outline: none;
resize: none;
/*
_border: 1px solid #999 !important;
_padding: 1px !important;
@@ -311,17 +311,17 @@ h1.groupHeader {
outline: none;
background-color: transparent
}
.useA11y .a11yCSSView .focusRow:focus .cssSelector,
.useA11y .a11yCSSView .focusRow:focus .cssPropName,
.useA11y .a11yCSSView .focusRow:focus .cssSelector,
.useA11y .a11yCSSView .focusRow:focus .cssPropName,
.useA11y .a11yCSSView .focusRow:focus .cssPropValue,
.useA11y .a11yCSSView .computedStyleRow:focus,
.useA11y .a11yCSSView .computedStyleRow:focus,
.useA11y .a11yCSSView .groupHeader:focus {
outline: 2px solid #FF9933;
outline-offset: -2px;
background-color: #FFFFD6;
}
.useA11y .a11yCSSView .groupHeader:focus {
outline-offset: -2px;
}
@@ -731,7 +731,7 @@ h1.groupHeader {
/* Time Info tip */
.timeInfoTip {
width: 150px;
width: 150px;
height: 40px
}
@@ -944,7 +944,7 @@ h1.groupHeader {
/*overflow-x: auto; HTML is damaged in case of big (2-3MB) responses */
}
/* replaced by .netInfoTextSelected for IE6 support
/* replaced by .netInfoTextSelected for IE6 support
.netInfoText[selected="true"] {
display: block;
}
@@ -963,7 +963,7 @@ h1.groupHeader {
}
.netInfoPostText .netInfoParamName {
width: 1px; /* Google Chrome need this otherwise the first column of
width: 1px; /* Google Chrome need this otherwise the first column of
the post variables table will be larger than expected */
}
@@ -1148,7 +1148,7 @@ h1.groupHeader {
}
* html .opened .spyHead .spyTitle,
* html .opened .logGroupLabel,
* html .opened .logGroupLabel,
* html .opened .memberLabelCell .memberLabel {
background-image: url(tree_close.gif);
background-repeat: no-repeat;
@@ -1677,7 +1677,7 @@ h1.groupHeader {
/*
.logRow-errorMessage > .hasTwisty > .errorTitle,
.logRow-spy .spyHead .spyTitle,
.logGroup > .logRow
.logGroup > .logRow
*/
.logRow-errorMessage .hasTwisty .errorTitle,
.logRow-spy .spyHead .spyTitle,
@@ -2056,11 +2056,11 @@ h1.groupHeader {
width: 10px;
height: 10px;
margin-top: 6px;
background: url(tabMenuTarget.png);
background: url(tabMenuTarget.png);
}
.fbTabMenuTarget:hover {
background: url(tabMenuTargetHover.png);
background: url(tabMenuTargetHover.png);
}
.fbShadow {
@@ -2098,7 +2098,7 @@ h1.groupHeader {
padding: 1px 18px 0;
text-decoration: none;
color: #000;
cursor: default;
cursor: default;
background: #ACA899;
margin: 4px 0;
}
@@ -2149,7 +2149,7 @@ h1.groupHeader {
}
.fbMenuShortcut {
padding-right: 85px;
padding-right: 85px;
}
.fbMenuShortcutKey {
@@ -2274,7 +2274,7 @@ h1.groupHeader {
margin: 0;
padding: 0;
overflow: hidden;
font-family: Lucida Grande, Tahoma, sans-serif;
font-size: 11px;
background: #fff;
@@ -2311,7 +2311,7 @@ h1.groupHeader {
margin: 0 5px 0 0;
background: #fff url(search.png) no-repeat 4px 2px !important;
background: #fff url(search.gif) no-repeat 4px 2px;
padding-left: 20px;
padding-left: 20px;
font-size: 11px;
}
@@ -2333,7 +2333,7 @@ h1.groupHeader {
background: url(errorIcon.png) no-repeat !important;
background: url(errorIcon.gif) no-repeat;
color: #f00;
font-weight: bold;
font-weight: bold;
}
#fbMiniErrors {
@@ -2348,7 +2348,7 @@ h1.groupHeader {
margin: 3px 4px 0;
height: 20px;
width: 20px;
float: right;
float: right;
background: url(sprite.png) 0 -135px;
cursor: pointer;
}
@@ -2403,10 +2403,10 @@ h1.groupHeader {
}
/************************************************************************************************
Sub-Layout
Sub-Layout
*************************************************************************************************/
/* fbToolbar
/* fbToolbar
*************************************************************************************************/
#fbToolbarIcon {
float: left;
@@ -2472,7 +2472,7 @@ h1.groupHeader {
#fbStatusBarBox {
top: 4px;
cursor: default;
cursor: default;
}
.fbToolbarSeparator {
@@ -2500,7 +2500,7 @@ h1.groupHeader {
.fbStatusBar a:hover {
color: blue;
cursor: pointer;
cursor: pointer;
}
@@ -2545,7 +2545,7 @@ h1.groupHeader {
padding-left: 4px;
}
/* body
/* body
*************************************************************************************************/
.fbPanel {
display: none;
@@ -2609,7 +2609,7 @@ h1.groupHeader {
position: absolute;
right: 2px;
bottom: 3px;
z-index: 99;
}
@@ -2624,7 +2624,7 @@ h1.groupHeader {
visibility: hidden !important;
}
/* fbBottom
/* fbBottom
*************************************************************************************************/
#fbCommand {
@@ -2689,7 +2689,7 @@ div.fbFitHeight {
Layout Controls
*************************************************************************************************/
/* fbToolbar buttons
/* fbToolbar buttons
*************************************************************************************************/
.fbSmallButton {
overflow: hidden;
@@ -2729,7 +2729,7 @@ div.fbFitHeight {
}
/* fbPanelBarBox tabs
/* fbPanelBarBox tabs
*************************************************************************************************/
.fbTab {
text-decoration: none;
@@ -2785,7 +2785,7 @@ a.fbTab:hover .fbTabR {
background: url(sprite.png) -8px -96px !important;
}
/* splitters
/* splitters
*************************************************************************************************/
#fbHSplitter {
position: fixed;
@@ -2888,7 +2888,7 @@ div.objectBox-element {
position: relative;
}
/* Webkit CSS Hack - bug in "highlight" named color */
/* Webkit CSS Hack - bug in "highlight" named color */
@media screen and (-webkit-min-device-pixel-ratio:0) {
.selectedElement{
background: #316AC5;
@@ -2903,7 +2903,7 @@ div.objectBox-element {
}
/* TODO: remove this? */
/* TODO: xxxpedro - IE need this in windowless mode (cnn.com) check if the issue is related to
/* TODO: xxxpedro - IE need this in windowless mode (cnn.com) check if the issue is related to
position. if so, override it at chrome.js initialization when creating the div */
.logRow {
position: relative;
@@ -2939,9 +2939,9 @@ position. if so, override it at chrome.js initialization when creating the div *
.objectBox-string {
color: red;
/* TODO: xxxpedro make long strings break line */
/*white-space: pre; */
/*white-space: pre; */
}
.objectBox-number {

80
vendor/firebug-lite/skin/xp/firebug.html vendored Executable file → Normal file
View File

@@ -14,71 +14,71 @@
<tr>
<!-- Interface - Top Area -->
<td id="fbTop" colspan="2">
<!--
<!--
<div>
--><!-- <span id="fbToolbarErrors" class="fbErrors">2 errors</span> --><!--
--><!-- <span id="fbToolbarErrors" class="fbErrors">2 errors</span> --><!--
<input type="text" id="fbToolbarSearch" />
</div>
-->
<!-- Window Buttons -->
<div id="fbWindowButtons">
<a id="fbWindow_btDeactivate" class="fbSmallButton fbHover" title="Deactivate Firebug for this web page">&nbsp;</a>
<a id="fbWindow_btDetach" class="fbSmallButton fbHover" title="Open Firebug in popup window">&nbsp;</a>
<a id="fbWindow_btClose" class="fbSmallButton fbHover" title="Minimize Firebug">&nbsp;</a>
</div>
<!-- Toolbar buttons and Status Bar -->
<div id="fbToolbar">
<div id="fbToolbarContent">
<!-- Firebug Button -->
<span id="fbToolbarIcon">
<a id="fbFirebugButton" class="fbIconButton" class="fbHover" target="_blank">&nbsp;</a>
</span>
<!--
<!--
<span id="fbLeftToolbarErrors" class="fbErrors">2 errors</span>
-->
<!-- Toolbar Buttons -->
<span id="fbToolbarButtons">
<!-- Fixed Toolbar Buttons -->
<span id="fbFixedButtons">
<a id="fbChrome_btInspect" class="fbButton fbHover" title="Click an element in the page to inspect">Inspect</a>
</span>
<!-- Console Panel Toolbar Buttons -->
<span id="fbConsoleButtons" class="fbToolbarButtons">
<a id="fbConsole_btClear" class="fbButton fbHover" title="Clear the console">Clear</a>
</span>
<!-- HTML Panel Toolbar Buttons -->
<!--
<!--
<span id="fbHTMLButtons" class="fbToolbarButtons">
<a id="fbHTML_btEdit" class="fbHover" title="Edit this HTML">Edit</a>
</span>
-->
</span>
<!-- Status Bar -->
<span id="fbStatusBarBox">
<span class="fbToolbarSeparator"></span>
<!-- HTML Panel Status Bar -->
<!--
<!--
<span id="fbHTMLStatusBar" class="fbStatusBar fbToolbarButtons">
</span>
-->
</span>
</div>
</div>
<!-- PanelBars -->
<div id="fbPanelBarBox">
<!-- Main PanelBar -->
<div id="fbPanelBar1" class="fbPanelBar">
<a id="fbConsoleTab" class="fbTab fbHover">
@@ -112,7 +112,7 @@
<!-- Side PanelBars -->
<div id="fbPanelBar2Box" class="hide">
<div id="fbPanelBar2" class="fbPanelBar">
<!--
<!--
<a class="fbTab fbHover">
<span class="fbTabL"></span>
<span class="fbTabText">Style</span>
@@ -131,18 +131,18 @@
-->
</div>
</div>
</div>
<!-- Horizontal Splitter -->
<div id="fbHSplitter">&nbsp;</div>
</td>
</tr>
<!-- Interface - Main Area -->
<tr id="fbContent">
<!-- Panels -->
<td id="fbPanelBox1">
<div id="fbPanel1" class="fbFitHeight">
@@ -150,41 +150,41 @@
<div id="fbHTML" class="fbPanel"></div>
</div>
</td>
<!-- Side Panel Box -->
<td id="fbPanelBox2" class="hide">
<!-- VerticalSplitter -->
<div id="fbVSplitter" class="fbVSplitter">&nbsp;</div>
<!-- Side Panels -->
<div id="fbPanel2" class="fbFitHeight">
<!-- HTML Side Panels -->
<div id="fbHTML_Style" class="fbPanel"></div>
<div id="fbHTML_Layout" class="fbPanel"></div>
<div id="fbHTML_DOM" class="fbPanel"></div>
</div>
<!-- Large Command Line -->
<textarea id="fbLargeCommandLine" class="fbFitHeight"></textarea>
<!-- Large Command Line Buttons -->
<div id="fbLargeCommandButtons">
<a id="fbCommand_btRun" class="fbButton fbHover">Run</a>
<a id="fbCommand_btClear" class="fbButton fbHover">Clear</a>
<a id="fbSmallCommandLineIcon" class="fbSmallButton fbHover"></a>
</div>
</td>
</tr>
<!-- Interface - Bottom Area -->
<tr id="fbBottom" class="hide">
<!-- Command Line -->
<td id="fbCommand" colspan="2">
<div id="fbCommandBox">
@@ -193,18 +193,18 @@
<a id="fbLargeCommandLineIcon" class="fbSmallButton fbHover"></a>
</div>
</td>
</tr>
</tbody>
</table>
</table>
<span id="fbMiniChrome">
<span id="fbMiniContent">
<span id="fbMiniIcon" title="Open Firebug Lite"></span>
<span id="fbMiniErrors" class="fbErrors"><!-- 2 errors --></span>
</span>
</span>
<!--
<!--
<div id="fbErrorPopup">
<div id="fbErrorPopupContent">
<div id="fbErrorIndicator" class="fbErrors">2 errors</div>

0
vendor/firebug-lite/skin/xp/firebug.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

0
vendor/firebug-lite/skin/xp/group.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 158 B

After

Width:  |  Height:  |  Size: 158 B

0
vendor/firebug-lite/skin/xp/html.css vendored Executable file → Normal file
View File

0
vendor/firebug-lite/skin/xp/infoIcon.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 359 B

After

Width:  |  Height:  |  Size: 359 B

Some files were not shown because too many files have changed in this diff Show More