mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 14:37:49 +00:00
Compare commits
1218 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
afcd5bc1e8 | ||
|
|
6a2cc1dfcf | ||
|
|
a67a085cc0 | ||
|
|
c7c70a7da5 | ||
|
|
aa18212085 | ||
|
|
a79c5c434c | ||
|
|
bd518dd906 | ||
|
|
49683ffd5d | ||
|
|
5308be3ba6 | ||
|
|
b5c59317ea | ||
|
|
0b28b7f7b6 | ||
|
|
97d4a2fe19 | ||
|
|
2da024c3b4 | ||
|
|
540148d2c0 | ||
|
|
2f79053d7b | ||
|
|
5aaf898a8f | ||
|
|
bcd0610069 | ||
|
|
2f900b62fe | ||
|
|
e0029485ab | ||
|
|
86a852fe76 | ||
|
|
74b09d6272 | ||
|
|
08110bdcf3 | ||
|
|
0541ec89cc | ||
|
|
588bf3e20d | ||
|
|
3f585df05c | ||
|
|
04ebca6c86 | ||
|
|
cefddab1ca | ||
|
|
a6b960be00 | ||
|
|
657f8bf71e | ||
|
|
619ac69746 | ||
|
|
23b2a33e75 | ||
|
|
23286d6428 | ||
|
|
898b378f06 | ||
|
|
29eb5713f5 | ||
|
|
5df1777477 | ||
|
|
ad38dc0115 | ||
|
|
0e9d44eedb | ||
|
|
e51a424513 | ||
|
|
abb54cc49a | ||
|
|
3ebb38d389 | ||
|
|
ed4b3a2ddb | ||
|
|
91c9cb1ea3 | ||
|
|
9971765d0c | ||
|
|
e5f840745b | ||
|
|
1011cfdf4c | ||
|
|
2cf08be625 | ||
|
|
8b441a506b | ||
|
|
f90d0aec23 | ||
|
|
e2555a43ad | ||
|
|
15e1557b2a | ||
|
|
5b4dc54465 | ||
|
|
37cd5dc97a | ||
|
|
a965836cf3 | ||
|
|
ff4949b8c2 | ||
|
|
4f68e93a43 | ||
|
|
142cee066d | ||
|
|
e2ae5b857c | ||
|
|
f8c7064d45 | ||
|
|
becd982749 | ||
|
|
dce7fccbb6 | ||
|
|
8bc17fe659 | ||
|
|
4df32723c2 | ||
|
|
abde9319fd | ||
|
|
488e62bd79 | ||
|
|
8fdf0ed9fa | ||
|
|
6b1d83c968 | ||
|
|
c68170b336 | ||
|
|
750067f42d | ||
|
|
c541e4ccdc | ||
|
|
e7221b96ec | ||
|
|
d5ef31929a | ||
|
|
7606ea3e25 | ||
|
|
fe7da41956 | ||
|
|
3ae8f23bff | ||
|
|
6248f8a658 | ||
|
|
f4ca396a79 | ||
|
|
afab656cfe | ||
|
|
a7e0428889 | ||
|
|
238e763aa1 | ||
|
|
aa1d7d870d | ||
|
|
c77650a17b | ||
|
|
6cb1f71adf | ||
|
|
4c55ea7068 | ||
|
|
7f2ee90c9f | ||
|
|
2130eacf41 | ||
|
|
daf1f1b10b | ||
|
|
c33df3147f | ||
|
|
151e316263 | ||
|
|
8eccdd098a | ||
|
|
508d46a7a4 | ||
|
|
3b199c30e0 | ||
|
|
377e2d87c8 | ||
|
|
c3740e0847 | ||
|
|
78854835aa | ||
|
|
4cae8fb22f | ||
|
|
3b96b91991 | ||
|
|
136d5253e7 | ||
|
|
580cd4cd1b | ||
|
|
f822dd8d70 | ||
|
|
1e939919c0 | ||
|
|
c4075c18cb | ||
|
|
d9c5082727 | ||
|
|
6bdb8a2f75 | ||
|
|
715aae679d | ||
|
|
6018350ac1 | ||
|
|
4851183757 | ||
|
|
ab960bdc96 | ||
|
|
4ea8c2ec24 | ||
|
|
4ba0f8b612 | ||
|
|
51c562256b | ||
|
|
b8dfb7cc14 | ||
|
|
92a6575137 | ||
|
|
aff1928482 | ||
|
|
0d361bc7b6 | ||
|
|
1859802d05 | ||
|
|
50860fded2 | ||
|
|
79dc90dfcb | ||
|
|
04a66a01e2 | ||
|
|
fe14140c69 | ||
|
|
a9d3ca8737 | ||
|
|
224a256f69 | ||
|
|
da0fad328a | ||
|
|
363fef0efc | ||
|
|
6e4cdc0c5e | ||
|
|
f73b35bb49 | ||
|
|
c1f805f497 | ||
|
|
678eb000b7 | ||
|
|
7f24cab7dd | ||
|
|
54f05aa5cb | ||
|
|
47a6d538f5 | ||
|
|
803c05dc68 | ||
|
|
77c128fc20 | ||
|
|
75690245aa | ||
|
|
e9562a6ce3 | ||
|
|
d985dbffb8 | ||
|
|
fa73d46885 | ||
|
|
b2ea6b1cd2 | ||
|
|
3a330e0cb7 | ||
|
|
462bc9bf3b | ||
|
|
40e096b6d5 | ||
|
|
8464b184b7 | ||
|
|
c3b3c71b0a | ||
|
|
76c2e0accb | ||
|
|
b36f21cbaf | ||
|
|
e23c874272 | ||
|
|
424d9fc34e | ||
|
|
30d305da0f | ||
|
|
7c006f7445 | ||
|
|
102d9e34d7 | ||
|
|
e8c87cfc45 | ||
|
|
bcd2c35604 | ||
|
|
413a38cdf2 | ||
|
|
bf5d0867a6 | ||
|
|
00705afc19 | ||
|
|
270ca7166a | ||
|
|
3ab99065ad | ||
|
|
1b1bb79b05 | ||
|
|
6ad829fa90 | ||
|
|
f5ea579db3 | ||
|
|
8e631dfcd4 | ||
|
|
03e23ecc19 | ||
|
|
a0a3a6af91 | ||
|
|
c2616dd4f3 | ||
|
|
76c1ed2fd4 | ||
|
|
527b167bc5 | ||
|
|
bcd13b270d | ||
|
|
536f09b68c | ||
|
|
01148a1df8 | ||
|
|
534296bba4 | ||
|
|
e908519fc3 | ||
|
|
61acdd0c29 | ||
|
|
bacaaaef8a | ||
|
|
b107653a0f | ||
|
|
8620733457 | ||
|
|
0274d3dd2d | ||
|
|
f659da740d | ||
|
|
0b31164008 | ||
|
|
f6827f482d | ||
|
|
5dce119b9f | ||
|
|
67a3fb99ef | ||
|
|
f03b3edca4 | ||
|
|
a6019d5316 | ||
|
|
ae4e45d8f9 | ||
|
|
08a3f533b7 | ||
|
|
65b148a3b2 | ||
|
|
4092747dde | ||
|
|
bb059c0f64 | ||
|
|
e5e8f35c06 | ||
|
|
a023f92049 | ||
|
|
58e484f389 | ||
|
|
aa5e1b2fe0 | ||
|
|
e2941dda3b | ||
|
|
64a9975488 | ||
|
|
8b74809f1c | ||
|
|
0bdc73195f | ||
|
|
73ce6066f8 | ||
|
|
8a51574acf | ||
|
|
e02db41f99 | ||
|
|
b79b715383 | ||
|
|
aafd66da62 | ||
|
|
f888dfe4f8 | ||
|
|
b89854766a | ||
|
|
23ae2c537d | ||
|
|
d10b44bdef | ||
|
|
303502efa7 | ||
|
|
3390d9309b | ||
|
|
99fb4c8ff7 | ||
|
|
b506174410 | ||
|
|
2538a56577 | ||
|
|
bbd59f800b | ||
|
|
7c92111067 | ||
|
|
96ebd44509 | ||
|
|
645acd4275 | ||
|
|
402ca89c50 | ||
|
|
3e2b0bb763 | ||
|
|
f3957ac416 | ||
|
|
571e752a42 | ||
|
|
ca2fd5c64a | ||
|
|
53cac4eef4 | ||
|
|
6dc03831d8 | ||
|
|
6543d3277e | ||
|
|
1bdda20e49 | ||
|
|
b679e9cc22 | ||
|
|
43a520c971 | ||
|
|
64d92ddf32 | ||
|
|
dad1fccdb4 | ||
|
|
6d19563a9f | ||
|
|
8be26ac755 | ||
|
|
d7bdf0ae25 | ||
|
|
4b80666a30 | ||
|
|
ecb3c108d1 | ||
|
|
8db488b943 | ||
|
|
a8abced07a | ||
|
|
f7a6cddc9e | ||
|
|
f3e0cbe5bf | ||
|
|
0acb2847bf | ||
|
|
3c324a716d | ||
|
|
76ab9cd539 | ||
|
|
929a996987 | ||
|
|
164bc71328 | ||
|
|
9d11b48ce5 | ||
|
|
b8a3a42278 | ||
|
|
351e44a127 | ||
|
|
f983ff2b7c | ||
|
|
bb7c959479 | ||
|
|
2f281c68b0 | ||
|
|
c89637e4db | ||
|
|
ad3236a859 | ||
|
|
98969648e9 | ||
|
|
3e03cbf2b8 | ||
|
|
3b302b822c | ||
|
|
fa8c607742 | ||
|
|
4c77d8807c | ||
|
|
357ce4663f | ||
|
|
b247502116 | ||
|
|
5f2a03076d | ||
|
|
9260bd2f57 | ||
|
|
41a8d2272e | ||
|
|
7ffe700d66 | ||
|
|
49ac4a5b52 | ||
|
|
59e45d99f2 | ||
|
|
bda6d56c60 | ||
|
|
89829331f0 | ||
|
|
3c2795b816 | ||
|
|
17f7069d07 | ||
|
|
ba52c744ae | ||
|
|
e7bbcfa72b | ||
|
|
a2fe303463 | ||
|
|
e2096c0ef1 | ||
|
|
d0f23b67ac | ||
|
|
46ffbc1d90 | ||
|
|
d8b5183b1d | ||
|
|
4c4b29cdef | ||
|
|
b6a426a10d | ||
|
|
d1d86811bc | ||
|
|
2fd70c8eca | ||
|
|
3e80dffd48 | ||
|
|
7cc1328bf1 | ||
|
|
ffcb38f74d | ||
|
|
37f168d466 | ||
|
|
b9c61eea60 | ||
|
|
1e8ac50ab5 | ||
|
|
56b7d339a6 | ||
|
|
0350d4904f | ||
|
|
5baad4df10 | ||
|
|
aaef6f6737 | ||
|
|
2a3296111d | ||
|
|
3a375c0ae1 | ||
|
|
31500cd6e4 | ||
|
|
b4e815c04b | ||
|
|
27644a7bd5 | ||
|
|
e52ed26c7a | ||
|
|
0369bf7afe | ||
|
|
16413cc32a | ||
|
|
753e47de13 | ||
|
|
b87bd5250b | ||
|
|
a61f41a79a | ||
|
|
53dba0a211 | ||
|
|
86e8437514 | ||
|
|
2d83592273 | ||
|
|
2baf7a3e9e | ||
|
|
677c01b753 | ||
|
|
43bcecf52f | ||
|
|
e31e1306c8 | ||
|
|
135cb0ad88 | ||
|
|
3411cce1d2 | ||
|
|
4f3ef2e8d8 | ||
|
|
a822979881 | ||
|
|
8429c1db36 | ||
|
|
d007878935 | ||
|
|
b3810c2afa | ||
|
|
d931d6e8e8 | ||
|
|
d460c42230 | ||
|
|
39931f9eaa | ||
|
|
477fdb2cf2 | ||
|
|
f5b2031211 | ||
|
|
b37e973463 | ||
|
|
2ab6da5b51 | ||
|
|
5fe15a160d | ||
|
|
8f8b29368e | ||
|
|
5e38259044 | ||
|
|
30c32908a3 | ||
|
|
3b125166d5 | ||
|
|
fdd7a5b8d2 | ||
|
|
62a88ce256 | ||
|
|
04348ab176 | ||
|
|
47abf76e88 | ||
|
|
cb7612aef6 | ||
|
|
b0980a90fc | ||
|
|
7479d282bc | ||
|
|
23c0bc0e7a | ||
|
|
5219385eb2 | ||
|
|
6cb3460fce | ||
|
|
f3a8e55e70 | ||
|
|
9d445ec238 | ||
|
|
ac53cc7d69 | ||
|
|
c068eedcf3 | ||
|
|
a6ff1ea9d5 | ||
|
|
41133cf40f | ||
|
|
42b48b3d86 | ||
|
|
a0b928dfbb | ||
|
|
3c5b828d7e | ||
|
|
bac4291086 | ||
|
|
868fd1253b | ||
|
|
c5c0ff77b6 | ||
|
|
54abb96a85 | ||
|
|
c5dac98e1d | ||
|
|
999022d647 | ||
|
|
85255da560 | ||
|
|
c8285a41bc | ||
|
|
ee1c64fafe | ||
|
|
73df84c0b4 | ||
|
|
be6a50b0ed | ||
|
|
401016d260 | ||
|
|
b856263af6 | ||
|
|
085dc1aa01 | ||
|
|
563059c4b9 | ||
|
|
168322fda5 | ||
|
|
f5e7671fbc | ||
|
|
d80077ed94 | ||
|
|
3b4cbc70e7 | ||
|
|
36927bff8b | ||
|
|
dcded33f58 | ||
|
|
fe5c7a7f3b | ||
|
|
aa60e55db4 | ||
|
|
7baf2267a0 | ||
|
|
c6854fa8fc | ||
|
|
454219fbfe | ||
|
|
379b7a057c | ||
|
|
34ca4f3efa | ||
|
|
11052f4d87 | ||
|
|
401c0f053c | ||
|
|
6c54ae2ae5 | ||
|
|
70379910f7 | ||
|
|
41e6991d2e | ||
|
|
3b990b7916 | ||
|
|
dc4671dd0d | ||
|
|
b2504adb30 | ||
|
|
e45db2e507 | ||
|
|
e52c421c1d | ||
|
|
0aa7a62dc3 | ||
|
|
b6bdb23ffd | ||
|
|
003c11c36b | ||
|
|
c5d4bb8dcb | ||
|
|
fc1a360212 | ||
|
|
4ecd69e4fa | ||
|
|
b2f69ea36a | ||
|
|
71f49dda0f | ||
|
|
c64a3bd3df | ||
|
|
0cd28f982d | ||
|
|
400b5c09d7 | ||
|
|
69cac05575 | ||
|
|
20befcdf84 | ||
|
|
ef2c4bf5e1 | ||
|
|
8c97051909 | ||
|
|
c500b2cc16 | ||
|
|
26ea38dcf4 | ||
|
|
2b05673125 | ||
|
|
8bc7e006db | ||
|
|
8501b0c2ef | ||
|
|
6d28724e48 | ||
|
|
71039740c3 | ||
|
|
6434747ef6 | ||
|
|
68190b8546 | ||
|
|
395a81058b | ||
|
|
82e681a191 | ||
|
|
1392d37ca2 | ||
|
|
627bfe6bfa | ||
|
|
f2c49500ee | ||
|
|
bc4262f901 | ||
|
|
44950212a0 | ||
|
|
9e467f872e | ||
|
|
db4bbc9b47 | ||
|
|
77cc37ba49 | ||
|
|
65654f8f9e | ||
|
|
efcf51c7bf | ||
|
|
59124c4cfe | ||
|
|
aacfefc752 | ||
|
|
648722f1a6 | ||
|
|
c2208f82dc | ||
|
|
40e9c66ca6 | ||
|
|
dc687c1d85 | ||
|
|
e6152a97e8 | ||
|
|
4d0c15b49e | ||
|
|
ca9e6fa087 | ||
|
|
10f64ee9c4 | ||
|
|
4c881b2726 | ||
|
|
41ad5e901f | ||
|
|
bf54267f0b | ||
|
|
f4a6e9ede9 | ||
|
|
7167d7e09f | ||
|
|
d461c87979 | ||
|
|
0e24641cb8 | ||
|
|
1a1e462f80 | ||
|
|
2900cfd288 | ||
|
|
912d6b04a1 | ||
|
|
165572022d | ||
|
|
ae467c7313 | ||
|
|
1e80c19b0f | ||
|
|
6eeafd3dc2 | ||
|
|
e33b15674d | ||
|
|
a23b918bef | ||
|
|
ef618992b5 | ||
|
|
708b962860 | ||
|
|
da2d08d771 | ||
|
|
30863e5fa6 | ||
|
|
6672a4f942 | ||
|
|
f7263047bf | ||
|
|
02fdf4e673 | ||
|
|
e2c703a96f | ||
|
|
32fdfcc1e5 | ||
|
|
6c1ae0b54d | ||
|
|
0c1c87b046 | ||
|
|
b51786e72e | ||
|
|
5ee5099af1 | ||
|
|
482dc9478b | ||
|
|
528b6a98a9 | ||
|
|
a8bcb5f3d5 | ||
|
|
d429f90ec5 | ||
|
|
72f559e1a3 | ||
|
|
2f92d55024 | ||
|
|
5a86b67263 | ||
|
|
bea4b29bc4 | ||
|
|
0cd4134bc6 | ||
|
|
ec74813be6 | ||
|
|
67926a4df2 | ||
|
|
40a591d0c0 | ||
|
|
783e03ffa3 | ||
|
|
1dddf27a39 | ||
|
|
2890eabf66 | ||
|
|
a3e077324a | ||
|
|
86ee93650d | ||
|
|
dd0d984d37 | ||
|
|
eba18891e5 | ||
|
|
5cb80a0a84 | ||
|
|
db14f324f6 | ||
|
|
238defb150 | ||
|
|
53ba1e0c3c | ||
|
|
95d3477c22 | ||
|
|
a06d1a0313 | ||
|
|
330c8cb46e | ||
|
|
da2e8a1030 | ||
|
|
5bc9e6b8bd | ||
|
|
9a02bd5fc7 | ||
|
|
89656fdf4a | ||
|
|
4cb7bea97d | ||
|
|
eb4861c3cd | ||
|
|
170c13b5ba | ||
|
|
26a6117889 | ||
|
|
014982cb2c | ||
|
|
058361e222 | ||
|
|
e344b66af9 | ||
|
|
54cb3599e3 | ||
|
|
6c427b7a26 | ||
|
|
ce093845e1 | ||
|
|
102c5f00d7 | ||
|
|
13d315a93b | ||
|
|
2cc247ddf8 | ||
|
|
5488644658 | ||
|
|
1fe9042953 | ||
|
|
8bde34dda0 | ||
|
|
98720bea4a | ||
|
|
032637bba1 | ||
|
|
dadde87cab | ||
|
|
fcd0bbfc56 | ||
|
|
600fbbadfb | ||
|
|
3d0df11e50 | ||
|
|
2e4c997dba | ||
|
|
5aaf7e40ae | ||
|
|
57703b040d | ||
|
|
c6ff776147 | ||
|
|
9ac729e1bc | ||
|
|
6d951ccc87 | ||
|
|
3217118fab | ||
|
|
6ef973ae33 | ||
|
|
e0a65ac34a | ||
|
|
b833d83a3e | ||
|
|
220713109c | ||
|
|
cafb9822ce | ||
|
|
1b3815928d | ||
|
|
fbb67f9dbe | ||
|
|
8d24f393ac | ||
|
|
7759376b91 | ||
|
|
ccc3081be0 | ||
|
|
62b66305f2 | ||
|
|
65daae2043 | ||
|
|
0fcf43b02b | ||
|
|
46d1f53ee9 | ||
|
|
fc22665dd8 | ||
|
|
7862e5ce2d | ||
|
|
7cbffd5ebf | ||
|
|
5028267c72 | ||
|
|
6f03ef955c | ||
|
|
f75bf13ad1 | ||
|
|
d7dbf0951d | ||
|
|
daf6de6a46 | ||
|
|
7d4c3ed404 | ||
|
|
a9fd17950a | ||
|
|
b91a515258 | ||
|
|
bc5729a9de | ||
|
|
729d1a57aa | ||
|
|
73e2562cd1 | ||
|
|
849423c9d8 | ||
|
|
1c9a9f364d | ||
|
|
e485e16d28 | ||
|
|
bc49e7fe18 | ||
|
|
6a9337434f | ||
|
|
0c89b9aeb5 | ||
|
|
6f7a8501cb | ||
|
|
7a03898ffe | ||
|
|
609ae34b4e | ||
|
|
2d21faf68a | ||
|
|
26ee0c5c2a | ||
|
|
cafb5e1331 | ||
|
|
7717b8aa64 | ||
|
|
c82322c490 | ||
|
|
4af0c066ec | ||
|
|
d2b10de40b | ||
|
|
26bfb74a60 | ||
|
|
ef129e4c8c | ||
|
|
0b04309ea5 | ||
|
|
fb4852f6db | ||
|
|
5046943020 | ||
|
|
14d7f89f75 | ||
|
|
d431e97030 | ||
|
|
8f06ea259a | ||
|
|
0a0fa58e2d | ||
|
|
286f1abb87 | ||
|
|
a621ba236a | ||
|
|
a041a3782d | ||
|
|
9f8064a8b5 | ||
|
|
729f424622 | ||
|
|
6a8e978fd7 | ||
|
|
aea509c230 | ||
|
|
21113b8c87 | ||
|
|
dcf6d382c4 | ||
|
|
c541598f40 | ||
|
|
bd8e38518f | ||
|
|
067036a359 | ||
|
|
22b51ed232 | ||
|
|
054e78572b | ||
|
|
31cb06a643 | ||
|
|
ee4a5a2604 | ||
|
|
05b60871c5 | ||
|
|
03a194fcb9 | ||
|
|
52e96c38dc | ||
|
|
f5dd98cac4 | ||
|
|
b890d40b54 | ||
|
|
457a0dc703 | ||
|
|
e4837cd75d | ||
|
|
67b2c6f900 | ||
|
|
260a84c4d8 | ||
|
|
4b0db6ec6c | ||
|
|
9c4c194bb5 | ||
|
|
ac74a1ea15 | ||
|
|
e4ddf3e155 | ||
|
|
896b27ef73 | ||
|
|
bdf0b9f288 | ||
|
|
1665e5cbff | ||
|
|
6e8c0de1ff | ||
|
|
4fb41ac6a9 | ||
|
|
af983b2dd3 | ||
|
|
405d5875b8 | ||
|
|
b30f979ec7 | ||
|
|
836bd258a0 | ||
|
|
d2f74ee245 | ||
|
|
45f668b416 | ||
|
|
d29d74f687 | ||
|
|
9fba7be296 | ||
|
|
f30851bac1 | ||
|
|
d308bce09f | ||
|
|
3d7dbd140c | ||
|
|
15bd64a1b4 | ||
|
|
3c30100837 | ||
|
|
81bdb9da43 | ||
|
|
60e3a93a30 | ||
|
|
158f2839fd | ||
|
|
c7b9df4286 | ||
|
|
0eca941e22 | ||
|
|
8592f4163f | ||
|
|
29e2598a39 | ||
|
|
32e75acb9f | ||
|
|
b54501a771 | ||
|
|
6062860628 | ||
|
|
a12c3797fb | ||
|
|
48bc8b4f1a | ||
|
|
e861681963 | ||
|
|
9985e81808 | ||
|
|
ffde99b216 | ||
|
|
492caa4fd2 | ||
|
|
01c0950ae8 | ||
|
|
20fa52309c | ||
|
|
7a345b5606 | ||
|
|
b6d8116882 | ||
|
|
4495e74f77 | ||
|
|
c009349d99 | ||
|
|
26d5ba992c | ||
|
|
320ef6f933 | ||
|
|
b678bb4a74 | ||
|
|
c1c394ac60 | ||
|
|
70d3057e17 | ||
|
|
3d27920226 | ||
|
|
33a43a5f93 | ||
|
|
fac9501840 | ||
|
|
4d6aade733 | ||
|
|
d9e2c1cc34 | ||
|
|
c8c6a7e7b1 | ||
|
|
69addb855e | ||
|
|
55fb0172c0 | ||
|
|
2026cbeebd | ||
|
|
d6d01cdfa0 | ||
|
|
cb07604dc6 | ||
|
|
549def0e48 | ||
|
|
a3c215919d | ||
|
|
ab904a1047 | ||
|
|
60381f4d6c | ||
|
|
8f607295ae | ||
|
|
27218a95af | ||
|
|
8e150ad6bc | ||
|
|
c8914a890c | ||
|
|
b25a86f352 | ||
|
|
ec8e279235 | ||
|
|
1cc16029db | ||
|
|
5c912bcc62 | ||
|
|
b3742c8d3c | ||
|
|
c3a7516712 | ||
|
|
12319d5775 | ||
|
|
45e1965936 | ||
|
|
6091c8ec49 | ||
|
|
cfb7dab0f3 | ||
|
|
2d9f3cde0f | ||
|
|
e5f4770247 | ||
|
|
dc7c321514 | ||
|
|
40164659b1 | ||
|
|
7829f3d224 | ||
|
|
92359257c1 | ||
|
|
d2a2b3a8c4 | ||
|
|
4019eb65f2 | ||
|
|
4c5bead5c6 | ||
|
|
0163aae357 | ||
|
|
8fa23a94a0 | ||
|
|
8176d56c72 | ||
|
|
5add168743 | ||
|
|
27e59404d3 | ||
|
|
54f5ac7b8d | ||
|
|
5c688cc0b7 | ||
|
|
86efb0ea09 | ||
|
|
bc13666222 | ||
|
|
d1abde7d1a | ||
|
|
691db4d406 | ||
|
|
fb833b0c19 | ||
|
|
4d2181ad83 | ||
|
|
9dd291a96e | ||
|
|
1344803e7e | ||
|
|
4a5f8fa974 | ||
|
|
212e4a6407 | ||
|
|
d47123779e | ||
|
|
fc734a6371 | ||
|
|
02be5b808e | ||
|
|
0d757fdc40 | ||
|
|
0263a879c4 | ||
|
|
c309ed1c49 | ||
|
|
e58de14437 | ||
|
|
78a7fa1d14 | ||
|
|
77178a9583 | ||
|
|
d2ab33eb52 | ||
|
|
7b3194660c | ||
|
|
f627b25e9d | ||
|
|
1bbb7c9d3b | ||
|
|
08a4ae1f56 | ||
|
|
7c398f8019 | ||
|
|
6651023f7f | ||
|
|
021df666a3 | ||
|
|
d7e60cb6d0 | ||
|
|
4cd26e6860 | ||
|
|
946a3bf5c8 | ||
|
|
b10e6a01b2 | ||
|
|
e23341a118 | ||
|
|
4446fb13a3 | ||
|
|
4dfbde7716 | ||
|
|
3c03d4a1f3 | ||
|
|
a0ecdfff0b | ||
|
|
60023a23df | ||
|
|
e96442631c | ||
|
|
94750bfa3c | ||
|
|
5cc02555d0 | ||
|
|
6e2f7e2f38 | ||
|
|
de92cc32e6 | ||
|
|
e97205409d | ||
|
|
091d8e3dbf | ||
|
|
171ca53c29 | ||
|
|
5be61796d9 | ||
|
|
1aee1c6cb8 | ||
|
|
343f48b08c | ||
|
|
358ecfd2eb | ||
|
|
8066ad7e65 | ||
|
|
7ae0d0099d | ||
|
|
2e4fc41c9b | ||
|
|
71247ff556 | ||
|
|
5ef163f143 | ||
|
|
510cbfaa3f | ||
|
|
bd3fcab9c0 | ||
|
|
9841e6aa4c | ||
|
|
1bf125eebd | ||
|
|
f9936b8b54 | ||
|
|
d11aa6de06 | ||
|
|
1c4fccc0fd | ||
|
|
aa0323f04d | ||
|
|
2916e9dd11 | ||
|
|
6958d7abd4 | ||
|
|
9e661cb858 | ||
|
|
a972026c67 | ||
|
|
2b1bda7418 | ||
|
|
a6a3f3ed80 | ||
|
|
5cca51e978 | ||
|
|
7c971587dc | ||
|
|
40a13d4b86 | ||
|
|
a0971d016d | ||
|
|
410e9e3eb8 | ||
|
|
37813c3826 | ||
|
|
e00c243662 | ||
|
|
f504f5aac5 | ||
|
|
0b63f2c259 | ||
|
|
14fb27ce77 | ||
|
|
7da7d7b7e0 | ||
|
|
907add6acc | ||
|
|
f110e3ddcd | ||
|
|
ed206e5611 | ||
|
|
e4d8af175b | ||
|
|
ba7ddc8cdc | ||
|
|
389f5790a7 | ||
|
|
6071982dd9 | ||
|
|
f71c0bd4c3 | ||
|
|
50b45d013a | ||
|
|
93a047e77c | ||
|
|
a3bf0e8888 | ||
|
|
d8fa2f3e89 | ||
|
|
e361c5a5b3 | ||
|
|
3ef032cbaf | ||
|
|
36cf5a7ff3 | ||
|
|
6d930d6920 | ||
|
|
f676a8c9c1 | ||
|
|
941ffee2d3 | ||
|
|
0a71f3372f | ||
|
|
f817f68487 | ||
|
|
826975f392 | ||
|
|
5f244d3c31 | ||
|
|
71be34859f | ||
|
|
f9a4705c9c | ||
|
|
a546842792 | ||
|
|
ba86e20179 | ||
|
|
b32fc6f6e6 | ||
|
|
1f13a34687 | ||
|
|
f212b4850d | ||
|
|
1b4555afb6 | ||
|
|
358013c67e | ||
|
|
a98667ca05 | ||
|
|
02e9f4c333 | ||
|
|
d7951db01b | ||
|
|
21fba2df9f | ||
|
|
a4947139a6 | ||
|
|
c01e7580cd | ||
|
|
8b4f22ed75 | ||
|
|
669b76bf99 | ||
|
|
efee02ace7 | ||
|
|
cd8adf5611 | ||
|
|
d216106b88 | ||
|
|
6dd8fb12ad | ||
|
|
a4999575d0 | ||
|
|
fcaff8ff28 | ||
|
|
cf0b3e3212 | ||
|
|
bccb4150fd | ||
|
|
9a297b0eb5 | ||
|
|
9c4baf7645 | ||
|
|
73b2f20509 | ||
|
|
642690e692 | ||
|
|
1468c74c36 | ||
|
|
0bfa1ec2d0 | ||
|
|
7c74464d7a | ||
|
|
de051ac1ac | ||
|
|
ba0c4c413d | ||
|
|
7e6f5ef4f5 | ||
|
|
712eeb009f | ||
|
|
b54e28deb7 | ||
|
|
1f44cebac3 | ||
|
|
9c05e8392b | ||
|
|
9a67fec48a | ||
|
|
1966ac7979 | ||
|
|
8b624217c5 | ||
|
|
40499af9b9 | ||
|
|
b3bd359a0d | ||
|
|
de07e3f874 | ||
|
|
c7e8953b68 | ||
|
|
80e7fe4bf9 | ||
|
|
2bc199d7fc | ||
|
|
9b710d8e81 | ||
|
|
cc6a0ee98d | ||
|
|
c9492d79a1 | ||
|
|
94c4719c0d | ||
|
|
c253e8d7b8 | ||
|
|
98f12fb8e1 | ||
|
|
e05a40bb16 | ||
|
|
c73bb67486 | ||
|
|
3ad0cbc86d | ||
|
|
6402af7db9 | ||
|
|
6a41a79ded | ||
|
|
fbd9a804a9 | ||
|
|
694e1175a1 | ||
|
|
80dbd4cbfa | ||
|
|
d459f4ac7c | ||
|
|
2c5c4bfbea | ||
|
|
a1a68bb5d7 | ||
|
|
984a10c1b1 | ||
|
|
3c4c06cb5e | ||
|
|
8d28a5ca3f | ||
|
|
801c4a56c3 | ||
|
|
ea000e6ce7 | ||
|
|
6723cdfa07 | ||
|
|
2cf10711f5 | ||
|
|
bde171e947 | ||
|
|
2696615523 | ||
|
|
f98028d1d8 | ||
|
|
97475fc365 | ||
|
|
ea7aa52ea3 | ||
|
|
ec4ae5978b | ||
|
|
90d73143e1 | ||
|
|
249f0cd72c | ||
|
|
232cc1ab34 | ||
|
|
2cea31cb1b | ||
|
|
02c4d60861 | ||
|
|
8c9073308a | ||
|
|
8cb5455671 | ||
|
|
8bc44e3bff | ||
|
|
73f84baaec | ||
|
|
d3acace1c4 | ||
|
|
7f3539d001 | ||
|
|
3ef19f1ab1 | ||
|
|
749b2db846 | ||
|
|
a3e99b5d89 | ||
|
|
dbbb3fbb55 | ||
|
|
6eeac45d23 | ||
|
|
5669cc0a0b | ||
|
|
d986901a1c | ||
|
|
5394bbf06a | ||
|
|
d7b2f922b5 | ||
|
|
9ab55443eb | ||
|
|
67c7a43e6f | ||
|
|
26a4bfb838 | ||
|
|
e7a16b2e64 | ||
|
|
a5612ed668 | ||
|
|
f55d15692b | ||
|
|
107994859b | ||
|
|
a8d3689061 | ||
|
|
4fb4ec5328 | ||
|
|
9bc8519656 | ||
|
|
af36d2d8e5 | ||
|
|
6b0069f10f | ||
|
|
a64b629333 | ||
|
|
fc4cc977ed | ||
|
|
7483520c8c | ||
|
|
5d18fb8c70 | ||
|
|
1163bfac5c | ||
|
|
d643bbd7e4 | ||
|
|
32158935f8 | ||
|
|
50bf1ea784 | ||
|
|
fa29123c5e | ||
|
|
314c652818 | ||
|
|
a3dd60370e | ||
|
|
3d82567118 | ||
|
|
eaac5e02c0 | ||
|
|
3bd5703bdb | ||
|
|
bf80a75474 | ||
|
|
bea7016223 | ||
|
|
c8ff2b4612 | ||
|
|
6c673cd19b | ||
|
|
c1ae43e041 | ||
|
|
9605072200 | ||
|
|
9cabc7c222 | ||
|
|
b2b3391827 | ||
|
|
19e94b8889 | ||
|
|
4bee8c9ead | ||
|
|
3f1ae77306 | ||
|
|
9f6d6d7b37 | ||
|
|
adac412f58 | ||
|
|
31ca38515a | ||
|
|
4a35929979 | ||
|
|
4a0610f107 | ||
|
|
9a1b3d813a | ||
|
|
a7a4862491 | ||
|
|
5783536837 | ||
|
|
f8646d1a5d | ||
|
|
39bb7064e7 | ||
|
|
388bf6934d | ||
|
|
5122e9271c | ||
|
|
32b36435f8 | ||
|
|
807ad48bbc | ||
|
|
b5842314b4 | ||
|
|
efb4db2b86 | ||
|
|
ecbf8cd722 | ||
|
|
9992144130 | ||
|
|
1f9cba6f53 | ||
|
|
2465a6bdbd | ||
|
|
1a7199fd6b | ||
|
|
57f0a4c6d7 | ||
|
|
138cf77916 | ||
|
|
43d1ca89c2 | ||
|
|
51e619b18f | ||
|
|
21df7426e2 | ||
|
|
2f6b2ca0c7 | ||
|
|
cf1b9f9595 | ||
|
|
b0ec8339fa | ||
|
|
762748684e | ||
|
|
bdfd5880e9 | ||
|
|
9e55e5bcea | ||
|
|
887576e4a5 | ||
|
|
ccd1d6ab29 | ||
|
|
fcbb63ad60 | ||
|
|
1607e7914c | ||
|
|
68e98397ab | ||
|
|
3983d4f473 | ||
|
|
9eda959489 | ||
|
|
4880f9923c | ||
|
|
87e8a4290e | ||
|
|
fd96d59963 | ||
|
|
1a1771f0b5 | ||
|
|
22ed53260f | ||
|
|
77cf88a3bf | ||
|
|
695d74d7c5 | ||
|
|
a164735369 | ||
|
|
6ccea636b1 | ||
|
|
0ccaf76661 | ||
|
|
593f6f9f86 | ||
|
|
fbdda6df03 | ||
|
|
a7dcce3e8d | ||
|
|
ee5718003b | ||
|
|
a43065ec08 | ||
|
|
1740ee91da | ||
|
|
90f95306f9 | ||
|
|
0964f9175e | ||
|
|
dbde3f8826 | ||
|
|
33e08baf3f | ||
|
|
6e67ebab05 | ||
|
|
5fbc5303ff | ||
|
|
e582ad226a | ||
|
|
dfb71a3a50 | ||
|
|
5355f4f25e | ||
|
|
98c422d227 | ||
|
|
e18b577d20 | ||
|
|
7226df593e | ||
|
|
8a376f647e | ||
|
|
050087f6c4 | ||
|
|
c67e347255 | ||
|
|
3fdac985c7 | ||
|
|
02ff3e6258 | ||
|
|
65ce1b0bb5 | ||
|
|
7e8528104b | ||
|
|
40ac55acb6 | ||
|
|
42c639d252 | ||
|
|
d110b64ee4 | ||
|
|
a2617d810c | ||
|
|
90d07bc04c | ||
|
|
013d9db86f | ||
|
|
9d4d725bc7 | ||
|
|
9881cc9e10 | ||
|
|
01474fed0b | ||
|
|
024e6d8ae8 | ||
|
|
607ba653f7 | ||
|
|
9090c1904f | ||
|
|
158b762367 | ||
|
|
e8b3b2dc31 | ||
|
|
5d72eec742 | ||
|
|
6fe020c920 | ||
|
|
40c5a6af49 | ||
|
|
803dce242b | ||
|
|
4ed722ccd8 | ||
|
|
f35d479d5e | ||
|
|
f3af61de97 | ||
|
|
077fb89083 | ||
|
|
d4d4390846 | ||
|
|
33e54546fe | ||
|
|
bf008e0680 | ||
|
|
08694bd709 | ||
|
|
91242440fc | ||
|
|
68ae6fc212 | ||
|
|
14a16c2a7a | ||
|
|
9cbb50d3a6 | ||
|
|
47635b9978 | ||
|
|
f90c3f2483 | ||
|
|
5a67ecc142 | ||
|
|
a542f8ab54 | ||
|
|
f32349db7d | ||
|
|
32f5db3f72 | ||
|
|
670e3983b4 | ||
|
|
e1cc4d8552 | ||
|
|
8422bb37b0 | ||
|
|
ebf9b64062 | ||
|
|
56b397b506 | ||
|
|
de6cc79ac8 | ||
|
|
d28395fdb9 | ||
|
|
84b8ee7bda | ||
|
|
b56c732332 | ||
|
|
041c1b4586 | ||
|
|
0edc480d17 | ||
|
|
1a3bcb4ebd | ||
|
|
7d8c2a84b7 | ||
|
|
4faac431c4 | ||
|
|
df9ded3282 | ||
|
|
1fe8d1679e | ||
|
|
708505f2b1 | ||
|
|
b2da5ee1a7 | ||
|
|
315e751f43 | ||
|
|
dc5544223f | ||
|
|
c14728d31a | ||
|
|
7d4b154866 | ||
|
|
b69647a0c3 | ||
|
|
d054442e2c | ||
|
|
e50bf1fb44 | ||
|
|
d40b6a75da | ||
|
|
e124e7fb5f | ||
|
|
7c3a163f9c | ||
|
|
03af0791aa | ||
|
|
464885a539 | ||
|
|
346579ac7a | ||
|
|
76ed206e9b | ||
|
|
06e7c963ef | ||
|
|
573d902026 | ||
|
|
66cdfe5896 | ||
|
|
9afd4659c7 | ||
|
|
7249217600 | ||
|
|
2f20c672e0 | ||
|
|
6d02a64c47 | ||
|
|
3d078383cb | ||
|
|
64e765bf7a | ||
|
|
b5b6125730 | ||
|
|
e45984f6b8 | ||
|
|
a95cf1c26c | ||
|
|
4a19913726 | ||
|
|
52ae769bfa | ||
|
|
44d7c3887d | ||
|
|
315271996c | ||
|
|
2357704540 | ||
|
|
262049f737 | ||
|
|
04d6e351a6 | ||
|
|
9fa86ec712 | ||
|
|
901e3dcff2 | ||
|
|
43fffe3200 | ||
|
|
1123e13072 | ||
|
|
996636d25b | ||
|
|
8864095bab | ||
|
|
def9f5d84a | ||
|
|
47d024ae7b | ||
|
|
05135ca171 | ||
|
|
ca1f22a7c6 | ||
|
|
9a461a5e48 | ||
|
|
73e7bab839 | ||
|
|
572060aedc | ||
|
|
f1b63d41f8 | ||
|
|
9ee423edcf | ||
|
|
70c8651182 | ||
|
|
2b54f23dad | ||
|
|
67ef2bb008 | ||
|
|
f2b5e58500 | ||
|
|
b8fa0d9b29 | ||
|
|
264d68dec9 | ||
|
|
71f5264ee1 | ||
|
|
ce8a1feb94 | ||
|
|
05c32044e9 | ||
|
|
44927be6e2 | ||
|
|
d1779d6cdd | ||
|
|
a13d640bcc | ||
|
|
c7d4106f66 | ||
|
|
2e59faad8f | ||
|
|
6d70b64b2e | ||
|
|
767f9c6bce | ||
|
|
edd7c2f0b1 | ||
|
|
b9cfd31bd5 | ||
|
|
6883f99141 | ||
|
|
c2aee218d2 | ||
|
|
8e44d73705 | ||
|
|
9e30cc4542 | ||
|
|
963e2c23b0 | ||
|
|
7ee4bf8d02 | ||
|
|
c3c6bc9666 | ||
|
|
ef1024bb60 | ||
|
|
6c6e1c2be3 | ||
|
|
e9a08ba9a9 | ||
|
|
59546b9989 | ||
|
|
816edcce2e | ||
|
|
8accfb3372 | ||
|
|
da146a9afd | ||
|
|
cbcd5ffdc4 | ||
|
|
6f600ebeac | ||
|
|
9aa456f26f | ||
|
|
dc77d7605d | ||
|
|
f7c4410f41 | ||
|
|
9fa0ec00b8 | ||
|
|
0125ff7303 | ||
|
|
fbc91cf7ae | ||
|
|
43c26b5d6f | ||
|
|
4e38f70e0e | ||
|
|
e2c86dac63 | ||
|
|
aebc0650f8 | ||
|
|
44cf971405 | ||
|
|
c0d7418054 | ||
|
|
a0db54b53f | ||
|
|
32b813e42b | ||
|
|
3c144b8601 | ||
|
|
076e4e6db5 | ||
|
|
2ea08ccd36 | ||
|
|
fc48518f2b | ||
|
|
594c3b3406 | ||
|
|
38edd713e4 | ||
|
|
6987d70dc2 | ||
|
|
0e4b307585 | ||
|
|
c81bbe95c6 | ||
|
|
b21a87b50f | ||
|
|
e3566eb1ce | ||
|
|
0429434dbb | ||
|
|
80f35ee713 | ||
|
|
224595c837 | ||
|
|
61ace9a24b | ||
|
|
8c630ede7e | ||
|
|
ca3b583695 | ||
|
|
c2cbb06d57 | ||
|
|
f6bf8d2e6d | ||
|
|
60c89b2754 | ||
|
|
b72fba911d | ||
|
|
3930c388e4 | ||
|
|
ddf5ef0839 | ||
|
|
c66947405b | ||
|
|
ad27b62343 | ||
|
|
5283b0f407 | ||
|
|
af41f9267a | ||
|
|
6e8c984250 | ||
|
|
c2e018b2ac | ||
|
|
a47ce3cf13 | ||
|
|
ba58f35f37 | ||
|
|
30fd1693ee | ||
|
|
161c17ce7f | ||
|
|
27dfe542bd | ||
|
|
353113f17f | ||
|
|
762e858c48 | ||
|
|
db49702046 | ||
|
|
7239bf791f | ||
|
|
9cb75cae1d | ||
|
|
fdb4cf1208 | ||
|
|
714cf7b18c | ||
|
|
1a1e0e1a6b | ||
|
|
f6c14ec31f | ||
|
|
da7f413f6f | ||
|
|
3cf28953a7 | ||
|
|
080b761f7f | ||
|
|
7f6ad484ec | ||
|
|
391a930d49 | ||
|
|
a532773703 | ||
|
|
49f8aa4289 | ||
|
|
44b9b085c0 | ||
|
|
a447353977 | ||
|
|
dea6ccbf43 | ||
|
|
0c4d8836e7 | ||
|
|
ef67e07732 | ||
|
|
7e885a4ddd | ||
|
|
a3c1f42708 | ||
|
|
d3ef5a3acb | ||
|
|
5098d63a22 | ||
|
|
4275a73170 | ||
|
|
78a157d675 | ||
|
|
97a437e8e6 | ||
|
|
3c37f290a8 | ||
|
|
dcd5d470e0 | ||
|
|
b424f3b60f | ||
|
|
201ea9a9f0 | ||
|
|
2469af6c3f | ||
|
|
bfe6e06b5a | ||
|
|
091b5fbe30 | ||
|
|
93168e6018 | ||
|
|
16ed081818 | ||
|
|
c38b4b29cf |
29
.commitlintrc.js
Normal file
29
.commitlintrc.js
Normal file
@@ -0,0 +1,29 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
extends: [
|
||||
'@commitlint/config-conventional', // scoped packages are not prefixed
|
||||
],
|
||||
rules: {
|
||||
'type-enum': [
|
||||
2,
|
||||
'always',
|
||||
[
|
||||
'build',
|
||||
'chore',
|
||||
'ci',
|
||||
'docs',
|
||||
'feat',
|
||||
'fix',
|
||||
'perf',
|
||||
'proposal',
|
||||
'refactor',
|
||||
'release',
|
||||
'revert',
|
||||
'style',
|
||||
'test',
|
||||
'wip',
|
||||
],
|
||||
],
|
||||
},
|
||||
};
|
||||
5
.eslintignore
Normal file
5
.eslintignore
Normal file
@@ -0,0 +1,5 @@
|
||||
coverage/
|
||||
coverage-merged/
|
||||
dist/
|
||||
node_modules/
|
||||
types/
|
||||
99
.eslintrc
Normal file
99
.eslintrc
Normal file
@@ -0,0 +1,99 @@
|
||||
{
|
||||
"extends": ["airbnb-base", "prettier"],
|
||||
"root": true,
|
||||
"env": {
|
||||
"amd": true,
|
||||
"browser": true,
|
||||
"es6": true,
|
||||
"jest": true,
|
||||
"node": true
|
||||
},
|
||||
"globals": {
|
||||
"BigInt": "readonly",
|
||||
"BigInt64Array": "readonly",
|
||||
"BigUint64Array": "readonly",
|
||||
"globalThis": "readonly"
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2020,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": [
|
||||
"prettier"
|
||||
],
|
||||
"rules": {
|
||||
"prettier/prettier": "error",
|
||||
// Overridden
|
||||
"camelcase": ["error", { "properties": "never", "allow": [ "W[0-9]+_"] }],
|
||||
"import/extensions": "off",
|
||||
"no-eval": "off",
|
||||
"no-self-compare": "off",
|
||||
"one-var": ["error", "never"],
|
||||
// @TODO: Fix the following rules progressively.
|
||||
"arrow-body-style": "warn",
|
||||
"prefer-arrow-callback": "warn",
|
||||
"prefer-object-spread": "off",
|
||||
"max-classes-per-file": "off",
|
||||
"dot-notation": "off",
|
||||
"object-shorthand": "off",
|
||||
"no-param-reassign": "off",
|
||||
"no-cond-assign": "off",
|
||||
"prefer-destructuring": "off",
|
||||
"func-names": "off",
|
||||
"no-nested-ternary": "off",
|
||||
"no-plusplus": "off",
|
||||
"strict": "off",
|
||||
"no-restricted-syntax": "off",
|
||||
"import/no-mutable-exports": "off",
|
||||
"guard-for-in": "off",
|
||||
"import/prefer-default-export": "off",
|
||||
"prefer-rest-params": "off",
|
||||
"prefer-spread": "off",
|
||||
"no-lonely-if": "off",
|
||||
"no-prototype-builtins": "off",
|
||||
"no-continue": "off",
|
||||
"no-shadow": "off",
|
||||
// Rules up for discussion.
|
||||
"no-multi-assign": "off",
|
||||
"new-cap": "off"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["**/*.ts"],
|
||||
"parserOptions": {
|
||||
"project": "./tsconfig.json"
|
||||
},
|
||||
"extends": [
|
||||
"airbnb-typescript/base",
|
||||
"prettier"
|
||||
],
|
||||
"plugins": ["@typescript-eslint"],
|
||||
"rules": {
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"warn",
|
||||
{
|
||||
"vars": "all",
|
||||
"args": "after-used",
|
||||
"ignoreRestSiblings": true,
|
||||
"argsIgnorePattern": "^_" // For tsc compatibility.
|
||||
}
|
||||
],
|
||||
"comma-dangle": "off",
|
||||
"implicit-arrow-linebreak": "off", // Conflicts with prettier.
|
||||
"import/extensions": "off",
|
||||
"import/prefer-default-export": "off",
|
||||
"operator-linebreak": "off",
|
||||
"object-curly-newline": "off",
|
||||
"prefer-rest-params": "off", // We need to use params.
|
||||
"prettier/prettier": "error",
|
||||
"@typescript-eslint/no-shadow": "warn",
|
||||
"@typescript-eslint/no-use-before-define": ["warn", { "functions": false }],
|
||||
"import/no-cycle": "warn",
|
||||
"no-bitwise": "off",
|
||||
"no-unsafe-finally": "warn",
|
||||
"no-param-reassign": "off",
|
||||
"no-shadow": "warn"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1 +1,2 @@
|
||||
* text=auto
|
||||
*.lockb binary diff=lockb
|
||||
|
||||
47
.github/CONTRIBUTING.md
vendored
47
.github/CONTRIBUTING.md
vendored
@@ -1,8 +1,14 @@
|
||||
# :construction: Notice :construction:
|
||||
|
||||
Pardon the mess. The `master` branch is in flux while we work on Lodash v5. This
|
||||
means things like npm scripts, which we encourage using for contributions, may
|
||||
not be working. Thank you for your patience.
|
||||
|
||||
# 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
|
||||
[code of conduct](https://code-of-conduct.openjsf.org) &
|
||||
[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/).
|
||||
@@ -13,30 +19,28 @@ Feature requests should be submitted in the
|
||||
[issue tracker](https://github.com/lodash/lodash/issues), with a description of
|
||||
the expected behavior & use case, where they’ll remain closed until sufficient interest,
|
||||
[e.g. :+1: reactions](https://help.github.com/articles/about-discussions-in-issues-and-pull-requests/),
|
||||
has been shown by the community. Before submitting a request, please search for
|
||||
similar ones in the
|
||||
has been [shown by the community](https://github.com/lodash/lodash/issues?q=label%3A%22votes+needed%22+sort%3Areactions-%2B1-desc).
|
||||
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. Don’t
|
||||
worry about regenerating the `dist/` or `doc/` files.
|
||||
For additions or bug fixes, please modify the relevant files. Include
|
||||
updated unit tests in the `test` directory as part of your pull request.
|
||||
Unit test files should be named `[filename].test.js`.
|
||||
|
||||
Before running the unit tests you’ll 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.
|
||||
Run unit tests from the command-line via `npm test`.
|
||||
|
||||
## Contributor License Agreement
|
||||
|
||||
Lodash is a member of the [jQuery Foundation](https://jquery.org/).
|
||||
As such, we request that all contributors sign the jQuery Foundation
|
||||
[contributor license agreement (CLA)](https://contribute.jquery.org/CLA/).
|
||||
Lodash is a member of the [JS Foundation](https://openjsf.org/).
|
||||
As such, we request that all contributors sign the JS Foundation
|
||||
[contributor license agreement (CLA)](https://cla.js.foundation/lodash/lodash).
|
||||
|
||||
For more information about CLAs, please check out Alex Russell’s excellent post,
|
||||
[“Why Do I Need to Sign This?”](http://infrequently.org/2008/06/why-do-i-need-to-sign-this/).
|
||||
[“Why Do I Need to Sign This?”](https://infrequently.org/2008/06/why-do-i-need-to-sign-this/).
|
||||
|
||||
## Coding Guidelines
|
||||
|
||||
@@ -48,7 +52,7 @@ established in the code.
|
||||
|
||||
- **Naming**:<br>
|
||||
Keep variable & method names concise & descriptive.<br>
|
||||
Variable names `index`, `collection`, & `callback` are preferable to
|
||||
Variable names `index`, `array`, & `iteratee` are preferable to
|
||||
`i`, `arr`, & `fn`.
|
||||
|
||||
- **Quotes**:<br>
|
||||
@@ -61,18 +65,7 @@ established in the code.
|
||||
[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):
|
||||
Guidelines are enforced using [ESLint](https://www.npmjs.com/package/eslint):
|
||||
```bash
|
||||
$ npm run style
|
||||
```
|
||||
|
||||
## Tips
|
||||
|
||||
You can opt-in to a pre-push git hook by adding an `.opt-in` file to the root of
|
||||
the project containing:
|
||||
```txt
|
||||
pre-push
|
||||
```
|
||||
|
||||
With that, when you `git push`, the pre-push git hook will trigger and execute
|
||||
`npm run validate`.
|
||||
|
||||
24
.github/lock.yml
vendored
Normal file
24
.github/lock.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
# Configuration for lock-threads - https://github.com/dessant/lock-threads
|
||||
|
||||
# Number of days of inactivity before a closed issue or pull request is locked
|
||||
daysUntilLock: 365
|
||||
|
||||
# Skip issues and pull requests created before a given timestamp. Timestamp must
|
||||
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
|
||||
skipCreatedBefore: false
|
||||
|
||||
# Issues and pull requests with these labels will not be locked. Set to `[]` to disable
|
||||
exemptLabels:
|
||||
- votes needed
|
||||
|
||||
# Label to add before locking, such as `outdated`. Set to `false` to disable
|
||||
lockLabel: false
|
||||
|
||||
# Comment to post before locking. Set to `false` to disable
|
||||
lockComment: >
|
||||
This thread has been automatically locked since there has not been
|
||||
any recent activity after it was closed. Please open a new issue for
|
||||
related bugs.
|
||||
|
||||
# Assign `resolved` as the reason for locking. Set to `false` to disable
|
||||
setLockReason: true
|
||||
16
.github/workflows/tests.yml
vendored
Normal file
16
.github/workflows/tests.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
name: CI
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
push:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version: 1.0.2
|
||||
- run: bun install
|
||||
15
.gitignore
vendored
15
.gitignore
vendored
@@ -1,9 +1,8 @@
|
||||
.DS_Store
|
||||
*.custom.*
|
||||
*.log
|
||||
*.map
|
||||
lodash.compat.min.js
|
||||
coverage
|
||||
node_modules
|
||||
.opt-in
|
||||
.opt-out
|
||||
*.log*
|
||||
dist/
|
||||
node_modules/
|
||||
*.code-workspace
|
||||
*.lockb
|
||||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
|
||||
1
.husky/.gitignore
vendored
Normal file
1
.husky/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
_
|
||||
4
.husky/commit-msg
Executable file
4
.husky/commit-msg
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
bun run commitlint --edit "$1"
|
||||
4
.husky/pre-commit
Executable file
4
.husky/pre-commit
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
bun run lint-staged
|
||||
96
.jscsrc
96
.jscsrc
@@ -1,96 +0,0 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
}
|
||||
5
.prettierignore
Normal file
5
.prettierignore
Normal file
@@ -0,0 +1,5 @@
|
||||
coverage/
|
||||
coverage-merged/
|
||||
dist/
|
||||
node_modules/
|
||||
types/
|
||||
6
.prettierrc
Normal file
6
.prettierrc
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"printWidth": 100,
|
||||
"useTabs": false,
|
||||
"tabWidth": 4,
|
||||
"singleQuote": true
|
||||
}
|
||||
77
.travis.yml
77
.travis.yml
@@ -1,77 +0,0 @@
|
||||
language: node_js
|
||||
sudo: false
|
||||
node_js:
|
||||
- "5"
|
||||
env:
|
||||
global:
|
||||
- BIN="node" ISTANBUL=false OPTION=""
|
||||
- SAUCE_LABS=false SAUCE_USERNAME="lodash"
|
||||
- secure: "tg1JFsIFnxzLaTboFPOnm+aJCuMm5+JdhLlESlqg9x3fwro++7KCnwHKLNovhchaPe4otC43ZMB/nfWhDnDm11dKbm/V6HlTkED+dadTsaLxVDg6J+7yK41QhokBPJOxLV78iDaNaAQVYEirAgZ0yn8kFubxmNKV+bpCGQNc9yU="
|
||||
matrix:
|
||||
-
|
||||
- BIN="phantomjs"
|
||||
- ISTANBUL=true
|
||||
- SAUCE_LABS=true
|
||||
matrix:
|
||||
include:
|
||||
- node_js: "0.10"
|
||||
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 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]="|\bcase\s+(?:dataView|set|map|weakMap)CtorString:.+|g"
|
||||
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 ] || 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.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\""
|
||||
@@ -1,74 +0,0 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, gender identity and expression, level of experience,
|
||||
nationality, personal appearance, race, religion, or sexual identity and
|
||||
orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
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.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at [coc@lodash.com](mailto:coc@lodash.com).
|
||||
The project team will review and investigate all complaints, and will respond in
|
||||
a way that it deems appropriate to the circumstances. The project team is obligated
|
||||
to maintain confidentiality with regard to the reporter of an incident. Further
|
||||
details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
4
LICENSE
4
LICENSE
@@ -1,4 +1,6 @@
|
||||
Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||
The MIT License
|
||||
|
||||
Copyright JS Foundation and other contributors <https://js.foundation/>
|
||||
|
||||
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
80
README.md
80
README.md
@@ -1,52 +1,72 @@
|
||||
# lodash v4.10.0
|
||||
# lodash
|
||||
|
||||
[Site](https://lodash.com/) |
|
||||
[Docs](https://lodash.com/docs) |
|
||||
[Contributing](https://github.com/lodash/lodash/blob/master/.github/CONTRIBUTING.md) |
|
||||
[Wiki](https://github.com/lodash/lodash/wiki "Changelog, Roadmap, etc.") |
|
||||
[Code of Conduct](https://code-of-conduct.openjsf.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
|
||||
$ npm run build
|
||||
```shell
|
||||
$ bun run build
|
||||
$ lodash -o ./dist/lodash.js
|
||||
$ lodash core -o ./dist/lodash.core.js
|
||||
```
|
||||
|
||||
## Community
|
||||
|
||||
[](https://gitter.im/lodash/lodash)
|
||||
|
||||
## Documentation
|
||||
|
||||
* [API Documentation](https://lodash.com/docs)
|
||||
* [FP Guide](https://github.com/lodash/lodash/wiki/FP-Guide)
|
||||
|
||||
## Download
|
||||
|
||||
Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.10.0/LICENSE) & supports [modern environments](#support).<br>
|
||||
* [Core build](https://raw.githubusercontent.com/lodash/lodash/4.17.10-npm/core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.17.10-npm/core.min.js))
|
||||
* [Full build](https://raw.githubusercontent.com/lodash/lodash/4.17.10-npm/lodash.js) ([~24 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.17.10-npm/lodash.min.js))
|
||||
* [CDN copies](https://www.jsdelivr.com/projects/lodash) [](https://www.jsdelivr.com/package/npm/lodash)
|
||||
|
||||
Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.17.10-npm/LICENSE) & supports modern environments.<br>
|
||||
Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick one that’s right for you.
|
||||
|
||||
* [Core build](https://raw.githubusercontent.com/lodash/lodash/4.10.0/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.10.0/dist/lodash.core.min.js))
|
||||
* [Full build](https://raw.githubusercontent.com/lodash/lodash/4.10.0/dist/lodash.js) ([~21 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.10.0/dist/lodash.min.js))
|
||||
* [CDN copies](https://www.jsdelivr.com/projects/lodash)
|
||||
## Installation
|
||||
|
||||
In a browser:
|
||||
```html
|
||||
<script src="lodash.js"></script>
|
||||
```
|
||||
|
||||
Using bun:
|
||||
```shell
|
||||
$ bun i lodash
|
||||
```
|
||||
|
||||
In [Bun](https://bun.sh):
|
||||
```js
|
||||
// Load the full build.
|
||||
var _ = require('lodash');
|
||||
// Load the core build.
|
||||
var _ = require('lodash/core');
|
||||
// Load the FP build for immutable auto-curried iteratee-first data-last methods.
|
||||
var fp = require('lodash/fp');
|
||||
|
||||
// Load method categories.
|
||||
var array = require('lodash/array');
|
||||
var object = require('lodash/fp/object');
|
||||
|
||||
// Cherry-pick methods for smaller browserify/rollup/webpack bundles.
|
||||
var at = require('lodash/at');
|
||||
var curryN = require('lodash/fp/curryN');
|
||||
```
|
||||
|
||||
Looking for Lodash modules written in ES6 or smaller bundle sizes? Check out [lodash-es](https://www.npmjs.com/package/lodash-es).
|
||||
|
||||
## Why Lodash?
|
||||
|
||||
Lodash makes JavaScript easier by taking the hassle out of working with arrays,<br>
|
||||
numbers, objects, strings, etc. Lodash’s modular methods are great for:
|
||||
|
||||
* Iterating arrays, objects, & strings
|
||||
* Manipulating & testing values
|
||||
* Creating composite functions
|
||||
* 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.10.0-npm/fp)
|
||||
|
||||
## Further Reading
|
||||
|
||||
* [Contributing](https://github.com/lodash/lodash/blob/4.10.0/.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)
|
||||
* [lodash](https://www.npmjs.com/package/lodash) & [per method packages](https://www.npmjs.com/search?q=keywords:lodash-modularized)
|
||||
* [lodash-es](https://www.npmjs.com/package/lodash-es), [babel-plugin-lodash](https://www.npmjs.com/package/babel-plugin-lodash), & [lodash-webpack-plugin](https://www.npmjs.com/package/lodash-webpack-plugin)
|
||||
|
||||
35
SECURITY.md
Normal file
35
SECURITY.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported versions
|
||||
|
||||
The following table describes the versions of this project that are currently
|
||||
supported with security updates:
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | ------------------ |
|
||||
| 4.x | :white_check_mark: |
|
||||
| 3.x | :x: |
|
||||
| 2.x | :x: |
|
||||
| 1.x | :x: |
|
||||
|
||||
## Responsible disclosure security policy
|
||||
|
||||
A responsible disclosure policy helps protect users of the project from publicly
|
||||
disclosed security vulnerabilities without a fix by employing a process where
|
||||
vulnerabilities are first triaged in a private manner, and only publicly disclosed
|
||||
after a reasonable time period that allows patching the vulnerability and provides
|
||||
an upgrade path for users.
|
||||
|
||||
We kindly ask you to refrain from malicious acts that put our users, the project,
|
||||
or any of the project’s team members at risk.
|
||||
|
||||
## Reporting a security issue
|
||||
|
||||
We consider the security of Lodash a top priority. But no matter how much effort
|
||||
we put into security, there can still be vulnerabilities present.
|
||||
|
||||
If you discover a security vulnerability, please report the security issue
|
||||
directly to the Lodash maintainers through the Security tab of the Lodash
|
||||
repository.
|
||||
|
||||
Your efforts to responsibly disclose your findings are sincerely appreciated.
|
||||
2
bunfig.toml
Normal file
2
bunfig.toml
Normal file
@@ -0,0 +1,2 @@
|
||||
[install.lockfile]
|
||||
print = "yarn"
|
||||
3998
dist/lodash.core.js
vendored
3998
dist/lodash.core.js
vendored
File diff suppressed because it is too large
Load Diff
30
dist/lodash.core.min.js
vendored
30
dist/lodash.core.min.js
vendored
@@ -1,30 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* lodash 4.10.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
||||
* Build: `lodash core -o ./dist/lodash.core.js`
|
||||
*/
|
||||
;(function(){function n(n,t){return n.push.apply(n,t),n}function t(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===pn?i===i:r(i,c)))var c=i,f=o}return f}function r(n,t,r){var e;return r(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return w(t,function(t){return n[t]})}function o(n){return n&&n.Object===Object?n:null}function i(n){return gn[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"||yn.test(n)?+n:-1,n>-1&&0==n%1&&(null==t?9007199254740991:t)>n}function a(n){return n instanceof l?n: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===pn)||(u=En[r],u=(n===u||n!==n&&u!==u)&&!kn.call(e,r)),u?t:n}function s(n){return Z(n)?Bn(n):{}}function h(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){
|
||||
n.apply(pn,r)},t)}function v(n,t){var r=true;return Cn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function y(n,t){var r=[];return Cn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function g(t,r,e,u,o){var i=-1,c=t.length;for(e||(e=C),o||(o=[]);++i<c;){var f=t[i];r>0&&e(f)?r>1?g(f,r-1,e,u,o):n(o,f):u||(o[o.length]=f)}return o}function b(n,t){return n&&Gn(n,t,on)}function _(n,t){return y(t,function(t){return X(n[t])})}function j(n,t,r,e,u){return n===t?true:null==n||null==t||!Z(n)&&!nn(t)?n!==n&&t!==t:d(n,t,j,r,e,u);
|
||||
}function d(n,t,r,e,u,o){var i=Vn(n),f=Vn(t),a="[object Array]",l="[object Array]";i||(a=Sn.call(n),a="[object Arguments]"==a?"[object Object]":a),f||(l=Sn.call(t),l="[object Arguments]"==l?"[object Object]":l);var p="[object Object]"==a&&!c(n),f="[object Object]"==l&&!c(t),l=a==l;o||(o=[]);var s=M(o,function(t){return t[0]===n});return s&&s[1]?s[1]==t:(o.push([n,t]),l&&!p?(r=i||isTypedArray(n)?I(n,t,r,e,u,o):$(n,t,a),o.pop(),r):2&u||(i=p&&kn.call(n,"__wrapped__"),a=f&&kn.call(t,"__wrapped__"),!i&&!a)?l?(r=q(n,t,r,e,u,o),
|
||||
o.pop(),r):false:(i=i?n.value():n,t=a?t.value():t,r=r(i,t,e,u,o),o.pop(),r))}function m(n){return typeof n=="function"?n:null==n?an:(typeof n=="object"?x:E)(n)}function O(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function w(n,t){var r=-1,e=W(n)?Array(n.length):[];return Cn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function x(n){var t=on(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],pn,3)))return false}return true}}function A(n,t){
|
||||
return n=Object(n),U(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function E(n){return function(t){return null==t?pn: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 Cn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function T(t,r){return U(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];kn.call(f,i)&&(a===c||a!==a&&c!==c)&&(c!==pn||i in f)||(f[i]=c)}return r}function R(n){return H(function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:pn,o=typeof o=="function"?(u--,o):pn;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 Z(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!==xn&&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!==pn){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=on(n),f=c.length,a=on(t).length;if(f!=a&&!i)return false;for(var l=f;l--;){var p=c[l];if(!(i?p in t:kn.call(t,p)))return false}for(a=true;++l<f;){var p=c[l],s=n[p],h=t[p];if(void 0!==pn||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:pn;if(Y(t)&&(Vn(n)||rn(n)||Q(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){return nn(n)&&W(n)&&(Vn(n)||Q(n))}function G(n){var t=n&&n.constructor;return n===(typeof t=="function"&&t.prototype||En)}function J(n){return n?n[0]:pn}function M(n,t){return r(n,m(t),Cn)}function P(n,t){return Cn(n,m(t))}function U(n,t,r){return e(n,m(t),r,3>arguments.length,Cn)}function V(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");
|
||||
return n=Hn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=pn),r}}function H(n){var t;if(typeof n!="function")throw new TypeError("Expected a function");return t=qn(t===pn?n.length-1:Hn(t),0),function(){for(var r=arguments,e=-1,u=qn(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 K(){if(!arguments.length)return[];var n=arguments[0];return Vn(n)?n:[n]}function L(n,t){return n>t}function Q(n){return nn(n)&&W(n)&&kn.call(n,"callee")&&(!Dn.call(n,"callee")||"[object Arguments]"==Sn.call(n));
|
||||
}function W(n){return null!=n&&Y(Jn(n))&&!X(n)}function X(n){return n=Z(n)?Sn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function Y(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n}function Z(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function nn(n){return!!n&&typeof n=="object"}function tn(n){return typeof n=="number"||nn(n)&&"[object Number]"==Sn.call(n)}function rn(n){return typeof n=="string"||!Vn(n)&&nn(n)&&"[object String]"==Sn.call(n)}function en(n,t){
|
||||
return t>n}function un(n){return typeof n=="string"?n:null==n?"":n+""}function on(n){var t=G(n);if(!t&&!W(n))return $n(Object(n));var r,e=z(n),u=!!e,e=e||[],o=e.length;for(r in n)!kn.call(n,r)||u&&("length"==r||f(r,o))||t&&"constructor"==r||e.push(r);return e}function cn(n){for(var t=-1,r=G(n),e=O(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||!kn.call(n,a))||o.push(a)}return o}function fn(n){return n?u(n,on(n)):[]}function an(n){return n;
|
||||
}function ln(t,r,e){var u=on(r),o=_(r,u);null!=e||Z(r)&&(o.length||!u.length)||(e=r,r=t,t=this,o=_(r,on(r)));var i=Z(e)&&"chain"in e?e.chain:true,c=X(t);return Cn(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 pn,sn=1/0,hn=/[&<>"'`]/g,vn=RegExp(hn.source),yn=/^(?:0|[1-9]\d*)$/,gn={
|
||||
"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},bn={"function":true,object:true},_n=bn[typeof exports]&&exports&&!exports.nodeType?exports:pn,jn=bn[typeof module]&&module&&!module.nodeType?module:pn,dn=jn&&jn.exports===_n?_n:pn,mn=o(bn[typeof self]&&self),On=o(bn[typeof window]&&window),wn=o(bn[typeof this]&&this),xn=o(_n&&jn&&typeof global=="object"&&global)||On!==(wn&&wn.window)&&On||mn||wn||Function("return this")(),An=Array.prototype,En=Object.prototype,kn=En.hasOwnProperty,Nn=0,Sn=En.toString,Tn=xn._,Fn=xn.Reflect,Rn=Fn?Fn.f:pn,Bn=Object.create,Dn=En.propertyIsEnumerable,In=xn.isFinite,$n=Object.keys,qn=Math.max,zn=!Dn.call({
|
||||
valueOf:1},"valueOf");l.prototype=s(a.prototype),l.prototype.constructor=l;var Cn=function(n,t){return function(r,e){if(null==r)return r;if(!W(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}}(b),Gn=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}}();Rn&&!Dn.call({valueOf:1},"valueOf")&&(O=function(n){n=Rn(n);for(var t,r=[];!(t=n.next()).done;)r.push(t.value);
|
||||
return r});var Jn=E("length"),Mn=H(function(n,t,r){return D(n,t,r)}),Pn=H(function(n,t){return h(n,1,t)}),Un=H(function(n,t,r){return h(n,Kn(t)||0,r)}),Vn=Array.isArray,Hn=Number,Kn=Number,Ln=R(function(n,t){F(t,on(t),n)}),Qn=R(function(n,t){F(t,cn(t),n)}),Wn=R(function(n,t,r,e){F(t,cn(t),n,e)}),Xn=H(function(n){return n.push(pn,p),Wn.apply(pn,n)}),Yn=H(function(n,t){return null==n?{}:A(n,g(t,1))}),Zn=m;a.assignIn=Qn,a.before=V,a.bind=Mn,a.chain=function(n){return n=a(n),n.__chain__=true,n},a.compact=function(n){
|
||||
return y(n,Boolean)},a.concat=function(){var t=arguments.length,r=K(arguments[0]);if(2>t)return t?N(r):[];for(var e=Array(t-1);t--;)e[t-1]=arguments[t];return g(e,1),n(N(r),fn)},a.create=function(n,t){var r=s(n);return t?Ln(r,t):r},a.defaults=Xn,a.defer=Pn,a.delay=Un,a.filter=function(n,t){return y(n,m(t))},a.flatten=function(n){return n&&n.length?g(n,1):[]},a.flattenDeep=function(n){return n&&n.length?g(n,sn):[]},a.iteratee=Zn,a.keys=on,a.map=function(n,t){return w(n,m(t))},a.matches=function(n){
|
||||
return x(Ln({},n))},a.mixin=ln,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 V(2,n)},a.pick=Yn,a.slice=function(n,t,r){var e=n?n.length:0;return r=r===pn?e:+r,e?k(n,null==t?0:+t,r):[]},a.sortBy=function(n,t){var r=0;return t=m(t),w(w(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===pn,i=r===r,c=null===e,f=e===pn,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}),E("c"))},a.tap=function(n,t){return t(n),n},a.thru=function(n,t){return t(n)},a.toArray=function(n){return W(n)?n.length?N(n):[]:fn(n)},a.values=fn,a.extend=Qn,ln(a,a),a.clone=function(n){return Z(n)?Vn(n)?N(n):F(n,on(n)):n},a.escape=function(n){return(n=un(n))&&vn.test(n)?n.replace(hn,i):n},a.every=function(n,t,r){return t=r?pn:t,v(n,m(t))},a.find=M,a.forEach=P,a.has=function(n,t){return null!=n&&kn.call(n,t);
|
||||
},a.head=J,a.identity=an,a.indexOf=function(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?qn(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=Q,a.isArray=Vn,a.isBoolean=function(n){return true===n||false===n||nn(n)&&"[object Boolean]"==Sn.call(n)},a.isDate=function(n){return nn(n)&&"[object Date]"==Sn.call(n)},a.isEmpty=function(n){if(W(n)&&(Vn(n)||rn(n)||X(n.splice)||Q(n)))return!n.length;for(var t in n)if(kn.call(n,t))return false;return!(zn&&on(n).length);
|
||||
},a.isEqual=function(n,t){return j(n,t)},a.isFinite=function(n){return typeof n=="number"&&In(n)},a.isFunction=X,a.isNaN=function(n){return tn(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=tn,a.isObject=Z,a.isRegExp=function(n){return Z(n)&&"[object RegExp]"==Sn.call(n)},a.isString=rn,a.isUndefined=function(n){return n===pn},a.last=function(n){var t=n?n.length:0;return t?n[t-1]:pn},a.max=function(n){return n&&n.length?t(n,an,L):pn},a.min=function(n){return n&&n.length?t(n,an,en):pn},
|
||||
a.noConflict=function(){return xn._===this&&(xn._=Tn),this},a.noop=function(){},a.reduce=U,a.result=function(n,t,r){return t=null==n?pn:n[t],t===pn&&(t=r),X(t)?t.call(n):t},a.size=function(n){return null==n?0:(n=W(n)?n:on(n),n.length)},a.some=function(n,t,r){return t=r?pn:t,S(n,m(t))},a.uniqueId=function(n){var t=++Nn;return un(n)+t},a.each=P,a.first=J,ln(a,function(){var n={};return b(a,function(t,r){kn.call(a.prototype,r)||(n[r]=t)}),n}(),{chain:false}),a.VERSION="4.10.0",Cn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){
|
||||
var t=(/^(?:replace|split)$/.test(n)?String.prototype:An)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);a.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Vn(u)?u:[],n)}return this[r](function(r){return t.apply(Vn(r)?r:[],n)})}}),a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=function(){return T(this.__wrapped__,this.__actions__)},(On||mn||{})._=a,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){
|
||||
return a}):_n&&jn?(dn&&((jn.exports=a)._=a),_n._=a):xn._=a}).call(this);
|
||||
861
dist/lodash.fp.js
vendored
861
dist/lodash.fp.js
vendored
@@ -1,861 +0,0 @@
|
||||
(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 with conversion `options` applied.
|
||||
*
|
||||
* @param {Function} lodash The lodash function to convert.
|
||||
* @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,
|
||||
fallbackHolder = __webpack_require__(3);
|
||||
|
||||
/**
|
||||
* Creates a function, with an arity of `n`, that invokes `func` with the
|
||||
* arguments it receives.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
* @param {number} n The arity of the new function.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function baseArity(func, n) {
|
||||
return n == 2
|
||||
? function(a, b) { return func.apply(undefined, arguments); }
|
||||
: function(a) { return func.apply(undefined, arguments); };
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func`, with up to `n` arguments, ignoring
|
||||
* any additional arguments.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to cap arguments for.
|
||||
* @param {number} n The arity cap.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function baseAry(func, n) {
|
||||
return n == 2
|
||||
? function(a, b) { return func(a, b); }
|
||||
: function(a) { return func(a); };
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `array`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to clone.
|
||||
* @returns {Array} Returns the cloned array.
|
||||
*/
|
||||
function cloneArray(array) {
|
||||
var length = array ? array.length : 0,
|
||||
result = Array(length);
|
||||
|
||||
while (length--) {
|
||||
result[length] = array[length];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that clones a given object using the assignment `func`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The assignment function.
|
||||
* @returns {Function} Returns the new cloner function.
|
||||
*/
|
||||
function createCloner(func) {
|
||||
return function(object) {
|
||||
return func({}, object);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` and uses `cloner` to clone the first
|
||||
* argument it receives.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
* @param {Function} cloner The function to clone arguments.
|
||||
* @returns {Function} Returns the new immutable function.
|
||||
*/
|
||||
function immutWrap(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;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 convert.
|
||||
* @param {Function} func The function to convert.
|
||||
* @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 forceCurry = ('curry' in options) && options.curry,
|
||||
forceFixed = ('fixed' in options) && options.fixed,
|
||||
forceRearg = ('rearg' in options) && options.rearg,
|
||||
placeholder = isLib ? func : fallbackHolder,
|
||||
pristine = isLib ? func.runInContext() : undefined;
|
||||
|
||||
var helpers = isLib ? func : {
|
||||
'ary': util.ary,
|
||||
'assign': util.assign,
|
||||
'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,
|
||||
assign = helpers.assign,
|
||||
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 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);
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a clone of `object` by `path`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to clone.
|
||||
* @param {Array|string} path The path to clone by.
|
||||
* @returns {Object} Returns the cloned object.
|
||||
*/
|
||||
function cloneByPath(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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `lodash` to an immutable auto-curried iteratee-first data-last
|
||||
* version with conversion `options` applied.
|
||||
*
|
||||
* @param {Object} [options] The options object. See `baseConvert` for more details.
|
||||
* @returns {Function} Returns the converted `lodash`.
|
||||
*/
|
||||
function convertLib(options) {
|
||||
return _.runInContext.convert(options)(undefined);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a converter function for `func` of `name`.
|
||||
*
|
||||
* @param {string} name The name of the function to convert.
|
||||
* @param {Function} func The function to convert.
|
||||
* @returns {Function} Returns the new converter function.
|
||||
*/
|
||||
function createConverter(name, func) {
|
||||
var oldOptions = options;
|
||||
return function(options) {
|
||||
var newUtil = isLib ? pristine : helpers,
|
||||
newFunc = isLib ? pristine[name] : func,
|
||||
newOptions = assign(assign({}, oldOptions), options);
|
||||
|
||||
return baseConvert(newUtil, name, newFunc, newOptions);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` to invoke its iteratee, with up to `n`
|
||||
* arguments, ignoring any additional arguments.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to cap iteratee arguments for.
|
||||
* @param {number} n The arity cap.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function iterateeAry(func, n) {
|
||||
return overArg(func, function(func) {
|
||||
return typeof func == 'function' ? baseAry(func, n) : func;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` to invoke its iteratee with arguments
|
||||
* arranged according to the specified `indexes` where the argument value at
|
||||
* the first index is provided as the first argument, the argument value at
|
||||
* the second index is provided as the second argument, and so on.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to rearrange iteratee arguments for.
|
||||
* @param {number[]} indexes The arranged argument indexes.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function iterateeRearg(func, indexes) {
|
||||
return overArg(func, function(func) {
|
||||
var n = indexes.length;
|
||||
return baseArity(rearg(baseAry(func, n), indexes), n);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with its first argument passed
|
||||
* thru `transform`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
* @param {...Function} transform The functions to transform the first argument.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function overArg(func, transform) {
|
||||
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] = transform(args[index]);
|
||||
return func.apply(undefined, args);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` and applys the conversions
|
||||
* rules by `name`.
|
||||
*
|
||||
* @private
|
||||
* @param {string} name The name of the function to wrap.
|
||||
* @param {Function} func The function to wrap.
|
||||
* @returns {Function} Returns the converted function.
|
||||
*/
|
||||
function wrap(name, func) {
|
||||
name = mapping.aliasToReal[name] || name;
|
||||
|
||||
var result,
|
||||
wrapped = func,
|
||||
wrapper = wrappers[name];
|
||||
|
||||
if (wrapper) {
|
||||
wrapped = wrapper(func);
|
||||
}
|
||||
else 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);
|
||||
}
|
||||
}
|
||||
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 && (forceFixed || !mapping.skipFixed[name])) {
|
||||
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 (forceCurry || (config.curry && aryKey > 1)) {
|
||||
forceCurry && console.log(forceCurry, name);
|
||||
result = curry(result, aryKey);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return !result;
|
||||
});
|
||||
|
||||
result || (result = wrapped);
|
||||
if (result == func) {
|
||||
result = forceCurry ? curry(result, 1) : function() {
|
||||
return func.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
result.convert = createConverter(name, func);
|
||||
if (mapping.placeholder[name]) {
|
||||
setPlaceholder = true;
|
||||
result.placeholder = func.placeholder = placeholder;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
if (!isObj) {
|
||||
return wrap(name, func);
|
||||
}
|
||||
var _ = func;
|
||||
|
||||
// Convert methods by 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)]);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Convert remaining methods.
|
||||
each(keys(_), function(key) {
|
||||
var func = _[key];
|
||||
if (typeof func == 'function') {
|
||||
var length = pairs.length;
|
||||
while (length--) {
|
||||
if (pairs[length][0] == key) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
func.convert = createConverter(key, func);
|
||||
pairs.push([key, func]);
|
||||
}
|
||||
});
|
||||
|
||||
// Assign to `_` leaving `_.prototype` unchanged to allow chaining.
|
||||
each(pairs, function(pair) {
|
||||
_[pair[0]] = pair[1];
|
||||
});
|
||||
|
||||
_.convert = convertLib;
|
||||
if (setPlaceholder) {
|
||||
_.placeholder = placeholder;
|
||||
}
|
||||
// Assign 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 = {
|
||||
|
||||
// Lodash aliases.
|
||||
'each': 'forEach',
|
||||
'eachRight': 'forEachRight',
|
||||
'entries': 'toPairs',
|
||||
'entriesIn': 'toPairsIn',
|
||||
'extend': 'assignIn',
|
||||
'extendWith': 'assignInWith',
|
||||
'first': 'head',
|
||||
|
||||
// Ramda aliases.
|
||||
'__': 'placeholder',
|
||||
'all': 'every',
|
||||
'allPass': 'overEvery',
|
||||
'always': 'constant',
|
||||
'any': 'some',
|
||||
'anyPass': 'overSome',
|
||||
'apply': 'spread',
|
||||
'assoc': 'set',
|
||||
'assocPath': 'set',
|
||||
'complement': 'negate',
|
||||
'compose': 'flowRight',
|
||||
'contains': 'includes',
|
||||
'dissoc': 'unset',
|
||||
'dissocPath': 'unset',
|
||||
'equals': 'isEqual',
|
||||
'identical': 'eq',
|
||||
'init': 'initial',
|
||||
'invertObj': 'invert',
|
||||
'juxt': 'over',
|
||||
'omitAll': 'omit',
|
||||
'nAry': 'ary',
|
||||
'path': 'get',
|
||||
'pathEq': 'matchesProperty',
|
||||
'pathOr': 'getOr',
|
||||
'paths': 'at',
|
||||
'pickAll': 'pick',
|
||||
'pipe': 'flow',
|
||||
'prop': 'get',
|
||||
'propEq': 'matchesProperty',
|
||||
'propOr': 'getOr',
|
||||
'props': 'at',
|
||||
'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',
|
||||
'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method',
|
||||
'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse',
|
||||
'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
|
||||
'uniqueId', 'words'
|
||||
],
|
||||
'2': [
|
||||
'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll',
|
||||
'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
|
||||
'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference',
|
||||
'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith',
|
||||
'eq', 'every', 'filter', 'find', 'find', 'findIndex', 'findKey', 'findLast',
|
||||
'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth',
|
||||
'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight',
|
||||
'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf',
|
||||
'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch',
|
||||
'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues',
|
||||
'matchesProperty', 'maxBy', 'meanBy', 'merge', 'minBy', 'multiply', 'omit', 'omitBy',
|
||||
'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', 'partialRight',
|
||||
'partition', 'pick', 'pickBy', 'pull', 'pullAll', 'pullAt', 'random', 'range',
|
||||
'rangeRight', 'rearg', 'reject', 'remove', 'repeat', 'restFrom', 'result',
|
||||
'sampleSize', 'some', 'sortBy', 'sortedIndex', 'sortedIndexOf', 'sortedLastIndex',
|
||||
'sortedLastIndexOf', 'sortedUniqBy', 'split', 'spreadFrom', 'startsWith',
|
||||
'subtract', 'sumBy', 'take', 'takeRight', 'takeRightWhile', 'takeWhile', 'tap',
|
||||
'throttle', 'thru', 'times', 'trimChars', 'trimCharsEnd', 'trimCharsStart',
|
||||
'truncate', 'union', 'uniqBy', 'uniqWith', 'unset', 'unzipWith', 'without',
|
||||
'wrap', 'xor', 'zip', 'zipObject', 'zipObjectDeep'
|
||||
],
|
||||
'3': [
|
||||
'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
|
||||
'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'invokeArgs',
|
||||
'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', 'mergeWith',
|
||||
'orderBy', 'padChars', 'padCharsEnd', 'padCharsStart', 'pullAllBy',
|
||||
'pullAllWith', 'reduce', 'reduceRight', 'replace', 'set', 'slice',
|
||||
'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith',
|
||||
'update', 'xorBy', 'xorWith', 'zipWith'
|
||||
],
|
||||
'4': [
|
||||
'fill', 'setWith', 'updateWith'
|
||||
]
|
||||
};
|
||||
|
||||
/** 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 = {
|
||||
'dropRightWhile': 1,
|
||||
'dropWhile': 1,
|
||||
'every': 1,
|
||||
'filter': 1,
|
||||
'find': 1,
|
||||
'findIndex': 1,
|
||||
'findKey': 1,
|
||||
'findLast': 1,
|
||||
'findLastIndex': 1,
|
||||
'findLastKey': 1,
|
||||
'flatMap': 1,
|
||||
'flatMapDeep': 1,
|
||||
'flatMapDepth': 1,
|
||||
'forEach': 1,
|
||||
'forEachRight': 1,
|
||||
'forIn': 1,
|
||||
'forInRight': 1,
|
||||
'forOwn': 1,
|
||||
'forOwnRight': 1,
|
||||
'map': 1,
|
||||
'mapKeys': 1,
|
||||
'mapValues': 1,
|
||||
'partition': 1,
|
||||
'reduce': 2,
|
||||
'reduceRight': 2,
|
||||
'reject': 1,
|
||||
'remove': 1,
|
||||
'some': 1,
|
||||
'takeRightWhile': 1,
|
||||
'takeWhile': 1,
|
||||
'times': 1,
|
||||
'transform': 2
|
||||
};
|
||||
|
||||
/** 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],
|
||||
'isEqualWith': [1, 2, 0],
|
||||
'isMatchWith': [2, 1, 0],
|
||||
'mergeWith': [1, 2, 0],
|
||||
'padChars': [2, 1, 0],
|
||||
'padCharsEnd': [2, 1, 0],
|
||||
'padCharsStart': [2, 1, 0],
|
||||
'pullAllBy': [2, 1, 0],
|
||||
'pullAllWith': [2, 1, 0],
|
||||
'setWith': [3, 1, 2, 0],
|
||||
'sortedIndexBy': [2, 1, 0],
|
||||
'sortedLastIndexBy': [2, 1, 0],
|
||||
'updateWith': [3, 1, 2, 0],
|
||||
'zipWith': [1, 2, 0]
|
||||
};
|
||||
|
||||
/** Used to map method names to spread configs. */
|
||||
exports.methodSpread = {
|
||||
'invokeArgs': 2,
|
||||
'invokeArgsMap': 2,
|
||||
'partial': 1,
|
||||
'partialRight': 1,
|
||||
'without': 1
|
||||
};
|
||||
|
||||
/** Used to identify methods which mutate arrays or objects. */
|
||||
exports.mutate = {
|
||||
'array': {
|
||||
'fill': true,
|
||||
'pull': true,
|
||||
'pullAll': true,
|
||||
'pullAllBy': true,
|
||||
'pullAllWith': 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,
|
||||
'update': true,
|
||||
'updateWith': 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',
|
||||
'invokeArgs': 'invoke',
|
||||
'invokeArgsMap': 'invokeMap',
|
||||
'padChars': 'pad',
|
||||
'padCharsEnd': 'padEnd',
|
||||
'padCharsStart': 'padStart',
|
||||
'restFrom': 'rest',
|
||||
'spreadFrom': 'spread',
|
||||
'trimChars': 'trim',
|
||||
'trimCharsEnd': 'trimEnd',
|
||||
'trimCharsStart': 'trimStart'
|
||||
};
|
||||
|
||||
/** Used to track methods that skip fixing their arity. */
|
||||
exports.skipFixed = {
|
||||
'castArray': true,
|
||||
'flow': true,
|
||||
'flowRight': true,
|
||||
'iteratee': true,
|
||||
'mixin': true,
|
||||
'runInContext': true
|
||||
};
|
||||
|
||||
/** Used to track methods that skip rearranging arguments. */
|
||||
exports.skipRearg = {
|
||||
'add': true,
|
||||
'assign': true,
|
||||
'assignIn': true,
|
||||
'bind': true,
|
||||
'bindKey': true,
|
||||
'concat': true,
|
||||
'difference': true,
|
||||
'divide': true,
|
||||
'eq': true,
|
||||
'gt': true,
|
||||
'gte': true,
|
||||
'isEqual': true,
|
||||
'lt': true,
|
||||
'lte': true,
|
||||
'matchesProperty': true,
|
||||
'merge': true,
|
||||
'multiply': true,
|
||||
'overArgs': true,
|
||||
'partial': true,
|
||||
'partialRight': true,
|
||||
'random': true,
|
||||
'range': true,
|
||||
'rangeRight': true,
|
||||
'subtract': true,
|
||||
'without': true,
|
||||
'zip': true,
|
||||
'zipObject': true
|
||||
};
|
||||
|
||||
|
||||
/***/ },
|
||||
/* 3 */
|
||||
/***/ function(module, exports) {
|
||||
|
||||
/**
|
||||
* The default argument placeholder value for methods.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
module.exports = {};
|
||||
|
||||
|
||||
/***/ }
|
||||
/******/ ])
|
||||
});
|
||||
;
|
||||
16
dist/lodash.fp.min.js
vendored
16
dist/lodash.fp.min.js
vendored
@@ -1,16 +0,0 @@
|
||||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.fp=e():t.fp=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){function n(t,e){return i(t,t,e)}var i=r(1);"function"==typeof _&&(_=n(_.runInContext())),
|
||||
t.exports=n},function(t,e,r){function n(t,e){return 2==e?function(e,r){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}}function i(t,e){return 2==e?function(e,r){return t(e,r)}:function(e){return t(e)}}function a(t){for(var e=t?t.length:0,r=Array(e);e--;)r[e]=t[e];return r}function o(t){return function(e){return t({},e)}}function s(t,e){return function(){var r=arguments.length;if(!r)return i;for(var n=Array(r);r--;)n[r]=arguments[r];var i=n[0]=e.apply(void 0,n);return t.apply(void 0,n),
|
||||
i}}function u(t,e,r,d){function f(t,e){e=F(e);for(var r=-1,n=e.length,i=M(Object(t)),a=i;null!=a&&++r<n;){var o=e[r],s=a[o];null!=s&&(a[o]=M(Object(s))),a=a[o]}return i}function h(t){return N.runInContext.convert(t)(void 0)}function y(t,e){var r=d;return function(n){var i=R?B:j,a=R?B[t]:e,o=w(w({},r),n);return u(i,t,a,o)}}function g(t,e){return v(t,function(t){return"function"==typeof t?i(t,e):t})}function m(t,e){return v(t,function(t){var r=e.length;return n(L(i(t,r),e),r)})}function v(t,e){return function(){
|
||||
var r=arguments.length;if(!r)return t();for(var n=Array(r);r--;)n[r]=arguments[r];var i=I.rearg?0:r-1;return n[i]=e(n[i]),t.apply(void 0,n)}}function x(t,e){t=p.aliasToReal[t]||t;var r,n=e,i=_[t];return i?n=i(e):I.immutable&&(l.array[t]?n=s(e,a):l.object[t]?n=s(e,o(e)):l.set[t]&&(n=s(e,f))),P(T,function(e){return P(p.aryMethod[e],function(i){if(t==i){var a=!R&&p.iterateeAry[t],o=p.iterateeRearg[t],s=p.methodSpread[t];return r=n,!I.fixed||!k&&p.skipFixed[t]||(r=void 0===s?C(r,e):D(r,s)),I.rearg&&e>1&&(E||!p.skipRearg[t])&&(r=L(r,p.methodRearg[t]||p.aryRearg[e])),
|
||||
I.cap&&(o?r=m(r,o):a&&(r=g(r,a))),(b||I.curry&&e>1)&&(b&&console.log(b,t),r=q(r,e)),!1}}),!r}),r||(r=n),r==e&&(r=b?q(r,1):function(){return e.apply(this,arguments)}),r.convert=y(t,e),p.placeholder[t]&&(W=!0,r.placeholder=e.placeholder=O),r}var W,R="function"==typeof e,A=e===Object(e);if(A&&(d=r,r=e,e=void 0),null==r)throw new TypeError;d||(d={});var I={cap:"cap"in d?d.cap:!0,curry:"curry"in d?d.curry:!0,fixed:"fixed"in d?d.fixed:!0,immutable:"immutable"in d?d.immutable:!0,rearg:"rearg"in d?d.rearg:!0
|
||||
},b="curry"in d&&d.curry,k="fixed"in d&&d.fixed,E="rearg"in d&&d.rearg,O=R?r:c,B=R?r.runInContext():void 0,j=R?r:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isFunction:t.isFunction,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,spread:t.spread,toPath:t.toPath},C=j.ary,w=j.assign,M=j.clone,q=j.curry,P=j.forEach,S=j.isArray,z=j.isFunction,K=j.keys,L=j.rearg,D=j.spread,F=j.toPath,T=K(p.aryMethod),_={castArray:function(t){return function(){var e=arguments[0];
|
||||
return S(e)?t(a(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[0],r=arguments[1],n=t(e,r),a=n.length;return I.cap&&"number"==typeof r?(r=r>2?r-2:1,a&&r>=a?n:i(n,r)):n}},mixin:function(t){return function(e){var r=this;if(!z(r))return t(r,Object(e));var n=[],i=[];return P(K(e),function(t){var a=e[t];z(a)&&(i.push(t),n.push(r.prototype[t]))}),t(r,Object(e)),P(i,function(t,e){var i=n[e];z(i)?r.prototype[t]=i:delete r.prototype[t]}),r}},runInContext:function(e){
|
||||
return function(r){return u(t,e(r),d)}}};if(!A)return x(e,r);var N=r,V=[];return P(T,function(t){P(p.aryMethod[t],function(t){var e=N[p.remap[t]||t];e&&V.push([t,x(t,e)])})}),P(K(N),function(t){var e=N[t];if("function"==typeof e){for(var r=V.length;r--;)if(V[r][0]==t)return;e.convert=y(t,e),V.push([t,e])}}),P(V,function(t){N[t[0]]=t[1]}),N.convert=h,W&&(N.placeholder=O),P(K(N),function(t){P(p.realToAlias[t]||[],function(e){N[e]=N[t]})}),N}var p=r(2),l=p.mutate,c=r(3);t.exports=u},function(t,e){e.aliasToReal={
|
||||
each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendWith:"assignInWith",first:"head",__:"placeholder",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",equals:"isEqual",identical:"eq",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",
|
||||
pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",unapply:"rest",unnest:"flatten",useWith:"overArgs",whereEq:"filter",zipObj:"zipObject"},e.aryMethod={1:["attempt","castArray","ceil","create","curry","curryRight","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","methodOf","mixin","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words"],
|
||||
2:["add","after","ary","assign","assignIn","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","minBy","multiply","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],
|
||||
3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","getOr","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],
|
||||
4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findIndex:1,findKey:1,findLast:1,findLastIndex:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},e.iterateeRearg={mapKeys:[1]},e.methodRearg={assignInWith:[1,2,0],assignWith:[1,2,0],getOr:[2,1,0],isEqualWith:[1,2,0],
|
||||
isMatchWith:[2,1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],updateWith:[3,1,2,0],zipWith:[1,2,0]},e.methodSpread={invokeArgs:2,invokeArgsMap:2,partial:1,partialRight:1,without:1},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignIn:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsDeep:!0,
|
||||
merge:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,r=e.aliasToReal,n={};for(var i in r){var a=r[i];t.call(n,a)?n[a].push(i):n[a]=[i]}return n}(),e.remap={curryN:"curry",curryRightN:"curryRight",getOr:"get",invokeArgs:"invoke",invokeArgsMap:"invokeMap",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",restFrom:"rest",
|
||||
spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,without:!0,zip:!0,zipObject:!0}},function(t,e){t.exports={}}])});
|
||||
15972
dist/lodash.js
vendored
15972
dist/lodash.js
vendored
File diff suppressed because it is too large
Load Diff
125
dist/lodash.min.js
vendored
125
dist/lodash.min.js
vendored
@@ -1,125 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* lodash 4.10.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
||||
* Build: `lodash -o ./dist/lodash.js`
|
||||
*/
|
||||
;(function(){function t(t,n){return t.set(n[0],n[1]),t}function n(t,n){return t.add(n),t}function r(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}function e(t,n,r,e){for(var u=-1,o=t.length;++u<o;){var i=t[u];n(e,i,r(i),t)}return e}function u(t,n){for(var r=-1,e=t.length;++r<e&&false!==n(t[r],r,t););return t}function o(t,n){for(var r=-1,e=t.length;++r<e;)if(!n(t[r],r,t))return false;
|
||||
return true}function i(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r];n(i,r,t)&&(o[u++]=i)}return o}function f(t,n){return!!t.length&&-1<d(t,n,0)}function c(t,n,r){for(var e=-1,u=t.length;++e<u;)if(r(n,t[e]))return true;return false}function a(t,n){for(var r=-1,e=t.length,u=Array(e);++r<e;)u[r]=n(t[r],r,t);return u}function l(t,n){for(var r=-1,e=n.length,u=t.length;++r<e;)t[u+r]=n[r];return t}function s(t,n,r,e){var u=-1,o=t.length;for(e&&o&&(r=t[++u]);++u<o;)r=n(r,t[u],u,t);return r}function h(t,n,r,e){
|
||||
var u=t.length;for(e&&u&&(r=t[--u]);u--;)r=n(r,t[u],u,t);return r}function p(t,n){for(var r=-1,e=t.length;++r<e;)if(n(t[r],r,t))return true;return false}function _(t,n,r){for(var e=-1,u=t.length;++e<u;){var o=t[e],i=n(o);if(null!=i&&(f===T?i===i:r(i,f)))var f=i,c=o}return c}function v(t,n,r,e){var u;return r(t,function(t,r,o){return n(t,r,o)?(u=e?r:t,false):void 0}),u}function g(t,n,r){for(var e=t.length,u=r?e:-1;r?u--:++u<e;)if(n(t[u],u,t))return u;return-1}function d(t,n,r){if(n!==n)return U(t,r);--r;for(var e=t.length;++r<e;)if(t[r]===n)return r;
|
||||
return-1}function y(t,n,r,e){--r;for(var u=t.length;++r<u;)if(e(t[r],n))return r;return-1}function b(t,n){var r=t?t.length:0;return r?m(t,n)/r:K}function x(t,n,r,e,u){return u(t,function(t,u,o){r=e?(e=false,t):n(r,t,u,o)}),r}function j(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].c;return t}function m(t,n){for(var r,e=-1,u=t.length;++e<u;){var o=n(t[e]);o!==T&&(r=r===T?o:r+o)}return r}function w(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}function A(t,n){return a(n,function(n){return[n,t[n]];
|
||||
})}function O(t){return function(n){return t(n)}}function k(t,n){return a(n,function(n){return t[n]})}function E(t,n){for(var r=-1,e=t.length;++r<e&&-1<d(n,t[r],0););return r}function I(t,n){for(var r=t.length;r--&&-1<d(n,t[r],0););return r}function S(t){return t&&t.Object===Object?t:null}function R(t,n){if(t!==n){var r=null===t,e=t===T,u=t===t,o=null===n,i=n===T,f=n===n;if(t>n&&!o||!u||r&&!i&&f||e&&f)return 1;if(n>t&&!r||!f||o&&!e&&u||i&&u)return-1}return 0}function W(t){return function(n,r){var e;
|
||||
return n===T&&r===T?0:(n!==T&&(e=n),r!==T&&(e=e===T?r:t(e,r)),e)}}function B(t){return Mt[t]}function C(t){return Lt[t]}function z(t){return"\\"+Ft[t]}function U(t,n,r){var e=t.length;for(n+=r?0:-1;r?n--:++n<e;){var u=t[n];if(u!==u)return n}return-1}function M(t){var n=false;if(null!=t&&typeof t.toString!="function")try{n=!!(t+"")}catch(r){}return n}function L(t,n){return t=typeof t=="number"||jt.test(t)?+t:-1,t>-1&&0==t%1&&(null==n?9007199254740991:n)>t}function $(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);
|
||||
return r}function D(t){var n=-1,r=Array(t.size);return t.forEach(function(t,e){r[++n]=[e,t]}),r}function F(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r];i!==n&&"__lodash_placeholder__"!==i||(t[r]="__lodash_placeholder__",o[u++]=r)}return o}function N(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=t}),r}function P(t){if(!t||!Wt.test(t))return t.length;for(var n=St.lastIndex=0;St.test(t);)n++;return n}function Z(t){return $t[t]}function q(S){function jt(t){if(Be(t)&&!ni(t)&&!(t instanceof Et)){
|
||||
if(t instanceof kt)return t;if(yu.call(t,"__wrapped__"))return Qr(t)}return new kt(t)}function Ot(){}function kt(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=T}function Et(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Mt(){}function Lt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function $t(t){var n=-1,r=t?t.length:0;
|
||||
for(this.__data__=new Lt;++n<r;)this.push(t[n])}function Dt(t,n){var r=t.__data__;return qr(n)?(r=r.__data__,"__lodash_hash_undefined__"===(typeof n=="string"?r.string:r.hash)[n]):r.has(n)}function Ft(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Zt(t,n){var r=Vt(t,n);return 0>r?false:(r==t.length-1?t.pop():Uu.call(t,r,1),true)}function qt(t,n){var r=Vt(t,n);return 0>r?T:t[r][1]}function Vt(t,n){for(var r=t.length;r--;)if(me(t[r][0],n))return r;return-1}function Kt(t,n,r){
|
||||
var e=Vt(t,n);0>e?t.push([n,r]):t[e][1]=r}function Gt(t,n,r,e){return t===T||me(t,gu[r])&&!yu.call(e,r)?n:t}function Ht(t,n,r){(r===T||me(t[n],r))&&(typeof n!="number"||r!==T||n in t)||(t[n]=r)}function Qt(t,n,r){var e=t[n];yu.call(t,n)&&me(e,r)&&(r!==T||n in t)||(t[n]=r)}function Xt(t,n,r,e){return lo(t,function(t,u,o){n(e,t,r(t),o)}),e}function tn(t,n){return t&&ur(n,Ye(n),t)}function nn(t,n){for(var r=-1,e=null==t,u=n.length,o=Array(u);++r<u;)o[r]=e?T:Ke(t,n[r]);return o}function rn(t,n,r){return t===t&&(r!==T&&(t=t>r?r:t),
|
||||
n!==T&&(t=n>t?n:t)),t}function en(t,n,r,e,o,i,f){var c;if(e&&(c=i?e(t,o,i,f):e(t)),c!==T)return c;if(!We(t))return t;if(o=ni(t)){if(c=Mr(t),!n)return er(t,c)}else{var a=zr(t),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(ri(t))return Xn(t,n);if("[object Object]"==a||"[object Arguments]"==a||l&&!i){if(M(t))return i?t:{};if(c=Lr(l?{}:t),!n)return ir(t,tn(c,t))}else{if(!Ut[a])return i?t:{};c=$r(t,a,en,n)}}if(f||(f=new Ft),i=f.get(t))return i;if(f.set(t,c),!o)var s=r?gn(t,Ye,Cr):Ye(t);return u(s||t,function(u,o){
|
||||
s&&(o=u,u=t[o]),Qt(c,o,en(u,n,r,e,o,t,f))}),c}function un(t){var n=Ye(t),r=n.length;return function(e){if(null==e)return!r;for(var u=r;u--;){var o=n[u],i=t[o],f=e[o];if(f===T&&!(o in Object(e))||!i(f))return false}return true}}function on(t){return We(t)?Bu(t):{}}function fn(t,n,r){if(typeof t!="function")throw new _u("Expected a function");return zu(function(){t.apply(T,r)},n)}function cn(t,n,r,e){var u=-1,o=f,i=true,l=t.length,s=[],h=n.length;if(!l)return s;r&&(n=a(n,O(r))),e?(o=c,i=false):n.length>=200&&(o=Dt,
|
||||
i=false,n=new $t(n));t:for(;++u<l;){var p=t[u],_=r?r(p):p;if(i&&_===_){for(var v=h;v--;)if(n[v]===_)continue t;s.push(p)}else o(n,_,e)||s.push(p)}return s}function an(t,n){var r=true;return lo(t,function(t,e,u){return r=!!n(t,e,u)}),r}function ln(t,n){var r=[];return lo(t,function(t,e,u){n(t,e,u)&&r.push(t)}),r}function sn(t,n,r,e,u){var o=-1,i=t.length;for(r||(r=Fr),u||(u=[]);++o<i;){var f=t[o];n>0&&r(f)?n>1?sn(f,n-1,r,e,u):l(u,f):e||(u[u.length]=f)}return u}function hn(t,n){return t&&ho(t,n,Ye)}function pn(t,n){
|
||||
return t&&po(t,n,Ye)}function _n(t,n){return i(n,function(n){return Ie(t[n])})}function vn(t,n){n=Zr(n,t)?[n]:Hn(n);for(var r=0,e=n.length;null!=t&&e>r;)t=t[n[r++]];return r&&r==e?t:T}function gn(t,n,r){return n=n(t),ni(t)?n:l(n,r(t))}function dn(t,n){return yu.call(t,n)||typeof t=="object"&&n in t&&null===$u(Object(t))}function yn(t,n){return n in Object(t)}function bn(t,n,r){for(var e=r?c:f,u=t[0].length,o=t.length,i=o,l=Array(o),s=1/0,h=[];i--;){var p=t[i];i&&n&&(p=a(p,O(n))),s=Zu(p.length,s),
|
||||
l[i]=r||!n&&(120>u||120>p.length)?T:new $t(i&&p)}var p=t[0],_=-1,v=l[0];t:for(;++_<u&&s>h.length;){var g=p[_],d=n?n(g):g;if(v?!Dt(v,d):!e(h,d,r)){for(i=o;--i;){var y=l[i];if(y?!Dt(y,d):!e(t[i],d,r))continue t}v&&v.push(d),h.push(g)}}return h}function xn(t,n,r){var e={};return hn(t,function(t,u,o){n(e,r(t),u,o)}),e}function jn(t,n,e){return Zr(n,t)||(n=Hn(n),t=Jr(t,n),n=re(n)),n=null==t?t:t[n],null==n?T:r(n,t,e)}function mn(t,n,r,e,u){if(t===n)n=true;else if(null==t||null==n||!We(t)&&!Be(n))n=t!==t&&n!==n;else t:{
|
||||
var o=ni(t),i=ni(n),f="[object Array]",c="[object Array]";o||(f=zr(t),f="[object Arguments]"==f?"[object Object]":f),i||(c=zr(n),c="[object Arguments]"==c?"[object Object]":c);var a="[object Object]"==f&&!M(t),i="[object Object]"==c&&!M(n);if((c=f==c)&&!a)u||(u=new Ft),n=o||De(t)?kr(t,n,mn,r,e,u):Er(t,n,f,mn,r,e,u);else{if(!(2&e)&&(o=a&&yu.call(t,"__wrapped__"),f=i&&yu.call(n,"__wrapped__"),o||f)){t=o?t.value():t,n=f?n.value():n,u||(u=new Ft),n=mn(t,n,r,e,u);break t}if(c)n:if(u||(u=new Ft),o=2&e,
|
||||
f=Ye(t),i=f.length,c=Ye(n).length,i==c||o){for(a=i;a--;){var l=f[a];if(!(o?l in n:dn(n,l))){n=false;break n}}if(c=u.get(t))n=c==n;else{c=true,u.set(t,n);for(var s=o;++a<i;){var l=f[a],h=t[l],p=n[l];if(r)var _=o?r(p,h,l,n,t,u):r(h,p,l,t,n,u);if(_===T?h!==p&&!mn(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l)}c&&!s&&(r=t.constructor,e=n.constructor,r!=e&&"constructor"in t&&"constructor"in n&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(c=false)),u["delete"](t),n=c}}else n=false;else n=false;
|
||||
}}return n}function wn(t,n,r,e){var u=r.length,o=u,i=!e;if(null==t)return!o;for(t=Object(t);u--;){var f=r[u];if(i&&f[2]?f[1]!==t[f[0]]:!(f[0]in t))return false}for(;++u<o;){var f=r[u],c=f[0],a=t[c],l=f[1];if(i&&f[2]){if(a===T&&!(c in t))return false}else{if(f=new Ft,e)var s=e(a,l,c,t,n,f);if(s===T?!mn(l,a,e,3,f):!s)return false}}return true}function An(t){return typeof t=="function"?t:null==t?ou:typeof t=="object"?ni(t)?In(t[0],t[1]):En(t):au(t)}function On(t){t=null==t?t:Object(t);var n,r=[];for(n in t)r.push(n);
|
||||
return r}function kn(t,n){var r=-1,e=Oe(t)?Array(t.length):[];return lo(t,function(t,u,o){e[++r]=n(t,u,o)}),e}function En(t){var n=Rr(t);return 1==n.length&&n[0][2]?Kr(n[0][0],n[0][1]):function(r){return r===t||wn(r,t,n)}}function In(t,n){return Zr(t)&&n===n&&!We(n)?Kr(t,n):function(r){var e=Ke(r,t);return e===T&&e===n?Je(r,t):mn(n,e,T,3)}}function Sn(t,n,r,e,o){if(t!==n){if(!ni(n)&&!De(n))var i=He(n);u(i||n,function(u,f){if(i&&(f=u,u=n[f]),We(u)){o||(o=new Ft);var c=f,a=o,l=t[c],s=n[c],h=a.get(s);
|
||||
if(h)Ht(t,c,h);else{var h=e?e(l,s,c+"",t,n,a):T,p=h===T;p&&(h=s,ni(s)||De(s)?ni(l)?h=l:ke(l)?h=er(l):(p=false,h=en(s,true)):Ue(s)||Ae(s)?Ae(l)?h=Te(l):!We(l)||r&&Ie(l)?(p=false,h=en(s,true)):h=l:p=false),a.set(s,h),p&&Sn(h,s,r,e,a),a["delete"](s),Ht(t,c,h)}}else c=e?e(t[f],u,f+"",t,n,o):T,c===T&&(c=u),Ht(t,f,c)})}}function Rn(t,n,r){var e=-1;return n=a(n.length?n:[ou],Sr()),t=kn(t,function(t){return{a:a(n,function(n){return n(t)}),b:++e,c:t}}),j(t,function(t,n){var e;t:{e=-1;for(var u=t.a,o=n.a,i=u.length,f=r.length;++e<i;){
|
||||
var c=R(u[e],o[e]);if(c){e=f>e?c*("desc"==r[e]?-1:1):c;break t}}e=t.b-n.b}return e})}function Wn(t,n){return t=Object(t),s(n,function(n,r){return r in t&&(n[r]=t[r]),n},{})}function Bn(t,n){for(var r=-1,e=gn(t,He,bo),u=e.length,o={};++r<u;){var i=e[r],f=t[i];n(f,i)&&(o[i]=f)}return o}function Cn(t){return function(n){return null==n?T:n[t]}}function zn(t){return function(n){return vn(n,t)}}function Un(t,n,r,e){var u=e?y:d,o=-1,i=n.length,f=t;for(r&&(f=a(t,O(r)));++o<i;)for(var c=0,l=n[o],l=r?r(l):l;-1<(c=u(f,l,c,e));)f!==t&&Uu.call(f,c,1),
|
||||
Uu.call(t,c,1);return t}function Mn(t,n){for(var r=t?n.length:0,e=r-1;r--;){var u=n[r];if(e==r||u!=o){var o=u;if(L(u))Uu.call(t,u,1);else if(Zr(u,t))delete t[u];else{var u=Hn(u),i=Jr(t,u);null!=i&&delete i[re(u)]}}}}function Ln(t,n){return t+Lu(Tu()*(n-t+1))}function $n(t,n){var r="";if(!t||1>n||n>9007199254740991)return r;do n%2&&(r+=t),(n=Lu(n/2))&&(t+=t);while(n);return r}function Dn(t,n,r,e){n=Zr(n,t)?[n]:Hn(n);for(var u=-1,o=n.length,i=o-1,f=t;null!=f&&++u<o;){var c=n[u];if(We(f)){var a=r;if(u!=i){
|
||||
var l=f[c],a=e?e(l,c,f):T;a===T&&(a=null==l?L(n[u+1])?[]:{}:l)}Qt(f,c,a)}f=f[c]}return t}function Fn(t,n,r){var e=-1,u=t.length;for(0>n&&(n=-n>u?0:u+n),r=r>u?u:r,0>r&&(r+=u),u=n>r?0:r-n>>>0,n>>>=0,r=Array(u);++e<u;)r[e]=t[e+n];return r}function Nn(t,n){var r;return lo(t,function(t,e,u){return r=n(t,e,u),!r}),!!r}function Pn(t,n,r){var e=0,u=t?t.length:e;if(typeof n=="number"&&n===n&&2147483647>=u){for(;u>e;){var o=e+u>>>1,i=t[o];(r?n>=i:n>i)&&null!==i?e=o+1:u=o}return u}return Zn(t,n,ou,r)}function Zn(t,n,r,e){
|
||||
n=r(n);for(var u=0,o=t?t.length:0,i=n!==n,f=null===n,c=n===T;o>u;){var a=Lu((u+o)/2),l=r(t[a]),s=l!==T,h=l===l;(i?h||e:f?h&&s&&(e||null!=l):c?h&&(e||s):null==l?0:e?n>=l:n>l)?u=a+1:o=a}return Zu(o,4294967294)}function qn(t,n){for(var r=0,e=t.length,u=t[0],o=n?n(u):u,i=o,f=1,c=[u];++r<e;)u=t[r],o=n?n(u):u,me(o,i)||(i=o,c[f++]=u);return c}function Tn(t,n,r){var e=-1,u=f,o=t.length,i=true,a=[],l=a;if(r)i=false,u=c;else if(o<200)l=n?[]:a;else{if(u=n?null:vo(t))return N(u);i=false,u=Dt,l=new $t}t:for(;++e<o;){
|
||||
var s=t[e],h=n?n(s):s;if(i&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue t;n&&l.push(h),a.push(s)}else u(l,h,r)||(l!==a&&l.push(h),a.push(s))}return a}function Vn(t,n,r,e){for(var u=t.length,o=e?u:-1;(e?o--:++o<u)&&n(t[o],o,t););return r?Fn(t,e?0:o,e?o+1:u):Fn(t,e?o+1:0,e?u:o)}function Kn(t,n){var r=t;return r instanceof Et&&(r=r.value()),s(n,function(t,n){return n.func.apply(n.thisArg,l([t],n.args))},r)}function Gn(t,n,r){for(var e=-1,u=t.length;++e<u;)var o=o?l(cn(o,t[e],n,r),cn(t[e],o,n,r)):t[e];
|
||||
return o&&o.length?Tn(o,n,r):[]}function Jn(t,n,r){for(var e=-1,u=t.length,o=n.length,i={};++e<u;)r(i,t[e],o>e?n[e]:T);return i}function Yn(t){return ke(t)?t:[]}function Hn(t){return ni(t)?t:jo(t)}function Qn(t,n,r){var e=t.length;return r=r===T?e:r,n||e>r?Fn(t,n,r):t}function Xn(t,n){if(n)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function tr(t){var n=new t.constructor(t.byteLength);return new Eu(n).set(new Eu(t)),n}function nr(t,n,r,e){var u=-1,o=t.length,i=r.length,f=-1,c=n.length,a=Pu(o-i,0),l=Array(c+a);
|
||||
for(e=!e;++f<c;)l[f]=n[f];for(;++u<i;)(e||o>u)&&(l[r[u]]=t[u]);for(;a--;)l[f++]=t[u++];return l}function rr(t,n,r,e){var u=-1,o=t.length,i=-1,f=r.length,c=-1,a=n.length,l=Pu(o-f,0),s=Array(l+a);for(e=!e;++u<l;)s[u]=t[u];for(l=u;++c<a;)s[l+c]=n[c];for(;++i<f;)(e||o>u)&&(s[l+r[i]]=t[u++]);return s}function er(t,n){var r=-1,e=t.length;for(n||(n=Array(e));++r<e;)n[r]=t[r];return n}function ur(t,n,r){return or(t,n,r)}function or(t,n,r,e){r||(r={});for(var u=-1,o=n.length;++u<o;){var i=n[u],f=e?e(r[i],t[i],i,r,t):t[i];
|
||||
Qt(r,i,f)}return r}function ir(t,n){return ur(t,Cr(t),n)}function fr(t,n){return function(r,u){var o=ni(r)?e:Xt,i=n?n():{};return o(r,t,Sr(u),i)}}function cr(t){return xe(function(n,r){var e=-1,u=r.length,o=u>1?r[u-1]:T,i=u>2?r[2]:T,o=typeof o=="function"?(u--,o):T;for(i&&Pr(r[0],r[1],i)&&(o=3>u?T:o,u=1),n=Object(n);++e<u;)(i=r[e])&&t(n,i,e,o);return n})}function ar(t,n){return function(r,e){if(null==r)return r;if(!Oe(r))return t(r,e);for(var u=r.length,o=n?u:-1,i=Object(r);(n?o--:++o<u)&&false!==e(i[o],o,i););
|
||||
return r}}function lr(t){return function(n,r,e){var u=-1,o=Object(n);e=e(n);for(var i=e.length;i--;){var f=e[t?i:++u];if(false===r(o[f],f,o))break}return n}}function sr(t,n,r){function e(){return(this&&this!==Jt&&this instanceof e?o:t).apply(u?r:this,arguments)}var u=1&n,o=_r(t);return e}function hr(t){return function(n){n=Ve(n);var r=Wt.test(n)?n.match(St):T,e=r?r[0]:n.charAt(0);return n=r?Qn(r,1).join(""):n.slice(1),e[t]()+n}}function pr(t){return function(n){return s(eu(ru(n)),t,"")}}function _r(t){
|
||||
return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var r=on(t.prototype),n=t.apply(r,n);return We(n)?n:r}}function vr(t,n,e){function u(){for(var i=arguments.length,f=Array(i),c=i,a=Br(u);c--;)f[c]=arguments[c];
|
||||
return c=3>i&&f[0]!==a&&f[i-1]!==a?[]:F(f,a),i-=c.length,e>i?wr(t,n,dr,u.placeholder,T,f,c,T,T,e-i):r(this&&this!==Jt&&this instanceof u?o:t,this,f)}var o=_r(t);return u}function gr(t){return xe(function(n){n=sn(n,1);var r=n.length,e=r,u=kt.prototype.thru;for(t&&n.reverse();e--;){var o=n[e];if(typeof o!="function")throw new _u("Expected a function");if(u&&!i&&"wrapper"==Ir(o))var i=new kt([],true)}for(e=i?e:r;++e<r;)var o=n[e],u=Ir(o),f="wrapper"==u?go(o):T,i=f&&Tr(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?i[Ir(f[0])].apply(i,f[3]):1==o.length&&Tr(o)?i[u]():i.thru(o);
|
||||
return function(){var t=arguments,e=t[0];if(i&&1==t.length&&ni(e)&&e.length>=200)return i.plant(e).value();for(var u=0,t=r?n[u].apply(this,t):e;++u<r;)t=n[u].call(this,t);return t}})}function dr(t,n,r,e,u,o,i,f,c,a){function l(){for(var d=arguments.length,y=d,b=Array(d);y--;)b[y]=arguments[y];if(_){var x,j=Br(l),y=b.length;for(x=0;y--;)b[y]===j&&x++}if(e&&(b=nr(b,e,u,_)),o&&(b=rr(b,o,i,_)),d-=x,_&&a>d)return j=F(b,j),wr(t,n,dr,l.placeholder,r,b,j,f,c,a-d);if(j=h?r:this,y=p?j[t]:t,d=b.length,f){x=b.length;
|
||||
for(var m=Zu(f.length,x),w=er(b);m--;){var A=f[m];b[m]=L(A,x)?w[A]:T}}else v&&d>1&&b.reverse();return s&&d>c&&(b.length=c),this&&this!==Jt&&this instanceof l&&(y=g||_r(y)),y.apply(j,b)}var s=128&n,h=1&n,p=2&n,_=24&n,v=512&n,g=p?T:_r(t);return l}function yr(t,n){return function(r,e){return xn(r,t,n(e))}}function br(t){return xe(function(n){return n=a(sn(n,1,Nr),Sr()),xe(function(e){var u=this;return t(n,function(t){return r(t,u,e)})})})}function xr(t,n){n=n===T?" ":n+"";var r=n.length;return 2>r?r?$n(n,t):n:(r=$n(n,Mu(t/P(n))),
|
||||
Wt.test(n)?Qn(r.match(St),0,t).join(""):r.slice(0,t))}function jr(t,n,e,u){function o(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==Jt&&this instanceof o?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++n];return r(h,i?e:this,s)}var i=1&n,f=_r(t);return o}function mr(t){return function(n,r,e){e&&typeof e!="number"&&Pr(n,r,e)&&(r=e=T),n=qe(n),n=n===n?n:0,r===T?(r=n,n=0):r=qe(r)||0,e=e===T?r>n?1:-1:qe(e)||0;var u=-1;r=Pu(Mu((r-n)/(e||1)),0);for(var o=Array(r);r--;)o[t?r:++u]=n,
|
||||
n+=e;return o}}function wr(t,n,r,e,u,o,i,f,c,a){var l=8&n;f=f?er(f):T;var s=l?i:T;i=l?T:i;var h=l?o:T;return o=l?T:o,n=(n|(l?32:64))&~(l?64:32),4&n||(n&=-4),n=[t,n,u,h,s,o,i,f,c,a],r=r.apply(T,n),Tr(t)&&xo(r,n),r.placeholder=e,r}function Ar(t){var n=hu[t];return function(t,r){if(t=qe(t),r=Pe(r)){var e=(Ve(t)+"e").split("e"),e=n(e[0]+"e"+(+e[1]+r)),e=(Ve(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return n(t)}}function Or(t,n,r,e,u,o,i,f){var c=2&n;if(!c&&typeof t!="function")throw new _u("Expected a function");
|
||||
var a=e?e.length:0;if(a||(n&=-97,e=u=T),i=i===T?i:Pu(Pe(i),0),f=f===T?f:Pe(f),a-=u?u.length:0,64&n){var l=e,s=u;e=u=T}var h=c?T:go(t);return o=[t,n,r,e,u,l,s,o,i,f],h&&(r=o[1],t=h[1],n=r|t,e=128==t&&8==r||128==t&&256==r&&h[8]>=o[7].length||384==t&&h[8]>=h[7].length&&8==r,131>n||e)&&(1&t&&(o[2]=h[2],n|=1&r?0:4),(r=h[3])&&(e=o[3],o[3]=e?nr(e,r,h[4]):er(r),o[4]=e?F(o[3],"__lodash_placeholder__"):er(h[4])),(r=h[5])&&(e=o[5],o[5]=e?rr(e,r,h[6]):er(r),o[6]=e?F(o[5],"__lodash_placeholder__"):er(h[6])),(r=h[7])&&(o[7]=er(r)),
|
||||
128&t&&(o[8]=null==o[8]?h[8]:Zu(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=n),t=o[0],n=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:t.length:Pu(o[9]-a,0),!f&&24&n&&(n&=-25),(h?_o:xo)(n&&1!=n?8==n||16==n?vr(t,n,f):32!=n&&33!=n||u.length?dr.apply(T,o):jr(t,n,r,e):sr(t,n,r),o)}function kr(t,n,r,e,u,o){var i=-1,f=2&u,c=1&u,a=t.length,l=n.length;if(!(a==l||f&&l>a))return false;if(l=o.get(t))return l==n;for(l=true,o.set(t,n);++i<a;){var s=t[i],h=n[i];if(e)var _=f?e(h,s,i,n,t,o):e(s,h,i,t,n,o);if(_!==T){
|
||||
if(_)continue;l=false;break}if(c){if(!p(n,function(t){return s===t||r(s,t,e,u,o)})){l=false;break}}else if(s!==h&&!r(s,h,e,u,o)){l=false;break}}return o["delete"](t),l}function Er(t,n,r,e,u,o,i){switch(r){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)break;t=t.buffer,n=n.buffer;case"[object ArrayBuffer]":if(t.byteLength!=n.byteLength||!e(new Eu(t),new Eu(n)))break;return true;case"[object Boolean]":case"[object Date]":return+t==+n;case"[object Error]":return t.name==n.name&&t.message==n.message;
|
||||
case"[object Number]":return t!=+t?n!=+n:t==+n;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var f=D;case"[object Set]":if(f||(f=N),t.size!=n.size&&!(2&o))break;return(r=i.get(t))?r==n:(o|=1,i.set(t,n),kr(f(t),f(n),e,u,o,i));case"[object Symbol]":if(co)return co.call(t)==co.call(n)}return false}function Ir(t){for(var n=t.name+"",r=no[n],e=yu.call(no,n)?r.length:0;e--;){var u=r[e],o=u.func;if(null==o||o==t)return u.name}return n}function Sr(){var t=jt.iteratee||iu,t=t===iu?An:t;
|
||||
return arguments.length?t(arguments[0],arguments[1]):t}function Rr(t){t=Qe(t);for(var n=t.length;n--;){var r=t[n][1];t[n][2]=r===r&&!We(r)}return t}function Wr(t,n){var r=t[n];return Ce(r)?r:T}function Br(t){return(yu.call(jt,"placeholder")?jt:t).placeholder}function Cr(t){return Ru(Object(t))}function zr(t){return ju.call(t)}function Ur(t,n,r){n=Zr(n,t)?[n]:Hn(n);for(var e,u=-1,o=n.length;++u<o;){var i=n[u];if(!(e=null!=t&&r(t,i)))break;t=t[i]}return e?e:(o=t?t.length:0,!!o&&Re(o)&&L(i,o)&&(ni(t)||Le(t)||Ae(t)));
|
||||
}function Mr(t){var n=t.length,r=t.constructor(n);return n&&"string"==typeof t[0]&&yu.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function Lr(t){return typeof t.constructor!="function"||Vr(t)?{}:on($u(Object(t)))}function $r(r,e,u,o){var i=r.constructor;switch(e){case"[object ArrayBuffer]":return tr(r);case"[object Boolean]":case"[object Date]":return new i(+r);case"[object DataView]":return e=o?tr(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.byteLength);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=o?tr(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.length);case"[object Map]":return e=o?u(D(r),true):D(r),s(e,t,new r.constructor);case"[object Number]":case"[object String]":return new i(r);case"[object RegExp]":return e=new r.constructor(r.source,vt.exec(r)),e.lastIndex=r.lastIndex,
|
||||
e;case"[object Set]":return e=o?u(N(r),true):N(r),s(e,n,new r.constructor);case"[object Symbol]":return co?Object(co.call(r)):{}}}function Dr(t){var n=t?t.length:T;return Re(n)&&(ni(t)||Le(t)||Ae(t))?w(n,String):null}function Fr(t){return ke(t)&&(ni(t)||Ae(t))}function Nr(t){return ni(t)&&!(2==t.length&&!Ie(t[0]))}function Pr(t,n,r){if(!We(r))return false;var e=typeof n;return("number"==e?Oe(r)&&L(n,r.length):"string"==e&&n in r)?me(r[n],t):false}function Zr(t,n){var r=typeof t;return"number"==r||"symbol"==r?true:!ni(t)&&($e(t)||ot.test(t)||!ut.test(t)||null!=n&&t in Object(n));
|
||||
}function qr(t){var n=typeof t;return"number"==n||"boolean"==n||"string"==n&&"__proto__"!=t||null==t}function Tr(t){var n=Ir(t),r=jt[n];return typeof r=="function"&&n in Et.prototype?t===r?true:(n=go(r),!!n&&t===n[0]):false}function Vr(t){var n=t&&t.constructor;return t===(typeof n=="function"&&n.prototype||gu)}function Kr(t,n){return function(r){return null==r?false:r[t]===n&&(n!==T||t in Object(r))}}function Gr(t,n,r,e,u,o){return We(t)&&We(n)&&Sn(t,n,T,Gr,o.set(n,t)),t}function Jr(t,n){return 1==n.length?t:vn(t,Fn(n,0,-1));
|
||||
}function Yr(t){return typeof t=="string"||$e(t)?t:t+""}function Hr(t){if(null!=t){try{return du.call(t)}catch(n){}return t+""}return""}function Qr(t){if(t instanceof Et)return t.clone();var n=new kt(t.__wrapped__,t.__chain__);return n.__actions__=er(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}function Xr(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:Pe(n),Fn(t,0>n?0:n,e)):[]}function te(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:Pe(n),n=e-n,Fn(t,0,0>n?0:n)):[]}function ne(t){
|
||||
return t?t[0]:T}function re(t){var n=t?t.length:0;return n?t[n-1]:T}function ee(t,n){return t&&t.length&&n&&n.length?Un(t,n):t}function ue(t){return t?Vu.call(t):t}function oe(t){if(!t||!t.length)return[];var n=0;return t=i(t,function(t){return ke(t)?(n=Pu(t.length,n),true):void 0}),w(n,function(n){return a(t,Cn(n))})}function ie(t,n){if(!t||!t.length)return[];var e=oe(t);return null==n?e:a(e,function(t){return r(n,T,t)})}function fe(t){return t=jt(t),t.__chain__=true,t}function ce(t,n){return n(t)}function ae(){
|
||||
return this}function le(t,n){return typeof n=="function"&&ni(t)?u(t,n):lo(t,Sr(n))}function se(t,n){var r;if(typeof n=="function"&&ni(t)){for(r=t.length;r--&&false!==n(t[r],r,t););r=t}else r=so(t,Sr(n));return r}function he(t,n){return(ni(t)?a:kn)(t,Sr(n,3))}function pe(t,n,r){var e=-1,u=Ne(t),o=u.length,i=o-1;for(n=(r?Pr(t,n,r):n===T)?1:rn(Pe(n),0,o);++e<n;)t=Ln(e,i),r=u[t],u[t]=u[e],u[e]=r;return u.length=n,u}function _e(t,n,r){return n=r?T:n,n=t&&null==n?t.length:n,Or(t,128,T,T,T,T,n)}function ve(t,n){
|
||||
var r;if(typeof n!="function")throw new _u("Expected a function");return t=Pe(t),function(){return 0<--t&&(r=n.apply(this,arguments)),1>=t&&(n=T),r}}function ge(t,n,r){return n=r?T:n,t=Or(t,8,T,T,T,T,T,n),t.placeholder=ge.placeholder,t}function de(t,n,r){return n=r?T:n,t=Or(t,16,T,T,T,T,T,n),t.placeholder=de.placeholder,t}function ye(t,n,r){function e(n){var r=c,e=a;return c=a=T,p=n,l=t.apply(e,r)}function u(t){var r=t-h;return t-=p,!h||r>=n||0>r||false!==v&&t>=v}function o(){var t=Vo();if(u(t))return i(t);
|
||||
var r;r=t-p,t=n-(t-h),r=false===v?t:Zu(t,v-r),s=zu(o,r)}function i(t){return Iu(s),s=T,g&&c?e(t):(c=a=T,l)}function f(){var t=Vo(),r=u(t);return c=arguments,a=this,h=t,r?s===T?(p=t=h,s=zu(o,n),_?e(t):l):(Iu(s),s=zu(o,n),e(h)):(s===T&&(s=zu(o,n)),l)}var c,a,l,s,h=0,p=0,_=false,v=false,g=true;if(typeof t!="function")throw new _u("Expected a function");return n=qe(n)||0,We(r)&&(_=!!r.leading,v="maxWait"in r&&Pu(qe(r.maxWait)||0,n),g="trailing"in r?!!r.trailing:g),f.cancel=function(){s!==T&&Iu(s),h=p=0,c=a=s=T},
|
||||
f.flush=function(){return s===T?l:i(Vo())},f}function be(t,n){function r(){var e=arguments,u=n?n.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=t.apply(this,e),r.cache=o.set(u,e),e)}if(typeof t!="function"||n&&typeof n!="function")throw new _u("Expected a function");return r.cache=new(be.Cache||Lt),r}function xe(t,n){if(typeof t!="function")throw new _u("Expected a function");return n=Pu(n===T?t.length-1:Pe(n),0),function(){for(var e=arguments,u=-1,o=Pu(e.length-n,0),i=Array(o);++u<o;)i[u]=e[n+u];
|
||||
switch(n){case 0:return t.call(this,i);case 1:return t.call(this,e[0],i);case 2:return t.call(this,e[0],e[1],i)}for(o=Array(n+1),u=-1;++u<n;)o[u]=e[u];return o[n]=i,r(t,this,o)}}function je(){if(!arguments.length)return[];var t=arguments[0];return ni(t)?t:[t]}function me(t,n){return t===n||t!==t&&n!==n}function we(t,n){return t>n}function Ae(t){return ke(t)&&yu.call(t,"callee")&&(!Cu.call(t,"callee")||"[object Arguments]"==ju.call(t))}function Oe(t){return null!=t&&Re(yo(t))&&!Ie(t)}function ke(t){
|
||||
return Be(t)&&Oe(t)}function Ee(t){return Be(t)?"[object Error]"==ju.call(t)||typeof t.message=="string"&&typeof t.name=="string":false}function Ie(t){return t=We(t)?ju.call(t):"","[object Function]"==t||"[object GeneratorFunction]"==t}function Se(t){return typeof t=="number"&&t==Pe(t)}function Re(t){return typeof t=="number"&&t>-1&&0==t%1&&9007199254740991>=t}function We(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function Be(t){return!!t&&typeof t=="object"}function Ce(t){return We(t)?(Ie(t)||M(t)?wu:bt).test(Hr(t)):false;
|
||||
}function ze(t){return typeof t=="number"||Be(t)&&"[object Number]"==ju.call(t)}function Ue(t){return!Be(t)||"[object Object]"!=ju.call(t)||M(t)?false:(t=$u(Object(t)),null===t?true:(t=yu.call(t,"constructor")&&t.constructor,typeof t=="function"&&t instanceof t&&du.call(t)==xu))}function Me(t){return We(t)&&"[object RegExp]"==ju.call(t)}function Le(t){return typeof t=="string"||!ni(t)&&Be(t)&&"[object String]"==ju.call(t)}function $e(t){return typeof t=="symbol"||Be(t)&&"[object Symbol]"==ju.call(t)}function De(t){
|
||||
return Be(t)&&Re(t.length)&&!!zt[ju.call(t)]}function Fe(t,n){return n>t}function Ne(t){if(!t)return[];if(Oe(t))return Le(t)?t.match(St):er(t);if(Wu&&t[Wu])return $(t[Wu]());var n=zr(t);return("[object Map]"==n?D:"[object Set]"==n?N:tu)(t)}function Pe(t){if(!t)return 0===t?t:0;if(t=qe(t),t===V||t===-V)return 1.7976931348623157e308*(0>t?-1:1);var n=t%1;return t===t?n?t-n:t:0}function Ze(t){return t?rn(Pe(t),0,4294967295):0}function qe(t){if(typeof t=="number")return t;if($e(t))return K;if(We(t)&&(t=Ie(t.valueOf)?t.valueOf():t,
|
||||
t=We(t)?t+"":t),typeof t!="string")return 0===t?t:+t;t=t.replace(at,"");var n=yt.test(t);return n||xt.test(t)?Pt(t.slice(2),n?2:8):dt.test(t)?K:+t}function Te(t){return ur(t,He(t))}function Ve(t){if(typeof t=="string")return t;if(null==t)return"";if($e(t))return ao?ao.call(t):"";var n=t+"";return"0"==n&&1/t==-V?"-0":n}function Ke(t,n,r){return t=null==t?T:vn(t,n),t===T?r:t}function Ge(t,n){return null!=t&&Ur(t,n,dn)}function Je(t,n){return null!=t&&Ur(t,n,yn)}function Ye(t){var n=Vr(t);if(!n&&!Oe(t))return Nu(Object(t));
|
||||
var r,e=Dr(t),u=!!e,e=e||[],o=e.length;for(r in t)!dn(t,r)||u&&("length"==r||L(r,o))||n&&"constructor"==r||e.push(r);return e}function He(t){for(var n=-1,r=Vr(t),e=On(t),u=e.length,o=Dr(t),i=!!o,o=o||[],f=o.length;++n<u;){var c=e[n];i&&("length"==c||L(c,f))||"constructor"==c&&(r||!yu.call(t,c))||o.push(c)}return o}function Qe(t){return A(t,Ye(t))}function Xe(t){return A(t,He(t))}function tu(t){return t?k(t,Ye(t)):[]}function nu(t){return Ai(Ve(t).toLowerCase())}function ru(t){return(t=Ve(t))&&t.replace(mt,B).replace(It,"");
|
||||
}function eu(t,n,r){return t=Ve(t),n=r?T:n,n===T&&(n=Bt.test(t)?Rt:ht),t.match(n)||[]}function uu(t){return function(){return t}}function ou(t){return t}function iu(t){return An(typeof t=="function"?t:en(t,true))}function fu(t,n,r){var e=Ye(n),o=_n(n,e);null!=r||We(n)&&(o.length||!e.length)||(r=n,n=t,t=this,o=_n(n,Ye(n)));var i=We(r)&&"chain"in r?r.chain:true,f=Ie(t);return u(o,function(r){var e=n[r];t[r]=e,f&&(t.prototype[r]=function(){var n=this.__chain__;if(i||n){var r=t(this.__wrapped__);return(r.__actions__=er(this.__actions__)).push({
|
||||
func:e,args:arguments,thisArg:t}),r.__chain__=n,r}return e.apply(t,l([this.value()],arguments))})}),t}function cu(){}function au(t){return Zr(t)?Cn(t):zn(t)}S=S?Yt.defaults({},S,Yt.pick(Jt,Ct)):Jt;var lu=S.Date,su=S.Error,hu=S.Math,pu=S.RegExp,_u=S.TypeError,vu=S.Array.prototype,gu=S.Object.prototype,du=S.Function.prototype.toString,yu=gu.hasOwnProperty,bu=0,xu=du.call(Object),ju=gu.toString,mu=Jt._,wu=pu("^"+du.call(yu).replace(ft,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Au=Tt?S.Buffer:T,Ou=S.Reflect,ku=S.Symbol,Eu=S.Uint8Array,Iu=S.clearTimeout,Su=Ou?Ou.f:T,Ru=Object.getOwnPropertySymbols,Wu=typeof(Wu=ku&&ku.iterator)=="symbol"?Wu:T,Bu=Object.create,Cu=gu.propertyIsEnumerable,zu=S.setTimeout,Uu=vu.splice,Mu=hu.ceil,Lu=hu.floor,$u=Object.getPrototypeOf,Du=S.isFinite,Fu=vu.join,Nu=Object.keys,Pu=hu.max,Zu=hu.min,qu=S.parseInt,Tu=hu.random,Vu=vu.reverse,Ku=Wr(S,"DataView"),Gu=Wr(S,"Map"),Ju=Wr(S,"Promise"),Yu=Wr(S,"Set"),Hu=Wr(S,"WeakMap"),Qu=Wr(Object,"create"),Xu=Hu&&new Hu,to=!Cu.call({
|
||||
valueOf:1},"valueOf"),no={},ro=Hr(Ku),eo=Hr(Gu),uo=Hr(Ju),oo=Hr(Yu),io=Hr(Hu),fo=ku?ku.prototype:T,co=fo?fo.valueOf:T,ao=fo?fo.toString:T;jt.templateSettings={escape:nt,evaluate:rt,interpolate:et,variable:"",imports:{_:jt}},jt.prototype=Ot.prototype,jt.prototype.constructor=jt,kt.prototype=on(Ot.prototype),kt.prototype.constructor=kt,Et.prototype=on(Ot.prototype),Et.prototype.constructor=Et,Mt.prototype=Qu?Qu(null):gu,Lt.prototype.clear=function(){this.__data__={hash:new Mt,map:Gu?new Gu:[],string:new Mt
|
||||
}},Lt.prototype["delete"]=function(t){var n=this.__data__;return qr(t)?(n=typeof t=="string"?n.string:n.hash,t=(Qu?n[t]!==T:yu.call(n,t))&&delete n[t]):t=Gu?n.map["delete"](t):Zt(n.map,t),t},Lt.prototype.get=function(t){var n=this.__data__;return qr(t)?(n=typeof t=="string"?n.string:n.hash,Qu?(t=n[t],t="__lodash_hash_undefined__"===t?T:t):t=yu.call(n,t)?n[t]:T):t=Gu?n.map.get(t):qt(n.map,t),t},Lt.prototype.has=function(t){var n=this.__data__;return qr(t)?(n=typeof t=="string"?n.string:n.hash,t=Qu?n[t]!==T:yu.call(n,t)):t=Gu?n.map.has(t):-1<Vt(n.map,t),
|
||||
t},Lt.prototype.set=function(t,n){var r=this.__data__;return qr(t)?(typeof t=="string"?r.string:r.hash)[t]=Qu&&n===T?"__lodash_hash_undefined__":n:Gu?r.map.set(t,n):Kt(r.map,t,n),this},$t.prototype.push=function(t){var n=this.__data__;qr(t)?(n=n.__data__,(typeof t=="string"?n.string:n.hash)[t]="__lodash_hash_undefined__"):n.set(t,"__lodash_hash_undefined__")},Ft.prototype.clear=function(){this.__data__={array:[],map:null}},Ft.prototype["delete"]=function(t){var n=this.__data__,r=n.array;return r?Zt(r,t):n.map["delete"](t);
|
||||
},Ft.prototype.get=function(t){var n=this.__data__,r=n.array;return r?qt(r,t):n.map.get(t)},Ft.prototype.has=function(t){var n=this.__data__,r=n.array;return r?-1<Vt(r,t):n.map.has(t)},Ft.prototype.set=function(t,n){var r=this.__data__,e=r.array;return e&&(199>e.length?Kt(e,t,n):(r.array=null,r.map=new Lt(e))),(r=r.map)&&r.set(t,n),this};var lo=ar(hn),so=ar(pn,true),ho=lr(),po=lr(true);Su&&!Cu.call({valueOf:1},"valueOf")&&(On=function(t){return $(Su(t))});var _o=Xu?function(t,n){return Xu.set(t,n),t}:ou,vo=Yu&&2===new Yu([1,2]).size?function(t){
|
||||
return new Yu(t)}:cu,go=Xu?function(t){return Xu.get(t)}:cu,yo=Cn("length");Ru||(Cr=function(){return[]});var bo=Ru?function(t){for(var n=[];t;)l(n,Cr(t)),t=$u(Object(t));return n}:Cr;(Ku&&"[object DataView]"!=zr(new Ku(new ArrayBuffer(1)))||Gu&&"[object Map]"!=zr(new Gu)||Ju&&"[object Promise]"!=zr(Ju.resolve())||Yu&&"[object Set]"!=zr(new Yu)||Hu&&"[object WeakMap]"!=zr(new Hu))&&(zr=function(t){var n=ju.call(t);if(t=(t="[object Object]"==n?t.constructor:T)?Hr(t):T)switch(t){case ro:return"[object DataView]";
|
||||
case eo:return"[object Map]";case uo:return"[object Promise]";case oo:return"[object Set]";case io:return"[object WeakMap]"}return n});var xo=function(){var t=0,n=0;return function(r,e){var u=Vo(),o=16-(u-n);if(n=u,o>0){if(150<=++t)return r}else t=0;return _o(r,e)}}(),jo=be(function(t){var n=[];return Ve(t).replace(it,function(t,r,e,u){n.push(e?u.replace(pt,"$1"):r||t)}),n}),mo=xe(function(t,n){return ke(t)?cn(t,sn(n,1,ke,true)):[]}),wo=xe(function(t,n){var r=re(n);return ke(r)&&(r=T),ke(t)?cn(t,sn(n,1,ke,true),Sr(r)):[];
|
||||
}),Ao=xe(function(t,n){var r=re(n);return ke(r)&&(r=T),ke(t)?cn(t,sn(n,1,ke,true),T,r):[]}),Oo=xe(function(t){var n=a(t,Yn);return n.length&&n[0]===t[0]?bn(n):[]}),ko=xe(function(t){var n=re(t),r=a(t,Yn);return n===re(r)?n=T:r.pop(),r.length&&r[0]===t[0]?bn(r,Sr(n)):[]}),Eo=xe(function(t){var n=re(t),r=a(t,Yn);return n===re(r)?n=T:r.pop(),r.length&&r[0]===t[0]?bn(r,T,n):[]}),Io=xe(ee),So=xe(function(t,n){n=a(sn(n,1),String);var r=nn(t,n);return Mn(t,n.sort(R)),r}),Ro=xe(function(t){return Tn(sn(t,1,ke,true));
|
||||
}),Wo=xe(function(t){var n=re(t);return ke(n)&&(n=T),Tn(sn(t,1,ke,true),Sr(n))}),Bo=xe(function(t){var n=re(t);return ke(n)&&(n=T),Tn(sn(t,1,ke,true),T,n)}),Co=xe(function(t,n){return ke(t)?cn(t,n):[]}),zo=xe(function(t){return Gn(i(t,ke))}),Uo=xe(function(t){var n=re(t);return ke(n)&&(n=T),Gn(i(t,ke),Sr(n))}),Mo=xe(function(t){var n=re(t);return ke(n)&&(n=T),Gn(i(t,ke),T,n)}),Lo=xe(oe),$o=xe(function(t){var n=t.length,n=n>1?t[n-1]:T,n=typeof n=="function"?(t.pop(),n):T;return ie(t,n)}),Do=xe(function(t){
|
||||
function n(n){return nn(n,t)}t=sn(t,1);var r=t.length,e=r?t[0]:0,u=this.__wrapped__;return 1>=r&&!this.__actions__.length&&u instanceof Et&&L(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:ce,args:[n],thisArg:T}),new kt(u,this.__chain__).thru(function(t){return r&&!t.length&&t.push(T),t})):this.thru(n)}),Fo=fr(function(t,n,r){yu.call(t,r)?++t[r]:t[r]=1}),No=fr(function(t,n,r){yu.call(t,r)?t[r].push(n):t[r]=[n]}),Po=xe(function(t,n,e){var u=-1,o=typeof n=="function",i=Zr(n),f=Oe(t)?Array(t.length):[];
|
||||
return lo(t,function(t){var c=o?n:i&&null!=t?t[n]:T;f[++u]=c?r(c,t,e):jn(t,n,e)}),f}),Zo=fr(function(t,n,r){t[r]=n}),qo=fr(function(t,n,r){t[r?0:1].push(n)},function(){return[[],[]]}),To=xe(function(t,n){if(null==t)return[];var r=n.length;return r>1&&Pr(t,n[0],n[1])?n=[]:r>2&&Pr(n[0],n[1],n[2])&&(n=[n[0]]),Rn(t,sn(n,1),[])}),Vo=lu.now,Ko=xe(function(t,n,r){var e=1;if(r.length)var u=F(r,Br(Ko)),e=32|e;return Or(t,e,n,r,u)}),Go=xe(function(t,n,r){var e=3;if(r.length)var u=F(r,Br(Go)),e=32|e;return Or(n,e,t,r,u);
|
||||
}),Jo=xe(function(t,n){return fn(t,1,n)}),Yo=xe(function(t,n,r){return fn(t,qe(n)||0,r)});be.Cache=Lt;var Ho=xe(function(t,n){n=a(sn(n,1,Nr),Sr());var e=n.length;return xe(function(u){for(var o=-1,i=Zu(u.length,e);++o<i;)u[o]=n[o].call(this,u[o]);return r(t,this,u)})}),Qo=xe(function(t,n){var r=F(n,Br(Qo));return Or(t,32,T,n,r)}),Xo=xe(function(t,n){var r=F(n,Br(Xo));return Or(t,64,T,n,r)}),ti=xe(function(t,n){return Or(t,256,T,T,T,sn(n,1))}),ni=Array.isArray,ri=Au?function(t){return t instanceof Au;
|
||||
}:uu(false),ei=cr(function(t,n){if(to||Vr(n)||Oe(n))ur(n,Ye(n),t);else for(var r in n)yu.call(n,r)&&Qt(t,r,n[r])}),ui=cr(function(t,n){if(to||Vr(n)||Oe(n))ur(n,He(n),t);else for(var r in n)Qt(t,r,n[r])}),oi=cr(function(t,n,r,e){or(n,He(n),t,e)}),ii=cr(function(t,n,r,e){or(n,Ye(n),t,e)}),fi=xe(function(t,n){return nn(t,sn(n,1))}),ci=xe(function(t){return t.push(T,Gt),r(oi,T,t)}),ai=xe(function(t){return t.push(T,Gr),r(_i,T,t)}),li=yr(function(t,n,r){t[n]=r},uu(ou)),si=yr(function(t,n,r){yu.call(t,n)?t[n].push(r):t[n]=[r];
|
||||
},Sr),hi=xe(jn),pi=cr(function(t,n,r){Sn(t,n,r)}),_i=cr(function(t,n,r,e){Sn(t,n,r,e)}),vi=xe(function(t,n){return null==t?{}:(n=a(sn(n,1),Yr),Wn(t,cn(gn(t,He,bo),n)))}),gi=xe(function(t,n){return null==t?{}:Wn(t,sn(n,1))}),di=pr(function(t,n,r){return n=n.toLowerCase(),t+(r?nu(n):n)}),yi=pr(function(t,n,r){return t+(r?"-":"")+n.toLowerCase()}),bi=pr(function(t,n,r){return t+(r?" ":"")+n.toLowerCase()}),xi=hr("toLowerCase"),ji=pr(function(t,n,r){return t+(r?"_":"")+n.toLowerCase()}),mi=pr(function(t,n,r){
|
||||
return t+(r?" ":"")+Ai(n)}),wi=pr(function(t,n,r){return t+(r?" ":"")+n.toUpperCase()}),Ai=hr("toUpperCase"),Oi=xe(function(t,n){try{return r(t,T,n)}catch(e){return Ee(e)?e:new su(e)}}),ki=xe(function(t,n){return u(sn(n,1),function(n){t[n]=Ko(t[n],t)}),t}),Ei=gr(),Ii=gr(true),Si=xe(function(t,n){return function(r){return jn(r,t,n)}}),Ri=xe(function(t,n){return function(r){return jn(t,r,n)}}),Wi=br(a),Bi=br(o),Ci=br(p),zi=mr(),Ui=mr(true),Mi=W(function(t,n){return t+n}),Li=Ar("ceil"),$i=W(function(t,n){
|
||||
return t/n}),Di=Ar("floor"),Fi=W(function(t,n){return t*n}),Ni=Ar("round"),Pi=W(function(t,n){return t-n});return jt.after=function(t,n){if(typeof n!="function")throw new _u("Expected a function");return t=Pe(t),function(){return 1>--t?n.apply(this,arguments):void 0}},jt.ary=_e,jt.assign=ei,jt.assignIn=ui,jt.assignInWith=oi,jt.assignWith=ii,jt.at=fi,jt.before=ve,jt.bind=Ko,jt.bindAll=ki,jt.bindKey=Go,jt.castArray=je,jt.chain=fe,jt.chunk=function(t,n,r){if(n=(r?Pr(t,n,r):n===T)?1:Pu(Pe(n),0),r=t?t.length:0,
|
||||
!r||1>n)return[];for(var e=0,u=0,o=Array(Mu(r/n));r>e;)o[u++]=Fn(t,e,e+=n);return o},jt.compact=function(t){for(var n=-1,r=t?t.length:0,e=0,u=[];++n<r;){var o=t[n];o&&(u[e++]=o)}return u},jt.concat=function(){var t=arguments.length,n=je(arguments[0]);if(2>t)return t?er(n):[];for(var r=Array(t-1);t--;)r[t-1]=arguments[t];for(var t=sn(r,1),r=-1,e=n.length,u=-1,o=t.length,i=Array(e+o);++r<e;)i[r]=n[r];for(;++u<o;)i[r++]=t[u];return i},jt.cond=function(t){var n=t?t.length:0,e=Sr();return t=n?a(t,function(t){
|
||||
if("function"!=typeof t[1])throw new _u("Expected a function");return[e(t[0]),t[1]]}):[],xe(function(e){for(var u=-1;++u<n;){var o=t[u];if(r(o[0],this,e))return r(o[1],this,e)}})},jt.conforms=function(t){return un(en(t,true))},jt.constant=uu,jt.countBy=Fo,jt.create=function(t,n){var r=on(t);return n?tn(r,n):r},jt.curry=ge,jt.curryRight=de,jt.debounce=ye,jt.defaults=ci,jt.defaultsDeep=ai,jt.defer=Jo,jt.delay=Yo,jt.difference=mo,jt.differenceBy=wo,jt.differenceWith=Ao,jt.drop=Xr,jt.dropRight=te,jt.dropRightWhile=function(t,n){
|
||||
return t&&t.length?Vn(t,Sr(n,3),true,true):[]},jt.dropWhile=function(t,n){return t&&t.length?Vn(t,Sr(n,3),true):[]},jt.fill=function(t,n,r,e){var u=t?t.length:0;if(!u)return[];for(r&&typeof r!="number"&&Pr(t,n,r)&&(r=0,e=u),u=t.length,r=Pe(r),0>r&&(r=-r>u?0:u+r),e=e===T||e>u?u:Pe(e),0>e&&(e+=u),e=r>e?0:Ze(e);e>r;)t[r++]=n;return t},jt.filter=function(t,n){return(ni(t)?i:ln)(t,Sr(n,3))},jt.flatMap=function(t,n){return sn(he(t,n),1)},jt.flatMapDeep=function(t,n){return sn(he(t,n),V)},jt.flatMapDepth=function(t,n,r){
|
||||
return r=r===T?1:Pe(r),sn(he(t,n),r)},jt.flatten=function(t){return t&&t.length?sn(t,1):[]},jt.flattenDeep=function(t){return t&&t.length?sn(t,V):[]},jt.flattenDepth=function(t,n){return t&&t.length?(n=n===T?1:Pe(n),sn(t,n)):[]},jt.flip=function(t){return Or(t,512)},jt.flow=Ei,jt.flowRight=Ii,jt.fromPairs=function(t){for(var n=-1,r=t?t.length:0,e={};++n<r;){var u=t[n];e[u[0]]=u[1]}return e},jt.functions=function(t){return null==t?[]:_n(t,Ye(t))},jt.functionsIn=function(t){return null==t?[]:_n(t,He(t));
|
||||
},jt.groupBy=No,jt.initial=function(t){return te(t,1)},jt.intersection=Oo,jt.intersectionBy=ko,jt.intersectionWith=Eo,jt.invert=li,jt.invertBy=si,jt.invokeMap=Po,jt.iteratee=iu,jt.keyBy=Zo,jt.keys=Ye,jt.keysIn=He,jt.map=he,jt.mapKeys=function(t,n){var r={};return n=Sr(n,3),hn(t,function(t,e,u){r[n(t,e,u)]=t}),r},jt.mapValues=function(t,n){var r={};return n=Sr(n,3),hn(t,function(t,e,u){r[e]=n(t,e,u)}),r},jt.matches=function(t){return En(en(t,true))},jt.matchesProperty=function(t,n){return In(t,en(n,true));
|
||||
},jt.memoize=be,jt.merge=pi,jt.mergeWith=_i,jt.method=Si,jt.methodOf=Ri,jt.mixin=fu,jt.negate=function(t){if(typeof t!="function")throw new _u("Expected a function");return function(){return!t.apply(this,arguments)}},jt.nthArg=function(t){return t=Pe(t),function(){return arguments[t]}},jt.omit=vi,jt.omitBy=function(t,n){return n=Sr(n),Bn(t,function(t,r){return!n(t,r)})},jt.once=function(t){return ve(2,t)},jt.orderBy=function(t,n,r,e){return null==t?[]:(ni(n)||(n=null==n?[]:[n]),r=e?T:r,ni(r)||(r=null==r?[]:[r]),
|
||||
Rn(t,n,r))},jt.over=Wi,jt.overArgs=Ho,jt.overEvery=Bi,jt.overSome=Ci,jt.partial=Qo,jt.partialRight=Xo,jt.partition=qo,jt.pick=gi,jt.pickBy=function(t,n){return null==t?{}:Bn(t,Sr(n))},jt.property=au,jt.propertyOf=function(t){return function(n){return null==t?T:vn(t,n)}},jt.pull=Io,jt.pullAll=ee,jt.pullAllBy=function(t,n,r){return t&&t.length&&n&&n.length?Un(t,n,Sr(r)):t},jt.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?Un(t,n,T,r):t},jt.pullAt=So,jt.range=zi,jt.rangeRight=Ui,jt.rearg=ti,
|
||||
jt.reject=function(t,n){var r=ni(t)?i:ln;return n=Sr(n,3),r(t,function(t,r,e){return!n(t,r,e)})},jt.remove=function(t,n){var r=[];if(!t||!t.length)return r;var e=-1,u=[],o=t.length;for(n=Sr(n,3);++e<o;){var i=t[e];n(i,e,t)&&(r.push(i),u.push(e))}return Mn(t,u),r},jt.rest=xe,jt.reverse=ue,jt.sampleSize=pe,jt.set=function(t,n,r){return null==t?t:Dn(t,n,r)},jt.setWith=function(t,n,r,e){return e=typeof e=="function"?e:T,null==t?t:Dn(t,n,r,e)},jt.shuffle=function(t){return pe(t,4294967295)},jt.slice=function(t,n,r){
|
||||
var e=t?t.length:0;return e?(r&&typeof r!="number"&&Pr(t,n,r)?(n=0,r=e):(n=null==n?0:Pe(n),r=r===T?e:Pe(r)),Fn(t,n,r)):[]},jt.sortBy=To,jt.sortedUniq=function(t){return t&&t.length?qn(t):[]},jt.sortedUniqBy=function(t,n){return t&&t.length?qn(t,Sr(n)):[]},jt.split=function(t,n,r){return r&&typeof r!="number"&&Pr(t,n,r)&&(n=r=T),r=r===T?4294967295:r>>>0,r?(t=Ve(t))&&(typeof n=="string"||null!=n&&!Me(n))&&(n+="",""==n&&Wt.test(t))?Qn(t.match(St),0,r):t.split(n,r):[]},jt.spread=function(t,n){if(typeof t!="function")throw new _u("Expected a function");
|
||||
return n=n===T?0:Pu(Pe(n),0),xe(function(e){var u=e[n];return e=Qn(e,0,n),u&&l(e,u),r(t,this,e)})},jt.tail=function(t){return Xr(t,1)},jt.take=function(t,n,r){return t&&t.length?(n=r||n===T?1:Pe(n),Fn(t,0,0>n?0:n)):[]},jt.takeRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:Pe(n),n=e-n,Fn(t,0>n?0:n,e)):[]},jt.takeRightWhile=function(t,n){return t&&t.length?Vn(t,Sr(n,3),false,true):[]},jt.takeWhile=function(t,n){return t&&t.length?Vn(t,Sr(n,3)):[]},jt.tap=function(t,n){return n(t),t},jt.throttle=function(t,n,r){
|
||||
var e=true,u=true;if(typeof t!="function")throw new _u("Expected a function");return We(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),ye(t,n,{leading:e,maxWait:n,trailing:u})},jt.thru=ce,jt.toArray=Ne,jt.toPairs=Qe,jt.toPairsIn=Xe,jt.toPath=function(t){return ni(t)?a(t,Yr):$e(t)?[t]:er(jo(t))},jt.toPlainObject=Te,jt.transform=function(t,n,r){var e=ni(t)||De(t);if(n=Sr(n,4),null==r)if(e||We(t)){var o=t.constructor;r=e?ni(t)?new o:[]:Ie(o)?on($u(Object(t))):{}}else r={};return(e?u:hn)(t,function(t,e,u){
|
||||
return n(r,t,e,u)}),r},jt.unary=function(t){return _e(t,1)},jt.union=Ro,jt.unionBy=Wo,jt.unionWith=Bo,jt.uniq=function(t){return t&&t.length?Tn(t):[]},jt.uniqBy=function(t,n){return t&&t.length?Tn(t,Sr(n)):[]},jt.uniqWith=function(t,n){return t&&t.length?Tn(t,T,n):[]},jt.unset=function(t,n){var r;if(null==t)r=true;else{r=t;var e=n,e=Zr(e,r)?[e]:Hn(e);r=Jr(r,e),e=re(e),r=null!=r&&Ge(r,e)?delete r[e]:true}return r},jt.unzip=oe,jt.unzipWith=ie,jt.update=function(t,n,r){return null==t?t:Dn(t,n,(typeof r=="function"?r:ou)(vn(t,n)),void 0);
|
||||
},jt.updateWith=function(t,n,r,e){return e=typeof e=="function"?e:T,null!=t&&(t=Dn(t,n,(typeof r=="function"?r:ou)(vn(t,n)),e)),t},jt.values=tu,jt.valuesIn=function(t){return null==t?[]:k(t,He(t))},jt.without=Co,jt.words=eu,jt.wrap=function(t,n){return n=null==n?ou:n,Qo(n,t)},jt.xor=zo,jt.xorBy=Uo,jt.xorWith=Mo,jt.zip=Lo,jt.zipObject=function(t,n){return Jn(t||[],n||[],Qt)},jt.zipObjectDeep=function(t,n){return Jn(t||[],n||[],Dn)},jt.zipWith=$o,jt.entries=Qe,jt.entriesIn=Xe,jt.extend=ui,jt.extendWith=oi,
|
||||
fu(jt,jt),jt.add=Mi,jt.attempt=Oi,jt.camelCase=di,jt.capitalize=nu,jt.ceil=Li,jt.clamp=function(t,n,r){return r===T&&(r=n,n=T),r!==T&&(r=qe(r),r=r===r?r:0),n!==T&&(n=qe(n),n=n===n?n:0),rn(qe(t),n,r)},jt.clone=function(t){return en(t,false,true)},jt.cloneDeep=function(t){return en(t,true,true)},jt.cloneDeepWith=function(t,n){return en(t,true,true,n)},jt.cloneWith=function(t,n){return en(t,false,true,n)},jt.deburr=ru,jt.divide=$i,jt.endsWith=function(t,n,r){t=Ve(t),n=typeof n=="string"?n:n+"";var e=t.length;return r=r===T?e:rn(Pe(r),0,e),
|
||||
r-=n.length,r>=0&&t.indexOf(n,r)==r},jt.eq=me,jt.escape=function(t){return(t=Ve(t))&&tt.test(t)?t.replace(Q,C):t},jt.escapeRegExp=function(t){return(t=Ve(t))&&ct.test(t)?t.replace(ft,"\\$&"):t},jt.every=function(t,n,r){var e=ni(t)?o:an;return r&&Pr(t,n,r)&&(n=T),e(t,Sr(n,3))},jt.find=function(t,n){if(n=Sr(n,3),ni(t)){var r=g(t,n);return r>-1?t[r]:T}return v(t,n,lo)},jt.findIndex=function(t,n){return t&&t.length?g(t,Sr(n,3)):-1},jt.findKey=function(t,n){return v(t,Sr(n,3),hn,true)},jt.findLast=function(t,n){
|
||||
if(n=Sr(n,3),ni(t)){var r=g(t,n,true);return r>-1?t[r]:T}return v(t,n,so)},jt.findLastIndex=function(t,n){return t&&t.length?g(t,Sr(n,3),true):-1},jt.findLastKey=function(t,n){return v(t,Sr(n,3),pn,true)},jt.floor=Di,jt.forEach=le,jt.forEachRight=se,jt.forIn=function(t,n){return null==t?t:ho(t,Sr(n),He)},jt.forInRight=function(t,n){return null==t?t:po(t,Sr(n),He)},jt.forOwn=function(t,n){return t&&hn(t,Sr(n))},jt.forOwnRight=function(t,n){return t&&pn(t,Sr(n))},jt.get=Ke,jt.gt=we,jt.gte=function(t,n){return t>=n;
|
||||
},jt.has=Ge,jt.hasIn=Je,jt.head=ne,jt.identity=ou,jt.includes=function(t,n,r,e){return t=Oe(t)?t:tu(t),r=r&&!e?Pe(r):0,e=t.length,0>r&&(r=Pu(e+r,0)),Le(t)?e>=r&&-1<t.indexOf(n,r):!!e&&-1<d(t,n,r)},jt.indexOf=function(t,n,r){var e=t?t.length:0;return e?(r=Pe(r),0>r&&(r=Pu(e+r,0)),d(t,n,r)):-1},jt.inRange=function(t,n,r){return n=qe(n)||0,r===T?(r=n,n=0):r=qe(r)||0,t=qe(t),t>=Zu(n,r)&&t<Pu(n,r)},jt.invoke=hi,jt.isArguments=Ae,jt.isArray=ni,jt.isArrayBuffer=function(t){return Be(t)&&"[object ArrayBuffer]"==ju.call(t);
|
||||
},jt.isArrayLike=Oe,jt.isArrayLikeObject=ke,jt.isBoolean=function(t){return true===t||false===t||Be(t)&&"[object Boolean]"==ju.call(t)},jt.isBuffer=ri,jt.isDate=function(t){return Be(t)&&"[object Date]"==ju.call(t)},jt.isElement=function(t){return!!t&&1===t.nodeType&&Be(t)&&!Ue(t)},jt.isEmpty=function(t){if(Oe(t)&&(ni(t)||Le(t)||Ie(t.splice)||Ae(t)||ri(t)))return!t.length;if(Be(t)){var n=zr(t);if("[object Map]"==n||"[object Set]"==n)return!t.size}for(var r in t)if(yu.call(t,r))return false;return!(to&&Ye(t).length);
|
||||
},jt.isEqual=function(t,n){return mn(t,n)},jt.isEqualWith=function(t,n,r){var e=(r=typeof r=="function"?r:T)?r(t,n):T;return e===T?mn(t,n,r):!!e},jt.isError=Ee,jt.isFinite=function(t){return typeof t=="number"&&Du(t)},jt.isFunction=Ie,jt.isInteger=Se,jt.isLength=Re,jt.isMap=function(t){return Be(t)&&"[object Map]"==zr(t)},jt.isMatch=function(t,n){return t===n||wn(t,n,Rr(n))},jt.isMatchWith=function(t,n,r){return r=typeof r=="function"?r:T,wn(t,n,Rr(n),r)},jt.isNaN=function(t){return ze(t)&&t!=+t},
|
||||
jt.isNative=Ce,jt.isNil=function(t){return null==t},jt.isNull=function(t){return null===t},jt.isNumber=ze,jt.isObject=We,jt.isObjectLike=Be,jt.isPlainObject=Ue,jt.isRegExp=Me,jt.isSafeInteger=function(t){return Se(t)&&t>=-9007199254740991&&9007199254740991>=t},jt.isSet=function(t){return Be(t)&&"[object Set]"==zr(t)},jt.isString=Le,jt.isSymbol=$e,jt.isTypedArray=De,jt.isUndefined=function(t){return t===T},jt.isWeakMap=function(t){return Be(t)&&"[object WeakMap]"==zr(t)},jt.isWeakSet=function(t){return Be(t)&&"[object WeakSet]"==ju.call(t);
|
||||
},jt.join=function(t,n){return t?Fu.call(t,n):""},jt.kebabCase=yi,jt.last=re,jt.lastIndexOf=function(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e;if(r!==T&&(u=Pe(r),u=(0>u?Pu(e+u,0):Zu(u,e-1))+1),n!==n)return U(t,u,true);for(;u--;)if(t[u]===n)return u;return-1},jt.lowerCase=bi,jt.lowerFirst=xi,jt.lt=Fe,jt.lte=function(t,n){return n>=t},jt.max=function(t){return t&&t.length?_(t,ou,we):T},jt.maxBy=function(t,n){return t&&t.length?_(t,Sr(n),we):T},jt.mean=function(t){return b(t,ou)},jt.meanBy=function(t,n){
|
||||
return b(t,Sr(n))},jt.min=function(t){return t&&t.length?_(t,ou,Fe):T},jt.minBy=function(t,n){return t&&t.length?_(t,Sr(n),Fe):T},jt.multiply=Fi,jt.noConflict=function(){return Jt._===this&&(Jt._=mu),this},jt.noop=cu,jt.now=Vo,jt.pad=function(t,n,r){t=Ve(t);var e=(n=Pe(n))?P(t):0;return n&&n>e?(n=(n-e)/2,xr(Lu(n),r)+t+xr(Mu(n),r)):t},jt.padEnd=function(t,n,r){t=Ve(t);var e=(n=Pe(n))?P(t):0;return n&&n>e?t+xr(n-e,r):t},jt.padStart=function(t,n,r){t=Ve(t);var e=(n=Pe(n))?P(t):0;return n&&n>e?xr(n-e,r)+t:t;
|
||||
},jt.parseInt=function(t,n,r){return r||null==n?n=0:n&&(n=+n),t=Ve(t).replace(at,""),qu(t,n||(gt.test(t)?16:10))},jt.random=function(t,n,r){if(r&&typeof r!="boolean"&&Pr(t,n,r)&&(n=r=T),r===T&&(typeof n=="boolean"?(r=n,n=T):typeof t=="boolean"&&(r=t,t=T)),t===T&&n===T?(t=0,n=1):(t=qe(t)||0,n===T?(n=t,t=0):n=qe(n)||0),t>n){var e=t;t=n,n=e}return r||t%1||n%1?(r=Tu(),Zu(t+r*(n-t+Nt("1e-"+((r+"").length-1))),n)):Ln(t,n)},jt.reduce=function(t,n,r){var e=ni(t)?s:x,u=3>arguments.length;return e(t,Sr(n,4),r,u,lo);
|
||||
},jt.reduceRight=function(t,n,r){var e=ni(t)?h:x,u=3>arguments.length;return e(t,Sr(n,4),r,u,so)},jt.repeat=function(t,n,r){return n=(r?Pr(t,n,r):n===T)?1:Pe(n),$n(Ve(t),n)},jt.replace=function(){var t=arguments,n=Ve(t[0]);return 3>t.length?n:n.replace(t[1],t[2])},jt.result=function(t,n,r){n=Zr(n,t)?[n]:Hn(n);var e=-1,u=n.length;for(u||(t=T,u=1);++e<u;){var o=null==t?T:t[n[e]];o===T&&(e=u,o=r),t=Ie(o)?o.call(t):o}return t},jt.round=Ni,jt.runInContext=q,jt.sample=function(t){t=Oe(t)?t:tu(t);var n=t.length;
|
||||
return n>0?t[Ln(0,n-1)]:T},jt.size=function(t){if(null==t)return 0;if(Oe(t)){var n=t.length;return n&&Le(t)?P(t):n}return Be(t)&&(n=zr(t),"[object Map]"==n||"[object Set]"==n)?t.size:Ye(t).length},jt.snakeCase=ji,jt.some=function(t,n,r){var e=ni(t)?p:Nn;return r&&Pr(t,n,r)&&(n=T),e(t,Sr(n,3))},jt.sortedIndex=function(t,n){return Pn(t,n)},jt.sortedIndexBy=function(t,n,r){return Zn(t,n,Sr(r))},jt.sortedIndexOf=function(t,n){var r=t?t.length:0;if(r){var e=Pn(t,n);if(r>e&&me(t[e],n))return e}return-1;
|
||||
},jt.sortedLastIndex=function(t,n){return Pn(t,n,true)},jt.sortedLastIndexBy=function(t,n,r){return Zn(t,n,Sr(r),true)},jt.sortedLastIndexOf=function(t,n){if(t&&t.length){var r=Pn(t,n,true)-1;if(me(t[r],n))return r}return-1},jt.startCase=mi,jt.startsWith=function(t,n,r){return t=Ve(t),r=rn(Pe(r),0,t.length),t.lastIndexOf(n,r)==r},jt.subtract=Pi,jt.sum=function(t){return t&&t.length?m(t,ou):0},jt.sumBy=function(t,n){return t&&t.length?m(t,Sr(n)):0},jt.template=function(t,n,r){var e=jt.templateSettings;r&&Pr(t,n,r)&&(n=T),
|
||||
t=Ve(t),n=oi({},n,e,Gt),r=oi({},n.imports,e.imports,Gt);var u,o,i=Ye(r),f=k(r,i),c=0;r=n.interpolate||wt;var a="__p+='";r=pu((n.escape||wt).source+"|"+r.source+"|"+(r===et?_t:wt).source+"|"+(n.evaluate||wt).source+"|$","g");var l="sourceURL"in n?"//# sourceURL="+n.sourceURL+"\n":"";if(t.replace(r,function(n,r,e,i,f,l){return e||(e=i),a+=t.slice(c,l).replace(At,z),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+n.length,n}),a+="';",(n=n.variable)||(a="with(obj){"+a+"}"),
|
||||
a=(o?a.replace(G,""):a).replace(J,"$1").replace(Y,"$1;"),a="function("+(n||"obj")+"){"+(n?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",n=Oi(function(){return Function(i,l+"return "+a).apply(T,f)}),n.source=a,Ee(n))throw n;return n},jt.times=function(t,n){if(t=Pe(t),1>t||t>9007199254740991)return[];var r=4294967295,e=Zu(t,4294967295);for(n=Sr(n),t-=4294967295,e=w(e,n);++r<t;)n(r);return e;
|
||||
},jt.toInteger=Pe,jt.toLength=Ze,jt.toLower=function(t){return Ve(t).toLowerCase()},jt.toNumber=qe,jt.toSafeInteger=function(t){return rn(Pe(t),-9007199254740991,9007199254740991)},jt.toString=Ve,jt.toUpper=function(t){return Ve(t).toUpperCase()},jt.trim=function(t,n,r){return(t=Ve(t))?r||n===T?t.replace(at,""):(n+="")?(t=t.match(St),n=n.match(St),Qn(t,E(t,n),I(t,n)+1).join("")):t:t},jt.trimEnd=function(t,n,r){return(t=Ve(t))?r||n===T?t.replace(st,""):(n+="")?(t=t.match(St),n=I(t,n.match(St))+1,Qn(t,0,n).join("")):t:t;
|
||||
},jt.trimStart=function(t,n,r){return(t=Ve(t))?r||n===T?t.replace(lt,""):(n+="")?(t=t.match(St),n=E(t,n.match(St)),Qn(t,n).join("")):t:t},jt.truncate=function(t,n){var r=30,e="...";if(We(n))var u="separator"in n?n.separator:u,r="length"in n?Pe(n.length):r,e="omission"in n?Ve(n.omission):e;t=Ve(t);var o=t.length;if(Wt.test(t))var i=t.match(St),o=i.length;if(r>=o)return t;if(o=r-P(e),1>o)return e;if(r=i?Qn(i,0,o).join(""):t.slice(0,o),u===T)return r+e;if(i&&(o+=r.length-o),Me(u)){if(t.slice(o).search(u)){
|
||||
var f=r;for(u.global||(u=pu(u.source,Ve(vt.exec(u))+"g")),u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===T?o:c)}}else t.indexOf(u,o)!=o&&(u=r.lastIndexOf(u),u>-1&&(r=r.slice(0,u)));return r+e},jt.unescape=function(t){return(t=Ve(t))&&X.test(t)?t.replace(H,Z):t},jt.uniqueId=function(t){var n=++bu;return Ve(t)+n},jt.upperCase=wi,jt.upperFirst=Ai,jt.each=le,jt.eachRight=se,jt.first=ne,fu(jt,function(){var t={};return hn(jt,function(n,r){yu.call(jt.prototype,r)||(t[r]=n)}),t}(),{chain:false}),
|
||||
jt.VERSION="4.10.0",u("bind bindKey curry curryRight partial partialRight".split(" "),function(t){jt[t].placeholder=jt}),u(["drop","take"],function(t,n){Et.prototype[t]=function(r){var e=this.__filtered__;if(e&&!n)return new Et(this);r=r===T?1:Pu(Pe(r),0);var u=this.clone();return e?u.__takeCount__=Zu(r,u.__takeCount__):u.__views__.push({size:Zu(r,4294967295),type:t+(0>u.__dir__?"Right":"")}),u},Et.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),u(["filter","map","takeWhile"],function(t,n){
|
||||
var r=n+1,e=1==r||3==r;Et.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:Sr(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}}),u(["head","last"],function(t,n){var r="take"+(n?"Right":"");Et.prototype[t]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(t,n){var r="drop"+(n?"":"Right");Et.prototype[t]=function(){return this.__filtered__?new Et(this):this[r](1)}}),Et.prototype.compact=function(){return this.filter(ou)},Et.prototype.find=function(t){
|
||||
return this.filter(t).head()},Et.prototype.findLast=function(t){return this.reverse().find(t)},Et.prototype.invokeMap=xe(function(t,n){return typeof t=="function"?new Et(this):this.map(function(r){return jn(r,t,n)})}),Et.prototype.reject=function(t){return t=Sr(t,3),this.filter(function(n){return!t(n)})},Et.prototype.slice=function(t,n){t=Pe(t);var r=this;return r.__filtered__&&(t>0||0>n)?new Et(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==T&&(n=Pe(n),r=0>n?r.dropRight(-n):r.take(n-t)),r)},Et.prototype.takeRightWhile=function(t){
|
||||
return this.reverse().takeWhile(t).reverse()},Et.prototype.toArray=function(){return this.take(4294967295)},hn(Et.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),u=jt[e?"take"+("last"==n?"Right":""):n],o=e||/^find/.test(n);u&&(jt.prototype[n]=function(){function n(t){return t=u.apply(jt,l([t],f)),e&&h?t[0]:t}var i=this.__wrapped__,f=e?[1]:arguments,c=i instanceof Et,a=f[0],s=c||ni(i);s&&r&&typeof a=="function"&&1!=a.length&&(c=s=false);var h=this.__chain__,p=!!this.__actions__.length,a=o&&!h,c=c&&!p;
|
||||
return!o&&s?(i=c?i:new Et(this),i=t.apply(i,f),i.__actions__.push({func:ce,args:[n],thisArg:T}),new kt(i,h)):a&&c?t.apply(this,f):(i=this.thru(n),a?e?i.value()[0]:i.value():i)})}),u("pop push shift sort splice unshift".split(" "),function(t){var n=vu[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t);jt.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){var u=this.value();return n.apply(ni(u)?u:[],t)}return this[r](function(r){return n.apply(ni(r)?r:[],t)});
|
||||
}}),hn(Et.prototype,function(t,n){var r=jt[n];if(r){var e=r.name+"";(no[e]||(no[e]=[])).push({name:n,func:r})}}),no[dr(T,2).name]=[{name:"wrapper",func:T}],Et.prototype.clone=function(){var t=new Et(this.__wrapped__);return t.__actions__=er(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=er(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=er(this.__views__),t},Et.prototype.reverse=function(){if(this.__filtered__){var t=new Et(this);t.__dir__=-1,
|
||||
t.__filtered__=true}else t=this.clone(),t.__dir__*=-1;return t},Et.prototype.value=function(){var t,n=this.__wrapped__.value(),r=this.__dir__,e=ni(n),u=0>r,o=e?n.length:0;t=o;for(var i=this.__views__,f=0,c=-1,a=i.length;++c<a;){var l=i[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":t-=s;break;case"take":t=Zu(t,f+s);break;case"takeRight":f=Pu(f,t-s)}}if(t={start:f,end:t},i=t.start,f=t.end,t=f-i,u=u?f:i-1,i=this.__iteratees__,f=i.length,c=0,a=Zu(t,this.__takeCount__),!e||200>o||o==t&&a==t)return Kn(n,this.__actions__);
|
||||
e=[];t:for(;t--&&a>c;){for(u+=r,o=-1,l=n[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 t;break t}}e[c++]=l}return e},jt.prototype.at=Do,jt.prototype.chain=function(){return fe(this)},jt.prototype.commit=function(){return new kt(this.value(),this.__chain__)},jt.prototype.next=function(){this.__values__===T&&(this.__values__=Ne(this.value()));var t=this.__index__>=this.__values__.length,n=t?T:this.__values__[this.__index__++];return{done:t,value:n}},jt.prototype.plant=function(t){
|
||||
for(var n,r=this;r instanceof Ot;){var e=Qr(r);e.__index__=0,e.__values__=T,n?u.__wrapped__=e:n=e;var u=e,r=r.__wrapped__}return u.__wrapped__=t,n},jt.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof Et?(this.__actions__.length&&(t=new Et(this)),t=t.reverse(),t.__actions__.push({func:ce,args:[ue],thisArg:T}),new kt(t,this.__chain__)):this.thru(ue)},jt.prototype.toJSON=jt.prototype.valueOf=jt.prototype.value=function(){return Kn(this.__wrapped__,this.__actions__)},Wu&&(jt.prototype[Wu]=ae),
|
||||
jt}var T,V=1/0,K=NaN,G=/\b__p\+='';/g,J=/\b(__p\+=)''\+/g,Y=/(__e\(.*?\)|\b__t\))\+'';/g,H=/&(?:amp|lt|gt|quot|#39|#96);/g,Q=/[&<>"'`]/g,X=RegExp(H.source),tt=RegExp(Q.source),nt=/<%-([\s\S]+?)%>/g,rt=/<%([\s\S]+?)%>/g,et=/<%=([\s\S]+?)%>/g,ut=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ot=/^\w*$/,it=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,ft=/[\\^$.*+?()[\]{}|]/g,ct=RegExp(ft.source),at=/^\s+|\s+$/g,lt=/^\s+/,st=/\s+$/,ht=/[a-zA-Z0-9]+/g,pt=/\\(\\)?/g,_t=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vt=/\w*$/,gt=/^0x/i,dt=/^[-+]0x[0-9a-f]+$/i,yt=/^0b[01]+$/i,bt=/^\[object .+?Constructor\]$/,xt=/^0o[0-7]+$/i,jt=/^(?:0|[1-9]\d*)$/,mt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,wt=/($^)/,At=/['\n\r\u2028\u2029\\]/g,Ot="[\\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])?)*",kt="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+Ot,Et="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",It=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),St=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+Et+Ot,"g"),Rt=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+",kt].join("|"),"g"),Wt=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),Bt=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ct="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),zt={};
|
||||
zt["[object Float32Array]"]=zt["[object Float64Array]"]=zt["[object Int8Array]"]=zt["[object Int16Array]"]=zt["[object Int32Array]"]=zt["[object Uint8Array]"]=zt["[object Uint8ClampedArray]"]=zt["[object Uint16Array]"]=zt["[object Uint32Array]"]=true,zt["[object Arguments]"]=zt["[object Array]"]=zt["[object ArrayBuffer]"]=zt["[object Boolean]"]=zt["[object DataView]"]=zt["[object Date]"]=zt["[object Error]"]=zt["[object Function]"]=zt["[object Map]"]=zt["[object Number]"]=zt["[object Object]"]=zt["[object RegExp]"]=zt["[object Set]"]=zt["[object String]"]=zt["[object WeakMap]"]=false;
|
||||
var Ut={};Ut["[object Arguments]"]=Ut["[object Array]"]=Ut["[object ArrayBuffer]"]=Ut["[object DataView]"]=Ut["[object Boolean]"]=Ut["[object Date]"]=Ut["[object Float32Array]"]=Ut["[object Float64Array]"]=Ut["[object Int8Array]"]=Ut["[object Int16Array]"]=Ut["[object Int32Array]"]=Ut["[object Map]"]=Ut["[object Number]"]=Ut["[object Object]"]=Ut["[object RegExp]"]=Ut["[object Set]"]=Ut["[object String]"]=Ut["[object Symbol]"]=Ut["[object Uint8Array]"]=Ut["[object Uint8ClampedArray]"]=Ut["[object Uint16Array]"]=Ut["[object Uint32Array]"]=true,
|
||||
Ut["[object Error]"]=Ut["[object Function]"]=Ut["[object WeakMap]"]=false;var Mt={"\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"},Lt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},$t={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Dt={"function":true,object:true},Ft={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"
|
||||
},Nt=parseFloat,Pt=parseInt,Zt=Dt[typeof exports]&&exports&&!exports.nodeType?exports:T,qt=Dt[typeof module]&&module&&!module.nodeType?module:T,Tt=qt&&qt.exports===Zt?Zt:T,Vt=S(Dt[typeof self]&&self),Kt=S(Dt[typeof window]&&window),Gt=S(Dt[typeof this]&&this),Jt=S(Zt&&qt&&typeof global=="object"&&global)||Kt!==(Gt&&Gt.window)&&Kt||Vt||Gt||Function("return this")(),Yt=q();(Kt||Vt||{})._=Yt,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return Yt}):Zt&&qt?(Tt&&((qt.exports=Yt)._=Yt),
|
||||
Zt._=Yt):Jt._=Yt}).call(this);
|
||||
350
dist/mapping.fp.js
vendored
350
dist/mapping.fp.js
vendored
@@ -1,350 +0,0 @@
|
||||
(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 = {
|
||||
|
||||
// Lodash aliases.
|
||||
'each': 'forEach',
|
||||
'eachRight': 'forEachRight',
|
||||
'entries': 'toPairs',
|
||||
'entriesIn': 'toPairsIn',
|
||||
'extend': 'assignIn',
|
||||
'extendWith': 'assignInWith',
|
||||
'first': 'head',
|
||||
|
||||
// Ramda aliases.
|
||||
'__': 'placeholder',
|
||||
'all': 'every',
|
||||
'allPass': 'overEvery',
|
||||
'always': 'constant',
|
||||
'any': 'some',
|
||||
'anyPass': 'overSome',
|
||||
'apply': 'spread',
|
||||
'assoc': 'set',
|
||||
'assocPath': 'set',
|
||||
'complement': 'negate',
|
||||
'compose': 'flowRight',
|
||||
'contains': 'includes',
|
||||
'dissoc': 'unset',
|
||||
'dissocPath': 'unset',
|
||||
'equals': 'isEqual',
|
||||
'identical': 'eq',
|
||||
'init': 'initial',
|
||||
'invertObj': 'invert',
|
||||
'juxt': 'over',
|
||||
'omitAll': 'omit',
|
||||
'nAry': 'ary',
|
||||
'path': 'get',
|
||||
'pathEq': 'matchesProperty',
|
||||
'pathOr': 'getOr',
|
||||
'paths': 'at',
|
||||
'pickAll': 'pick',
|
||||
'pipe': 'flow',
|
||||
'prop': 'get',
|
||||
'propEq': 'matchesProperty',
|
||||
'propOr': 'getOr',
|
||||
'props': 'at',
|
||||
'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',
|
||||
'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method',
|
||||
'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse',
|
||||
'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
|
||||
'uniqueId', 'words'
|
||||
],
|
||||
'2': [
|
||||
'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll',
|
||||
'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
|
||||
'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference',
|
||||
'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith',
|
||||
'eq', 'every', 'filter', 'find', 'find', 'findIndex', 'findKey', 'findLast',
|
||||
'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth',
|
||||
'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight',
|
||||
'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf',
|
||||
'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch',
|
||||
'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues',
|
||||
'matchesProperty', 'maxBy', 'meanBy', 'merge', 'minBy', 'multiply', 'omit', 'omitBy',
|
||||
'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', 'partialRight',
|
||||
'partition', 'pick', 'pickBy', 'pull', 'pullAll', 'pullAt', 'random', 'range',
|
||||
'rangeRight', 'rearg', 'reject', 'remove', 'repeat', 'restFrom', 'result',
|
||||
'sampleSize', 'some', 'sortBy', 'sortedIndex', 'sortedIndexOf', 'sortedLastIndex',
|
||||
'sortedLastIndexOf', 'sortedUniqBy', 'split', 'spreadFrom', 'startsWith',
|
||||
'subtract', 'sumBy', 'take', 'takeRight', 'takeRightWhile', 'takeWhile', 'tap',
|
||||
'throttle', 'thru', 'times', 'trimChars', 'trimCharsEnd', 'trimCharsStart',
|
||||
'truncate', 'union', 'uniqBy', 'uniqWith', 'unset', 'unzipWith', 'without',
|
||||
'wrap', 'xor', 'zip', 'zipObject', 'zipObjectDeep'
|
||||
],
|
||||
'3': [
|
||||
'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
|
||||
'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'invokeArgs',
|
||||
'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', 'mergeWith',
|
||||
'orderBy', 'padChars', 'padCharsEnd', 'padCharsStart', 'pullAllBy',
|
||||
'pullAllWith', 'reduce', 'reduceRight', 'replace', 'set', 'slice',
|
||||
'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith',
|
||||
'update', 'xorBy', 'xorWith', 'zipWith'
|
||||
],
|
||||
'4': [
|
||||
'fill', 'setWith', 'updateWith'
|
||||
]
|
||||
};
|
||||
|
||||
/** 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 = {
|
||||
'dropRightWhile': 1,
|
||||
'dropWhile': 1,
|
||||
'every': 1,
|
||||
'filter': 1,
|
||||
'find': 1,
|
||||
'findIndex': 1,
|
||||
'findKey': 1,
|
||||
'findLast': 1,
|
||||
'findLastIndex': 1,
|
||||
'findLastKey': 1,
|
||||
'flatMap': 1,
|
||||
'flatMapDeep': 1,
|
||||
'flatMapDepth': 1,
|
||||
'forEach': 1,
|
||||
'forEachRight': 1,
|
||||
'forIn': 1,
|
||||
'forInRight': 1,
|
||||
'forOwn': 1,
|
||||
'forOwnRight': 1,
|
||||
'map': 1,
|
||||
'mapKeys': 1,
|
||||
'mapValues': 1,
|
||||
'partition': 1,
|
||||
'reduce': 2,
|
||||
'reduceRight': 2,
|
||||
'reject': 1,
|
||||
'remove': 1,
|
||||
'some': 1,
|
||||
'takeRightWhile': 1,
|
||||
'takeWhile': 1,
|
||||
'times': 1,
|
||||
'transform': 2
|
||||
};
|
||||
|
||||
/** 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],
|
||||
'isEqualWith': [1, 2, 0],
|
||||
'isMatchWith': [2, 1, 0],
|
||||
'mergeWith': [1, 2, 0],
|
||||
'padChars': [2, 1, 0],
|
||||
'padCharsEnd': [2, 1, 0],
|
||||
'padCharsStart': [2, 1, 0],
|
||||
'pullAllBy': [2, 1, 0],
|
||||
'pullAllWith': [2, 1, 0],
|
||||
'setWith': [3, 1, 2, 0],
|
||||
'sortedIndexBy': [2, 1, 0],
|
||||
'sortedLastIndexBy': [2, 1, 0],
|
||||
'updateWith': [3, 1, 2, 0],
|
||||
'zipWith': [1, 2, 0]
|
||||
};
|
||||
|
||||
/** Used to map method names to spread configs. */
|
||||
exports.methodSpread = {
|
||||
'invokeArgs': 2,
|
||||
'invokeArgsMap': 2,
|
||||
'partial': 1,
|
||||
'partialRight': 1,
|
||||
'without': 1
|
||||
};
|
||||
|
||||
/** Used to identify methods which mutate arrays or objects. */
|
||||
exports.mutate = {
|
||||
'array': {
|
||||
'fill': true,
|
||||
'pull': true,
|
||||
'pullAll': true,
|
||||
'pullAllBy': true,
|
||||
'pullAllWith': 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,
|
||||
'update': true,
|
||||
'updateWith': 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',
|
||||
'invokeArgs': 'invoke',
|
||||
'invokeArgsMap': 'invokeMap',
|
||||
'padChars': 'pad',
|
||||
'padCharsEnd': 'padEnd',
|
||||
'padCharsStart': 'padStart',
|
||||
'restFrom': 'rest',
|
||||
'spreadFrom': 'spread',
|
||||
'trimChars': 'trim',
|
||||
'trimCharsEnd': 'trimEnd',
|
||||
'trimCharsStart': 'trimStart'
|
||||
};
|
||||
|
||||
/** Used to track methods that skip fixing their arity. */
|
||||
exports.skipFixed = {
|
||||
'castArray': true,
|
||||
'flow': true,
|
||||
'flowRight': true,
|
||||
'iteratee': true,
|
||||
'mixin': true,
|
||||
'runInContext': true
|
||||
};
|
||||
|
||||
/** Used to track methods that skip rearranging arguments. */
|
||||
exports.skipRearg = {
|
||||
'add': true,
|
||||
'assign': true,
|
||||
'assignIn': true,
|
||||
'bind': true,
|
||||
'bindKey': true,
|
||||
'concat': true,
|
||||
'difference': true,
|
||||
'divide': true,
|
||||
'eq': true,
|
||||
'gt': true,
|
||||
'gte': true,
|
||||
'isEqual': true,
|
||||
'lt': true,
|
||||
'lte': true,
|
||||
'matchesProperty': true,
|
||||
'merge': true,
|
||||
'multiply': true,
|
||||
'overArgs': true,
|
||||
'partial': true,
|
||||
'partialRight': true,
|
||||
'random': true,
|
||||
'range': true,
|
||||
'rangeRight': true,
|
||||
'subtract': true,
|
||||
'without': true,
|
||||
'zip': true,
|
||||
'zipObject': true
|
||||
};
|
||||
|
||||
|
||||
/***/ }
|
||||
/******/ ])
|
||||
});
|
||||
;
|
||||
10702
doc/README.md
10702
doc/README.md
File diff suppressed because it is too large
Load Diff
@@ -1,469 +0,0 @@
|
||||
var mapping = require('./_mapping'),
|
||||
mutateMap = mapping.mutate,
|
||||
fallbackHolder = require('./placeholder');
|
||||
|
||||
/**
|
||||
* Creates a function, with an arity of `n`, that invokes `func` with the
|
||||
* arguments it receives.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
* @param {number} n The arity of the new function.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function baseArity(func, n) {
|
||||
return n == 2
|
||||
? function(a, b) { return func.apply(undefined, arguments); }
|
||||
: function(a) { return func.apply(undefined, arguments); };
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func`, with up to `n` arguments, ignoring
|
||||
* any additional arguments.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to cap arguments for.
|
||||
* @param {number} n The arity cap.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function baseAry(func, n) {
|
||||
return n == 2
|
||||
? function(a, b) { return func(a, b); }
|
||||
: function(a) { return func(a); };
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `array`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to clone.
|
||||
* @returns {Array} Returns the cloned array.
|
||||
*/
|
||||
function cloneArray(array) {
|
||||
var length = array ? array.length : 0,
|
||||
result = Array(length);
|
||||
|
||||
while (length--) {
|
||||
result[length] = array[length];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that clones a given object using the assignment `func`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The assignment function.
|
||||
* @returns {Function} Returns the new cloner function.
|
||||
*/
|
||||
function createCloner(func) {
|
||||
return function(object) {
|
||||
return func({}, object);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` and uses `cloner` to clone the first
|
||||
* argument it receives.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
* @param {Function} cloner The function to clone arguments.
|
||||
* @returns {Function} Returns the new immutable function.
|
||||
*/
|
||||
function immutWrap(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;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 convert.
|
||||
* @param {Function} func The function to convert.
|
||||
* @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 forceCurry = ('curry' in options) && options.curry,
|
||||
forceFixed = ('fixed' in options) && options.fixed,
|
||||
forceRearg = ('rearg' in options) && options.rearg,
|
||||
placeholder = isLib ? func : fallbackHolder,
|
||||
pristine = isLib ? func.runInContext() : undefined;
|
||||
|
||||
var helpers = isLib ? func : {
|
||||
'ary': util.ary,
|
||||
'assign': util.assign,
|
||||
'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,
|
||||
assign = helpers.assign,
|
||||
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 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);
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a clone of `object` by `path`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to clone.
|
||||
* @param {Array|string} path The path to clone by.
|
||||
* @returns {Object} Returns the cloned object.
|
||||
*/
|
||||
function cloneByPath(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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `lodash` to an immutable auto-curried iteratee-first data-last
|
||||
* version with conversion `options` applied.
|
||||
*
|
||||
* @param {Object} [options] The options object. See `baseConvert` for more details.
|
||||
* @returns {Function} Returns the converted `lodash`.
|
||||
*/
|
||||
function convertLib(options) {
|
||||
return _.runInContext.convert(options)(undefined);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a converter function for `func` of `name`.
|
||||
*
|
||||
* @param {string} name The name of the function to convert.
|
||||
* @param {Function} func The function to convert.
|
||||
* @returns {Function} Returns the new converter function.
|
||||
*/
|
||||
function createConverter(name, func) {
|
||||
var oldOptions = options;
|
||||
return function(options) {
|
||||
var newUtil = isLib ? pristine : helpers,
|
||||
newFunc = isLib ? pristine[name] : func,
|
||||
newOptions = assign(assign({}, oldOptions), options);
|
||||
|
||||
return baseConvert(newUtil, name, newFunc, newOptions);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` to invoke its iteratee, with up to `n`
|
||||
* arguments, ignoring any additional arguments.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to cap iteratee arguments for.
|
||||
* @param {number} n The arity cap.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function iterateeAry(func, n) {
|
||||
return overArg(func, function(func) {
|
||||
return typeof func == 'function' ? baseAry(func, n) : func;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` to invoke its iteratee with arguments
|
||||
* arranged according to the specified `indexes` where the argument value at
|
||||
* the first index is provided as the first argument, the argument value at
|
||||
* the second index is provided as the second argument, and so on.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to rearrange iteratee arguments for.
|
||||
* @param {number[]} indexes The arranged argument indexes.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function iterateeRearg(func, indexes) {
|
||||
return overArg(func, function(func) {
|
||||
var n = indexes.length;
|
||||
return baseArity(rearg(baseAry(func, n), indexes), n);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with its first argument passed
|
||||
* thru `transform`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
* @param {...Function} transform The functions to transform the first argument.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function overArg(func, transform) {
|
||||
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] = transform(args[index]);
|
||||
return func.apply(undefined, args);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` and applys the conversions
|
||||
* rules by `name`.
|
||||
*
|
||||
* @private
|
||||
* @param {string} name The name of the function to wrap.
|
||||
* @param {Function} func The function to wrap.
|
||||
* @returns {Function} Returns the converted function.
|
||||
*/
|
||||
function wrap(name, func) {
|
||||
name = mapping.aliasToReal[name] || name;
|
||||
|
||||
var result,
|
||||
wrapped = func,
|
||||
wrapper = wrappers[name];
|
||||
|
||||
if (wrapper) {
|
||||
wrapped = wrapper(func);
|
||||
}
|
||||
else 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);
|
||||
}
|
||||
}
|
||||
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 && (forceFixed || !mapping.skipFixed[name])) {
|
||||
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 (forceCurry || (config.curry && aryKey > 1)) {
|
||||
forceCurry && console.log(forceCurry, name);
|
||||
result = curry(result, aryKey);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return !result;
|
||||
});
|
||||
|
||||
result || (result = wrapped);
|
||||
if (result == func) {
|
||||
result = forceCurry ? curry(result, 1) : function() {
|
||||
return func.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
result.convert = createConverter(name, func);
|
||||
if (mapping.placeholder[name]) {
|
||||
setPlaceholder = true;
|
||||
result.placeholder = func.placeholder = placeholder;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
if (!isObj) {
|
||||
return wrap(name, func);
|
||||
}
|
||||
var _ = func;
|
||||
|
||||
// Convert methods by 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)]);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Convert remaining methods.
|
||||
each(keys(_), function(key) {
|
||||
var func = _[key];
|
||||
if (typeof func == 'function') {
|
||||
var length = pairs.length;
|
||||
while (length--) {
|
||||
if (pairs[length][0] == key) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
func.convert = createConverter(key, func);
|
||||
pairs.push([key, func]);
|
||||
}
|
||||
});
|
||||
|
||||
// Assign to `_` leaving `_.prototype` unchanged to allow chaining.
|
||||
each(pairs, function(pair) {
|
||||
_[pair[0]] = pair[1];
|
||||
});
|
||||
|
||||
_.convert = convertLib;
|
||||
if (setPlaceholder) {
|
||||
_.placeholder = placeholder;
|
||||
}
|
||||
// Assign aliases.
|
||||
each(keys(_), function(key) {
|
||||
each(mapping.realToAlias[key] || [], function(alias) {
|
||||
_[alias] = _[key];
|
||||
});
|
||||
});
|
||||
|
||||
return _;
|
||||
}
|
||||
|
||||
module.exports = baseConvert;
|
||||
@@ -1,18 +0,0 @@
|
||||
var baseConvert = require('./_baseConvert');
|
||||
|
||||
/**
|
||||
* Converts `lodash` to an immutable auto-curried iteratee-first data-last
|
||||
* version with conversion `options` applied.
|
||||
*
|
||||
* @param {Function} lodash The lodash function to convert.
|
||||
* @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;
|
||||
288
fp/_mapping.js
288
fp/_mapping.js
@@ -1,288 +0,0 @@
|
||||
/** Used to map aliases to their real names. */
|
||||
exports.aliasToReal = {
|
||||
|
||||
// Lodash aliases.
|
||||
'each': 'forEach',
|
||||
'eachRight': 'forEachRight',
|
||||
'entries': 'toPairs',
|
||||
'entriesIn': 'toPairsIn',
|
||||
'extend': 'assignIn',
|
||||
'extendWith': 'assignInWith',
|
||||
'first': 'head',
|
||||
|
||||
// Ramda aliases.
|
||||
'__': 'placeholder',
|
||||
'all': 'every',
|
||||
'allPass': 'overEvery',
|
||||
'always': 'constant',
|
||||
'any': 'some',
|
||||
'anyPass': 'overSome',
|
||||
'apply': 'spread',
|
||||
'assoc': 'set',
|
||||
'assocPath': 'set',
|
||||
'complement': 'negate',
|
||||
'compose': 'flowRight',
|
||||
'contains': 'includes',
|
||||
'dissoc': 'unset',
|
||||
'dissocPath': 'unset',
|
||||
'equals': 'isEqual',
|
||||
'identical': 'eq',
|
||||
'init': 'initial',
|
||||
'invertObj': 'invert',
|
||||
'juxt': 'over',
|
||||
'omitAll': 'omit',
|
||||
'nAry': 'ary',
|
||||
'path': 'get',
|
||||
'pathEq': 'matchesProperty',
|
||||
'pathOr': 'getOr',
|
||||
'paths': 'at',
|
||||
'pickAll': 'pick',
|
||||
'pipe': 'flow',
|
||||
'prop': 'get',
|
||||
'propEq': 'matchesProperty',
|
||||
'propOr': 'getOr',
|
||||
'props': 'at',
|
||||
'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',
|
||||
'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method',
|
||||
'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse',
|
||||
'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
|
||||
'uniqueId', 'words'
|
||||
],
|
||||
'2': [
|
||||
'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll',
|
||||
'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
|
||||
'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference',
|
||||
'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith',
|
||||
'eq', 'every', 'filter', 'find', 'find', 'findIndex', 'findKey', 'findLast',
|
||||
'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth',
|
||||
'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight',
|
||||
'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf',
|
||||
'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch',
|
||||
'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues',
|
||||
'matchesProperty', 'maxBy', 'meanBy', 'merge', 'minBy', 'multiply', 'omit', 'omitBy',
|
||||
'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', 'partialRight',
|
||||
'partition', 'pick', 'pickBy', 'pull', 'pullAll', 'pullAt', 'random', 'range',
|
||||
'rangeRight', 'rearg', 'reject', 'remove', 'repeat', 'restFrom', 'result',
|
||||
'sampleSize', 'some', 'sortBy', 'sortedIndex', 'sortedIndexOf', 'sortedLastIndex',
|
||||
'sortedLastIndexOf', 'sortedUniqBy', 'split', 'spreadFrom', 'startsWith',
|
||||
'subtract', 'sumBy', 'take', 'takeRight', 'takeRightWhile', 'takeWhile', 'tap',
|
||||
'throttle', 'thru', 'times', 'trimChars', 'trimCharsEnd', 'trimCharsStart',
|
||||
'truncate', 'union', 'uniqBy', 'uniqWith', 'unset', 'unzipWith', 'without',
|
||||
'wrap', 'xor', 'zip', 'zipObject', 'zipObjectDeep'
|
||||
],
|
||||
'3': [
|
||||
'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
|
||||
'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'invokeArgs',
|
||||
'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', 'mergeWith',
|
||||
'orderBy', 'padChars', 'padCharsEnd', 'padCharsStart', 'pullAllBy',
|
||||
'pullAllWith', 'reduce', 'reduceRight', 'replace', 'set', 'slice',
|
||||
'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith',
|
||||
'update', 'xorBy', 'xorWith', 'zipWith'
|
||||
],
|
||||
'4': [
|
||||
'fill', 'setWith', 'updateWith'
|
||||
]
|
||||
};
|
||||
|
||||
/** 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 = {
|
||||
'dropRightWhile': 1,
|
||||
'dropWhile': 1,
|
||||
'every': 1,
|
||||
'filter': 1,
|
||||
'find': 1,
|
||||
'findIndex': 1,
|
||||
'findKey': 1,
|
||||
'findLast': 1,
|
||||
'findLastIndex': 1,
|
||||
'findLastKey': 1,
|
||||
'flatMap': 1,
|
||||
'flatMapDeep': 1,
|
||||
'flatMapDepth': 1,
|
||||
'forEach': 1,
|
||||
'forEachRight': 1,
|
||||
'forIn': 1,
|
||||
'forInRight': 1,
|
||||
'forOwn': 1,
|
||||
'forOwnRight': 1,
|
||||
'map': 1,
|
||||
'mapKeys': 1,
|
||||
'mapValues': 1,
|
||||
'partition': 1,
|
||||
'reduce': 2,
|
||||
'reduceRight': 2,
|
||||
'reject': 1,
|
||||
'remove': 1,
|
||||
'some': 1,
|
||||
'takeRightWhile': 1,
|
||||
'takeWhile': 1,
|
||||
'times': 1,
|
||||
'transform': 2
|
||||
};
|
||||
|
||||
/** 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],
|
||||
'isEqualWith': [1, 2, 0],
|
||||
'isMatchWith': [2, 1, 0],
|
||||
'mergeWith': [1, 2, 0],
|
||||
'padChars': [2, 1, 0],
|
||||
'padCharsEnd': [2, 1, 0],
|
||||
'padCharsStart': [2, 1, 0],
|
||||
'pullAllBy': [2, 1, 0],
|
||||
'pullAllWith': [2, 1, 0],
|
||||
'setWith': [3, 1, 2, 0],
|
||||
'sortedIndexBy': [2, 1, 0],
|
||||
'sortedLastIndexBy': [2, 1, 0],
|
||||
'updateWith': [3, 1, 2, 0],
|
||||
'zipWith': [1, 2, 0]
|
||||
};
|
||||
|
||||
/** Used to map method names to spread configs. */
|
||||
exports.methodSpread = {
|
||||
'invokeArgs': 2,
|
||||
'invokeArgsMap': 2,
|
||||
'partial': 1,
|
||||
'partialRight': 1,
|
||||
'without': 1
|
||||
};
|
||||
|
||||
/** Used to identify methods which mutate arrays or objects. */
|
||||
exports.mutate = {
|
||||
'array': {
|
||||
'fill': true,
|
||||
'pull': true,
|
||||
'pullAll': true,
|
||||
'pullAllBy': true,
|
||||
'pullAllWith': 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,
|
||||
'update': true,
|
||||
'updateWith': 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',
|
||||
'invokeArgs': 'invoke',
|
||||
'invokeArgsMap': 'invokeMap',
|
||||
'padChars': 'pad',
|
||||
'padCharsEnd': 'padEnd',
|
||||
'padCharsStart': 'padStart',
|
||||
'restFrom': 'rest',
|
||||
'spreadFrom': 'spread',
|
||||
'trimChars': 'trim',
|
||||
'trimCharsEnd': 'trimEnd',
|
||||
'trimCharsStart': 'trimStart'
|
||||
};
|
||||
|
||||
/** Used to track methods that skip fixing their arity. */
|
||||
exports.skipFixed = {
|
||||
'castArray': true,
|
||||
'flow': true,
|
||||
'flowRight': true,
|
||||
'iteratee': true,
|
||||
'mixin': true,
|
||||
'runInContext': true
|
||||
};
|
||||
|
||||
/** Used to track methods that skip rearranging arguments. */
|
||||
exports.skipRearg = {
|
||||
'add': true,
|
||||
'assign': true,
|
||||
'assignIn': true,
|
||||
'bind': true,
|
||||
'bindKey': true,
|
||||
'concat': true,
|
||||
'difference': true,
|
||||
'divide': true,
|
||||
'eq': true,
|
||||
'gt': true,
|
||||
'gte': true,
|
||||
'isEqual': true,
|
||||
'lt': true,
|
||||
'lte': true,
|
||||
'matchesProperty': true,
|
||||
'merge': true,
|
||||
'multiply': true,
|
||||
'overArgs': true,
|
||||
'partial': true,
|
||||
'partialRight': true,
|
||||
'random': true,
|
||||
'range': true,
|
||||
'rangeRight': true,
|
||||
'subtract': true,
|
||||
'without': true,
|
||||
'zip': true,
|
||||
'zipObject': true
|
||||
};
|
||||
@@ -1,6 +0,0 @@
|
||||
/**
|
||||
* The default argument placeholder value for methods.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
module.exports = {};
|
||||
@@ -1,71 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var _ = require('lodash'),
|
||||
fs = require('fs-extra'),
|
||||
glob = require('glob'),
|
||||
path = require('path');
|
||||
|
||||
var minify = require('../common/minify.js');
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a [fs.copy](https://github.com/jprichardson/node-fs-extra#copy)
|
||||
* function with `srcPath` and `destPath` partially applied.
|
||||
*
|
||||
* @memberOf file
|
||||
* @param {string} srcPath The path of the file to copy.
|
||||
* @param {string} destPath The path to copy the file to.
|
||||
* @returns {Function} Returns the partially applied function.
|
||||
*/
|
||||
function copy(srcPath, destPath) {
|
||||
return _.partial(fs.copy, srcPath, destPath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an object of compiled template and base name pairs that match `pattern`.
|
||||
*
|
||||
* @memberOf file
|
||||
* @param {string} pattern The glob pattern to be match.
|
||||
* @returns {Object} Returns the object of compiled templates.
|
||||
*/
|
||||
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'));
|
||||
}, {});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a `minify` function with `srcPath` and `destPath` partially applied.
|
||||
*
|
||||
* @memberOf file
|
||||
* @param {string} srcPath The path of the file to minify.
|
||||
* @param {string} destPath The path to write the file to.
|
||||
* @returns {Function} Returns the partially applied function.
|
||||
*/
|
||||
function min(srcPath, destPath) {
|
||||
return _.partial(minify, srcPath, destPath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a [fs.writeFile](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback)
|
||||
* function with `filePath` and `data` partially applied.
|
||||
*
|
||||
* @memberOf file
|
||||
* @param {string} destPath The path to write the file to.
|
||||
* @param {string} data The data to write to the file.
|
||||
* @returns {Function} Returns the partially applied function.
|
||||
*/
|
||||
function write(destPath, data) {
|
||||
return _.partial(fs.writeFile, destPath, data);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
module.exports = {
|
||||
'copy': copy,
|
||||
'globTemplate': globTemplate,
|
||||
'min': min,
|
||||
'write': write
|
||||
};
|
||||
@@ -1,9 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var _mapping = require('../../fp/_mapping'),
|
||||
util = require('./util'),
|
||||
Hash = util.Hash;
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
module.exports = new Hash(_mapping);
|
||||
@@ -1,39 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var _ = require('lodash'),
|
||||
fs = require('fs-extra'),
|
||||
uglify = require('uglify-js');
|
||||
|
||||
var uglifyOptions = require('./uglify.options');
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Asynchronously minifies the file at `srcPath`, writes it to `destPath`, and
|
||||
* invokes `callback` upon completion. The callback is invoked with one argument:
|
||||
* (error).
|
||||
*
|
||||
* If unspecified, `destPath` is `srcPath` with an extension of `.min.js`. For
|
||||
* example, a `srcPath` of `path/to/foo.js` would have a `destPath` of `path/to/foo.min.js`.
|
||||
*
|
||||
* @param {string} srcPath The path of the file to minify.
|
||||
* @param {string} [destPath] The path to write the file to.
|
||||
* @param {Function} callback The function invoked upon completion.
|
||||
* @param {Object} [option] The UglifyJS options object.
|
||||
*/
|
||||
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;
|
||||
@@ -1,24 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The UglifyJS options object for
|
||||
* [compress](https://github.com/mishoo/UglifyJS2#compressor-options),
|
||||
* [mangle](https://github.com/mishoo/UglifyJS2#mangler-options), and
|
||||
* [output](https://github.com/mishoo/UglifyJS2#beautifier-options) options.
|
||||
*/
|
||||
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
|
||||
}
|
||||
};
|
||||
@@ -1,27 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var _ = require('lodash');
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a hash object. If a `properties` object is provided, its own
|
||||
* enumerable properties are assigned to the created object.
|
||||
*
|
||||
* @memberOf util
|
||||
* @param {Object} [properties] The properties to assign to the object.
|
||||
* @returns {Object} Returns the new hash object.
|
||||
*/
|
||||
function Hash(properties) {
|
||||
return _.transform(properties, function(result, value, key) {
|
||||
result[key] = (_.isPlainObject(value) && !(value instanceof Hash))
|
||||
? new Hash(value)
|
||||
: value;
|
||||
}, this);
|
||||
}
|
||||
|
||||
Hash.prototype = Object.create(null);
|
||||
|
||||
module.exports = {
|
||||
'Hash': Hash
|
||||
};
|
||||
@@ -1,55 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var _ = require('lodash'),
|
||||
async = require('async'),
|
||||
path = require('path'),
|
||||
webpack = require('webpack');
|
||||
|
||||
var file = require('../common/file');
|
||||
|
||||
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),
|
||||
file.min(path.join(distPath, filename))
|
||||
], onComplete);
|
||||
}
|
||||
|
||||
build();
|
||||
@@ -1,65 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var _ = require('lodash'),
|
||||
fs = require('fs-extra'),
|
||||
path = require('path');
|
||||
|
||||
var file = require('../common/file'),
|
||||
mapping = require('../common/mapping');
|
||||
|
||||
var templatePath = path.join(__dirname, 'template/doc'),
|
||||
template = file.globTemplate(path.join(templatePath, '*.jst'));
|
||||
|
||||
var argNames = ['a', 'b', 'c', 'd'];
|
||||
|
||||
var templateData = {
|
||||
'mapping': mapping,
|
||||
'toArgOrder': toArgOrder,
|
||||
'toFuncList': toFuncList
|
||||
};
|
||||
|
||||
function toArgOrder(array) {
|
||||
var reordered = [];
|
||||
_.each(array, function(newIndex, index) {
|
||||
reordered[newIndex] = argNames[index];
|
||||
});
|
||||
return '`(' + reordered.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));
|
||||
@@ -1,120 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var _ = require('lodash'),
|
||||
async = require('async'),
|
||||
glob = require('glob'),
|
||||
path = require('path');
|
||||
|
||||
var file = require('../common/file'),
|
||||
mapping = require('../common/mapping');
|
||||
|
||||
var templatePath = path.join(__dirname, 'template/modules'),
|
||||
template = file.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',
|
||||
'core.min.js',
|
||||
'fp.js',
|
||||
'index.js',
|
||||
'lodash.js',
|
||||
'lodash.min.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 (!_.includes(modulePaths, modulePath)) {
|
||||
modulePaths.push(modulePath);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var actions = modulePaths.map(function(modulePath) {
|
||||
var moduleName = path.basename(modulePath, '.js');
|
||||
return file.write(path.join(fpPath, moduleName + '.js'), getTemplate(moduleName));
|
||||
});
|
||||
|
||||
actions.unshift(file.copy(path.join(__dirname, '../../fp'), fpPath));
|
||||
actions.push(file.write(path.join(fpPath, '_falseOptions.js'), template._falseOptions()));
|
||||
actions.push(file.write(path.join(fpPath, '_util.js'), template._util()));
|
||||
actions.push(file.write(path.join(target, 'fp.js'), template.fp()));
|
||||
actions.push(file.write(path.join(fpPath, 'convert.js'), template.convert()));
|
||||
|
||||
async.series(actions, onComplete);
|
||||
}
|
||||
|
||||
build(_.last(process.argv));
|
||||
@@ -1,220 +0,0 @@
|
||||
## 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>
|
||||
<script>
|
||||
// Loading `lodash.fp.js` converts `_` to its fp variant.
|
||||
_.defaults({ 'a': 2, 'b': 2 })({ 'a': 1 });
|
||||
// → { 'a: 1, 'b': 2 }
|
||||
|
||||
// Use `noConflict` to restore the pre-fp variant.
|
||||
var fp = _.noConflict();
|
||||
|
||||
_.defaults({ 'a': 1 }, { 'a': 2, 'b': 2 });
|
||||
// → { 'a: 1, 'b': 2 }
|
||||
fp.defaults({ 'a': 2, 'b': 2 })({ 'a': 1 });
|
||||
// → { 'a: 1, 'b': 2 }
|
||||
</script>
|
||||
```
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
// Load the fp build.
|
||||
var fp = 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');
|
||||
```
|
||||
|
||||
## Mapping
|
||||
|
||||
Immutable auto-curried iteratee-first data-last methods sound great, but what
|
||||
does that really mean for each method? Below is a breakdown of the mapping used
|
||||
to convert each method.
|
||||
|
||||
#### Capped Iteratee Arguments
|
||||
|
||||
Iteratee arguments are capped to avoid gotchas with variadic iteratees.
|
||||
```js
|
||||
// The `lodash/map` iteratee receives three arguments:
|
||||
// (value, index|key, collection)
|
||||
_.map(['6', '8', '10'], parseInt);
|
||||
// → [6, NaN, 2]
|
||||
|
||||
// The `lodash/fp/map` iteratee is capped at one argument:
|
||||
// (value)
|
||||
fp.map(parseInt)(['6', '8', '10']);
|
||||
// → [6, 8, 10]
|
||||
```
|
||||
|
||||
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 have fixed arities to support auto-currying.
|
||||
```js
|
||||
// `lodash/padStart` accepts an optional `chars` param.
|
||||
_.padStart('a', 3, '-')
|
||||
// → '--a'
|
||||
|
||||
// `lodash/fp/padStart` does not.
|
||||
fp.padStart(3)('a');
|
||||
// → ' a'
|
||||
fp.padCharsStart('-')(3)('a');
|
||||
// → '--a'
|
||||
```
|
||||
|
||||
Methods with a fixed arity of one:<br>
|
||||
<%= toFuncList(_.difference(mapping.aryMethod[1], _.keys(mapping.skipFixed))) %>
|
||||
|
||||
Methods with a fixed arity of two:<br>
|
||||
<%= toFuncList(_.difference(mapping.aryMethod[2], _.keys(mapping.skipFixed))) %>
|
||||
|
||||
Methods with a fixed arity of three:<br>
|
||||
<%= toFuncList(_.difference(mapping.aryMethod[3], _.keys(mapping.skipFixed))) %>
|
||||
|
||||
Methods with a fixed arity of four:<br>
|
||||
<%= toFuncList(_.difference(mapping.aryMethod[4], _.keys(mapping.skipFixed))) %>
|
||||
|
||||
#### Rearranged Arguments
|
||||
|
||||
Method arguments are rearranged to make composition easier.
|
||||
```js
|
||||
// `lodash/filter` is data-first iteratee-last:
|
||||
// (collection, iteratee)
|
||||
var compact = _.partial(_.filter, _, Boolean);
|
||||
compact(['a', null, 'c']);
|
||||
// → ['a', 'c']
|
||||
|
||||
// `lodash/fp/filter` is iteratee-first data-last:
|
||||
// (iteratee, collection)
|
||||
var compact = fp.filter(Boolean);
|
||||
compact(['a', null, 'c']);
|
||||
// → ['a', 'c']
|
||||
```
|
||||
|
||||
##### Most methods follow these rules
|
||||
|
||||
A fixed arity of two has an argument order of:<br>
|
||||
<%= toArgOrder(mapping.aryRearg[2]) %>
|
||||
|
||||
A fixed arity of three has an argument order of:<br>
|
||||
<%= toArgOrder(mapping.aryRearg[3]) %>
|
||||
|
||||
A fixed arity of four has an argument order of:<br>
|
||||
<%= toArgOrder(mapping.aryRearg[4]) %>
|
||||
|
||||
##### Exceptions to the rules
|
||||
|
||||
Methods that accept an array of arguments as their second parameter:<br>
|
||||
<%= toFuncList(_.keys(mapping.methodSpread)) %>
|
||||
|
||||
Methods with unchanged argument orders:<br>
|
||||
<%= toFuncList(_.keys(mapping.skipRearg)) %>
|
||||
|
||||
Methods with custom argument orders:<br>
|
||||
<%= _.map(_.keys(mapping.methodRearg), function(methodName) {
|
||||
var orders = mapping.methodRearg[methodName];
|
||||
return ' * `_.' + methodName + '` has an order of ' + toArgOrder(orders);
|
||||
}).join('\n') %>
|
||||
|
||||
#### New Methods
|
||||
|
||||
Not all variadic methods have corresponding new method variants. Feel free to
|
||||
[request](https://github.com/lodash/lodash/blob/master/.github/CONTRIBUTING.md#feature-requests)
|
||||
any additions.
|
||||
|
||||
Methods created to accommodate Lodash’s variadic methods:<br>
|
||||
<%= toFuncList(_.keys(mapping.remap)) %>
|
||||
|
||||
#### Aliases
|
||||
|
||||
There are <%= _.size(mapping.aliasToReal) %> method aliases:<br>
|
||||
<%= _.map(_.keys(mapping.aliasToReal).sort(), function(alias) {
|
||||
var realName = mapping.aliasToReal[alias];
|
||||
return ' * `_.' + alias + '` is an alias of `_.' + realName + '`';
|
||||
}).join('\n') %>
|
||||
|
||||
## Placeholders
|
||||
|
||||
The placeholder argument, which defaults to `_`, may be used to fill in method
|
||||
arguments in a different order. Placeholders are filled by the first available
|
||||
arguments of the curried returned function.
|
||||
```js
|
||||
// The equivalent of `2 > 5`.
|
||||
_.gt(2)(5);
|
||||
// → false
|
||||
|
||||
// The equivalent of `_.gt(5, 2)` or `5 > 2`.
|
||||
_.gt(_, 2)(5);
|
||||
// → true
|
||||
```
|
||||
|
||||
## Chaining
|
||||
|
||||
The `lodash/fp` module **does not** convert chain sequence methods. See
|
||||
[Izaak Schroeder’s article](https://medium.com/making-internets/why-using-chain-is-a-mistake-9bc1f80d51ba)
|
||||
on using functional composition as an alternative to method chaining.
|
||||
|
||||
## Convert
|
||||
|
||||
Although `lodash/fp` & its method modules come pre-converted, there are times
|
||||
when you may want to customize the conversion. That’s when the `convert` method
|
||||
comes in handy.
|
||||
```js
|
||||
// Every option is `true` by default.
|
||||
var _fp = fp.convert({
|
||||
// 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
|
||||
});
|
||||
|
||||
// The `convert` method is available on each method too.
|
||||
var mapValuesWithKey = fp.mapValues.convert({ 'cap': false });
|
||||
|
||||
// Here’s an example of disabling iteratee argument caps to access the `key` param.
|
||||
mapValuesWithKey(function(value, key) {
|
||||
return key == 'a' ? -1 : value;
|
||||
})({ 'a': 1, 'b': 1 });
|
||||
// => { 'a': -1, 'b': 1 }
|
||||
```
|
||||
|
||||
Manual conversions are also possible with the `convert` module.
|
||||
```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());
|
||||
```
|
||||
@@ -1,7 +0,0 @@
|
||||
module.exports = {
|
||||
'cap': false,
|
||||
'curry': false,
|
||||
'fixed': false,
|
||||
'immutable': false,
|
||||
'rearg': false
|
||||
};
|
||||
@@ -1,14 +0,0 @@
|
||||
module.exports = {
|
||||
'ary': require('../ary'),
|
||||
'assign': require('../_baseAssign'),
|
||||
'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')
|
||||
};
|
||||
@@ -1 +0,0 @@
|
||||
module.exports = require('./<%= name %>');
|
||||
@@ -1,2 +0,0 @@
|
||||
var convert = require('./convert');
|
||||
module.exports = convert(require('../<%= name %>'));
|
||||
@@ -1,18 +0,0 @@
|
||||
var baseConvert = require('./_baseConvert'),
|
||||
util = require('./_util');
|
||||
|
||||
/**
|
||||
* Converts `func` of `name` to an immutable auto-curried iteratee-first data-last
|
||||
* version with conversion `options` applied. 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;
|
||||
@@ -1,2 +0,0 @@
|
||||
var _ = require('./lodash.min').runInContext();
|
||||
module.exports = require('./fp/_baseConvert')(_, _);
|
||||
@@ -1,5 +0,0 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -1,5 +0,0 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'), require('./_falseOptions'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -1,31 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var _ = require('lodash'),
|
||||
async = require('async'),
|
||||
path = require('path');
|
||||
|
||||
var file = require('../common/file');
|
||||
|
||||
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([
|
||||
file.copy(baseLodash, distLodash),
|
||||
file.min(distLodash)
|
||||
], onComplete);
|
||||
}
|
||||
|
||||
build();
|
||||
@@ -1,60 +0,0 @@
|
||||
'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("[Ⓝ](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 bugs.
|
||||
return string
|
||||
// Repair the default value of `chars`.
|
||||
// See https://github.com/eslint/doctrine/issues/157 for more details.
|
||||
.replace(/\bchars=''/g, "chars=' '")
|
||||
// Wrap symbol property identifiers in brackets.
|
||||
.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));
|
||||
@@ -1,34 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var _ = require('lodash'),
|
||||
async = require('async'),
|
||||
path = require('path');
|
||||
|
||||
var file = require('../common/file');
|
||||
|
||||
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 file.copy(pair[0], path.join(target, pair[1]));
|
||||
});
|
||||
|
||||
async.series(actions, onComplete);
|
||||
}
|
||||
|
||||
build(_.last(process.argv));
|
||||
90
package.json
90
package.json
@@ -1,52 +1,50 @@
|
||||
{
|
||||
"name": "lodash",
|
||||
"version": "4.10.0",
|
||||
"version": "5.0.0",
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"main": "lodash.js",
|
||||
"devDependencies": {
|
||||
"async": "^1.5.2",
|
||||
"benchmark": "^2.1.0",
|
||||
"chalk": "^1.1.3",
|
||||
"codecov.io": "~0.1.6",
|
||||
"coveralls": "^2.11.9",
|
||||
"curl-amd": "~0.8.12",
|
||||
"docdown": "~0.5.1",
|
||||
"dojo": "^1.11.1",
|
||||
"ecstatic": "^1.4.0",
|
||||
"fs-extra": "~0.26.7",
|
||||
"glob": "^7.0.3",
|
||||
"istanbul": "0.4.3",
|
||||
"jquery": "^2.2.3",
|
||||
"jscs": "^2.11.0",
|
||||
"lodash": "4.8.2",
|
||||
"platform": "^1.3.1",
|
||||
"qunit-extras": "^1.5.0",
|
||||
"qunitjs": "~1.23.0",
|
||||
"request": "^2.69.0",
|
||||
"requirejs": "^2.2.0",
|
||||
"sauce-tunnel": "^2.4.0",
|
||||
"uglify-js": "2.6.2",
|
||||
"webpack": "^1.12.15"
|
||||
},
|
||||
"main": "dist/lodash.js",
|
||||
"sideEffects": false,
|
||||
"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",
|
||||
"validate": "npm run style && npm run test"
|
||||
}
|
||||
"prepare": "husky install",
|
||||
"lint": "eslint ./src/**/*.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "17.7.1",
|
||||
"@commitlint/config-conventional": "17.7.0",
|
||||
"@types/eslint": "8.44.2",
|
||||
"@types/jest": "29.5.5",
|
||||
"@typescript-eslint/eslint-plugin": "6.7.0",
|
||||
"@typescript-eslint/parser": "6.7.0",
|
||||
"eslint": "8.49.0",
|
||||
"eslint-config-airbnb-base": "15.0.0",
|
||||
"eslint-config-airbnb-typescript": "17.1.0",
|
||||
"eslint-config-prettier": "9.0.0",
|
||||
"eslint-plugin-import": "2.28.1",
|
||||
"eslint-plugin-prettier": "5.0.0",
|
||||
"husky": "8.0.3",
|
||||
"lint-staged": "14.0.1",
|
||||
"lodash": "4.17.21",
|
||||
"prettier": "3.0.3"
|
||||
},
|
||||
"lint-staged": {
|
||||
"src/**/*.{ts}": [
|
||||
"eslint --fix"
|
||||
]
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged",
|
||||
"commit-msg": "bun run commitlint --edit $1"
|
||||
}
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.17.1",
|
||||
"yarn": "^1.22.19"
|
||||
},
|
||||
"volta": {
|
||||
"node": "18.17.1",
|
||||
"yarn": "1.22.19"
|
||||
},
|
||||
"engineStrict": true
|
||||
}
|
||||
|
||||
@@ -1,131 +0,0 @@
|
||||
;(function(window) {
|
||||
'use strict';
|
||||
|
||||
/** The base path of the lodash builds. */
|
||||
var basePath = '../';
|
||||
|
||||
/** The lodash build to load. */
|
||||
var build = (build = /build=([^&]+)/.exec(location.search)) && decodeURIComponent(build[1]);
|
||||
|
||||
/** The other library to load. */
|
||||
var other = (other = /other=([^&]+)/.exec(location.search)) && decodeURIComponent(other[1]);
|
||||
|
||||
/** The `ui` object. */
|
||||
var ui = {};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Registers an event listener on an element.
|
||||
*
|
||||
* @private
|
||||
* @param {Element} element The element.
|
||||
* @param {string} eventName The name of the event.
|
||||
* @param {Function} handler The event handler.
|
||||
* @returns {Element} The element.
|
||||
*/
|
||||
function addListener(element, eventName, handler) {
|
||||
if (typeof element.addEventListener != 'undefined') {
|
||||
element.addEventListener(eventName, handler, false);
|
||||
} else if (typeof element.attachEvent != 'undefined') {
|
||||
element.attachEvent('on' + eventName, handler);
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// Initialize controls.
|
||||
addListener(window, 'load', function() {
|
||||
function eventHandler(event) {
|
||||
var buildIndex = buildList.selectedIndex,
|
||||
otherIndex = otherList.selectedIndex,
|
||||
search = location.search.replace(/^\?|&?(?:build|other)=[^&]*&?/g, '');
|
||||
|
||||
if (event.stopPropagation) {
|
||||
event.stopPropagation();
|
||||
} else {
|
||||
event.cancelBubble = true;
|
||||
}
|
||||
location.href =
|
||||
location.href.split('?')[0] + '?' +
|
||||
(search ? search + '&' : '') +
|
||||
'build=' + (buildIndex < 0 ? build : buildList[buildIndex].value) + '&' +
|
||||
'other=' + (otherIndex < 0 ? other : otherList[otherIndex].value);
|
||||
}
|
||||
|
||||
var span1 = document.createElement('span');
|
||||
span1.style.cssText = 'float:right';
|
||||
span1.innerHTML =
|
||||
'<label for="perf-build">Build: </label>' +
|
||||
'<select id="perf-build">' +
|
||||
'<option value="lodash">lodash</option>' +
|
||||
'</select>';
|
||||
|
||||
var span2 = document.createElement('span');
|
||||
span2.style.cssText = 'float:right';
|
||||
span2.innerHTML =
|
||||
'<label for="perf-other">Other Library: </label>' +
|
||||
'<select id="perf-other">' +
|
||||
'<option value="underscore-dev">Underscore (development)</option>' +
|
||||
'<option value="underscore">Underscore (production)</option>' +
|
||||
'<option value="lodash">lodash</option>' +
|
||||
'</select>';
|
||||
|
||||
var buildList = span1.lastChild,
|
||||
otherList = span2.lastChild,
|
||||
toolbar = document.getElementById('perf-toolbar');
|
||||
|
||||
toolbar.appendChild(span2);
|
||||
toolbar.appendChild(span1);
|
||||
|
||||
buildList.selectedIndex = (function() {
|
||||
switch (build) {
|
||||
case 'lodash':
|
||||
case null: return 0;
|
||||
}
|
||||
return -1;
|
||||
}());
|
||||
|
||||
otherList.selectedIndex = (function() {
|
||||
switch (other) {
|
||||
case 'underscore-dev': return 0;
|
||||
case 'lodash': return 2;
|
||||
case 'underscore':
|
||||
case null: return 1;
|
||||
}
|
||||
return -1;
|
||||
}());
|
||||
|
||||
addListener(buildList, 'change', eventHandler);
|
||||
addListener(otherList, 'change', eventHandler);
|
||||
});
|
||||
|
||||
// The lodash build file path.
|
||||
ui.buildPath = (function() {
|
||||
var result;
|
||||
switch (build) {
|
||||
case null: build = 'lodash';
|
||||
case 'lodash': result = 'dist/lodash.min.js'; break;
|
||||
default: return build;
|
||||
}
|
||||
return basePath + result;
|
||||
}());
|
||||
|
||||
// The other library file path.
|
||||
ui.otherPath = (function() {
|
||||
var result;
|
||||
switch (other) {
|
||||
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;
|
||||
default: return other;
|
||||
}
|
||||
return basePath + result;
|
||||
}());
|
||||
|
||||
ui.urlParams = { 'build': build, 'other': other };
|
||||
|
||||
window.ui = ui;
|
||||
|
||||
}(this));
|
||||
@@ -1,69 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<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');
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
window.onload = init;
|
||||
}());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
1983
perf/perf.js
1983
perf/perf.js
File diff suppressed because it is too large
Load Diff
18
src/.eslintrc.cjs
Normal file
18
src/.eslintrc.cjs
Normal file
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
const path = require('node:path');
|
||||
|
||||
module.exports = {
|
||||
overrides: [
|
||||
{
|
||||
files: ['**/*.{ts}'],
|
||||
rules: {
|
||||
'import/no-extraneous-dependencies': [
|
||||
'error',
|
||||
// Use package.json from both this package folder and root.
|
||||
{ packageDir: [__dirname, path.join(__dirname, '../')] },
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
88
src/.internal/Hash.ts
Normal file
88
src/.internal/Hash.ts
Normal file
@@ -0,0 +1,88 @@
|
||||
/** Used to stand-in for `undefined` hash values. */
|
||||
const HASH_UNDEFINED = '__lodash_hash_undefined__'
|
||||
|
||||
class Hash {
|
||||
|
||||
/**
|
||||
* Creates a hash object.
|
||||
*
|
||||
* @private
|
||||
* @constructor
|
||||
* @param {Array} [entries] The key-value pairs to cache.
|
||||
*/
|
||||
constructor(entries) {
|
||||
let index = -1
|
||||
const length = entries == null ? 0 : entries.length
|
||||
|
||||
this.clear()
|
||||
while (++index < length) {
|
||||
const entry = entries[index]
|
||||
this.set(entry[0], entry[1])
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all key-value entries from the hash.
|
||||
*
|
||||
* @memberOf Hash
|
||||
*/
|
||||
clear() {
|
||||
this.__data__ = Object.create(null)
|
||||
this.size = 0
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes `key` and its value from the hash.
|
||||
*
|
||||
* @memberOf Hash
|
||||
* @param {string} key The key of the value to remove.
|
||||
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
||||
*/
|
||||
delete(key) {
|
||||
const result = this.has(key) && delete this.__data__[key]
|
||||
this.size -= result ? 1 : 0
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the hash value for `key`.
|
||||
*
|
||||
* @memberOf Hash
|
||||
* @param {string} key The key of the value to get.
|
||||
* @returns {*} Returns the entry value.
|
||||
*/
|
||||
get(key) {
|
||||
const data = this.__data__
|
||||
const result = data[key]
|
||||
return result === HASH_UNDEFINED ? undefined : result
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a hash value for `key` exists.
|
||||
*
|
||||
* @memberOf Hash
|
||||
* @param {string} key The key of the entry to check.
|
||||
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
||||
*/
|
||||
has(key) {
|
||||
const data = this.__data__
|
||||
return data[key] !== undefined
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the hash `key` to `value`.
|
||||
*
|
||||
* @memberOf Hash
|
||||
* @param {string} key The key of the value to set.
|
||||
* @param {*} value The value to set.
|
||||
* @returns {Object} Returns the hash instance.
|
||||
*/
|
||||
set(key, value) {
|
||||
const data = this.__data__
|
||||
this.size += this.has(key) ? 0 : 1
|
||||
data[key] = value === undefined ? HASH_UNDEFINED : value
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
export default Hash
|
||||
103
src/.internal/ListCache.ts
Normal file
103
src/.internal/ListCache.ts
Normal file
@@ -0,0 +1,103 @@
|
||||
import assocIndexOf from './assocIndexOf.js'
|
||||
|
||||
class ListCache {
|
||||
|
||||
/**
|
||||
* Creates an list cache object.
|
||||
*
|
||||
* @private
|
||||
* @constructor
|
||||
* @param {Array} [entries] The key-value pairs to cache.
|
||||
*/
|
||||
constructor(entries) {
|
||||
let index = -1
|
||||
const length = entries == null ? 0 : entries.length
|
||||
|
||||
this.clear()
|
||||
while (++index < length) {
|
||||
const entry = entries[index]
|
||||
this.set(entry[0], entry[1])
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all key-value entries from the list cache.
|
||||
*
|
||||
* @memberOf ListCache
|
||||
*/
|
||||
clear() {
|
||||
this.__data__ = []
|
||||
this.size = 0
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes `key` and its value from the list cache.
|
||||
*
|
||||
* @memberOf ListCache
|
||||
* @param {string} key The key of the value to remove.
|
||||
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
||||
*/
|
||||
delete(key) {
|
||||
const data = this.__data__
|
||||
const index = assocIndexOf(data, key)
|
||||
|
||||
if (index < 0) {
|
||||
return false
|
||||
}
|
||||
const lastIndex = data.length - 1
|
||||
if (index === lastIndex) {
|
||||
data.pop()
|
||||
} else {
|
||||
data.splice(index, 1)
|
||||
}
|
||||
--this.size
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the list cache value for `key`.
|
||||
*
|
||||
* @memberOf ListCache
|
||||
* @param {string} key The key of the value to get.
|
||||
* @returns {*} Returns the entry value.
|
||||
*/
|
||||
get(key) {
|
||||
const data = this.__data__
|
||||
const index = assocIndexOf(data, key)
|
||||
return index < 0 ? undefined : data[index][1]
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a list cache value for `key` exists.
|
||||
*
|
||||
* @memberOf ListCache
|
||||
* @param {string} key The key of the entry to check.
|
||||
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
||||
*/
|
||||
has(key) {
|
||||
return assocIndexOf(this.__data__, key) > -1
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the list cache `key` to `value`.
|
||||
*
|
||||
* @memberOf ListCache
|
||||
* @param {string} key The key of the value to set.
|
||||
* @param {*} value The value to set.
|
||||
* @returns {Object} Returns the list cache instance.
|
||||
*/
|
||||
set(key, value) {
|
||||
const data = this.__data__
|
||||
const index = assocIndexOf(data, key)
|
||||
|
||||
if (index < 0) {
|
||||
++this.size
|
||||
data.push([key, value])
|
||||
} else {
|
||||
data[index][1] = value
|
||||
}
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
export default ListCache
|
||||
120
src/.internal/MapCache.ts
Normal file
120
src/.internal/MapCache.ts
Normal file
@@ -0,0 +1,120 @@
|
||||
|
||||
import Hash from './Hash.js'
|
||||
|
||||
/**
|
||||
* Gets the data for `map`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} map The map to query.
|
||||
* @param {string} key The reference key.
|
||||
* @returns {*} Returns the map data.
|
||||
*/
|
||||
function getMapData({ __data__ }, key) {
|
||||
const data = __data__
|
||||
return isKeyable(key)
|
||||
? data[typeof key === 'string' ? 'string' : 'hash']
|
||||
: data.map
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is suitable for use as unique object key.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
||||
*/
|
||||
function isKeyable(value) {
|
||||
const type = typeof value
|
||||
return (type === 'string' || type === 'number' || type === 'symbol' || type === 'boolean')
|
||||
? (value !== '__proto__')
|
||||
: (value === null)
|
||||
}
|
||||
|
||||
class MapCache {
|
||||
|
||||
/**
|
||||
* Creates a map cache object to store key-value pairs.
|
||||
*
|
||||
* @private
|
||||
* @constructor
|
||||
* @param {Array} [entries] The key-value pairs to cache.
|
||||
*/
|
||||
constructor(entries) {
|
||||
let index = -1
|
||||
const length = entries == null ? 0 : entries.length
|
||||
|
||||
this.clear()
|
||||
while (++index < length) {
|
||||
const entry = entries[index]
|
||||
this.set(entry[0], entry[1])
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all key-value entries from the map.
|
||||
*
|
||||
* @memberOf MapCache
|
||||
*/
|
||||
clear() {
|
||||
this.size = 0
|
||||
this.__data__ = {
|
||||
'hash': new Hash,
|
||||
'map': new Map,
|
||||
'string': new Hash
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes `key` and its value from the map.
|
||||
*
|
||||
* @memberOf MapCache
|
||||
* @param {string} key The key of the value to remove.
|
||||
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
||||
*/
|
||||
delete(key) {
|
||||
const result = getMapData(this, key)['delete'](key)
|
||||
this.size -= result ? 1 : 0
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the map value for `key`.
|
||||
*
|
||||
* @memberOf MapCache
|
||||
* @param {string} key The key of the value to get.
|
||||
* @returns {*} Returns the entry value.
|
||||
*/
|
||||
get(key) {
|
||||
return getMapData(this, key).get(key)
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a map value for `key` exists.
|
||||
*
|
||||
* @memberOf MapCache
|
||||
* @param {string} key The key of the entry to check.
|
||||
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
||||
*/
|
||||
has(key) {
|
||||
return getMapData(this, key).has(key)
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the map `key` to `value`.
|
||||
*
|
||||
* @memberOf MapCache
|
||||
* @param {string} key The key of the value to set.
|
||||
* @param {*} value The value to set.
|
||||
* @returns {Object} Returns the map cache instance.
|
||||
*/
|
||||
set(key, value) {
|
||||
const data = getMapData(this, key)
|
||||
const size = data.size
|
||||
|
||||
data.set(key, value)
|
||||
this.size += data.size === size ? 0 : 1
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
export default MapCache
|
||||
52
src/.internal/SetCache.ts
Normal file
52
src/.internal/SetCache.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import MapCache from './MapCache.js'
|
||||
|
||||
/** Used to stand-in for `undefined` hash values. */
|
||||
const HASH_UNDEFINED = '__lodash_hash_undefined__'
|
||||
|
||||
class SetCache {
|
||||
|
||||
/**
|
||||
* Creates an array cache object to store unique values.
|
||||
*
|
||||
* @private
|
||||
* @constructor
|
||||
* @param {Array} [values] The values to cache.
|
||||
*/
|
||||
constructor(values) {
|
||||
let index = -1
|
||||
const length = values == null ? 0 : values.length
|
||||
|
||||
this.__data__ = new MapCache
|
||||
while (++index < length) {
|
||||
this.add(values[index])
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds `value` to the array cache.
|
||||
*
|
||||
* @memberOf SetCache
|
||||
* @alias push
|
||||
* @param {*} value The value to cache.
|
||||
* @returns {Object} Returns the cache instance.
|
||||
*/
|
||||
add(value) {
|
||||
this.__data__.set(value, HASH_UNDEFINED)
|
||||
return this
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is in the array cache.
|
||||
*
|
||||
* @memberOf SetCache
|
||||
* @param {*} value The value to search for.
|
||||
* @returns {boolean} Returns `true` if `value` is found, else `false`.
|
||||
*/
|
||||
has(value) {
|
||||
return this.__data__.has(value)
|
||||
}
|
||||
}
|
||||
|
||||
SetCache.prototype.push = SetCache.prototype.add
|
||||
|
||||
export default SetCache
|
||||
93
src/.internal/Stack.ts
Normal file
93
src/.internal/Stack.ts
Normal file
@@ -0,0 +1,93 @@
|
||||
import ListCache from './ListCache.js'
|
||||
import MapCache from './MapCache.js'
|
||||
|
||||
/** Used as the size to enable large array optimizations. */
|
||||
const LARGE_ARRAY_SIZE = 200
|
||||
|
||||
class Stack {
|
||||
|
||||
/**
|
||||
* Creates a stack cache object to store key-value pairs.
|
||||
*
|
||||
* @private
|
||||
* @constructor
|
||||
* @param {Array} [entries] The key-value pairs to cache.
|
||||
*/
|
||||
constructor(entries) {
|
||||
const data = this.__data__ = new ListCache(entries)
|
||||
this.size = data.size
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all key-value entries from the stack.
|
||||
*
|
||||
* @memberOf Stack
|
||||
*/
|
||||
clear() {
|
||||
this.__data__ = new ListCache
|
||||
this.size = 0
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes `key` and its value from the stack.
|
||||
*
|
||||
* @memberOf Stack
|
||||
* @param {string} key The key of the value to remove.
|
||||
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
||||
*/
|
||||
delete(key) {
|
||||
const data = this.__data__
|
||||
const result = data['delete'](key)
|
||||
|
||||
this.size = data.size
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the stack value for `key`.
|
||||
*
|
||||
* @memberOf Stack
|
||||
* @param {string} key The key of the value to get.
|
||||
* @returns {*} Returns the entry value.
|
||||
*/
|
||||
get(key) {
|
||||
return this.__data__.get(key)
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a stack value for `key` exists.
|
||||
*
|
||||
* @memberOf Stack
|
||||
* @param {string} key The key of the entry to check.
|
||||
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
||||
*/
|
||||
has(key) {
|
||||
return this.__data__.has(key)
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the stack `key` to `value`.
|
||||
*
|
||||
* @memberOf Stack
|
||||
* @param {string} key The key of the value to set.
|
||||
* @param {*} value The value to set.
|
||||
* @returns {Object} Returns the stack cache instance.
|
||||
*/
|
||||
set(key, value) {
|
||||
let data = this.__data__
|
||||
if (data instanceof ListCache) {
|
||||
const pairs = data.__data__
|
||||
if (pairs.length < LARGE_ARRAY_SIZE - 1) {
|
||||
pairs.push([key, value])
|
||||
this.size = ++data.size
|
||||
return this
|
||||
}
|
||||
data = this.__data__ = new MapCache(pairs)
|
||||
}
|
||||
data.set(key, value)
|
||||
this.size = data.size
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
export default Stack
|
||||
15
src/.internal/addMapEntry.ts
Normal file
15
src/.internal/addMapEntry.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Adds the key-value `pair` to `map`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} map The map to modify.
|
||||
* @param {Array} pair The key-value pair to add.
|
||||
* @returns {Object} Returns `map`.
|
||||
*/
|
||||
function addMapEntry(map, pair) {
|
||||
// Don't return `map.set` because it's not chainable in IE 11.
|
||||
map.set(pair[0], pair[1])
|
||||
return map
|
||||
}
|
||||
|
||||
export default addMapEntry
|
||||
15
src/.internal/addSetEntry.ts
Normal file
15
src/.internal/addSetEntry.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Adds `value` to `set`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} set The set to modify.
|
||||
* @param {*} value The value to add.
|
||||
* @returns {Object} Returns `set`.
|
||||
*/
|
||||
function addSetEntry(set, value) {
|
||||
// Don't return `set.add` because it's not chainable in IE 11.
|
||||
set.add(value)
|
||||
return set
|
||||
}
|
||||
|
||||
export default addSetEntry
|
||||
21
src/.internal/arrayEach.ts
Normal file
21
src/.internal/arrayEach.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* A specialized version of `forEach` for arrays.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array] The array to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {Array} Returns `array`.
|
||||
*/
|
||||
function arrayEach(array, iteratee) {
|
||||
let index = -1
|
||||
const length = array.length
|
||||
|
||||
while (++index < length) {
|
||||
if (iteratee(array[index], index, array) === false) {
|
||||
break
|
||||
}
|
||||
}
|
||||
return array
|
||||
}
|
||||
|
||||
export default arrayEach
|
||||
20
src/.internal/arrayEachRight.ts
Normal file
20
src/.internal/arrayEachRight.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* A specialized version of `forEachRight` for arrays.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array] The array to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {Array} Returns `array`.
|
||||
*/
|
||||
function arrayEachRight(array, iteratee) {
|
||||
let length = array == null ? 0 : array.length
|
||||
|
||||
while (length--) {
|
||||
if (iteratee(array[length], length, array) === false) {
|
||||
break
|
||||
}
|
||||
}
|
||||
return array
|
||||
}
|
||||
|
||||
export default arrayEachRight
|
||||
17
src/.internal/arrayIncludes.ts
Normal file
17
src/.internal/arrayIncludes.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import baseIndexOf from './baseIndexOf.js'
|
||||
|
||||
/**
|
||||
* A specialized version of `includes` for arrays without support for
|
||||
* specifying an index to search from.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array] The array to inspect.
|
||||
* @param {*} target The value to search for.
|
||||
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
||||
*/
|
||||
function arrayIncludes(array, value) {
|
||||
const length = array == null ? 0 : array.length
|
||||
return !!length && baseIndexOf(array, value, 0) > -1
|
||||
}
|
||||
|
||||
export default arrayIncludes
|
||||
23
src/.internal/arrayIncludesWith.ts
Normal file
23
src/.internal/arrayIncludesWith.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* This function is like `arrayIncludes` except that it accepts a comparator.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array] The array to inspect.
|
||||
* @param {*} target The value to search for.
|
||||
* @param {Function} comparator The comparator invoked per element.
|
||||
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
||||
*/
|
||||
function arrayIncludesWith(array, target, comparator) {
|
||||
if (array == null) {
|
||||
return false
|
||||
}
|
||||
|
||||
for (const value of array) {
|
||||
if (comparator(target, value)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
export default arrayIncludesWith
|
||||
43
src/.internal/arrayLikeKeys.ts
Normal file
43
src/.internal/arrayLikeKeys.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import isArguments from '../isArguments.js'
|
||||
import isBuffer from '../isBuffer.js'
|
||||
import isIndex from './isIndex.js'
|
||||
import isTypedArray from '../isTypedArray.js'
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
const hasOwnProperty = Object.prototype.hasOwnProperty
|
||||
|
||||
/**
|
||||
* Creates an array of the enumerable property names of the array-like `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @param {boolean} inherited Specify returning inherited property names.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function arrayLikeKeys(value, inherited) {
|
||||
const isArr = Array.isArray(value)
|
||||
const isArg = !isArr && isArguments(value)
|
||||
const isBuff = !isArr && !isArg && isBuffer(value)
|
||||
const isType = !isArr && !isArg && !isBuff && isTypedArray(value)
|
||||
const skipIndexes = isArr || isArg || isBuff || isType
|
||||
const length = value.length
|
||||
const result = new Array(skipIndexes ? length : 0)
|
||||
let index = skipIndexes ? -1 : length
|
||||
while (++index < length) {
|
||||
result[index] = `${index}`
|
||||
}
|
||||
for (const key in value) {
|
||||
if ((inherited || hasOwnProperty.call(value, key)) &&
|
||||
!(skipIndexes && (
|
||||
// Safari 9 has enumerable `arguments.length` in strict mode.
|
||||
(key === 'length' ||
|
||||
// Skip index properties.
|
||||
isIndex(key, length))
|
||||
))) {
|
||||
result.push(key)
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
export default arrayLikeKeys
|
||||
25
src/.internal/arrayReduce.ts
Normal file
25
src/.internal/arrayReduce.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* A specialized version of `reduce` for arrays.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array] The array to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @param {*} [accumulator] The initial value.
|
||||
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
||||
* the initial value.
|
||||
* @returns {*} Returns the accumulated value.
|
||||
*/
|
||||
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
||||
let index = -1
|
||||
const length = array == null ? 0 : array.length
|
||||
|
||||
if (initAccum && length) {
|
||||
accumulator = array[++index]
|
||||
}
|
||||
while (++index < length) {
|
||||
accumulator = iteratee(accumulator, array[index], index, array)
|
||||
}
|
||||
return accumulator
|
||||
}
|
||||
|
||||
export default arrayReduce
|
||||
23
src/.internal/arrayReduceRight.ts
Normal file
23
src/.internal/arrayReduceRight.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* A specialized version of `reduceRight` for arrays.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array] The array to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @param {*} [accumulator] The initial value.
|
||||
* @param {boolean} [initAccum] Specify using the last element of `array` as
|
||||
* the initial value.
|
||||
* @returns {*} Returns the accumulated value.
|
||||
*/
|
||||
function arrayReduceRight(array, iteratee, accumulator, initAccum) {
|
||||
let length = array == null ? 0 : array.length
|
||||
if (initAccum && length) {
|
||||
accumulator = array[--length]
|
||||
}
|
||||
while (length--) {
|
||||
accumulator = iteratee(accumulator, array[length], length, array)
|
||||
}
|
||||
return accumulator
|
||||
}
|
||||
|
||||
export default arrayReduceRight
|
||||
12
src/.internal/asciiSize.ts
Normal file
12
src/.internal/asciiSize.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Gets the size of an ASCII `string`.
|
||||
*
|
||||
* @private
|
||||
* @param {string} string The string inspect.
|
||||
* @returns {number} Returns the string size.
|
||||
*/
|
||||
function asciiSize({ length }) {
|
||||
return length
|
||||
}
|
||||
|
||||
export default asciiSize
|
||||
12
src/.internal/asciiToArray.ts
Normal file
12
src/.internal/asciiToArray.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Converts an ASCII `string` to an array.
|
||||
*
|
||||
* @private
|
||||
* @param {string} string The string to convert.
|
||||
* @returns {Array} Returns the converted array.
|
||||
*/
|
||||
function asciiToArray(string) {
|
||||
return string.split('')
|
||||
}
|
||||
|
||||
export default asciiToArray
|
||||
20
src/.internal/assignMergeValue.ts
Normal file
20
src/.internal/assignMergeValue.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import baseAssignValue from './baseAssignValue.js'
|
||||
import eq from '../eq.js'
|
||||
|
||||
/**
|
||||
* This function is like `assignValue` except that it doesn't assign
|
||||
* `undefined` values.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to modify.
|
||||
* @param {string} key The key of the property to assign.
|
||||
* @param {*} value The value to assign.
|
||||
*/
|
||||
function assignMergeValue(object, key, value) {
|
||||
if ((value !== undefined && !eq(object[key], value)) ||
|
||||
(value === undefined && !(key in object))) {
|
||||
baseAssignValue(object, key, value)
|
||||
}
|
||||
}
|
||||
|
||||
export default assignMergeValue
|
||||
27
src/.internal/assignValue.ts
Normal file
27
src/.internal/assignValue.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import baseAssignValue from './baseAssignValue.js'
|
||||
import eq from '../eq.js'
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
const hasOwnProperty = Object.prototype.hasOwnProperty
|
||||
|
||||
/**
|
||||
* Assigns `value` to `key` of `object` if the existing value is not equivalent.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to modify.
|
||||
* @param {string} key The key of the property to assign.
|
||||
* @param {*} value The value to assign.
|
||||
*/
|
||||
function assignValue(object, key, value) {
|
||||
const objValue = object[key]
|
||||
|
||||
if (!(hasOwnProperty.call(object, key) && eq(objValue, value))) {
|
||||
if (value !== 0 || (1 / value) === (1 / objValue)) {
|
||||
baseAssignValue(object, key, value)
|
||||
}
|
||||
} else if (value === undefined && !(key in object)) {
|
||||
baseAssignValue(object, key, value)
|
||||
}
|
||||
}
|
||||
|
||||
export default assignValue
|
||||
21
src/.internal/assocIndexOf.ts
Normal file
21
src/.internal/assocIndexOf.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import eq from '../eq.js'
|
||||
|
||||
/**
|
||||
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} key The key to search for.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
function assocIndexOf(array, key) {
|
||||
let { length } = array
|
||||
while (length--) {
|
||||
if (eq(array[length][0], key)) {
|
||||
return length
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
export default assocIndexOf
|
||||
23
src/.internal/baseAssignValue.ts
Normal file
23
src/.internal/baseAssignValue.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* The base implementation of `assignValue` and `assignMergeValue` without
|
||||
* value checks.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to modify.
|
||||
* @param {string} key The key of the property to assign.
|
||||
* @param {*} value The value to assign.
|
||||
*/
|
||||
function baseAssignValue(object, key, value) {
|
||||
if (key === '__proto__') {
|
||||
Object.defineProperty(object, key, {
|
||||
'configurable': true,
|
||||
'enumerable': true,
|
||||
'value': value,
|
||||
'writable': true
|
||||
})
|
||||
} else {
|
||||
object[key] = value
|
||||
}
|
||||
}
|
||||
|
||||
export default baseAssignValue
|
||||
23
src/.internal/baseAt.ts
Normal file
23
src/.internal/baseAt.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import get from '../get.js'
|
||||
|
||||
/**
|
||||
* The base implementation of `at` without support for individual paths.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {string[]} paths The property paths to pick.
|
||||
* @returns {Array} Returns the picked elements.
|
||||
*/
|
||||
function baseAt(object, paths) {
|
||||
let index = -1
|
||||
const length = paths.length
|
||||
const result = new Array(length)
|
||||
const skip = object == null
|
||||
|
||||
while (++index < length) {
|
||||
result[index] = skip ? undefined : get(object, paths[index])
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
export default baseAt
|
||||
241
src/.internal/baseClone.ts
Normal file
241
src/.internal/baseClone.ts
Normal file
@@ -0,0 +1,241 @@
|
||||
import Stack from './Stack.js'
|
||||
import arrayEach from './arrayEach.js'
|
||||
import assignValue from './assignValue.js'
|
||||
import cloneBuffer from './cloneBuffer.js'
|
||||
import copyArray from './copyArray.js'
|
||||
import copyObject from './copyObject.js'
|
||||
import cloneArrayBuffer from './cloneArrayBuffer.js'
|
||||
import cloneDataView from './cloneDataView.js'
|
||||
import cloneRegExp from './cloneRegExp.js'
|
||||
import cloneSymbol from './cloneSymbol.js'
|
||||
import cloneTypedArray from './cloneTypedArray.js'
|
||||
import copySymbols from './copySymbols.js'
|
||||
import copySymbolsIn from './copySymbolsIn.js'
|
||||
import getAllKeys from './getAllKeys.js'
|
||||
import getAllKeysIn from './getAllKeysIn.js'
|
||||
import getTag from './getTag.js'
|
||||
import initCloneObject from './initCloneObject.js'
|
||||
import isBuffer from '../isBuffer.js'
|
||||
import isObject from '../isObject.js'
|
||||
import isTypedArray from '../isTypedArray.js'
|
||||
import keys from '../keys.js'
|
||||
import keysIn from '../keysIn.js'
|
||||
|
||||
/** Used to compose bitmasks for cloning. */
|
||||
const CLONE_DEEP_FLAG = 1
|
||||
const CLONE_FLAT_FLAG = 2
|
||||
const CLONE_SYMBOLS_FLAG = 4
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
const argsTag = '[object Arguments]'
|
||||
const arrayTag = '[object Array]'
|
||||
const boolTag = '[object Boolean]'
|
||||
const dateTag = '[object Date]'
|
||||
const errorTag = '[object Error]'
|
||||
const mapTag = '[object Map]'
|
||||
const numberTag = '[object Number]'
|
||||
const objectTag = '[object Object]'
|
||||
const regexpTag = '[object RegExp]'
|
||||
const setTag = '[object Set]'
|
||||
const stringTag = '[object String]'
|
||||
const symbolTag = '[object Symbol]'
|
||||
const weakMapTag = '[object WeakMap]'
|
||||
|
||||
const arrayBufferTag = '[object ArrayBuffer]'
|
||||
const dataViewTag = '[object DataView]'
|
||||
const float32Tag = '[object Float32Array]'
|
||||
const float64Tag = '[object Float64Array]'
|
||||
const int8Tag = '[object Int8Array]'
|
||||
const int16Tag = '[object Int16Array]'
|
||||
const int32Tag = '[object Int32Array]'
|
||||
const uint8Tag = '[object Uint8Array]'
|
||||
const uint8ClampedTag = '[object Uint8ClampedArray]'
|
||||
const uint16Tag = '[object Uint16Array]'
|
||||
const uint32Tag = '[object Uint32Array]'
|
||||
|
||||
/** Used to identify `toStringTag` values supported by `clone`. */
|
||||
const cloneableTags = {}
|
||||
cloneableTags[argsTag] = cloneableTags[arrayTag] =
|
||||
cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
|
||||
cloneableTags[boolTag] = cloneableTags[dateTag] =
|
||||
cloneableTags[float32Tag] = cloneableTags[float64Tag] =
|
||||
cloneableTags[int8Tag] = cloneableTags[int16Tag] =
|
||||
cloneableTags[int32Tag] = cloneableTags[mapTag] =
|
||||
cloneableTags[numberTag] = cloneableTags[objectTag] =
|
||||
cloneableTags[regexpTag] = cloneableTags[setTag] =
|
||||
cloneableTags[stringTag] = cloneableTags[symbolTag] =
|
||||
cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
|
||||
cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true
|
||||
cloneableTags[errorTag] = cloneableTags[weakMapTag] = false
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
const hasOwnProperty = Object.prototype.hasOwnProperty
|
||||
|
||||
/**
|
||||
* Initializes an object clone based on its `toStringTag`.
|
||||
*
|
||||
* **Note:** This function only supports cloning values with tags of
|
||||
* `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to clone.
|
||||
* @param {string} tag The `toStringTag` of the object to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @returns {Object} Returns the initialized clone.
|
||||
*/
|
||||
function initCloneByTag(object, tag, isDeep) {
|
||||
const Ctor = object.constructor
|
||||
switch (tag) {
|
||||
case arrayBufferTag:
|
||||
return cloneArrayBuffer(object)
|
||||
|
||||
case boolTag:
|
||||
case dateTag:
|
||||
return new Ctor(+object)
|
||||
|
||||
case dataViewTag:
|
||||
return cloneDataView(object, isDeep)
|
||||
|
||||
case float32Tag: case float64Tag:
|
||||
case int8Tag: case int16Tag: case int32Tag:
|
||||
case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
|
||||
return cloneTypedArray(object, isDeep)
|
||||
|
||||
case mapTag:
|
||||
return new Ctor
|
||||
|
||||
case numberTag:
|
||||
case stringTag:
|
||||
return new Ctor(object)
|
||||
|
||||
case regexpTag:
|
||||
return cloneRegExp(object)
|
||||
|
||||
case setTag:
|
||||
return new Ctor
|
||||
|
||||
case symbolTag:
|
||||
return cloneSymbol(object)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes an array clone.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to clone.
|
||||
* @returns {Array} Returns the initialized clone.
|
||||
*/
|
||||
function initCloneArray(array) {
|
||||
const { length } = array
|
||||
const result = new array.constructor(length)
|
||||
|
||||
// Add properties assigned by `RegExp#exec`.
|
||||
if (length && typeof array[0] === 'string' && hasOwnProperty.call(array, 'index')) {
|
||||
result.index = array.index
|
||||
result.input = array.input
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `clone` and `cloneDeep` which tracks
|
||||
* traversed objects.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to clone.
|
||||
* @param {number} bitmask The bitmask flags.
|
||||
* 1 - Deep clone
|
||||
* 2 - Flatten inherited properties
|
||||
* 4 - Clone symbols
|
||||
* @param {Function} [customizer] The function to customize cloning.
|
||||
* @param {string} [key] The key of `value`.
|
||||
* @param {Object} [object] The parent object of `value`.
|
||||
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
|
||||
* @returns {*} Returns the cloned value.
|
||||
*/
|
||||
function baseClone(value, bitmask, customizer, key, object, stack) {
|
||||
let result
|
||||
const isDeep = bitmask & CLONE_DEEP_FLAG
|
||||
const isFlat = bitmask & CLONE_FLAT_FLAG
|
||||
const isFull = bitmask & CLONE_SYMBOLS_FLAG
|
||||
|
||||
if (customizer) {
|
||||
result = object ? customizer(value, key, object, stack) : customizer(value)
|
||||
}
|
||||
if (result !== undefined) {
|
||||
return result
|
||||
}
|
||||
if (!isObject(value)) {
|
||||
return value
|
||||
}
|
||||
const isArr = Array.isArray(value)
|
||||
const tag = getTag(value)
|
||||
if (isArr) {
|
||||
result = initCloneArray(value)
|
||||
if (!isDeep) {
|
||||
return copyArray(value, result)
|
||||
}
|
||||
} else {
|
||||
const isFunc = typeof value === 'function'
|
||||
|
||||
if (isBuffer(value)) {
|
||||
return cloneBuffer(value, isDeep)
|
||||
}
|
||||
if (tag === objectTag || tag === argsTag || (isFunc && !object)) {
|
||||
result = (isFlat || isFunc) ? {} : initCloneObject(value)
|
||||
if (!isDeep) {
|
||||
return isFlat
|
||||
? copySymbolsIn(value, copyObject(value, keysIn(value), result))
|
||||
: copySymbols(value, Object.assign(result, value))
|
||||
}
|
||||
} else {
|
||||
if (isFunc || !cloneableTags[tag]) {
|
||||
return object ? value : {}
|
||||
}
|
||||
result = initCloneByTag(value, tag, isDeep)
|
||||
}
|
||||
}
|
||||
// Check for circular references and return its corresponding clone.
|
||||
stack || (stack = new Stack)
|
||||
const stacked = stack.get(value)
|
||||
if (stacked) {
|
||||
return stacked
|
||||
}
|
||||
stack.set(value, result)
|
||||
|
||||
if (tag === mapTag) {
|
||||
value.forEach((subValue, key) => {
|
||||
result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack))
|
||||
})
|
||||
return result
|
||||
}
|
||||
|
||||
if (tag === setTag) {
|
||||
value.forEach((subValue) => {
|
||||
result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack))
|
||||
})
|
||||
return result
|
||||
}
|
||||
|
||||
if (isTypedArray(value)) {
|
||||
return result
|
||||
}
|
||||
|
||||
const keysFunc = isFull
|
||||
? (isFlat ? getAllKeysIn : getAllKeys)
|
||||
: (isFlat ? keysIn : keys)
|
||||
|
||||
const props = isArr ? undefined : keysFunc(value)
|
||||
arrayEach(props || value, (subValue, key) => {
|
||||
if (props) {
|
||||
key = subValue
|
||||
subValue = value[key]
|
||||
}
|
||||
// Recursively populate clone (susceptible to call stack limits).
|
||||
assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack))
|
||||
})
|
||||
return result
|
||||
}
|
||||
|
||||
export default baseClone
|
||||
16
src/.internal/baseConforms.ts
Normal file
16
src/.internal/baseConforms.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import baseConformsTo from './baseConformsTo.js'
|
||||
import keys from '../keys.js'
|
||||
|
||||
/**
|
||||
* The base implementation of `conforms` which doesn't clone `source`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object of property predicates to conform to.
|
||||
* @returns {Function} Returns the new spec function.
|
||||
*/
|
||||
function baseConforms(source) {
|
||||
const props = keys(source)
|
||||
return (object) => baseConformsTo(object, source, props)
|
||||
}
|
||||
|
||||
export default baseConforms
|
||||
27
src/.internal/baseConformsTo.ts
Normal file
27
src/.internal/baseConformsTo.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* The base implementation of `conformsTo` which accepts `props` to check.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to inspect.
|
||||
* @param {Object} source The object of property predicates to conform to.
|
||||
* @returns {boolean} Returns `true` if `object` conforms, else `false`.
|
||||
*/
|
||||
function baseConformsTo(object, source, props) {
|
||||
let length = props.length
|
||||
if (object == null) {
|
||||
return !length
|
||||
}
|
||||
object = Object(object)
|
||||
while (length--) {
|
||||
const key = props[length]
|
||||
const predicate = source[key]
|
||||
const value = object[key]
|
||||
|
||||
if ((value === undefined && !(key in object)) || !predicate(value)) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
export default baseConformsTo
|
||||
63
src/.internal/baseDifference.ts
Normal file
63
src/.internal/baseDifference.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import SetCache from './SetCache.js'
|
||||
import arrayIncludes from './arrayIncludes.js'
|
||||
import arrayIncludesWith from './arrayIncludesWith.js'
|
||||
import map from '../map.js'
|
||||
import cacheHas from './cacheHas.js'
|
||||
|
||||
/** Used as the size to enable large array optimizations. */
|
||||
const LARGE_ARRAY_SIZE = 200
|
||||
|
||||
/**
|
||||
* The base implementation of methods like `difference` without support
|
||||
* for excluding multiple arrays.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {Array} values The values to exclude.
|
||||
* @param {Function} [iteratee] The iteratee invoked per element.
|
||||
* @param {Function} [comparator] The comparator invoked per element.
|
||||
* @returns {Array} Returns the new array of filtered values.
|
||||
*/
|
||||
function baseDifference(array, values, iteratee, comparator) {
|
||||
let includes = arrayIncludes
|
||||
let isCommon = true
|
||||
const result = []
|
||||
const valuesLength = values.length
|
||||
|
||||
if (!array.length) {
|
||||
return result
|
||||
}
|
||||
if (iteratee) {
|
||||
values = map(values, (value) => iteratee(value))
|
||||
}
|
||||
if (comparator) {
|
||||
includes = arrayIncludesWith
|
||||
isCommon = false
|
||||
}
|
||||
else if (values.length >= LARGE_ARRAY_SIZE) {
|
||||
includes = cacheHas
|
||||
isCommon = false
|
||||
values = new SetCache(values)
|
||||
}
|
||||
outer:
|
||||
for (let value of array) {
|
||||
const computed = iteratee == null ? value : iteratee(value)
|
||||
|
||||
value = (comparator || value !== 0) ? value : 0
|
||||
if (isCommon && computed === computed) {
|
||||
let valuesIndex = valuesLength
|
||||
while (valuesIndex--) {
|
||||
if (values[valuesIndex] === computed) {
|
||||
continue outer
|
||||
}
|
||||
}
|
||||
result.push(value)
|
||||
}
|
||||
else if (!includes(values, computed, comparator)) {
|
||||
result.push(value)
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
export default baseDifference
|
||||
31
src/.internal/baseEach.ts
Normal file
31
src/.internal/baseEach.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import baseForOwn from './baseForOwn.js'
|
||||
import isArrayLike from '../isArrayLike.js'
|
||||
|
||||
/**
|
||||
* The base implementation of `forEach`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array|Object} collection The collection to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {Array|Object} Returns `collection`.
|
||||
*/
|
||||
function baseEach(collection, iteratee) {
|
||||
if (collection == null) {
|
||||
return collection
|
||||
}
|
||||
if (!isArrayLike(collection)) {
|
||||
return baseForOwn(collection, iteratee)
|
||||
}
|
||||
const length = collection.length
|
||||
const iterable = Object(collection)
|
||||
let index = -1
|
||||
|
||||
while (++index < length) {
|
||||
if (iteratee(iterable[index], index, iterable) === false) {
|
||||
break
|
||||
}
|
||||
}
|
||||
return collection
|
||||
}
|
||||
|
||||
export default baseEach
|
||||
30
src/.internal/baseEachRight.ts
Normal file
30
src/.internal/baseEachRight.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import baseForOwnRight from './baseForOwnRight.js'
|
||||
import isArrayLike from '../isArrayLike.js'
|
||||
|
||||
/**
|
||||
* The base implementation of `forEachRight`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array|Object} collection The collection to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {Array|Object} Returns `collection`.
|
||||
*/
|
||||
function baseEachRight(collection, iteratee) {
|
||||
if (collection == null) {
|
||||
return collection
|
||||
}
|
||||
if (!isArrayLike(collection)) {
|
||||
return baseForOwnRight(collection, iteratee)
|
||||
}
|
||||
const iterable = Object(collection)
|
||||
let length = collection.length
|
||||
|
||||
while (length--) {
|
||||
if (iteratee(iterable[length], length, iterable) === false) {
|
||||
break
|
||||
}
|
||||
}
|
||||
return collection
|
||||
}
|
||||
|
||||
export default baseEachRight
|
||||
23
src/.internal/baseFindIndex.ts
Normal file
23
src/.internal/baseFindIndex.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* The base implementation of `findIndex` and `findLastIndex`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {Function} predicate The function invoked per iteration.
|
||||
* @param {number} fromIndex The index to search from.
|
||||
* @param {boolean} [fromRight] Specify iterating from right to left.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
||||
const { length } = array
|
||||
let index = fromIndex + (fromRight ? 1 : -1)
|
||||
|
||||
while ((fromRight ? index-- : ++index < length)) {
|
||||
if (predicate(array[index], index, array)) {
|
||||
return index
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
export default baseFindIndex
|
||||
22
src/.internal/baseFindKey.ts
Normal file
22
src/.internal/baseFindKey.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* The base implementation of methods like `findKey` and `findLastKey`
|
||||
* which iterates over `collection` using `eachFunc`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array|Object} collection The collection to inspect.
|
||||
* @param {Function} predicate The function invoked per iteration.
|
||||
* @param {Function} eachFunc The function to iterate over `collection`.
|
||||
* @returns {*} Returns the found element or its key, else `undefined`.
|
||||
*/
|
||||
function baseFindKey(collection, predicate, eachFunc) {
|
||||
let result
|
||||
eachFunc(collection, (value, key, collection) => {
|
||||
if (predicate(value, key, collection)) {
|
||||
result = key
|
||||
return false
|
||||
}
|
||||
})
|
||||
return result
|
||||
}
|
||||
|
||||
export default baseFindKey
|
||||
37
src/.internal/baseFlatten.ts
Normal file
37
src/.internal/baseFlatten.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import isFlattenable from './isFlattenable.js'
|
||||
|
||||
/**
|
||||
* The base implementation of `flatten` with support for restricting flattening.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to flatten.
|
||||
* @param {number} depth The maximum recursion depth.
|
||||
* @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
|
||||
* @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
|
||||
* @param {Array} [result=[]] The initial result value.
|
||||
* @returns {Array} Returns the new flattened array.
|
||||
*/
|
||||
function baseFlatten(array, depth, predicate, isStrict, result) {
|
||||
predicate || (predicate = isFlattenable)
|
||||
result || (result = [])
|
||||
|
||||
if (array == null) {
|
||||
return result
|
||||
}
|
||||
|
||||
for (const value of array) {
|
||||
if (depth > 0 && predicate(value)) {
|
||||
if (depth > 1) {
|
||||
// Recursively flatten arrays (susceptible to call stack limits).
|
||||
baseFlatten(value, depth - 1, predicate, isStrict, result)
|
||||
} else {
|
||||
result.push(...value)
|
||||
}
|
||||
} else if (!isStrict) {
|
||||
result[result.length] = value
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
export default baseFlatten
|
||||
27
src/.internal/baseFor.ts
Normal file
27
src/.internal/baseFor.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* The base implementation of `baseForOwn` which iterates over `object`
|
||||
* properties returned by `keysFunc` and invokes `iteratee` for each property.
|
||||
* Iteratee functions may exit iteration early by explicitly returning `false`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @param {Function} keysFunc The function to get the keys of `object`.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseFor(object, iteratee, keysFunc) {
|
||||
const iterable = Object(object)
|
||||
const props = keysFunc(object)
|
||||
let { length } = props
|
||||
let index = -1
|
||||
|
||||
while (length--) {
|
||||
const key = props[++index]
|
||||
if (iteratee(iterable[key], key, iterable) === false) {
|
||||
break
|
||||
}
|
||||
}
|
||||
return object
|
||||
}
|
||||
|
||||
export default baseFor
|
||||
16
src/.internal/baseForOwn.ts
Normal file
16
src/.internal/baseForOwn.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import baseFor from './baseFor.js'
|
||||
import keys from '../keys.js'
|
||||
|
||||
/**
|
||||
* The base implementation of `forOwn`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseForOwn(object, iteratee) {
|
||||
return object && baseFor(object, iteratee, keys)
|
||||
}
|
||||
|
||||
export default baseForOwn
|
||||
16
src/.internal/baseForOwnRight.ts
Normal file
16
src/.internal/baseForOwnRight.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import baseForRight from './baseForRight.js'
|
||||
import keys from '../keys.js'
|
||||
|
||||
/**
|
||||
* The base implementation of `forOwnRight`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseForOwnRight(object, iteratee) {
|
||||
return object && baseForRight(object, iteratee, keys)
|
||||
}
|
||||
|
||||
export default baseForOwnRight
|
||||
25
src/.internal/baseForRight.ts
Normal file
25
src/.internal/baseForRight.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* This function is like `baseFor` except that it iterates over properties
|
||||
* in the opposite order.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @param {Function} keysFunc The function to get the keys of `object`.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseForRight(object, iteratee, keysFunc) {
|
||||
const iterable = Object(object)
|
||||
const props = keysFunc(object)
|
||||
let { length } = props
|
||||
|
||||
while (length--) {
|
||||
const key = props[length]
|
||||
if (iteratee(iterable[key], key, iterable) === false) {
|
||||
break
|
||||
}
|
||||
}
|
||||
return object
|
||||
}
|
||||
|
||||
export default baseForRight
|
||||
24
src/.internal/baseGet.ts
Normal file
24
src/.internal/baseGet.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import castPath from './castPath.js'
|
||||
import toKey from './toKey.js'
|
||||
|
||||
/**
|
||||
* The base implementation of `get` without support for default values.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @param {Array|string} path The path of the property to get.
|
||||
* @returns {*} Returns the resolved value.
|
||||
*/
|
||||
function baseGet(object, path) {
|
||||
path = castPath(path, object)
|
||||
|
||||
let index = 0
|
||||
const length = path.length
|
||||
|
||||
while (object != null && index < length) {
|
||||
object = object[toKey(path[index++])]
|
||||
}
|
||||
return (index && index === length) ? object : undefined
|
||||
}
|
||||
|
||||
export default baseGet
|
||||
14
src/.internal/baseInRange.ts
Normal file
14
src/.internal/baseInRange.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* The base implementation of `inRange` which doesn't coerce arguments.
|
||||
*
|
||||
* @private
|
||||
* @param {number} number The number to check.
|
||||
* @param {number} start The start of the range.
|
||||
* @param {number} end The end of the range.
|
||||
* @returns {boolean} Returns `true` if `number` is in the range, else `false`.
|
||||
*/
|
||||
function baseInRange(number, start, end) {
|
||||
return number >= Math.min(start, end) && number < Math.max(start, end)
|
||||
}
|
||||
|
||||
export default baseInRange
|
||||
20
src/.internal/baseIndexOf.ts
Normal file
20
src/.internal/baseIndexOf.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import baseFindIndex from './baseFindIndex.js'
|
||||
import baseIsNaN from './baseIsNaN.js'
|
||||
import strictIndexOf from './strictIndexOf.js'
|
||||
|
||||
/**
|
||||
* The base implementation of `indexOf` without `fromIndex` bounds checks.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} value The value to search for.
|
||||
* @param {number} fromIndex The index to search from.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
function baseIndexOf(array, value, fromIndex) {
|
||||
return value === value
|
||||
? strictIndexOf(array, value, fromIndex)
|
||||
: baseFindIndex(array, baseIsNaN, fromIndex)
|
||||
}
|
||||
|
||||
export default baseIndexOf
|
||||
23
src/.internal/baseIndexOfWith.ts
Normal file
23
src/.internal/baseIndexOfWith.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* This function is like `baseIndexOf` except that it accepts a comparator.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} value The value to search for.
|
||||
* @param {number} fromIndex The index to search from.
|
||||
* @param {Function} comparator The comparator invoked per element.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
function baseIndexOfWith(array, value, fromIndex, comparator) {
|
||||
let index = fromIndex - 1
|
||||
const { length } = array
|
||||
|
||||
while (++index < length) {
|
||||
if (comparator(array[index], value)) {
|
||||
return index
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
export default baseIndexOfWith
|
||||
72
src/.internal/baseIntersection.ts
Normal file
72
src/.internal/baseIntersection.ts
Normal file
@@ -0,0 +1,72 @@
|
||||
import SetCache from './SetCache.js'
|
||||
import arrayIncludes from './arrayIncludes.js'
|
||||
import arrayIncludesWith from './arrayIncludesWith.js'
|
||||
import map from '../map.js'
|
||||
import cacheHas from './cacheHas.js'
|
||||
|
||||
/**
|
||||
* The base implementation of methods like `intersection` that accepts an
|
||||
* array of arrays to inspect.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} arrays The arrays to inspect.
|
||||
* @param {Function} [iteratee] The iteratee invoked per element.
|
||||
* @param {Function} [comparator] The comparator invoked per element.
|
||||
* @returns {Array} Returns the new array of shared values.
|
||||
*/
|
||||
function baseIntersection(arrays, iteratee, comparator) {
|
||||
const includes = comparator ? arrayIncludesWith : arrayIncludes
|
||||
const length = arrays[0].length
|
||||
const othLength = arrays.length
|
||||
const caches = new Array(othLength)
|
||||
const result = []
|
||||
|
||||
let array
|
||||
let maxLength = Infinity
|
||||
let othIndex = othLength
|
||||
|
||||
while (othIndex--) {
|
||||
array = arrays[othIndex]
|
||||
if (othIndex && iteratee) {
|
||||
array = map(array, (value) => iteratee(value))
|
||||
}
|
||||
maxLength = Math.min(array.length, maxLength)
|
||||
caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
|
||||
? new SetCache(othIndex && array)
|
||||
: undefined
|
||||
}
|
||||
array = arrays[0]
|
||||
|
||||
let index = -1
|
||||
const seen = caches[0]
|
||||
|
||||
outer:
|
||||
while (++index < length && result.length < maxLength) {
|
||||
let value = array[index]
|
||||
const computed = iteratee ? iteratee(value) : value
|
||||
|
||||
value = (comparator || value !== 0) ? value : 0
|
||||
if (!(seen
|
||||
? cacheHas(seen, computed)
|
||||
: includes(result, computed, comparator)
|
||||
)) {
|
||||
othIndex = othLength
|
||||
while (--othIndex) {
|
||||
const cache = caches[othIndex]
|
||||
if (!(cache
|
||||
? cacheHas(cache, computed)
|
||||
: includes(arrays[othIndex], computed, comparator))
|
||||
) {
|
||||
continue outer
|
||||
}
|
||||
}
|
||||
if (seen) {
|
||||
seen.push(computed)
|
||||
}
|
||||
result.push(value)
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
export default baseIntersection
|
||||
28
src/.internal/baseIsEqual.ts
Normal file
28
src/.internal/baseIsEqual.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import baseIsEqualDeep from './baseIsEqualDeep.js'
|
||||
import isObjectLike from '../isObjectLike.js'
|
||||
|
||||
/**
|
||||
* The base implementation of `isEqual` which supports partial comparisons
|
||||
* and tracks traversed objects.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to compare.
|
||||
* @param {*} other The other value to compare.
|
||||
* @param {boolean} bitmask The bitmask flags.
|
||||
* 1 - Unordered comparison
|
||||
* 2 - Partial comparison
|
||||
* @param {Function} [customizer] The function to customize comparisons.
|
||||
* @param {Object} [stack] Tracks traversed `value` and `other` objects.
|
||||
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
||||
*/
|
||||
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
||||
if (value === other) {
|
||||
return true
|
||||
}
|
||||
if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
|
||||
return value !== value && other !== other
|
||||
}
|
||||
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack)
|
||||
}
|
||||
|
||||
export default baseIsEqual
|
||||
79
src/.internal/baseIsEqualDeep.ts
Normal file
79
src/.internal/baseIsEqualDeep.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
import Stack from './Stack.js'
|
||||
import equalArrays from './equalArrays.js'
|
||||
import equalByTag from './equalByTag.js'
|
||||
import equalObjects from './equalObjects.js'
|
||||
import getTag from './getTag.js'
|
||||
import isBuffer from '../isBuffer.js'
|
||||
import isTypedArray from '../isTypedArray.js'
|
||||
|
||||
/** Used to compose bitmasks for value comparisons. */
|
||||
const COMPARE_PARTIAL_FLAG = 1
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
const argsTag = '[object Arguments]'
|
||||
const arrayTag = '[object Array]'
|
||||
const objectTag = '[object Object]'
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
const hasOwnProperty = Object.prototype.hasOwnProperty
|
||||
|
||||
/**
|
||||
* A specialized version of `baseIsEqual` for arrays and objects which performs
|
||||
* deep comparisons and tracks traversed objects enabling objects with circular
|
||||
* references to be compared.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to compare.
|
||||
* @param {Object} other The other object to compare.
|
||||
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
||||
* @param {Function} customizer The function to customize comparisons.
|
||||
* @param {Function} equalFunc The function to determine equivalents of values.
|
||||
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
|
||||
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
||||
*/
|
||||
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
||||
let objIsArr = Array.isArray(object)
|
||||
const othIsArr = Array.isArray(other)
|
||||
let objTag = objIsArr ? arrayTag : getTag(object)
|
||||
let othTag = othIsArr ? arrayTag : getTag(other)
|
||||
|
||||
objTag = objTag === argsTag ? objectTag : objTag
|
||||
othTag = othTag === argsTag ? objectTag : othTag
|
||||
|
||||
let objIsObj = objTag === objectTag
|
||||
const othIsObj = othTag === objectTag
|
||||
const isSameTag = objTag === othTag
|
||||
|
||||
if (isSameTag && isBuffer(object)) {
|
||||
if (!isBuffer(other)) {
|
||||
return false
|
||||
}
|
||||
objIsArr = true
|
||||
objIsObj = false
|
||||
}
|
||||
if (isSameTag && !objIsObj) {
|
||||
stack || (stack = new Stack)
|
||||
return (objIsArr || isTypedArray(object))
|
||||
? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
|
||||
: equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack)
|
||||
}
|
||||
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
||||
const objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__')
|
||||
const othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__')
|
||||
|
||||
if (objIsWrapped || othIsWrapped) {
|
||||
const objUnwrapped = objIsWrapped ? object.value() : object
|
||||
const othUnwrapped = othIsWrapped ? other.value() : other
|
||||
|
||||
stack || (stack = new Stack)
|
||||
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack)
|
||||
}
|
||||
}
|
||||
if (!isSameTag) {
|
||||
return false
|
||||
}
|
||||
stack || (stack = new Stack)
|
||||
return equalObjects(object, other, bitmask, customizer, equalFunc, stack)
|
||||
}
|
||||
|
||||
export default baseIsEqualDeep
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user