Compare commits

..

657 Commits

Author SHA1 Message Date
jdalton
afcd5bc1e8 Update security policy 2024-10-06 13:19:41 -04:00
KEHyeon
6a2cc1dfcf chore: combine the if statements into one (#5785) 2024-07-10 15:56:03 -05:00
ygj6
a67a085cc0 fix: inRange test (#5821) 2024-04-15 22:55:09 -04:00
김진범
c7c70a7da5 test: add some cases (#5789) 2024-01-11 09:07:57 -08:00
tison
aa18212085 test: fix cannot find root (#5741)
Signed-off-by: tison <wander4096@gmail.com>
2023-09-27 10:00:44 -07:00
jdalton
a79c5c434c wip: unit test fixes continued 2023-09-21 07:45:49 -07:00
tison
bd518dd906 test: partially fix broken tests (#5733)
* test: fix throttle.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix pickBy.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix isBuffer.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: partially fix attempt.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: partially fix dropRightWhile.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix defer.spec.js and rest.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix invoke.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix isArray.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: partially fix iteration-methods.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix xor-methods.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix property.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix ary.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix omit-methods.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix debounce-and-throttle.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix unzip-and-zip.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix toPairs-methods.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix exit-early.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: temporarily comment out takeWhile and dropWhile tests

Signed-off-by: tison <wander4096@gmail.com>

* test: partially fix union*.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix startsWith-and-endsWith.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix isNil.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix some of syntax errors

Signed-off-by: tison <wander4096@gmail.com>

---------

Signed-off-by: tison <wander4096@gmail.com>
2023-09-21 07:40:27 -07:00
tison
49683ffd5d ci: make it work (#5728)
Signed-off-by: tison <wander4096@gmail.com>
2023-09-19 15:11:00 -07:00
jdalton
5308be3ba6 wip: code formatting nits continued 2023-09-17 11:28:57 -07:00
jdalton
b5c59317ea wip: code formatting nits continued 2023-09-16 22:59:56 -07:00
jdalton
0b28b7f7b6 wip: code formatting nits 2023-09-16 16:18:43 -07:00
jdalton
97d4a2fe19 wip: migrate to bun 2023-09-16 14:47:50 -07:00
Jacob
2da024c3b4 perf: use === instead of == (#5118) 2021-04-23 11:25:37 -06:00
Arslan Ahmad
540148d2c0 Update tests.yml (#5140)
`npm cit` is short for `npm ci` and `npm test`
2021-04-23 11:18:47 -06:00
Benjamin Tan
2f79053d7b Enable GitHub Actions CI. 2020-12-21 21:55:43 +08:00
Benjamin Tan
5aaf898a8f Fix ESLint errors and tests.
I've commented out a test for `_.merge` and will re-look it as I
gradually cleanup the codebase.
2020-12-21 21:52:57 +08:00
Benjamin Tan
bcd0610069 Cleanup package.json and CONTRIBUTING.md.
The master branch has been in flux for a pretty long time, so leaving
the broken npm scripts and messages in CONTRIBUTING.md doesn't make
sense and has been confusing to contributors. This commit removes broken
npm scripts and removes all unnecessary dependencies for now.
2020-12-21 21:49:59 +08:00
Clara Bennett
2f900b62fe Remove outdated contributor tips (#5008)
The `opt-cli` pre-push functionality was removed from lodash just a few days
after it was added (see 2cd12c38e3),
but the documentation encouraging contributors to use it still remains.
Remove to avoid confusion for new contributors.
2020-12-20 14:58:02 +08:00
thxiami
e0029485ab Update links in CONTRIBUTING.md & README.md (#4829) 2020-10-28 21:24:25 +01:00
Utkarsh Kukreti
86a852fe76 Changing font-style to monospace for '--save' option in README.md (#4681)
--save is a command-line option and it should be monospaced

Co-authored-by: utkarsh-kukreti <utkarshk@dewsolutions.in>
2020-06-03 22:35:27 -07:00
Chen Yu
74b09d6272 fix: fix the params of Hash#delete in in jsdoc (#4737)
Remove the unused param `hash` from the jsdoc of `Hash#delete`
2020-05-06 16:42:49 +08:00
Chen Yu
08110bdcf3 fix: fix the jsdoc of SetCache#has (#4739)
The return type should be `boolean` instead of `number`
2020-05-05 22:54:24 +02:00
Dylan Westerhold
0541ec89cc Update links in CONTRIBUTING.md (#4741) 2020-05-05 22:03:05 +02:00
Kerry Liu
588bf3e20d Handle leading zeros in quote html entity (#4623) 2020-02-05 09:17:16 +01:00
Luiz Américo
3f585df05c Fix uniqueId prefix coercion (#4619) 2020-01-22 22:07:54 +01:00
Luiz Américo
04ebca6c86 Enable escape and once tests (#4618) 2020-01-08 22:43:03 +01:00
RajuPedda
cefddab1ca Updated the check of isFunction method (#4555) 2019-11-19 13:35:48 -08:00
Cameron Chamberlain
a6b960be00 Remove extraneous conditional (#4531)
Since `function flow(funcs)` changed to `function flow(...funcs)` this ternary became unnecessary, since funcs will always have a length now.
2019-11-11 17:13:41 -08:00
Michał Lipiński
657f8bf71e Fix parentheses placement broken in 16413cc 2019-11-06 21:02:07 +01:00
Michał Lipiński
619ac69746 Ensure orderBy will accept iteratee path arrays #4438 (#4513) 2019-10-17 11:23:07 +02:00
Ivan
23b2a33e75 Fix vulnerabilities in npm packages (#4490) 2019-10-03 13:56:41 -07:00
Graeme Yeates
23286d6428 Short circuit sortedIndexBy methods for empty arrays (#4496) 2019-10-03 13:56:09 -07:00
Anatoliy Kurochkin
898b378f06 perfomance fixes, eslint fixes (#4482) 2019-09-26 00:58:44 -07:00
jdalton
29eb5713f5 Cleanup baseOrderBy. 2019-08-30 13:44:00 -07:00
Mohit Y
5df1777477 add order by behaviour with array similar to get method (#4453)
* add order by behaviour with array similar to get method

* remove typo for fixing orderby iteratee assignment

* lint fixes

* update test case

* include package-lock from master

* Add identity function for default iteratee
2019-08-30 13:38:49 -07:00
Luiz Américo
ad38dc0115 Prevent ReDos in words (#4450) 2019-08-28 16:07:13 -07:00
Luiz Américo
0e9d44eedb Fix flow and flowRight parameter handling (#4445)
* Enable flow and flowRight tests

* Remove flow and flowRight tests for default value and shortcut fusion

* Use native rest parameters / spread operator in flow and flowRight

* Fix syntax of flow and flowRight examples
2019-08-28 16:06:45 -07:00
Luiz Américo
e51a424513 Fix string methods to handle empty values (#4442)
* Enable strings category methods tests

* Ensure escape, pad, padEnd, padStart, trim, trimEnd, trimStart, unescape return an empty string for falsey values

* Coerce value to string using toString in truncate, capitalize and case methods

* Ensure createCaseFirst returns an empty string for falsey values
2019-08-26 06:13:55 -07:00
Luiz Américo
abb54cc49a Simplify toString (#4441)
* Assume Symbol exists in toString tests

* Use native array map instead of custom one in toString

* Assume Symbol.prototype.toString exists in toString
2019-08-25 13:25:42 -07:00
Luiz Américo
3ebb38d389 Coerce findLastIndex and lastIndexOf fromIndex parameter to integer (#4440)
* Enable lastIndexOf, findLast and findLastIndex

* Coerce findLastIndex fromIndex parameter to integer

* Coerce lastIndexOf fromIndex parameter to integer
2019-08-24 09:44:00 -07:00
Luiz Américo
ed4b3a2ddb Enable case methods tests (#4436) 2019-08-24 09:41:50 -07:00
Luiz Américo
91c9cb1ea3 Ensure escapeRegExp returns an empty string when passing falsy values (#4432)
* Enable escapeRegExp tests

* Ensure escapeRegExp returns an empty string when passing falsy values

* Add parens around expression in escapeRegExp
2019-08-22 16:08:13 -07:00
Luiz Américo
9971765d0c Enable create tests and adapt it for the new primitive prototype behavior (#4418)
* Enable create tests and adapt it for the new primitive prototype behavior

* Use isObject in create tests instead of manual check

* Store properties in a variable when used more than once in create tests

* Add parens around arrow function params in create tests
2019-08-22 16:07:43 -07:00
Luiz Américo
e5f840745b Flatten at paths parameter (#4431)
* Enable at tests

* Flatten at paths parameter
2019-08-22 07:49:36 -07:00
Luiz Américo
1011cfdf4c merge: copy function values independent of source index (#4429)
* merge: copy function values independent of source index

* Enable merge tests
2019-08-22 07:48:28 -07:00
Luiz Américo
2cf08be625 Ensure after n parameter is coerced from NaN to 0 (#4430)
* Enable after tests

* Ensure after n parameter is coerced from NaN to 0
2019-08-22 07:46:46 -07:00
Michał Lipiński
8b441a506b Align indentations 2019-08-20 12:13:07 +02:00
Michał Lipiński
f90d0aec23 Update eslint and eslint-plugin-import 2019-08-20 12:09:33 +02:00
Luiz Américo
e2555a43ad Implement asciiWords and unicodeWords using String.match instead of binding RegExp.exec (#4417)
* Enable words tests
* Implement asciiWords and unicodeWords using String.match instead of binding RegExp.exec
2019-08-18 11:24:56 -07:00
Phap Dinh
15e1557b2a lint files (#4416)
* lint files

* added back arrow-paren and removed duplicate
2019-08-17 10:44:54 -07:00
Luiz Américo
5b4dc54465 Coerce to integer and set default value for chunk size parameter (#4413)
* Enable chunk module tests

* Coerce to integer and set default value for chunk size param
2019-08-17 09:53:11 -07:00
Luiz Américo
37cd5dc97a Coerce drop and dropRight n param using toInteger (#4412)
* Coerce dropRight n param using toInteger

* Coerce drop n param using toInteger
2019-08-16 15:52:06 -07:00
Luiz Américo
a965836cf3 Enable indexOf tests (#4411) 2019-08-16 15:51:17 -07:00
Luiz Américo
ff4949b8c2 Coerce indexOf fromIndex parameter to integer (#4410) 2019-08-16 10:56:41 -07:00
Luiz Américo
4f68e93a43 Add missing isObject import to isIterateeCall (#4409) 2019-08-16 10:53:49 -07:00
Luiz Américo
142cee066d Do not use property shorthand in countBy documentation (#4405) 2019-08-14 21:22:09 -07:00
Luiz Américo
e2ae5b857c Add missing isTypedArray import to baseClone (#4404) 2019-08-14 21:21:27 -07:00
jdalton
f8c7064d45 Cleanup security.md document. 2019-07-23 13:57:47 -07:00
Liran Tal
becd982749 docs(security): add responsible disclosure policy (#4374) 2019-07-23 13:48:17 -07:00
John-David Dalton
dce7fccbb6 Add back accidentally removed semicolons to escape.js. 2019-07-02 16:08:37 -07:00
Jack Works
8bc17fe659 Add support for globalThis when detecting global object (#4347) 2019-07-02 11:35:27 -07:00
lvzhenbang
4df32723c2 fix reTypedTag error (#4342) 2019-06-26 09:11:14 -07:00
Youcef Mammar
abde9319fd Fix typo in merge test (#4334) 2019-06-24 09:17:18 -07:00
James Yang
488e62bd79 Fix stringToPath bug for consecutive [] (#4319) 2019-06-07 09:25:16 -07:00
Yang Jin
8fdf0ed9fa Minor doc format (#4285) 2019-04-28 09:00:44 -07:00
John-David Dalton
6b1d83c968 Fix typo in toPlainObject(). 2019-04-14 22:05:23 -07:00
Amu
c68170b336 Fix findLast missing dependency (#4259) 2019-04-14 09:26:02 -07:00
David Luzar
750067f42d tweak _.clone/_.cloneDeep docs (#4239) 2019-03-18 00:04:04 -07:00
Amu
c541e4ccdc Fix _.maxBy and _.minBy (#4233) 2019-03-11 21:43:45 -07:00
Steve Moser
e7221b96ec Remove --save option as it isn't required anymore (#4199)
* Remove --save option as it isn't required anymore
* Add note about using npm < 5.0.0
2019-02-20 15:36:22 +00:00
Benjamin Tan
d5ef31929a Add initial test files from lodash v4. (#4172)
* Install test dependencies.

* Add initial test files.

These files were created using a simplistic AST manipulator using `recast` to
preserve formatting. There's bound to be a huge chunk of errors, but this serves
as a good start. QUnit was replaced with Mocha, with ES2015 imports running via
`esm`.

As far as possible, QUnit-specific syntax has been replaced with Mocha's
`describe` and `it`, while the native Node.js `assert` module is used for
assertions. Files in the `test` directory ending in `.test.js` will be treated
as test files.

* Add initial passing files to test run.
2019-02-12 09:11:32 -08:00
John-David Dalton
7606ea3e25 Update package.json version. 2019-02-12 09:08:23 -08:00
moonformeli
fe7da41956 Cancel old timer, editing pr #4139 (#4187)
* Cancel old timer, editing pr for $4139
2019-02-11 22:50:11 -08:00
carbureted
3ae8f23bff Locally scope key in keysIn (#4173) 2019-01-27 13:59:41 -08:00
James Garbutt
6248f8a658 use extension resolution (#4163) 2019-01-20 13:57:10 -08:00
moonformeli
f4ca396a79 Use 3 equal signs (#4153)
Like other if statements, use 3 equal signs
2019-01-15 23:57:26 -08:00
moonformeli
afab656cfe Change type check and the way of sending params. (#4145) 2019-01-10 23:45:15 -08:00
John-David Dalton
a7e0428889 Add .github/.lock.yml config for lock bot. 2018-12-26 21:53:45 -06:00
Luiz Américo
238e763aa1 Use native filter instead of custom one where possible (#4116) 2018-12-11 08:26:35 -08:00
Luiz Américo
aa1d7d870d Replace getTag implementation by the one from baseGetTag (remove workarounds) (#4115) 2018-12-11 07:53:23 -08:00
Luiz Américo
c77650a17b Remove check for Symbol.toStringTag field mutations in baseGetTag (#4112) (#4113) 2018-12-10 17:29:53 -08:00
Luiz Américo
6cb1f71adf Assume Symbol is always defined (#4111) 2018-12-10 16:28:20 -08:00
Luiz Américo
4c55ea7068 Use baseGetTag instead of getTag where possible (#4112) 2018-12-10 16:27:28 -08:00
Luiz Américo
7f2ee90c9f Fix baseOrderBy missing dependency (#4105) 2018-12-05 17:12:26 -08:00
Luiz Américo
2130eacf41 Fix baseClone missing dependency (#4104) 2018-12-05 17:11:10 -08:00
Luiz Américo
daf1f1b10b Fix findLast missing dependency (#4103) 2018-12-05 17:10:43 -08:00
Luiz Américo
c33df3147f Re-add keysIn module fixing baseClone and baseMerge (#4099) (#4100) 2018-12-05 17:10:09 -08:00
Luiz Américo
151e316263 Remove check for existence of getOwnPropertySymbols (#4102) 2018-12-04 20:10:48 -08:00
Luiz Américo
8eccdd098a Restore createAssigner (fixes compilation of merge and mergeWith) (#4101) 2018-12-04 20:09:54 -08:00
Luiz Américo
508d46a7a4 Replace MapCache by Map in memoize (#4094) (#4095) 2018-12-01 09:09:30 -08:00
Luiz Américo
3b199c30e0 Remove checks for the Map existence (#4091) 2018-11-30 08:09:58 -08:00
LinWei
377e2d87c8 fix: limit the precision when the precision is negative (#4085) 2018-11-28 07:12:21 -08:00
Luiz Américo
c3740e0847 Remove unnecessary null check in arrayEach (#4082) 2018-11-25 09:24:43 -06:00
Luiz Américo
78854835aa Remove support for PhantomJS in arrayLikeKeys (#4081) 2018-11-25 09:01:03 -06:00
Luiz Américo
4cae8fb22f Remove support for node v0.10 in arrayLikeKeys (#4079) 2018-11-24 21:38:47 -06:00
Luiz Américo
3b96b91991 Call upperFirst directly, instead of capitalize, in camelCase (#4075) (#4077) 2018-11-24 19:10:56 -06:00
Saravyas
136d5253e7 Added arrow function in below files (#4061) 2018-11-17 21:35:31 -06:00
John-David Dalton
580cd4cd1b Remove n_ note for unsupported Node. 2018-11-15 06:46:03 -08:00
alireza-mh
f822dd8d70 Add lodash-es description for ES6 scripts (#4035) 2018-11-15 06:43:48 -08:00
Saravyas
1e939919c0 converted to fat arrow function (#4059) 2018-11-12 23:14:08 -08:00
Michał Lipiński
c4075c18cb Update deps (eslint-plugin-import@2.14.0) 2018-10-29 11:31:45 +01:00
alireza-mh
d9c5082727 add round up description on ceil documentation (#4027)
Signed-off-by: Alireza <alireza.mh@gmail.com>
2018-10-28 07:56:54 -07:00
Jacob B
6bdb8a2f75 Add missing space in uniqWith docblock (#3995) 2018-10-09 16:28:28 -07:00
Muhammad Abdullah
715aae679d add snakeCase example with digit (#3993)
add `snakeCase` example with digit
2018-10-08 07:58:33 -07:00
M Somerville
6018350ac1 Add extended and supplement combining marks ranges (#3932) 2018-09-02 15:00:30 -07:00
Kevin Cooper
4851183757 Update filterObject docs to reference pickBy (#3861)
* Update `filterObject` docs to reference `pickBy`.
2018-07-10 09:47:19 -07:00
Doug Brunner
ab960bdc96 Clarify doc for range usage with single arg (#3854) 2018-06-28 16:45:39 -07:00
John-David Dalton
4ea8c2ec24 Remove unused var from tail(). 2018-06-15 06:20:07 -04:00
John-David Dalton
4ba0f8b612 Remove more methods. 2018-06-15 06:15:16 -04:00
Renjith VK
51c562256b Add example of Array slice (#3823) 2018-06-12 07:36:06 -07:00
Jason Yu
b8dfb7cc14 Create fromEntries.js (#3809)
Rename fromPairs to fromEntries.
2018-06-01 06:33:34 -07:00
John-David Dalton
92a6575137 Avoid skipping set of -0 when an existing +0 exists. [closes #3798] 2018-05-18 08:36:35 -07:00
Michał Lipiński
aff1928482 Tiny style correction in uniqueId and compareMultiple 2018-05-15 10:53:07 +02:00
Michał Lipiński
0d361bc7b6 Remove semicolons from sampleSize and baseClone 2018-05-15 10:50:43 +02:00
Michał Lipiński
1859802d05 Remove trailing space in slice 2018-05-15 10:48:22 +02:00
Todd Wolfson
50860fded2 Added short circuit for typed arrays (#3786) 2018-05-13 09:19:32 -07:00
Ryan Homer
79dc90dfcb Allow compareMultiple to accept compare functions in addition to order strings (#3764) 2018-05-01 12:22:50 -07:00
John-David Dalton
04a66a01e2 Update countBy doc example to be more at a glance friendly. [closes #3771] 2018-05-01 12:21:58 -07:00
John-David Dalton
fe14140c69 Drop version number from readme. 2018-04-24 11:05:59 -07:00
Evan Brodie
a9d3ca8737 Updates version on README header (#3767) 2018-04-24 10:17:55 -07:00
Tyler
224a256f69 Update _.union documentation (#3758)
Clarifying example as per https://github.com/lodash/lodash/issues/3757
2018-04-17 13:34:50 -07:00
Michal Glaus
da0fad328a Fix inclusion of litteral "+" in rsMisc (#3736)
`rsDigits` contained a "+" character but was also used in negated character class.
2018-04-06 06:52:06 -07:00
Joyee Cheung
363fef0efc internal: use util.types to migrate DEP0103 in Node.js (#3704)
- Use require('util').types instead of using process.binding('util')
  to get the type checking helpers
- Rename nodeUtil to nodeTypes since that is what it is for

Refs: https://github.com/nodejs/node/pull/18415
2018-03-23 07:31:36 -07:00
Pahomov
6e4cdc0c5e Fix npm link in README.md (#3700) 2018-03-22 08:38:18 -07:00
Eran Nussbaum
f73b35bb49 Implement defaultToAny method (#3615) 2018-03-08 08:05:12 -08:00
alireza valizade
c1f805f497 use isObjectLike module instead of (typeof value == 'object' && value !== null) in another modules (#3650) 2018-02-19 00:26:01 -08:00
Dean Merchant
678eb000b7 Add string example to isEmpty docs (#3647)
While this is covered in the the description above, there exist examples for arrays and objects and I think this gives 'at a glance' confirmation that the function works as intended with strings.
2018-02-17 10:47:32 -08:00
Юра Панарин
7f24cab7dd add uniq Map for generated ID (#3644) 2018-02-13 09:39:08 -08:00
Jan Niklas Fingerle
54f05aa5cb Update documentation in slice.js (#3631)
Even though #3627 has been closed, negative indexes should be documented.
2018-02-06 08:41:01 -08:00
John-David Dalton
47a6d538f5 Cleanup compareAscending and remove hardcoded locale. 2018-01-26 01:48:10 -08:00
靳晓松
803c05dc68 Support locales in sorting methods (#3602) 2018-01-25 23:15:54 -08:00
Oscar Hallgren
77c128fc20 Changed to function as documented. (#3596) 2018-01-19 16:05:02 -08:00
John-David Dalton
75690245aa Add the accepted customizer arguments to cloneDeepWith docs. 2018-01-14 09:06:30 -08:00
John-David Dalton
e9562a6ce3 Update argument count for cloneWith customizer. [closes #3582] 2018-01-09 10:08:44 -08:00
Matt Lubner
d985dbffb8 rAF as default for debounce/throtte (#3560) (#3567)
Uses rAF by default for debounce/throtte unless `wait` is specified. (#3560)
2018-01-01 12:05:08 -06:00
John-David Dalton
fa73d46885 Enable _.words to detect ordinals in compound words. [closes #3561] 2017-12-29 10:28:08 -06:00
AlexanderLukin
b2ea6b1cd2 Remove duplicated "by which" words from the doc (#3534) 2017-12-06 00:06:26 -08:00
Sean Larkin
3a330e0cb7 feat(sideEffects): Set sideEffects false for opt. (#3533)
This adds the webpack v4 sideEffects optimization. Since we are now in alpha I wanted to help ensure this gets out there so people testing webpack v4 can see the instant wins. <3
2017-12-05 15:45:38 -08:00
GCHQDeveloper500
462bc9bf3b Update license file with MIT title (#3498) 2017-11-18 10:01:18 -08:00
Liang Zhao
40e096b6d5 Fix operator in createMathOperation. (#3499) 2017-11-17 07:04:34 -08:00
Younes Fkihi
8464b184b7 Remove map examples from parseInt and trim (#3487) 2017-11-10 07:45:27 -08:00
Michał Lipiński
c3b3c71b0a Tiny style correction in createMathOperation. 2017-11-08 22:45:41 +01:00
Michał Lipiński
76c2e0accb Revert "Fix typo in escapeRegExp (#3448)"
This reverts commit 102d9e34d7.
2017-11-08 22:40:28 +01:00
Tim Dorr
b36f21cbaf Faster/simpler isPlainObject check (#3483)
Faster/simpler isPlainObject check.

This runs up the prototype chain to check equivalency. When run in a cross-realm environment (differing contexts, iframes, etc), this ensures we're checking the value's prototype matches its context-specific instance of Object. 

This is faster than calling `toString()` on the constructor. There's still the `baseGetTag()` call, which does its own `toString()`, but this swaps out one for cross-realm stuff. It's also a bit simpler to understand, I think.
2017-11-08 11:11:20 -08:00
Nazar Mokrynskyi
e23c874272 Tiny performance improvement by not compiling regular expression each time (#3479) 2017-11-07 06:32:08 -08:00
Younes Fkihi
424d9fc34e Fix typo in inRange (#3478) 2017-11-06 13:44:18 -06:00
JiaWen Peng
30d305da0f Modify the logic to make the code more intuitive (#3472) 2017-11-04 07:08:43 -05:00
JiaWen Peng
7c006f7445 Fix #3466 (#3467) 2017-11-01 20:38:28 -07:00
Younes Fkihi
102d9e34d7 Fix typo in escapeRegExp (#3448) 2017-10-25 12:57:20 -07:00
Matthew Dordal
e8c87cfc45 Ignore log files that end with random numbers (#3445) 2017-10-23 09:23:41 -07:00
Younes Fkihi
bcd2c35604 Fix typo in parseInt (#3433) 2017-10-18 00:44:38 -07:00
Michał Lipiński
413a38cdf2 Remove trailing space in sortedUniq. 2017-10-16 12:04:12 +02:00
Michał Lipiński
bf5d0867a6 Remove semicolons from dropRight. 2017-10-16 12:01:05 +02:00
Lukas Drgon
00705afc19 Add jsDelivr hits badge (#3418) 2017-10-09 09:34:07 -07:00
Dmitri Rabinowitz
270ca7166a Add missing keysIn import for baseClone.js (#3413) 2017-10-05 09:48:42 -07:00
KaranJariwala
3ab99065ad Verbiage change (#3408)
'T' missing in This.
2017-10-02 20:51:18 -07:00
John-David Dalton
1b1bb79b05 Commit and whitespace nits in debounce. 2017-10-01 19:55:40 -07:00
Christopher James Calo
6ad829fa90 Add pending() function to debounce and throttle to fix #3387 (#3388) 2017-09-27 07:43:46 -07:00
Shawn Steffey
f5ea579db3 Fixes param definition (#3368)
Bitmask is number
2017-09-13 10:07:46 -07:00
Michał Lipiński
8e631dfcd4 Faster testing against first char in stringToPath (to close #3308). 2017-08-14 10:27:49 +02:00
Nisse Bergman
03e23ecc19 clarify documentation about sortedUniq (#3310)
clarify that sortedUniq only works on sorted arrays
2017-08-09 00:51:47 -07:00
John-David Dalton
a0a3a6af91 Fix typo in findKey. 2017-08-07 01:18:04 -07:00
James
c2616dd4f3 Remove useless return in setToPairs. (#3286) 2017-07-30 23:43:21 -07:00
James
76c1ed2fd4 avoid shadowing result (#3280)
related e908519fc3
2017-07-25 15:06:15 -07:00
Doug Cone
527b167bc5 _.update() docs grammar fix (#3264) 2017-07-16 18:10:59 -07:00
Michał Lipiński
bcd13b270d Fixin loop args order regression from 3c2795b in invertBy. 2017-07-14 13:25:15 +02:00
Michał Lipiński
536f09b68c Fixin loop args order regression from 3c2795b in invert. 2017-07-14 13:20:29 +02:00
John-David Dalton
01148a1df8 Avoid using the values toString method in _.invert if it’s not a function. [closes #3260] 2017-07-12 07:45:55 -07:00
吕铭印
534296bba4 Update dropRight.js (#3241) 2017-07-03 11:15:51 -07:00
James
e908519fc3 stringToPath: avoid shadowing variable (#3226)
- remove the shadowing done using `string` variable declared in upper scope
2017-06-26 23:32:38 -07:00
JD Isaacks
61acdd0c29 default prefix to empty string (#3214)
This starting returning NaN for me. It looks like it is trying to add undefined + number when there is no prefix.
2017-06-20 14:55:44 -07:00
John-David Dalton
bacaaaef8a Support symbols in property paths of set. [closes #3189] 2017-06-06 07:06:47 -07:00
Michał Lipiński
b107653a0f A better fix for tag scope in baseClone. 2017-05-18 22:36:38 +02:00
Michał Lipiński
8620733457 Fixin tag scope in baseClone. 2017-05-18 20:41:00 +02:00
Michał Lipiński
0274d3dd2d Always use parentheses in arrow functions (fixin 67a3fb9). 2017-05-18 20:33:55 +02:00
Hubert Argasinski
f659da740d Fix CoC link in .github/CONTRIBUTING.md (#3156) 2017-05-13 13:06:02 -07:00
Michał Lipiński
0b31164008 Complete wrapper modules removal for setToString (c6854fa). 2017-05-09 21:02:12 +02:00
Prateek Saxena
f6827f482d Fix CoC link in REAMDE (#3138) 2017-05-03 09:30:46 -07:00
John-David Dalton
5dce119b9f Cleanup baseClone. 2017-04-29 21:48:48 -07:00
Aaron Greenberg
67a3fb99ef Fix cloneDeep with circularly dependent Sets/Maps (#3123) 2017-04-24 14:55:12 -07:00
John-David Dalton
f03b3edca4 Update object checks. 2017-04-23 22:15:51 -07:00
Michał Lipiński
a6019d5316 Fixin repeat import. 2017-04-23 21:57:54 +02:00
Michał Lipiński
ae4e45d8f9 Fixin filter imports. 2017-04-20 21:49:57 +02:00
John-David Dalton
08a3f533b7 Use Array#splice directly. 2017-04-19 12:23:00 -07:00
John-David Dalton
65b148a3b2 Remove mergeData. 2017-04-19 00:01:10 -07:00
Michał Lipiński
4092747dde Fixin some and every imports. 2017-04-18 09:44:50 +02:00
Michał Lipiński
bb059c0f64 Fixin new map imports. 2017-04-18 09:33:58 +02:00
John-David Dalton
e5e8f35c06 Remove baseSlice. 2017-04-17 21:06:27 -07:00
John-David Dalton
a023f92049 Fix typo in find. 2017-04-16 16:06:30 -05:00
John-David Dalton
58e484f389 Remove baseKeys and baseKeysIn. 2017-04-16 15:57:02 -05:00
John-David Dalton
aa5e1b2fe0 Fix object coercion. 2017-04-16 15:30:42 -05:00
John-David Dalton
e2941dda3b Fix typos. 2017-04-16 08:57:46 -05:00
John-David Dalton
64a9975488 Split filter out. 2017-04-16 08:49:26 -05:00
John-David Dalton
8b74809f1c Simplify mapKey and mapValue. 2017-04-15 23:23:17 -05:00
John-David Dalton
0bdc73195f Split map out. 2017-04-15 23:22:49 -05:00
John-David Dalton
73ce6066f8 Fix jsdoc for every and some. 2017-04-15 23:08:47 -05:00
John-David Dalton
8a51574acf Rename mapKeys and mapValues to mapKey and mapValue. 2017-04-15 22:59:53 -05:00
Michał Lipiński
e02db41f99 Proper style npm script execution (#3103). 2017-04-14 13:18:47 +02:00
Jordan Eldredge
b79b715383 Enable no-unexpected-multiline (#3103)
This rule can help catch errors introduced by automatic semicolon insertion
edge cases. It seems like a sensible thing to have enabled in a code base that
does not use semicolons.

http://eslint.org/docs/rules/no-unexpected-multiline
2017-04-12 15:18:14 -07:00
Michał Lipiński
aafd66da62 Last spacing in template string expressions. 2017-04-10 10:05:25 +02:00
Michał Lipiński
f888dfe4f8 Adjust eslint settings to new requirements (d10b44b). 2017-04-10 09:31:01 +02:00
John-David Dalton
b89854766a Rename someValues to someValue. 2017-04-09 22:59:45 -07:00
John-David Dalton
23ae2c537d Split out every into everyValue. 2017-04-09 22:59:31 -07:00
John-David Dalton
d10b44bdef Adjust spacing in template string expressions. 2017-04-08 22:41:48 -07:00
John-David Dalton
303502efa7 Remove toSource. 2017-04-08 22:23:09 -07:00
John-David Dalton
3390d9309b Remove internal hasPath. 2017-04-07 08:19:32 -07:00
Michał Lipiński
99fb4c8ff7 Fixin scope range for var declarations in internal version of hasPath. 2017-04-06 22:44:15 +02:00
Michał Lipiński
b506174410 Use more for-of 2017-04-05 09:05:58 +02:00
Michał Lipiński
2538a56577 Math them all. 2017-04-04 22:38:50 +02:00
Michał Lipiński
bbd59f800b Catch undeclared vars with eslint. 2017-04-04 22:38:12 +02:00
Michał Lipiński
7c92111067 Fixin scope range for var declarations in hasPath and hasPathIn. 2017-04-04 20:37:52 +02:00
Michał Lipiński
96ebd44509 Fixin missing references in repeat. 2017-04-04 20:35:33 +02:00
Michał Lipiński
645acd4275 Fixin declaration in someValues (571e752). 2017-04-04 19:22:54 +02:00
Michał Lipiński
402ca89c50 Fixin declaration in baseSum (3e2b0bb). 2017-04-04 19:15:11 +02:00
John-David Dalton
3e2b0bb763 Use more for-of 2017-04-03 10:36:11 -07:00
John-David Dalton
f3957ac416 Remove replaceHolders. 2017-04-03 10:36:11 -07:00
John-David Dalton
571e752a42 Rename someObj to someValues. 2017-04-03 10:14:20 -07:00
Michał Lipiński
ca2fd5c64a Remove semicolons. 2017-04-03 11:55:12 +02:00
Michał Lipiński
53cac4eef4 ESify find implementation. 2017-04-03 11:53:13 +02:00
Michał Lipiński
6dc03831d8 Add semi option to eslint config. 2017-04-03 11:50:23 +02:00
John-David Dalton
6543d3277e Add someObj. 2017-04-02 22:33:51 -07:00
John-David Dalton
1bdda20e49 Reimplement find. 2017-04-02 22:33:38 -07:00
Charles Merriam
b679e9cc22 Update _.pad* examples to show pad length < string. (#3088)
One example now shows that specifying a padding length of less than the
length of the string returns the entire original string.
2017-03-30 12:55:00 -07:00
Roman Gusev
43a520c971 Remove constant function from examples (#3086) 2017-03-30 09:42:45 -07:00
Roman Gusev
64d92ddf32 Remove stubTrue from cond example (#3085) 2017-03-30 07:44:14 -07:00
John-David Dalton
dad1fccdb4 Remove unused internal createCtor. 2017-03-27 14:18:21 -07:00
John-David Dalton
6d19563a9f Simplify words. 2017-03-27 14:09:52 -07:00
Michał Lipiński
8be26ac755 Implement baseEach and baseEachRight since createBaseFor is gone. 2017-03-27 22:58:39 +02:00
John-David Dalton
d7bdf0ae25 Remove createCompounder. 2017-03-26 21:38:25 -07:00
John-David Dalton
4b80666a30 Simplify tail. 2017-03-24 08:18:16 -07:00
John-David Dalton
ecb3c108d1 Simplify flip. 2017-03-23 23:19:55 -07:00
John-David Dalton
8db488b943 Remove getRawTag and objectToString. 2017-03-22 21:34:52 -07:00
Michał Lipiński
a8abced07a Fixin keysIn import in getAllKeysIn by switching to baseKeysIn. 2017-03-22 22:55:03 +01:00
John-David Dalton
f7a6cddc9e Remove nativeKeys and nativeKeysIn. 2017-03-21 22:23:03 -07:00
John-David Dalton
f3e0cbe5bf Use more Array#map. 2017-03-20 22:33:32 -07:00
John-David Dalton
0acb2847bf Remove toString use from castPath. 2017-03-17 23:51:03 -07:00
John-David Dalton
3c324a716d Remove toString use from createCaseFirst. 2017-03-16 23:41:37 -07:00
Michał Lipiński
76ab9cd539 Adjust styling of array checks in head, uniq, uniqBy and uniqWith to other methods. 2017-03-16 22:48:46 +01:00
John-David Dalton
929a996987 Remove arrayReduce from createCompounder. 2017-03-15 22:35:14 -07:00
John-David Dalton
164bc71328 Remove toString from createCompounder. 2017-03-15 22:34:15 -07:00
John-David Dalton
9d11b48ce5 Remove toUpper and toLower. 2017-03-14 23:29:32 -07:00
John-David Dalton
b8a3a42278 Remove toString coercion method use. 2017-03-14 23:29:32 -07:00
Michał Lipiński
351e44a127 Fixin some leftovers bb7c959. 2017-03-14 23:29:32 -07:00
Michał Lipiński
f983ff2b7c Prefere ES6 templates. 2017-03-14 23:29:31 -07:00
John-David Dalton
bb7c959479 Remove coercion method use. 2017-03-13 20:58:03 -07:00
John-David Dalton
2f281c68b0 Remove baseNth. 2017-03-12 23:24:54 -07:00
John-David Dalton
c89637e4db Use more destructuring. 2017-03-12 23:16:34 -07:00
John-David Dalton
ad3236a859 Remove countHolders. 2017-03-12 23:16:21 -07:00
Michał Lipiński
98969648e9 Say goodbye to jscs. 2017-03-12 19:58:58 +01:00
Michał Lipiński
3e03cbf2b8 Use const and let for var declaration in baseEach and baseEachRight. 2017-03-12 19:53:08 +01:00
John-David Dalton
3b302b822c Remove baseClamp. 2017-03-12 00:06:58 -08:00
John-David Dalton
fa8c607742 Update baseEach modules. 2017-03-11 21:41:07 -08:00
Michał Lipiński
4c77d8807c Cleanup and sort eslint settings for future use. 2017-03-09 21:50:47 +01:00
John-David Dalton
357ce4663f Remove concat. 2017-03-08 23:05:09 -08:00
Michał Lipiński
b247502116 Porting applicable jscs configuration to eslint.
* jsdocs validation off now
2017-03-08 23:42:33 +01:00
John-David Dalton
5f2a03076d Use the new operator with the Array constructor. 2017-03-07 22:07:04 -08:00
John-David Dalton
9260bd2f57 Remove baseTimes. 2017-03-07 21:50:53 -08:00
Michał Lipiński
41a8d2272e Consistent use (always) of parentheses in arrow functions. 2017-03-07 21:57:21 +01:00
John-David Dalton
7ffe700d66 Remove join. 2017-03-06 23:05:28 -08:00
Michał Lipiński
49ac4a5b52 Consistency for eslint arrow-parens. 2017-03-06 10:57:45 +01:00
Michał Lipiński
59e45d99f2 Fixin assignment to constant. 2017-03-06 10:42:27 +01:00
John-David Dalton
bda6d56c60 Remove guard params. 2017-03-05 02:37:18 -08:00
John-David Dalton
89829331f0 Remove baseFill. 2017-03-05 02:29:38 -08:00
John-David Dalton
3c2795b816 Remove baseForOwn from several modules. 2017-03-05 00:30:14 -08:00
John-David Dalton
17f7069d07 Remove isIterateeCall. 2017-03-05 00:30:06 -08:00
John-David Dalton
ba52c744ae Avoid let lists. 2017-03-02 10:03:12 -08:00
John-David Dalton
e7bbcfa72b Use const for key in hasPath. 2017-03-01 23:05:25 -08:00
John-David Dalton
a2fe303463 Indent nit. 2017-03-01 23:05:25 -08:00
Michał Lipiński
e2096c0ef1 Fixin keysIn import in defaults by switching to baseKeysIn. 2017-03-01 14:39:47 +01:00
John-David Dalton
d0f23b67ac Use consistent nullish check for array. 2017-03-01 00:36:01 -08:00
John-David Dalton
46ffbc1d90 Cleanup hasPath modules. 2017-02-27 23:01:51 -08:00
Michał Lipiński
d8b5183b1d Consistent parens usage for arrow functions with body. 2017-02-27 12:15:08 +01:00
John-David Dalton
4c4b29cdef Expose hasPath and hasPathIn. 2017-02-26 23:08:19 -08:00
John-David Dalton
b6a426a10d Simplify has and hasIn. 2017-02-26 23:07:29 -08:00
John-David Dalton
d1d86811bc Use parens for single params too. 2017-02-25 20:22:39 -08:00
John-David Dalton
2fd70c8eca Ensure toString coerces nullish values in arrays to strings. 2017-02-25 20:22:25 -08:00
Mark Pollmann
3e80dffd48 Fixed small typo in debounce docs (#3029)
Just a small thing I noticed, I think it reads better this way.
2017-02-25 13:50:20 -08:00
John-David Dalton
7cc1328bf1 Simplify functions. 2017-02-24 23:52:03 -08:00
John-David Dalton
ffcb38f74d Remove isFunction use. 2017-02-24 23:52:03 -08:00
John-David Dalton
37f168d466 Remove apply. 2017-02-24 23:51:57 -08:00
John-David Dalton
b9c61eea60 Remove rearg. 2017-02-22 16:48:11 -08:00
Michał Lipiński
1e8ac50ab5 Missing iteratee call in countBy (missed in 5baad4d). 2017-02-22 22:28:42 +01:00
John-David Dalton
56b7d339a6 Remove arrayPush in favor of spreading arguments. 2017-02-21 10:35:22 -08:00
John-David Dalton
0350d4904f Remove baseWrapperValue. 2017-02-21 10:35:22 -08:00
Michał Lipiński
5baad4df10 Missing iteratee call in groupBy and keyBy. 2017-02-21 10:40:51 +01:00
Michał Lipiński
aaef6f6737 Cleanup imports in baseClone and baseMergeDeep. 2017-02-21 10:12:51 +01:00
John-David Dalton
2a3296111d Simplify concat. 2017-02-20 23:28:46 -08:00
Michał Lipiński
3a375c0ae1 Fixin vars declaration inside templating fn because they cannot be declared as const.
+ minor eslint fixes
2017-02-20 14:37:13 +01:00
Michał Lipiński
31500cd6e4 Fixin missing accumulator return in keyBy. 2017-02-19 22:00:35 +01:00
Michał Lipiński
b4e815c04b Eslint cleanup for shared modules. 2017-02-18 23:31:42 +01:00
John-David Dalton
27644a7bd5 Remove reverse module. 2017-02-18 09:13:33 -08:00
Michał Lipiński
e52ed26c7a Fixin missing accumulator return in reduce and predicate call in partition. 2017-02-18 16:58:15 +01:00
Michał Lipiński
0369bf7afe Replace one time used variables with their original refs in random. 2017-02-18 16:40:38 +01:00
Michał Lipiński
16413cc32a Eslint cleanup (imports left), except template. 2017-02-17 23:22:07 +01:00
Michał Lipiński
753e47de13 Esling ES6 rules for current codebase. 2017-02-17 23:03:26 +01:00
Michał Lipiński
b87bd5250b Minimal eslint config. (#3015) 2017-02-17 22:15:52 +01:00
Michał Lipiński
a61f41a79a Complete baseRandom removal (cb7612a). 2017-02-16 18:49:36 +01:00
Michał Lipiński
53dba0a211 Complete semicolons removal (6cb3460). 2017-02-16 18:43:31 +01:00
John-David Dalton
86e8437514 Remove spread module. 2017-02-15 23:32:40 -08:00
Michał Lipiński
2d83592273 Fixin value typo. (#3010) 2017-02-15 07:20:48 -08:00
Michał Lipiński
2baf7a3e9e Fixin arrayPush imports. (#3008) 2017-02-15 01:21:24 -08:00
Michał Lipiński
677c01b753 Complete stubs removal (c5c0ff7). (#3007) 2017-02-15 01:16:56 -08:00
John-David Dalton
43bcecf52f Fix iteration order if sources in defaults. 2017-02-13 17:36:27 -08:00
John-David Dalton
e31e1306c8 Inline baseToString into toString. 2017-02-13 08:07:43 -08:00
Michał Lipiński
135cb0ad88 Fixin imports in invert methods. (#3002) 2017-02-13 08:05:18 -08:00
Michał Lipiński
3411cce1d2 Fixin imports in invoke. (#3001) 2017-02-13 08:03:41 -08:00
Michał Lipiński
4f3ef2e8d8 Fixin import path to copyArray. (#3000) 2017-02-13 08:02:46 -08:00
Michał Lipiński
a822979881 Correct name of var and add missing import. (#2999) 2017-02-13 08:01:40 -08:00
John-David Dalton
8429c1db36 Minor format not in isKey. 2017-02-11 23:11:01 -08:00
wikibootup
d007878935 Remove duplicate check symbol type (#2996) 2017-02-11 11:42:20 -08:00
John-David Dalton
b3810c2afa Remove baseAssign modules. 2017-02-10 17:38:12 -08:00
John-David Dalton
d931d6e8e8 Simplify isType methods. 2017-02-10 17:38:12 -08:00
Michał Lipiński
d460c42230 Complete identity removal module. (#2993) 2017-02-10 17:38:02 -08:00
Michał Lipiński
39931f9eaa Unescape with broken regexp (#2992) 2017-02-10 17:37:38 -08:00
Michał Lipiński
477fdb2cf2 Template broken after remove semicolons action (#2991) 2017-02-10 17:37:22 -08:00
Michał Lipiński
f5b2031211 Additional fix for b0980a9 Remove baseCreate. (#2988) 2017-02-10 17:37:04 -08:00
Michał Lipiński
b37e973463 unescape broken after remove semicolons action (#2986) 2017-02-10 17:36:47 -08:00
Michał Lipiński
2ab6da5b51 fix baseMean usage in mean (#2985) 2017-02-10 17:36:15 -08:00
John-David Dalton
5fe15a160d Simplify defaults. [closes #2983] 2017-02-08 11:26:59 -08:00
John-David Dalton
8f8b29368e Simplify method juggle in trim modules. 2017-02-07 17:55:40 -08:00
John-David Dalton
5e38259044 Expand stringToPath to matching more non-string expressions. 2017-02-07 10:48:46 -08:00
John-David Dalton
30c32908a3 Use “composes” to describe flow/flowRight. [closes #2979] 2017-02-07 07:54:20 -08:00
John-David Dalton
3b125166d5 Make the comment more generic. 2017-02-07 02:13:08 -08:00
John-David Dalton
fdd7a5b8d2 Minor cleanup in stringToPath. 2017-02-07 01:52:27 -08:00
John-David Dalton
62a88ce256 Allow regexp to be minified better. 2017-02-07 01:48:00 -08:00
John-David Dalton
04348ab176 Newline nit in trimEnd. 2017-02-07 01:43:52 -08:00
John-David Dalton
47abf76e88 Comment the scary regexp. 2017-02-07 01:43:30 -08:00
John-David Dalton
cb7612aef6 Simplify shuffle and sample. 2017-02-06 23:53:17 -08:00
John-David Dalton
b0980a90fc Remove baseCreate. 2017-02-05 23:44:30 -08:00
John-David Dalton
7479d282bc Minor var order juggle in compact. 2017-02-05 22:45:15 -08:00
John-David Dalton
23c0bc0e7a Use new operator to invoke the array.constructor. 2017-02-05 22:44:38 -08:00
John-David Dalton
5219385eb2 Use consistent null check in head. 2017-02-05 22:31:39 -08:00
John-David Dalton
6cb3460fce Remove semicolons. 2017-02-05 22:22:04 -08:00
John-David Dalton
f3a8e55e70 Use built-in String#trim methods when possible. 2017-02-03 22:49:18 -08:00
ecmadao
9d445ec238 bugfixed in zip & concat funcs (#2971) 2017-02-03 09:55:33 -08:00
John-David Dalton
ac53cc7d69 Use the built-in partial feature of modern setTimeout. 2017-02-02 23:26:04 -08:00
John-David Dalton
c068eedcf3 Remove identity module. 2017-02-01 21:46:38 -08:00
John-David Dalton
a6ff1ea9d5 Rename isEqual to eqDeep. 2017-01-30 00:03:45 -08:00
John-David Dalton
41133cf40f Remove the constant module. 2017-01-28 23:33:05 -08:00
John-David Dalton
42b48b3d86 Cleanup baseClone. [closes #2961] 2017-01-27 23:21:05 -08:00
Roman Gusev
a0b928dfbb Remove extra spaces from jsdoc (#2958) 2017-01-27 06:22:58 -08:00
John-David Dalton
3c5b828d7e Use Object.assign in create. 2017-01-24 10:44:42 -08:00
John-David Dalton
bac4291086 Simplify toPlainObject. 2017-01-24 10:44:22 -08:00
John-David Dalton
868fd1253b Make lower param of clamp required. [closes #2949] 2017-01-24 10:32:12 -08:00
John-David Dalton
c5c0ff77b6 Remove stubs. 2017-01-19 15:25:51 -08:00
John-David Dalton
54abb96a85 Remove “in” variants. 2017-01-19 15:25:40 -08:00
John-David Dalton
c5dac98e1d Remove more modules that have ES equivs. 2017-01-19 15:24:04 -08:00
John-David Dalton
999022d647 Remove includes module. 2017-01-19 14:54:57 -08:00
John-David Dalton
85255da560 Add construction emojis. 2017-01-19 14:13:35 -08:00
Jure Triglav
c8285a41bc Update with info about the state of master (#2941) 2017-01-19 13:49:24 -08:00
John-David Dalton
ee1c64fafe Even more tag cleanup. 2017-01-19 13:33:14 -08:00
John-David Dalton
73df84c0b4 More tag cleanup. 2017-01-19 11:48:11 -08:00
John-David Dalton
be6a50b0ed Cleanup tag order. 2017-01-19 11:45:31 -08:00
Bert Verhelst
401016d260 Add related function for each module. [closes #2932] 2017-01-16 23:51:23 -08:00
John-David Dalton
b856263af6 Replace deburr with toString in createCompounder. 2017-01-12 12:11:19 -08:00
John-David Dalton
085dc1aa01 Consolidate template modules. 2017-01-12 11:05:53 -08:00
John-David Dalton
563059c4b9 Consolidate invoke modules. 2017-01-12 10:56:23 -08:00
John-David Dalton
168322fda5 Remove more creator modules. 2017-01-11 15:58:20 -08:00
John-David Dalton
f5e7671fbc Use destructuring in code samples. 2017-01-11 13:41:14 -08:00
John-David Dalton
d80077ed94 Consolidate aggregate modules. 2017-01-11 12:31:21 -08:00
John-David Dalton
3b4cbc70e7 Consolidate over modules. 2017-01-11 12:11:56 -08:00
John-David Dalton
36927bff8b Consolidate invert modules. 2017-01-11 10:39:30 -08:00
John-David Dalton
dcded33f58 Remove min and max modules. 2017-01-11 10:28:02 -08:00
John-David Dalton
fe5c7a7f3b Consolidate toPairs modules. 2017-01-11 10:22:56 -08:00
John-David Dalton
aa60e55db4 Update module paths. 2017-01-11 10:06:12 -08:00
John-David Dalton
7baf2267a0 Cleanup createRound. 2017-01-11 10:00:00 -08:00
John-David Dalton
c6854fa8fc Remove wrapper modules. 2017-01-11 08:11:07 -08:00
John-David Dalton
454219fbfe Simplify flow modules. 2017-01-11 08:11:00 -08:00
Bjarne Øverli
379b7a057c Minor cleanup to createFlow. [closes #2925] 2017-01-11 08:08:59 -08:00
John-David Dalton
34ca4f3efa Consolidate relational modules. 2017-01-11 00:11:42 -08:00
John-David Dalton
11052f4d87 Cleanup baseRandom. 2017-01-11 00:03:53 -08:00
John-David Dalton
401c0f053c Consolidate max and min modules. 2017-01-11 00:03:28 -08:00
John-David Dalton
6c54ae2ae5 Consolidate delay modules. 2017-01-10 21:25:56 -08:00
John-David Dalton
70379910f7 Simplify baseCreate. 2017-01-10 21:25:41 -08:00
John-David Dalton
41e6991d2e Use index instead of charAt. 2017-01-10 21:09:14 -08:00
John-David Dalton
3b990b7916 Minor formatting nits. 2017-01-10 21:08:02 -08:00
John-David Dalton
dc4671dd0d Simplify isTypedArray. 2017-01-10 20:36:37 -08:00
John-David Dalton
b2504adb30 Fix isFlattenable. 2017-01-10 20:36:37 -08:00
John-David Dalton
e45db2e507 Remove baseGetAllKeys. 2017-01-10 20:36:37 -08:00
John-David Dalton
e52c421c1d Remove overArg. 2017-01-10 20:36:28 -08:00
John-David Dalton
0aa7a62dc3 Simplify asciiSize. 2017-01-10 17:49:05 -08:00
John-David Dalton
b6bdb23ffd Remove getPrototype. 2017-01-10 17:44:48 -08:00
John-David Dalton
003c11c36b Cleanup stringToPath. 2017-01-10 17:25:48 -08:00
John-David Dalton
c5d4bb8dcb Consolidate escape and unescape modules. 2017-01-10 17:09:40 -08:00
John-David Dalton
fc1a360212 Remove isFinite and isNaN. 2017-01-10 14:45:40 -08:00
John-David Dalton
4ecd69e4fa Simplify isType modules. 2017-01-10 14:43:43 -08:00
John-David Dalton
b2f69ea36a Remove baseLodash. 2017-01-10 11:18:05 -08:00
John-David Dalton
71f49dda0f Move Stack modules into Stack. 2017-01-10 11:10:08 -08:00
John-David Dalton
c64a3bd3df Move SetCache modules into SetCache. 2017-01-10 10:24:52 -08:00
John-David Dalton
0cd28f982d Move MapCache modules into MapCache. 2017-01-10 10:17:58 -08:00
John-David Dalton
400b5c09d7 Move ListCache modules into ListCache. 2017-01-10 10:07:19 -08:00
John-David Dalton
69cac05575 Move Hash modules into Hash. 2017-01-10 10:06:28 -08:00
John-David Dalton
20befcdf84 Remove getView. 2017-01-10 10:05:41 -08:00
John-David Dalton
ef2c4bf5e1 Update doc examples to ES2015. 2017-01-10 01:46:24 -08:00
John-David Dalton
8c97051909 Remove “static” jsdoc tag. 2017-01-10 01:09:46 -08:00
John-David Dalton
c500b2cc16 Rearrange tag check order in isFunction. 2017-01-10 00:48:15 -08:00
John-David Dalton
26ea38dcf4 Move internal modules to “internal” folder. 2017-01-10 00:45:05 -08:00
John-David Dalton
2b05673125 Remove unneeded comment from memoize. 2017-01-09 20:44:41 -08:00
John-David Dalton
8bc7e006db Assume ES5+ built-ins exist. 2017-01-09 19:51:05 -08:00
John-David Dalton
8501b0c2ef Remove _realNames. 2017-01-09 18:52:08 -08:00
John-David Dalton
6d28724e48 Inline FUNC_ERROR_TEXT. 2017-01-09 18:51:09 -08:00
John-David Dalton
71039740c3 Simplify isArguments. 2017-01-09 18:45:39 -08:00
John-David Dalton
6434747ef6 Use Date.now. 2017-01-09 18:45:39 -08:00
John-David Dalton
68190b8546 Use Array.isArray. 2017-01-09 18:45:33 -08:00
John-David Dalton
395a81058b Remove noop. 2017-01-09 18:38:36 -08:00
John-David Dalton
82e681a191 Remove _getFuncName. 2017-01-09 18:32:56 -08:00
John-David Dalton
1392d37ca2 Simplify _createFlow. 2017-01-09 18:32:48 -08:00
John-David Dalton
627bfe6bfa Remove arguments references where possible. 2017-01-09 18:30:38 -08:00
John-David Dalton
f2c49500ee Consolidate prototype vars used only once. 2017-01-09 18:16:47 -08:00
John-David Dalton
bc4262f901 Remove core-js guard. 2017-01-09 18:07:23 -08:00
John-David Dalton
44950212a0 Cleanup built-in constructor modules. 2017-01-09 17:56:33 -08:00
John-David Dalton
9e467f872e Remove _wrapperClone module. 2017-01-09 17:56:12 -08:00
John-David Dalton
db4bbc9b47 Fix __data__ typos. 2017-01-09 17:47:31 -08:00
John-David Dalton
77cc37ba49 Remove references to _. 2017-01-09 17:38:33 -08:00
John-David Dalton
65654f8f9e Remove baseIteratee and castFunction. 2017-01-09 17:31:55 -08:00
John-David Dalton
efcf51c7bf Remove unary helpers. 2017-01-09 17:31:54 -08:00
John-David Dalton
59124c4cfe Remove category modules. 2017-01-09 17:31:49 -08:00
John-David Dalton
aacfefc752 Remove remaining rest helper use. 2017-01-09 16:03:54 -08:00
John-David Dalton
648722f1a6 Apply class transform. 2017-01-09 14:01:20 -08:00
John-David Dalton
c2208f82dc Convert remaining vars to let/const. 2017-01-09 13:53:41 -08:00
John-David Dalton
40e9c66ca6 Remove more unused modules. 2017-01-09 13:01:51 -08:00
John-David Dalton
dc687c1d85 Apply even more let/const transforms. 2017-01-09 13:00:52 -08:00
John-David Dalton
e6152a97e8 Fix syntax typo. 2017-01-09 12:20:58 -08:00
John-David Dalton
4d0c15b49e Apply more let/const transforms. 2017-01-09 12:20:58 -08:00
John-David Dalton
ca9e6fa087 Fix style nits. 2017-01-09 12:20:58 -08:00
John-David Dalton
10f64ee9c4 Apply let/const transform. 2017-01-08 23:37:20 -08:00
John-David Dalton
4c881b2726 Apply template string transform. 2017-01-06 18:02:01 -08:00
John-David Dalton
41ad5e901f Apply destructuring transform. 2017-01-06 15:52:32 -08:00
John-David Dalton
bf54267f0b Apply rest arguments transform. 2017-01-06 15:49:42 -08:00
John-David Dalton
f4a6e9ede9 Apply spread arguments transform. 2017-01-06 15:42:44 -08:00
John-David Dalton
7167d7e09f Apply arrow function transform. 2017-01-06 15:41:39 -08:00
John-David Dalton
d461c87979 Remove _customOmitClone module. 2017-01-06 07:51:23 -08:00
John-David Dalton
0e24641cb8 Continue to use more ES2015. 2017-01-06 07:51:23 -08:00
John-David Dalton
1a1e462f80 Use more ES2015. 2017-01-06 07:51:23 -08:00
John-David Dalton
2900cfd288 Modularize master branch. 2017-01-06 07:51:22 -08:00
John-David Dalton
912d6b04a1 Bump to v4.17.4. 2017-01-06 07:51:17 -08:00
John-David Dalton
165572022d Rebuild lodash and docs. 2017-01-06 07:50:36 -08:00
John-David Dalton
ae467c7313 Update deps. 2017-01-06 07:50:36 -08:00
John-David Dalton
1e80c19b0f Remove dead “modern environments” link from readme. [ci skip] 2017-01-06 07:50:29 -08:00
John-David Dalton
6eeafd3dc2 Update kitchen sink size. [ci skip] 2016-12-31 00:52:52 -06:00
John-David Dalton
e33b15674d Ensure _.omit doesn’t mutate object with deep paths. [closes #2912] 2016-12-30 18:09:11 -06:00
John-David Dalton
a23b918bef Increment package version to enable ci tests. 2016-12-30 18:07:58 -06:00
John-David Dalton
ef618992b5 Bump to v4.17.3. 2016-12-26 10:43:11 -06:00
John-David Dalton
708b962860 Rebuild lodash and docs. 2016-12-26 10:43:11 -06:00
John-David Dalton
da2d08d771 Update deps. 2016-12-26 10:43:11 -06:00
John-David Dalton
30863e5fa6 Fix conversion of npm package and source doc links. [ci skip] 2016-12-26 10:43:05 -06:00
John-David Dalton
6672a4f942 Update fp doc template for fp.reduceRight iteratee argument order. [ci skip] 2016-12-24 11:21:51 -06:00
John-David Dalton
f7263047bf Use a strict undefined check for arity in createWrap. 2016-12-21 15:23:54 -06:00
John-David Dalton
02fdf4e673 Wrap in ternary value within hashHas in parens for clarity. 2016-12-21 15:23:54 -06:00
John-David Dalton
e2c703a96f Avoid more coercion. 2016-12-21 15:23:54 -06:00
John-David Dalton
32fdfcc1e5 Avoid coercing position in _.startsWith, if it’s undefined. 2016-12-21 12:34:28 -06:00
John-David Dalton
6c1ae0b54d Update Safari in sauce. 2016-12-21 00:19:59 -06:00
John-David Dalton
0c1c87b046 Update Firefox in sauce. 2016-12-20 16:54:40 -06:00
John-David Dalton
b51786e72e Fix lazy sequence test fails. 2016-12-20 16:54:40 -06:00
John-David Dalton
5ee5099af1 Update code skipped on the coverage run. 2016-12-20 16:54:40 -06:00
John-David Dalton
482dc9478b Remove array length limit for lay evaluation. [closes #2874] 2016-12-20 16:54:40 -06:00
John-David Dalton
528b6a98a9 Minor doc space nit. [ci skip] 2016-12-06 15:15:09 +09:00
John-David Dalton
a8bcb5f3d5 ES6 to ES2015 nit. [ci skip] 2016-12-06 15:15:09 +09:00
Dave Wasmer
d429f90ec5 Mention ES6 delimiters in templateSettings docs (#2857) 2016-12-06 15:15:09 +09:00
John-David Dalton
72f559e1a3 Exit early from getSymbols if object is nullish. 2016-11-25 00:16:37 -06:00
Ophir LOJKINE
2f92d55024 Clarify _.isEqual docs on comparing functions and DOM nodes. [closes #2849] [ci skip] 2016-11-25 00:16:05 -06:00
John-David Dalton
5a86b67263 Minor engines field format nit. 2016-11-24 23:58:40 -06:00
John-David Dalton
bea4b29bc4 Remove unneeded Object coercions. 2016-11-24 23:41:10 -06:00
John-David Dalton
0cd4134bc6 Fix Android 5.1 test fails. 2016-11-24 23:41:10 -06:00
John-David Dalton
ec74813be6 Add non-enumerable symbol tests. 2016-11-24 00:07:26 -06:00
John-David Dalton
67926a4df2 Minor test nit. 2016-11-24 00:07:26 -06:00
John-David Dalton
40a591d0c0 Test _.isEqual crawls symbol properties. 2016-11-24 00:07:26 -06:00
John-David Dalton
783e03ffa3 Simplify baseIsEqualDeep now that getSymbols returns only enumerable symbols. 2016-11-24 00:07:26 -06:00
John-David Dalton
1dddf27a39 Include only enumerable symbols in getSymbols result. [closes #2845] 2016-11-24 00:07:26 -06:00
John-David Dalton
2890eabf66 Replace isObject use with isObjectLike in baseIsEqual. 2016-11-21 23:34:21 -06:00
John-David Dalton
a3e077324a Add support for comparing symbol properties to _.isEqual. [closes #2840] 2016-11-21 23:34:21 -06:00
John-David Dalton
86ee93650d Flip iteratee arguments for fp.reduceRight. 2016-11-21 23:34:21 -06:00
John-David Dalton
dd0d984d37 Add customOmitClone helper. 2016-11-21 23:34:21 -06:00
John-David Dalton
eba18891e5 Rename private spread helper to flatSpread. 2016-11-21 23:34:20 -06:00
John-David Dalton
5cb80a0a84 Disable headings link icons in marky-markdown. 2016-11-19 23:39:27 -06:00
John-David Dalton
db14f324f6 Increment package version to enable ci tests. 2016-11-19 23:39:27 -06:00
John-David Dalton
238defb150 Bump to v4.17.2. 2016-11-19 23:39:27 -06:00
John-David Dalton
53ba1e0c3c Rebuild lodash and docs. 2016-11-19 23:39:19 -06:00
John-David Dalton
95d3477c22 Fix code style nits. 2016-11-15 22:04:15 -08:00
John-David Dalton
a06d1a0313 Add _.omit and _.pick tests for keys over paths. 2016-11-15 21:47:03 -08:00
John-David Dalton
330c8cb46e Cleanup path tests. 2016-11-15 21:46:14 -08:00
John-David Dalton
da2e8a1030 Minor var order nit. 2016-11-15 20:18:53 -08:00
John-David Dalton
5bc9e6b8bd Avoid double cloning for the common case in _.omit. 2016-11-15 18:19:11 -08:00
John-David Dalton
9a02bd5fc7 Simplify baseUnset. 2016-11-15 18:07:27 -08:00
John-David Dalton
89656fdf4a Don’t treat a picked path as deep if it exists as a property of the object. [closes #2826] 2016-11-15 10:41:11 -08:00
John-David Dalton
4cb7bea97d Ensure _.spread doesn’t include arguments after those spread. [closes #2825] 2016-11-15 10:41:11 -08:00
John-David Dalton
eb4861c3cd Increment package version to enable ci tests. 2016-11-15 10:41:11 -08:00
John-David Dalton
170c13b5ba Bump to v4.17.1. 2016-11-14 20:37:42 -08:00
John-David Dalton
26a6117889 Rebuild lodash and docs. 2016-11-14 20:31:46 -08:00
John-David Dalton
014982cb2c Remove isKey use from invokeMap. 2016-11-14 17:32:52 -08:00
John-David Dalton
058361e222 Move the isKey check into castPath. 2016-11-14 15:37:46 -08:00
John-David Dalton
e344b66af9 Cleanup _.omit. 2016-11-14 12:04:52 -08:00
John-David Dalton
54cb3599e3 Fix yarn runs in travis by pinning to v0.16.1. 2016-11-14 10:41:38 -08:00
John-David Dalton
6c427b7a26 Avoid deep cloning of _.omit result. 2016-11-14 09:57:39 -08:00
John-David Dalton
ce093845e1 Ensure _.pick supports path arrays. [closes #2809] 2016-11-14 01:06:35 -08:00
John-David Dalton
102c5f00d7 Ensure _.pickBy doesn’t treat keys with dots as deep paths. [closes #2808] 2016-11-14 00:49:47 -08:00
John-David Dalton
13d315a93b Increment package version to enable ci tests. 2016-11-14 00:49:41 -08:00
John-David Dalton
2cc247ddf8 Bump to v4.17.0. 2016-11-13 22:49:29 -08:00
John-David Dalton
5488644658 Rebuild lodash and docs. 2016-11-11 09:40:37 -08:00
John-David Dalton
1fe9042953 Update coveralls and platform.js deps. 2016-11-11 09:40:33 -08:00
John-David Dalton
8bde34dda0 Update optional marky-markdown dep to 9.0.1. 2016-11-10 13:50:35 -08:00
greenkeeper[bot]
98720bea4a Update optional-dev-dependency to 2.0.0. 2016-11-10 13:32:10 -08:00
John-David Dalton
032637bba1 Update core error text. [ci skip] 2016-11-10 11:39:18 -08:00
John-David Dalton
dadde87cab Consolidate ternary in baseClone. 2016-11-08 08:36:02 -08:00
John-David Dalton
fcd0bbfc56 Correct bitmask flag order. [ci skip] 2016-11-08 07:35:20 -08:00
John-David Dalton
600fbbadfb Cleanup _.omit. 2016-11-08 01:03:41 -08:00
John-David Dalton
3d0df11e50 Add bitmask to baseClone. 2016-11-07 23:00:31 -08:00
John-David Dalton
2e4c997dba Use more clear condition in unclonable test. 2016-11-07 23:00:31 -08:00
John-David Dalton
5aaf7e40ae Cleanup deep path tests. 2016-11-07 23:00:21 -08:00
John-David Dalton
57703b040d Rename param props to paths. 2016-11-06 18:07:49 -08:00
John-David Dalton
c6ff776147 Use baseGet and baseSet in basePickBy. 2016-11-06 17:15:38 -08:00
Aviv Rosental
9ac729e1bc Add deep functionality for _.omit and _.pick. (#2794) 2016-11-06 17:02:41 -08:00
Jhen-Jie Hong
6d951ccc87 Fix freeProcess.binding(util) usage (#2793) 2016-11-06 11:11:01 -08:00
John-David Dalton
3217118fab Add more _.spread tests. 2016-11-06 00:39:13 -07:00
John-David Dalton
6ef973ae33 Avoid trailing slice unless needed. 2016-11-06 00:13:16 -07:00
John-David Dalton
e0a65ac34a Cleanup fp tests. 2016-11-06 00:11:53 -07:00
John-David Dalton
b833d83a3e Add tests for “AllWith” fp methods. 2016-11-06 00:11:53 -07:00
John-David Dalton
220713109c Capitalize Lodash in header. [ci skip] 2016-11-06 00:11:53 -07:00
John-David Dalton
cafb9822ce Refine combo mark ranges. 2016-11-06 00:11:48 -07:00
John-David Dalton
1b3815928d Ensure fp.mergeAllWith accepts more than 2 sources. [closes #2786] 2016-11-04 01:10:54 -07:00
greenkeeper[bot]
fbb67f9dbe Update deps. 2016-11-03 08:24:04 -07:00
John-David Dalton
8d24f393ac Increment package version to enable ci tests. 2016-11-01 00:55:43 -07:00
John-David Dalton
7759376b91 Bump to v4.16.6. 2016-10-31 23:00:14 -07:00
John-David Dalton
ccc3081be0 Rebuild lodash and docs. 2016-10-31 22:58:47 -07:00
John-David Dalton
62b66305f2 Adjust conditional assignments. 2016-10-31 20:34:49 -07:00
John-David Dalton
65daae2043 Remove unneeded var assignment in baseXor. 2016-10-31 16:32:58 -07:00
John-David Dalton
0fcf43b02b Ensure _.xor returns an empty array when comparing the same array. [closes #2776] 2016-10-31 16:32:58 -07:00
John-David Dalton
46d1f53ee9 Increment package version to enable ci tests. 2016-10-31 16:32:52 -07:00
John-David Dalton
fc22665dd8 Bump to v4.16.5. 2016-10-30 22:56:07 -07:00
John-David Dalton
7862e5ce2d Rebuild lodash and docs. 2016-10-30 22:56:04 -07:00
John-David Dalton
7cbffd5ebf Update deps. 2016-10-30 22:55:59 -07:00
John-David Dalton
5028267c72 Fix broken builds. 2016-10-29 18:32:24 -07:00
John-David Dalton
6f03ef955c Drop Node 4 testing in travis. 2016-10-29 18:32:24 -07:00
John-David Dalton
f75bf13ad1 Use ~ instead of $HOME. 2016-10-29 18:32:23 -07:00
John-David Dalton
d7dbf0951d Add another _.xor test for multiple arrays. 2016-10-29 18:32:23 -07:00
John-David Dalton
daf6de6a46 Add uncloneable Proxy constructor test. 2016-10-29 18:32:23 -07:00
John-David Dalton
7d4c3ed404 Add async function detection to _.isFunction. 2016-10-29 18:32:23 -07:00
John-David Dalton
a9fd17950a Add clear to the Map interface note of _.memoize. [ci skip] 2016-10-29 18:32:23 -07:00
John-David Dalton
b91a515258 Cleanup test labels. 2016-10-27 00:06:59 -07:00
John-David Dalton
bc5729a9de Use consistent nullish checks. 2016-10-27 00:06:59 -07:00
John-David Dalton
729d1a57aa Ensure _.xor works with more than two arrays. [closes #2758] 2016-10-27 00:06:59 -07:00
John-David Dalton
73e2562cd1 Add Node 7 testing to travis. 2016-10-26 00:51:34 -07:00
John-David Dalton
849423c9d8 Param doc format nits. [ci skip] 2016-10-25 23:13:40 -07:00
Richard Gibson
1c9a9f364d Avoid object mutation in getRawTag. [closes #2755] 2016-10-25 23:13:34 -07:00
John-David Dalton
e485e16d28 Update deps. 2016-10-25 14:30:33 -07:00
John-David Dalton
bc49e7fe18 Bump Chrome testing in Sauce. 2016-10-24 16:15:31 -07:00
John-David Dalton
6a9337434f Use travis jwt addon. 2016-10-24 16:15:31 -07:00
John-David Dalton
0c89b9aeb5 Update uglify-js to 2.7.4. 2016-10-24 10:17:49 -07:00
Josh Soref
6f7a8501cb Spelling. (#2745) 2016-10-20 12:15:15 -07:00
John-David Dalton
7a03898ffe Bump HOT_COUNT limit to improve fp debugging. 2016-10-19 16:22:32 -07:00
John-David Dalton
609ae34b4e Rename jQuery Foundation to JS Foundation. [ci skip] 2016-10-19 08:41:40 -07:00
John-David Dalton
2d21faf68a Update async to 2.1.2. 2016-10-19 08:41:36 -07:00
John-David Dalton
26ee0c5c2a Cleanup PhantomJS upgrade. 2016-10-15 23:32:13 -07:00
John-David Dalton
cafb5e1331 Avoid leaked var in _.before test. 2016-10-15 18:10:55 -07:00
John-David Dalton
7717b8aa64 Remove more quotes. 2016-10-15 18:10:55 -07:00
John-David Dalton
c82322c490 Fix amd test fails. 2016-10-15 18:10:50 -07:00
John-David Dalton
4af0c066ec Update async to 2.1.1. 2016-10-15 12:17:20 -07:00
John-David Dalton
d2b10de40b Bump Edge testing in Sauce. 2016-10-13 12:30:51 -07:00
John-David Dalton
26bfb74a60 Continue to configure npm. 2016-10-13 00:59:02 -07:00
John-David Dalton
ef129e4c8c Use semicolons in place of &&. 2016-10-13 00:48:07 -07:00
John-David Dalton
0b04309ea5 Use yarn. 2016-10-12 22:42:58 -07:00
John-David Dalton
fb4852f6db More travis cleanup. 2016-10-12 22:21:35 -07:00
John-David Dalton
5046943020 Remove extraneous quotes from travis.yml. 2016-10-12 19:50:55 -07:00
John-David Dalton
14d7f89f75 Remove mapping shortcut references. 2016-10-12 07:03:02 -07:00
John-David Dalton
d431e97030 fp.convert should handle aliased and remapped methods. [closes #2728] 2016-10-11 22:40:20 -07:00
John-David Dalton
8f06ea259a Tweak exit early in _.isFunction. 2016-10-10 10:34:38 -07:00
John-David Dalton
0a0fa58e2d Use isObjectLike instead of isObject. 2016-10-10 10:28:16 -07:00
John-David Dalton
286f1abb87 Use empty string instead of undefined. 2016-10-10 10:27:57 -07:00
John-David Dalton
a621ba236a Remove try-catches in tests where possible. 2016-10-10 08:13:15 -07:00
John-David Dalton
a041a3782d Remove unneeded IE conditional comments test. 2016-10-10 08:12:35 -07:00
John-David Dalton
9f8064a8b5 Add read-only Symbol.toStringTag test. 2016-10-09 23:35:46 -07:00
John-David Dalton
729f424622 Minor formatting nit. [ci skip] 2016-10-09 22:40:40 -07:00
John-David Dalton
6a8e978fd7 Remove unneeded _.isPlainObject test. 2016-10-09 22:32:20 -07:00
John-David Dalton
aea509c230 Add Symbol.toStringTag test for _.isPlainObject. 2016-10-09 22:25:33 -07:00
John-David Dalton
21113b8c87 Minor hyphen nit. [ci skip] 2016-10-09 22:25:01 -07:00
John-David Dalton
dcf6d382c4 Add missing realm.element. 2016-10-09 21:27:25 -07:00
John-David Dalton
c541598f40 Cleanup testing arguments objects. 2016-10-09 21:09:50 -07:00
John-David Dalton
bd8e38518f Add more _.isElement tests. 2016-10-09 20:24:48 -07:00
John-David Dalton
067036a359 Simplify isElement. 2016-10-09 20:24:36 -07:00
John-David Dalton
22b51ed232 Refine _.isError checks to avoid false positives on plain objects. 2016-10-09 20:06:03 -07:00
John-David Dalton
054e78572b Add support for ordinals to _.words. 2016-10-09 16:43:44 -07:00
John-David Dalton
31cb06a643 Move Symbol.toStringTag workaround to getRawTag. 2016-10-09 16:43:36 -07:00
John-David Dalton
ee4a5a2604 Make objectToString its own helper function. 2016-10-09 12:59:28 -07:00
John-David Dalton
05b60871c5 Minor toSource param description nit. [ci skip] 2016-10-09 12:37:22 -07:00
John-David Dalton
03a194fcb9 Make toStringTag checks resistant to spoofing. 2016-10-08 10:59:01 -07:00
John-David Dalton
52e96c38dc Exit early from _.isEmpty for nullish values. 2016-10-08 10:42:21 -07:00
John-David Dalton
f5dd98cac4 Clarify lodash build. 2016-10-08 10:41:35 -07:00
John-David Dalton
b890d40b54 Remove unneeded capture phase param from addEventListener. 2016-10-08 10:41:21 -07:00
John-David Dalton
457a0dc703 Update glob to 7.1.1. 2016-10-07 15:31:47 -07:00
John-David Dalton
e4837cd75d Increment package version to enable ci tests. 2016-10-07 08:15:21 -07:00
John-David Dalton
67b2c6f900 Bump to v4.16.4. 2016-10-05 23:20:11 -07:00
John-David Dalton
260a84c4d8 Rebuild lodash and docs. 2016-10-05 23:19:24 -07:00
John-David Dalton
4b0db6ec6c Update qunit-extras to 3.0.0. 2016-10-05 23:19:24 -07:00
John-David Dalton
9c4c194bb5 Replace Object.create mock with undefined to hit more bizarro code paths. 2016-10-05 23:19:24 -07:00
John-David Dalton
ac74a1ea15 Remove unneeded shim juggle. 2016-10-05 23:19:24 -07:00
John-David Dalton
e4ddf3e155 Add nested check to _.merge test for non-plain object source values. 2016-10-05 23:19:23 -07:00
John-David Dalton
896b27ef73 Remove unneeded bizarro tests. 2016-10-05 23:19:23 -07:00
John-David Dalton
bdf0b9f288 Cleanup Babel workaround. 2016-10-05 23:19:10 -07:00
John-David Dalton
1665e5cbff Add bizarro _.create test. 2016-10-05 17:22:31 -07:00
John-David Dalton
6e8c0de1ff Add buffer test for _.merge. 2016-10-05 15:36:36 -07:00
John-David Dalton
4fb41ac6a9 Update removed snippets for the coverage run. 2016-10-05 12:13:25 -07:00
John-David Dalton
af983b2dd3 Ensure _.negate test for multiple arguments hits the 4 arguments case. 2016-10-05 11:09:37 -07:00
John-David Dalton
405d5875b8 Add _.isEmpty test for prototype objects. 2016-10-05 11:09:37 -07:00
John-David Dalton
b30f979ec7 Wrap arguments in case IIFE is removed. 2016-10-05 10:34:20 -07:00
John-David Dalton
836bd258a0 Ensure _.toString works on an array of symbols. 2016-10-05 09:07:51 -07:00
John-David Dalton
d2f74ee245 Minor _.toString doc typo fix. [ci skip] 2016-10-05 08:16:03 -07:00
John-David Dalton
45f668b416 Add baseIsArguments. 2016-10-04 22:28:17 -07:00
John-David Dalton
d29d74f687 Move baseClamp use to arraySampleSize and baseSampleSize. 2016-10-04 22:28:16 -07:00
John-David Dalton
9fba7be296 Add comments to arrayLikeKeys. [ci skip] 2016-10-04 08:41:32 -07:00
John-David Dalton
f30851bac1 Simplify _.isArguments more. 2016-10-04 01:08:05 -07:00
John-David Dalton
d308bce09f Add isTypedArray check to _.isEmpty. 2016-10-04 00:32:15 -07:00
John-David Dalton
3d7dbd140c Remove unused variable. 2016-10-04 00:23:34 -07:00
John-David Dalton
15bd64a1b4 Normalize keys of buffers and typed arrays. 2016-10-04 00:23:00 -07:00
John-David Dalton
3c30100837 Use baseFor in baseMerge. 2016-10-03 22:32:30 -07:00
John-David Dalton
81bdb9da43 Cleanup array type juggling. 2016-10-03 20:34:37 -07:00
John-David Dalton
60e3a93a30 Simplify _.isArguments. 2016-10-03 20:33:39 -07:00
John-David Dalton
158f2839fd Remove Safari 8.1 note. [ci skip] 2016-10-03 20:30:46 -07:00
John-David Dalton
c7b9df4286 Cleanup branching for array-likes in baseMergeDeep. 2016-10-03 18:06:07 -07:00
John-David Dalton
0eca941e22 Add isBuffer checks to baseMerge and _.transform. 2016-10-03 18:05:32 -07:00
John-David Dalton
8592f4163f Fix _.merge regression with buffers. [closes #2699] 2016-10-03 17:07:45 -07:00
John-David Dalton
29e2598a39 Remove duplicate operator. [ci skip] 2016-10-03 14:57:06 -07:00
John-David Dalton
32e75acb9f Indentation nit. [ci skip] 2016-10-03 14:56:32 -07:00
John-David Dalton
b54501a771 Increment package version to enable ci tests. 2016-10-03 10:34:46 -07:00
John-David Dalton
6062860628 Bump to v4.16.3. 2016-10-02 20:22:53 -07:00
John-David Dalton
a12c3797fb Rebuild lodash and docs. 2016-10-02 20:22:06 -07:00
John-David Dalton
48bc8b4f1a Update Firefox in sauce. 2016-10-02 19:19:10 -07:00
John-David Dalton
e861681963 Cleanup buffer tests. 2016-10-02 13:57:42 -07:00
John-David Dalton
9985e81808 Add _.isEqual test for buffers. 2016-10-02 13:37:47 -07:00
John-David Dalton
ffde99b216 Minor test formatting nit. [ci skip] 2016-10-01 23:35:30 -07:00
John-David Dalton
492caa4fd2 Add _.isFunction test for the Proxy constructor. 2016-10-01 23:34:45 -07:00
John-David Dalton
01c0950ae8 Add existence check for runInContext. [closes #2694] 2016-09-30 15:33:12 -07:00
John-David Dalton
20fa52309c Add proxyTag check to _.isFunction for Safari 10 support of the Proxy constructor. [closes #2689] 2016-09-29 14:54:09 -07:00
John-David Dalton
7a345b5606 Clarify fp spread methods description. [closes #2687] [ci skip] 2016-09-29 13:06:04 -07:00
John-David Dalton
b6d8116882 Indentation nit in readme. [ci skip] 2016-09-28 14:03:24 -07:00
John-David Dalton
4495e74f77 Treat buffers separately from typed arrays. 2016-09-28 12:54:11 -07:00
John-David Dalton
c009349d99 Use only one defineProperty reference. 2016-09-27 14:36:41 -07:00
John-David Dalton
26d5ba992c Fix prototype typo. 2016-09-27 14:04:06 -07:00
John-David Dalton
320ef6f933 Cleanup assignment test. 2016-09-26 21:43:49 -07:00
John-David Dalton
b678bb4a74 Make _.defaultsDeep and _.merge consistent with _.defaults in assigning undefined values. [closes #2676] 2016-09-26 21:43:49 -07:00
John-David Dalton
c1c394ac60 Increment package version to enable ci tests. 2016-09-26 21:43:49 -07:00
John-David Dalton
70d3057e17 Bump to v4.16.2. 2016-09-25 13:24:51 -07:00
John-David Dalton
3d27920226 Rebuild lodash and docs. 2016-09-25 13:24:51 -07:00
John-David Dalton
33a43a5f93 Update Node usage example. [ci skip] 2016-09-25 13:24:51 -07:00
John-David Dalton
fac9501840 Refine ext detection. 2016-09-25 13:19:48 -07:00
John-David Dalton
4d6aade733 Rename param to size. 2016-09-25 13:19:48 -07:00
John-David Dalton
d9e2c1cc34 Remove MAX_ARRAY_LENGTH use in arrayShuffle and baseShuffle. 2016-09-25 13:19:48 -07:00
John-David Dalton
c8c6a7e7b1 Fix arraySample description. [ci skip] 2016-09-25 13:19:48 -07:00
John-David Dalton
69addb855e Add baseSample, baseSampleSize, and baseShuffle. 2016-09-25 13:19:48 -07:00
John-David Dalton
55fb0172c0 Move thrower from v4 to move to v3. 2016-09-25 13:19:43 -07:00
John-David Dalton
2026cbeebd Add thrower helper. 2016-09-24 10:57:38 -07:00
John-David Dalton
d6d01cdfa0 Remove the need for es-sham. 2016-09-23 19:25:46 -07:00
John-David Dalton
cb07604dc6 Fix local failing PhantomJS 2 test. 2016-09-23 16:51:21 -07:00
John-David Dalton
549def0e48 Use Buffer.allocUnsafe when available. 2016-09-23 16:48:36 -07:00
John-David Dalton
a3c215919d Create more error text constants. 2016-09-23 16:48:02 -07:00
John-David Dalton
ab904a1047 Add error to encourage users to shim when needed. 2016-09-23 14:39:03 -07:00
John-David Dalton
60381f4d6c Update deps. 2016-09-22 16:02:49 -07:00
John-David Dalton
8f607295ae Increment package version to enable ci tests. 2016-09-20 15:13:43 -07:00
845 changed files with 38720 additions and 136013 deletions

29
.commitlintrc.js Normal file
View 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
View File

@@ -0,0 +1,5 @@
coverage/
coverage-merged/
dist/
node_modules/
types/

99
.eslintrc Normal file
View 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
View File

@@ -1 +1,2 @@
* text=auto
*.lockb binary diff=lockb

View File

@@ -1,7 +1,13 @@
# :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://jquery.org/conduct/) &
[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,
@@ -19,21 +25,19 @@ Before submitting a request, please search for similar ones in the
## Pull Requests
For additions or bug fixes you should only need to modify `lodash.js`. Include
updated unit tests in the `test` directory as part of your pull request. Dont
worry about regenerating the `dist/` or `doc/` files.
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 youll need to install, `npm i`,
[development dependencies](https://docs.npmjs.com/files/package.json#devdependencies).
Run unit tests from the command-line via `npm test`, or open `test/index.html` &
`test/fp.html` in a web browser. The [Backbone](http://backbonejs.org/) &
[Underscore](http://underscorejs.org/) test suites are included as well.
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 Russells excellent post,
[“Why Do I Need to Sign This?”](https://infrequently.org/2008/06/why-do-i-need-to-sign-this/).
@@ -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
View 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
View 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

10
.gitignore vendored
View File

@@ -1,4 +1,8 @@
.DS_Store
*.log
doc/*.html
node_modules
*.log*
dist/
node_modules/
*.code-workspace
*.lockb
*.sublime-project
*.sublime-workspace

1
.husky/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
_

4
.husky/commit-msg Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
bun run commitlint --edit "$1"

4
.husky/pre-commit Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
bun run lint-staged

97
.jscsrc
View File

@@ -1,97 +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,
"disallowUnusedVariables": true,
"jsDoc": {
"checkRedundantAccess": true,
"checkTypes": true,
"requireNewlineAfterDescription": true,
"requireParamDescription": true,
"requireParamTypes": true,
"requireReturnTypes": true
}
}

View File

@@ -1,11 +0,0 @@
'use strict';
delete global['__core-js_shared__'];
const _ = require('./lodash.js');
const globals = require('lodash-doc-globals');
module.exports = {
'babel': false,
'globals': _.assign({ '_': _ }, globals)
};

5
.prettierignore Normal file
View File

@@ -0,0 +1,5 @@
coverage/
coverage-merged/
dist/
node_modules/
types/

6
.prettierrc Normal file
View File

@@ -0,0 +1,6 @@
{
"printWidth": 100,
"useTabs": false,
"tabWidth": 4,
"singleQuote": true
}

View File

@@ -1,98 +0,0 @@
language: node_js
sudo: false
node_js:
- "6"
cache:
directories:
- $HOME/.npm
- travis_phantomjs
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: "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:
# Upgrade PhantomJS to v2.1.1.
- "export PHANTOMJS_VERSION=2.1.1"
- "export PATH=$PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin:$PATH"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then wget https://github.com/Medium/phantomjs/releases/download/v$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2; fi"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi"
- "phantomjs --version"
# Use exact Node version.
- "nvm use $TRAVIS_NODE_VERSION"
# Setup npm.
- "npm set loglevel error"
- "npm set progress false"
- "npm i -g npm@\"^2.0.0\""
# Remove code skipped on the coverage run.
- |
PATTERN[0]="|\s*if\s*\(enumerate\b[\s\S]+?\};\s*\}|"
PATTERN[1]="|\s*while\s*\([^)]+\)\s*\{\s*iteratee\(index\);\s*\}|"
PATTERN[2]="|\s*else\s*\{\s*assocSet\(data\b[\s\S]+?\}|"
PATTERN[3]="|\bcase\s+(?:dataView|promise|set|map|weakMap)CtorString:.+|g"
PATTERN[4]="|\bindex,\s*iterable\)\s*===\s*false\)[^}]+?(break;)|"
PATTERN[5]="|\s*if\s*\(\!lodashFunc\)\s*\{\s*return;\s*\}|"
PATTERN[6]="|\s*define\([\s\S]+?\);|"
PATTERN[7]="|\s*root\._\s*=\s*_;|"
if [ $ISTANBUL == true ]; then
set -e
for PTRN in ${PATTERN[@]}; do
node ./test/remove.js "$PTRN" ./lodash.js
done
fi
# Use lodash-cli from GitHub.
- "git clone --depth=10 --branch=master git://github.com/lodash/lodash-cli ./node_modules/lodash-cli"
- "mkdir -p ./node_modules/lodash-cli/node_modules/lodash && cd $_ && cp ../../../../lodash.js ./lodash.js && cp ../../../../package.json ./package.json"
- "cd ../../ && npm i --production && cd ../../"
script:
# Detect code coverage.
- "[ $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"
# Test in Node.js and PhantomJS.
- "[ $ISTANBUL == true ] || node ./node_modules/lodash-cli/bin/lodash -o ./dist/lodash.js"
- "[ $ISTANBUL == true ] || (node ./node_modules/lodash-cli/bin/lodash modularize exports=node -o ./ && node ./node_modules/lodash-cli/bin/lodash -d -o ./lodash.js)"
- "[ $ISTANBUL == true ] || [ $SAUCE_LABS == true ] || cd ./test"
- "[ $ISTANBUL == true ] || [ $SAUCE_LABS == true ] || $BIN $OPTION ./test.js ../lodash.js"
- "[ $ISTANBUL == true ] || [ $SAUCE_LABS == true ] || [ $TRAVIS_SECURE_ENV_VARS == false ] || $BIN $OPTION ./test.js ../dist/lodash.min.js"
# Test in Sauce Labs.
- "[ $SAUCE_LABS == false ] || node ./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\""

View File

@@ -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/>

View File

@@ -1,30 +1,26 @@
# lodash v4.16.1
# lodash
[Site](https://lodash.com/) |
[Docs](https://lodash.com/docs) |
[FP Guide](https://github.com/lodash/lodash/wiki/FP-Guide) |
[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://jquery.org/conduct/) |
[Twitter](https://twitter.com/bestiejs) |
[Chat](https://gitter.im/lodash/lodash)
[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):
```shell
$ npm run build
$ bun run build
$ lodash -o ./dist/lodash.js
$ lodash core -o ./dist/lodash.core.js
```
## Download
* [Core build](https://raw.githubusercontent.com/lodash/lodash/4.16.1/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.16.1/dist/lodash.core.min.js))
* [Full build](https://raw.githubusercontent.com/lodash/lodash/4.16.1/dist/lodash.js) ([~23 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.16.1/dist/lodash.min.js))
* [CDN copies](https://www.jsdelivr.com/projects/lodash)
* [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) [![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/lodash/badge)](https://www.jsdelivr.com/package/npm/lodash)
Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.16.1/LICENSE) & supports [modern environments](#support).<br>
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 thats right for you.
## Installation
@@ -34,13 +30,12 @@ In a browser:
<script src="lodash.js"></script>
```
Using npm:
Using bun:
```shell
$ npm i -g npm
$ npm i --save lodash
$ bun i lodash
```
In Node.js:
In [Bun](https://bun.sh):
```js
// Load the full build.
var _ = require('lodash');
@@ -54,27 +49,24 @@ var array = require('lodash/array');
var object = require('lodash/fp/object');
// Cherry-pick methods for smaller browserify/rollup/webpack bundles.
var chunk = require('lodash/chunk');
var extend = require('lodash/fp/extend');
var at = require('lodash/at');
var curryN = require('lodash/fp/curryN');
```
**Note:**<br>
Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL.
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. Lodashs 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](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)
* [lodash/fp](https://github.com/lodash/lodash/tree/npm/fp)
* [lodash-amd](https://www.npmjs.com/package/lodash-amd)

35
SECURITY.md Normal file
View 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 projects 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
View File

@@ -0,0 +1,2 @@
[install.lockfile]
print = "yarn"

3839
dist/lodash.core.js vendored

File diff suppressed because it is too large Load Diff

View File

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

1006
dist/lodash.fp.js vendored

File diff suppressed because it is too large Load Diff

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

@@ -1,20 +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){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 l(t,e,r,d){function c(t,e){if(B.cap){var r=u.iterateeRearg[t];if(r)return x(e,r);var n=!b&&u.iterateeAry[t];if(n)return W(e,n)}return e}function h(t,e,r){return E||B.curry&&r>1?z(e,r):e}function g(t,e,r){if(B.fixed&&(F||!u.skipFixed[t])){var n=u.methodSpread[t],i=n&&n.start;return void 0===i?w(e,r):N(e,i)}return e}function y(t,e,r){return B.rearg&&r>1&&(j||!u.skipRearg[t])?_(e,u.methodRearg[t]||u.aryRearg[r]):e}function m(t,e){e=U(e);for(var r=-1,n=e.length,i=n-1,a=D(Object(t)),o=a;null!=o&&++r<n;){
var s=e[r],l=o[s];null!=l&&(o[e[r]]=D(r==i?l:Object(l))),o=o[s]}return a}function v(t){return J.runInContext.convert(t)(void 0)}function A(t,e){var r=d;return function(n){return l(b?C:S,t,b?C[t]:e,M(M({},r),n))}}function W(t,e){return I(t,function(t){return"function"==typeof t?i(t,e):t})}function x(t,e){return I(t,function(t){var r=e.length;return n(_(i(t,r),e),r)})}function I(t,e){return function(){var r=arguments.length;if(!r)return t();for(var n=Array(r);r--;)n[r]=arguments[r];var i=B.rearg?0:r-1;
return n[i]=e(n[i]),t.apply(void 0,n)}}function R(t,e){t=u.aliasToReal[t]||t;var r,n=e,i=H[t];return i?n=i(e):B.immutable&&(p.array[t]?n=s(e,a):p.object[t]?n=s(e,o(e)):p.set[t]&&(n=s(e,m))),q(G,function(e){return q(u.aryMethod[e],function(i){if(t==i){var a=u.methodSpread[t];return r=a&&a.afterRearg?g(t,y(t,n,e),e):y(t,g(t,n,e),e),r=c(t,r),r=h(t,r,e),!1}}),!r}),r||(r=n),r==e&&(r=E?z(r,1):function(){return e.apply(this,arguments)}),r.convert=A(t,e),u.placeholder[t]&&(O=!0,r.placeholder=e.placeholder=L),
r}var O,b="function"==typeof e,k=e===Object(e);if(k&&(d=r,r=e,e=void 0),null==r)throw new TypeError;d||(d={});var B={cap:!("cap"in d)||d.cap,curry:!("curry"in d)||d.curry,fixed:!("fixed"in d)||d.fixed,immutable:!("immutable"in d)||d.immutable,rearg:!("rearg"in d)||d.rearg},E="curry"in d&&d.curry,F="fixed"in d&&d.fixed,j="rearg"in d&&d.rearg,L=b?r:f,C=b?r.runInContext():void 0,S=b?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,toInteger:t.toInteger,toPath:t.toPath},w=S.ary,M=S.assign,D=S.clone,z=S.curry,q=S.forEach,P=S.isArray,T=S.isFunction,K=S.keys,_=S.rearg,N=S.spread,V=S.toInteger,U=S.toPath,G=K(u.aryMethod),H={castArray:function(t){return function(){var e=arguments[0];return P(e)?t(a(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[0],r=arguments[1],n=t(e,r),a=n.length;return B.cap&&"number"==typeof r?(r=r>2?r-2:1,a&&a<=r?n:i(n,r)):n}},
mixin:function(t){return function(e){var r=this;if(!T(r))return t(r,Object(e));var n=[];return q(K(e),function(t){T(e[t])&&n.push([t,r.prototype[t]])}),t(r,Object(e)),q(n,function(t){var e=t[1];T(e)?r.prototype[t[0]]=e:delete r.prototype[t[0]]}),r}},nthArg:function(t){return function(e){var r=e<0?1:V(e)+1;return z(t(e),r)}},rearg:function(t){return function(e,r){var n=r?r.length:0;return z(t(e,r),n)}},runInContext:function(e){return function(r){return l(t,e(r),d)}}};if(!k)return R(e,r);var J=r,Q=[];
return q(G,function(t){q(u.aryMethod[t],function(t){var e=J[u.remap[t]||t];e&&Q.push([t,R(t,e)])})}),q(K(J),function(t){var e=J[t];if("function"==typeof e){for(var r=Q.length;r--;)if(Q[r][0]==t)return;e.convert=A(t,e),Q.push([t,e])}}),q(Q,function(t){J[t[0]]=t[1]}),J.convert=v,O&&(J.placeholder=L),q(K(J),function(t){q(u.realToAlias[t]||[],function(e){J[e]=J[t]})}),J}var u=r(2),p=u.mutate,f=r(3);t.exports=l},function(t,e){e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",
extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",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",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",
indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},
e.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","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","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","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","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","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,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom: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={assignInAllWith:[1,2,0],assignInWith:[1,2,0],assignAllWith:[1,2,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,2,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],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],
sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},e.methodSpread={assignAll:{start:0},assignAllWith:{afterRearg:!0,start:1},assignInAll:{start:0},assignInAllWith:{afterRearg:!0,start:1},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{afterRearg:!0,start:1},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},e.mutate={array:{
fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!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={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",
mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!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,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},function(t,e){t.exports={}}])});

16895
dist/lodash.js vendored

File diff suppressed because it is too large Load Diff

132
dist/lodash.min.js vendored
View File

@@ -1,132 +0,0 @@
/**
* @license
* lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
*/
;(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,i=t?t.length:0;++u<i;){var o=t[u];n(e,o,r(o),t)}return e}function u(t,n){for(var r=-1,e=t?t.length:0;++r<e&&false!==n(t[r],r,t););return t}function i(t,n){for(var r=t?t.length:0;r--&&false!==n(t[r],r,t););
return t}function o(t,n){for(var r=-1,e=t?t.length:0;++r<e;)if(!n(t[r],r,t))return false;return true}function f(t,n){for(var r=-1,e=t?t.length:0,u=0,i=[];++r<e;){var o=t[r];n(o,r,t)&&(i[u++]=o)}return i}function c(t,n){return!(!t||!t.length)&&-1<d(t,n,0)}function a(t,n,r){for(var e=-1,u=t?t.length:0;++e<u;)if(r(n,t[e]))return true;return false}function l(t,n){for(var r=-1,e=t?t.length:0,u=Array(e);++r<e;)u[r]=n(t[r],r,t);return u}function s(t,n){for(var r=-1,e=n.length,u=t.length;++r<e;)t[u+r]=n[r];return t}function h(t,n,r,e){
var u=-1,i=t?t.length:0;for(e&&i&&(r=t[++u]);++u<i;)r=n(r,t[u],u,t);return r}function p(t,n,r,e){var u=t?t.length:0;for(e&&u&&(r=t[--u]);u--;)r=n(r,t[u],u,t);return r}function _(t,n){for(var r=-1,e=t?t.length:0;++r<e;)if(n(t[r],r,t))return true;return false}function v(t,n,r){var e;return r(t,function(t,r,u){if(n(t,r,u))return e=r,false}),e}function g(t,n,r,e){var u=t.length;for(r+=e?1:-1;e?r--:++r<u;)if(n(t[r],r,t))return r;return-1}function d(t,n,r){if(n===n)t:{--r;for(var e=t.length;++r<e;)if(t[r]===n){t=r;
break t}t=-1}else t=g(t,b,r);return t}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){return t!==t}function x(t,n){var r=t?t.length:0;return r?k(t,n)/r:P}function j(t){return function(n){return null==n?F:n[t]}}function w(t){return function(n){return null==t?F:t[n]}}function m(t,n,r,e,u){return u(t,function(t,u,i){r=e?(e=false,t):n(r,t,u,i)}),r}function A(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].c;return t}function k(t,n){for(var r,e=-1,u=t.length;++e<u;){
var i=n(t[e]);i!==F&&(r=r===F?i:r+i)}return r}function E(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}function O(t,n){return l(n,function(n){return[n,t[n]]})}function S(t){return function(n){return t(n)}}function I(t,n){return l(n,function(n){return t[n]})}function R(t,n){return t.has(n)}function z(t,n){for(var r=-1,e=t.length;++r<e&&-1<d(n,t[r],0););return r}function W(t,n){for(var r=t.length;r--&&-1<d(n,t[r],0););return r}function B(t){return"\\"+Dt[t]}function L(t){var n=-1,r=Array(t.size);
return t.forEach(function(t,e){r[++n]=[e,t]}),r}function C(t,n){return function(r){return t(n(r))}}function U(t,n){for(var r=-1,e=t.length,u=0,i=[];++r<e;){var o=t[r];o!==n&&"__lodash_placeholder__"!==o||(t[r]="__lodash_placeholder__",i[u++]=r)}return i}function M(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=t}),r}function D(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=[t,t]}),r}function T(t){if(Wt.test(t)){for(var n=Rt.lastIndex=0;Rt.test(t);)++n;t=n}else t=tn(t);
return t}function $(t){return Wt.test(t)?t.match(Rt)||[]:t.split("")}var F,N=1/0,P=NaN,Z=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],q=/\b__p\+='';/g,V=/\b(__p\+=)''\+/g,K=/(__e\(.*?\)|\b__t\))\+'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,J=/[&<>"']/g,Y=RegExp(G.source),H=RegExp(J.source),Q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,tt=/<%=([\s\S]+?)%>/g,nt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rt=/^\w*$/,et=/^\./,ut=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ot=RegExp(it.source),ft=/^\s+|\s+$/g,ct=/^\s+/,at=/\s+$/,lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,ht=/,? & /,pt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,_t=/\\(\\)?/g,vt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,gt=/\w*$/,dt=/^[-+]0x[0-9a-f]+$/i,yt=/^0b[01]+$/i,bt=/^\[object .+?Constructor\]$/,xt=/^0o[0-7]+$/i,jt=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mt=/($^)/,At=/['\n\r\u2028\u2029\\]/g,kt="[\\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])?)*",Et="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+kt,Ot="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",St=RegExp("['\u2019]","g"),It=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),Rt=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+Ot+kt,"g"),zt=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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\\u2000-\\u206f \\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])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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\\u2000-\\u206f \\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\\u2000-\\u206f \\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])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d+",Et].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 ]/,Lt="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Ct={};
Ct["[object Float32Array]"]=Ct["[object Float64Array]"]=Ct["[object Int8Array]"]=Ct["[object Int16Array]"]=Ct["[object Int32Array]"]=Ct["[object Uint8Array]"]=Ct["[object Uint8ClampedArray]"]=Ct["[object Uint16Array]"]=Ct["[object Uint32Array]"]=true,Ct["[object Arguments]"]=Ct["[object Array]"]=Ct["[object ArrayBuffer]"]=Ct["[object Boolean]"]=Ct["[object DataView]"]=Ct["[object Date]"]=Ct["[object Error]"]=Ct["[object Function]"]=Ct["[object Map]"]=Ct["[object Number]"]=Ct["[object Object]"]=Ct["[object RegExp]"]=Ct["[object Set]"]=Ct["[object String]"]=Ct["[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,Dt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Tt=parseFloat,$t=parseInt,Ft=typeof global=="object"&&global&&global.Object===Object&&global,Nt=typeof self=="object"&&self&&self.Object===Object&&self,Pt=Ft||Nt||Function("return this")(),Zt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,qt=Zt&&typeof module=="object"&&module&&!module.nodeType&&module,Vt=qt&&qt.exports===Zt,Kt=Vt&&Ft.g;
t:{try{Mt=Kt&&Kt.f("util");break t}catch(t){}Mt=void 0}var Gt=Mt&&Mt.isArrayBuffer,Jt=Mt&&Mt.isDate,Yt=Mt&&Mt.isMap,Ht=Mt&&Mt.isRegExp,Qt=Mt&&Mt.isSet,Xt=Mt&&Mt.isTypedArray,tn=j("length"),nn=w({"\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","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C",
"\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i",
"\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S",
"\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n",
"\u017f":"s"}),rn=w({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),en=w({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),un=function w(kt){function Et(t){return ni.call(t)}function Ot(t){if(au(t)&&!Ko(t)&&!(t instanceof Dt)){if(t instanceof Mt)return t;if(Qu.call(t,"__wrapped__"))return ze(t)}return new Mt(t)}function Rt(){}function Mt(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=F}function Dt(t){this.__wrapped__=t,this.__actions__=[],
this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}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 Nt(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){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function qt(t){var n=-1,r=t?t.length:0;for(this.__data__=new Zt;++n<r;)this.add(t[n])}function Kt(t){this.size=(this.__data__=new Nt(t)).size;
}function tn(t,n){var r,e=Ko(t)||nu(t)?E(t.length,qu):[],u=e.length,i=!!u;for(r in t)!n&&!Qu.call(t,r)||i&&("length"==r||ge(r,u))||e.push(r);return e}function on(t,n,r,e){return t===F||tu(t,Gu[r])&&!Qu.call(e,r)?n:t}function fn(t,n,r){(r===F||tu(t[n],r))&&(typeof n!="number"||r!==F||n in t)||hn(t,n,r)}function cn(t,n,r){var e=t[n];Qu.call(t,n)&&tu(e,r)&&(r!==F||n in t)||hn(t,n,r)}function an(t,n){for(var r=t.length;r--;)if(tu(t[r][0],n))return r;return-1}function ln(t,n,r,e){return Ki(t,function(t,u,i){
n(e,t,r(t),i)}),e}function sn(t,n){return t&&zr(n,mu(n),t)}function hn(t,n,r){"__proto__"==n&&fi?fi(t,n,{configurable:true,enumerable:true,value:r,writable:true}):t[n]=r}function pn(t,n){for(var r=-1,e=null==t,u=n.length,i=Du(u);++r<u;)i[r]=e?F:ju(t,n[r]);return i}function _n(t,n,r){return t===t&&(r!==F&&(t=t<=r?t:r),n!==F&&(t=t>=n?t:n)),t}function vn(t,n,r,e,i,o,f){var c;if(e&&(c=o?e(t,i,o,f):e(t)),c!==F)return c;if(!cu(t))return t;if(i=Ko(t)){if(c=he(t),!n)return Rr(t,c)}else{var a=Et(t),l="[object Function]"==a||"[object GeneratorFunction]"==a;
if(Jo(t))return kr(t,n);if("[object Object]"==a||"[object Arguments]"==a||l&&!o){if(c=pe(l?{}:t),!n)return Wr(t,sn(c,t))}else{if(!Ut[a])return o?t:{};c=_e(t,a,vn,n)}}if(f||(f=new Kt),o=f.get(t))return o;if(f.set(t,c),!i)var s=r?In(t,mu,ro):mu(t);return u(s||t,function(u,i){s&&(i=u,u=t[i]),cn(c,i,vn(u,n,r,e,i,t,f))}),c}function gn(t){var n=mu(t);return function(r){return dn(r,t,n)}}function dn(t,n,r){var e=r.length;if(null==t)return!e;for(t=Pu(t);e--;){var u=r[e],i=n[u],o=t[u];if(o===F&&!(u in t)||!i(o))return false;
}return true}function yn(t){return cu(t)?li(t):{}}function bn(t,n,r){if(typeof t!="function")throw new Vu("Expected a function");return oo(function(){t.apply(F,r)},n)}function xn(t,n,r,e){var u=-1,i=c,o=true,f=t.length,s=[],h=n.length;if(!f)return s;r&&(n=l(n,S(r))),e?(i=a,o=false):200<=n.length&&(i=R,o=false,n=new qt(n));t:for(;++u<f;){var p=t[u],_=r?r(p):p,p=e||0!==p?p:0;if(o&&_===_){for(var v=h;v--;)if(n[v]===_)continue t;s.push(p)}else i(n,_,e)||s.push(p)}return s}function jn(t,n){var r=true;return Ki(t,function(t,e,u){
return r=!!n(t,e,u)}),r}function wn(t,n,r){for(var e=-1,u=t.length;++e<u;){var i=t[e],o=n(i);if(null!=o&&(f===F?o===o&&!pu(o):r(o,f)))var f=o,c=i}return c}function mn(t,n){var r=[];return Ki(t,function(t,e,u){n(t,e,u)&&r.push(t)}),r}function An(t,n,r,e,u){var i=-1,o=t.length;for(r||(r=ve),u||(u=[]);++i<o;){var f=t[i];0<n&&r(f)?1<n?An(f,n-1,r,e,u):s(u,f):e||(u[u.length]=f)}return u}function kn(t,n){return t&&Ji(t,n,mu)}function En(t,n){return t&&Yi(t,n,mu)}function On(t,n){return f(n,function(n){return iu(t[n]);
})}function Sn(t,n){n=ye(n,t)?[n]:mr(n);for(var r=0,e=n.length;null!=t&&r<e;)t=t[Se(n[r++])];return r&&r==e?t:F}function In(t,n,r){return n=n(t),Ko(t)?n:s(n,r(t))}function Rn(t,n){return t>n}function zn(t,n){return null!=t&&Qu.call(t,n)}function Wn(t,n){return null!=t&&n in Pu(t)}function Bn(t,n,r){for(var e=r?a:c,u=t[0].length,i=t.length,o=i,f=Du(i),s=1/0,h=[];o--;){var p=t[o];o&&n&&(p=l(p,S(n))),s=ki(p.length,s),f[o]=!r&&(n||120<=u&&120<=p.length)?new qt(o&&p):F}var p=t[0],_=-1,v=f[0];t:for(;++_<u&&h.length<s;){
var g=p[_],d=n?n(g):g,g=r||0!==g?g:0;if(v?!R(v,d):!e(h,d,r)){for(o=i;--o;){var y=f[o];if(y?!R(y,d):!e(t[o],d,r))continue t}v&&v.push(d),h.push(g)}}return h}function Ln(t,n,r){var e={};return kn(t,function(t,u,i){n(e,r(t),u,i)}),e}function Cn(t,n,e){return ye(n,t)||(n=mr(n),t=Ae(t,n),n=Ue(n)),n=null==t?t:t[Se(n)],null==n?F:r(n,t,e)}function Un(t){return au(t)&&"[object ArrayBuffer]"==ni.call(t)}function Mn(t){return au(t)&&"[object Date]"==ni.call(t)}function Dn(t,n,r,e,u){if(t===n)n=true;else if(null==t||null==n||!cu(t)&&!au(n))n=t!==t&&n!==n;else t:{
var i=Ko(t),o=Ko(n),f="[object Array]",c="[object Array]";i||(f=Et(t),f="[object Arguments]"==f?"[object Object]":f),o||(c=Et(n),c="[object Arguments]"==c?"[object Object]":c);var a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&!a)u||(u=new Kt),n=i||tf(t)?re(t,n,Dn,r,e,u):ee(t,n,f,Dn,r,e,u);else{if(!(2&e)&&(i=a&&Qu.call(t,"__wrapped__"),f=o&&Qu.call(n,"__wrapped__"),i||f)){t=i?t.value():t,n=f?n.value():n,u||(u=new Kt),n=Dn(t,n,r,e,u);break t}if(c)n:if(u||(u=new Kt),i=2&e,f=mu(t),o=f.length,
c=mu(n).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in n:Qu.call(n,l))){n=false;break n}}if((c=u.get(t))&&u.get(n))n=c==n;else{c=true,u.set(t,n),u.set(n,t);for(var s=i;++a<o;){var l=f[a],h=t[l],p=n[l];if(r)var _=i?r(p,h,l,n,t,u):r(h,p,l,t,n,u);if(_===F?h!==p&&!Dn(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),u.delete(n),
n=c}}else n=false;else n=false}}return n}function Tn(t){return au(t)&&"[object Map]"==Et(t)}function $n(t,n,r,e){var u=r.length,i=u,o=!e;if(null==t)return!i;for(t=Pu(t);u--;){var f=r[u];if(o&&f[2]?f[1]!==t[f[0]]:!(f[0]in t))return false}for(;++u<i;){var f=r[u],c=f[0],a=t[c],l=f[1];if(o&&f[2]){if(a===F&&!(c in t))return false}else{if(f=new Kt,e)var s=e(a,l,c,t,n,f);if(s===F?!Dn(l,a,e,3,f):!s)return false}}return true}function Fn(t){return!(!cu(t)||Yu&&Yu in t)&&(iu(t)?ei:bt).test(Ie(t))}function Nn(t){return cu(t)&&"[object RegExp]"==ni.call(t);
}function Pn(t){return au(t)&&"[object Set]"==Et(t)}function Zn(t){return au(t)&&fu(t.length)&&!!Ct[ni.call(t)]}function qn(t){return typeof t=="function"?t:null==t?zu:typeof t=="object"?Ko(t)?Hn(t[0],t[1]):Yn(t):Cu(t)}function Vn(t){if(!xe(t))return mi(t);var n,r=[];for(n in Pu(t))Qu.call(t,n)&&"constructor"!=n&&r.push(n);return r}function Kn(t){if(!cu(t)){var n=[];if(null!=t)for(var r in Pu(t))n.push(r);return n}r=xe(t);var e=[];for(n in t)("constructor"!=n||!r&&Qu.call(t,n))&&e.push(n);return e;
}function Gn(t,n){return t<n}function Jn(t,n){var r=-1,e=ru(t)?Du(t.length):[];return Ki(t,function(t,u,i){e[++r]=n(t,u,i)}),e}function Yn(t){var n=ae(t);return 1==n.length&&n[0][2]?je(n[0][0],n[0][1]):function(r){return r===t||$n(r,t,n)}}function Hn(t,n){return ye(t)&&n===n&&!cu(n)?je(Se(t),n):function(r){var e=ju(r,t);return e===F&&e===n?wu(r,t):Dn(n,e,F,3)}}function Qn(t,n,r,e,i){if(t!==n){if(!Ko(n)&&!tf(n))var o=Kn(n);u(o||n,function(u,f){if(o&&(f=u,u=n[f]),cu(u)){i||(i=new Kt);var c=f,a=i,l=t[c],s=n[c],h=a.get(s);
if(h)fn(t,c,h);else{var h=e?e(l,s,c+"",t,n,a):F,p=h===F;p&&(h=s,Ko(s)||tf(s)?Ko(l)?h=l:eu(l)?h=Rr(l):(p=false,h=vn(s,true)):su(s)||nu(s)?nu(l)?h=bu(l):!cu(l)||r&&iu(l)?(p=false,h=vn(s,true)):h=l:p=false),p&&(a.set(s,h),Qn(h,s,r,e,a),a.delete(s)),fn(t,c,h)}}else c=e?e(t[f],u,f+"",t,n,i):F,c===F&&(c=u),fn(t,f,c)})}}function Xn(t,n){var r=t.length;if(r)return n+=0>n?r:0,ge(n,r)?t[n]:F}function tr(t,n,r){var e=-1;return n=l(n.length?n:[zu],S(fe())),t=Jn(t,function(t){return{a:l(n,function(n){return n(t)}),b:++e,c:t
}}),A(t,function(t,n){var e;t:{e=-1;for(var u=t.a,i=n.a,o=u.length,f=r.length;++e<o;){var c=Or(u[e],i[e]);if(c){e=e>=f?c:c*("desc"==r[e]?-1:1);break t}}e=t.b-n.b}return e})}function nr(t,n){return t=Pu(t),rr(t,n,function(n,r){return r in t})}function rr(t,n,r){for(var e=-1,u=n.length,i={};++e<u;){var o=n[e],f=t[o];r(f,o)&&hn(i,o,f)}return i}function er(t){return function(n){return Sn(n,t)}}function ur(t,n,r,e){var u=e?y:d,i=-1,o=n.length,f=t;for(t===n&&(n=Rr(n)),r&&(f=l(t,S(r)));++i<o;)for(var c=0,a=n[i],a=r?r(a):a;-1<(c=u(f,a,c,e));)f!==t&&hi.call(f,c,1),
hi.call(t,c,1);return t}function ir(t,n){for(var r=t?n.length:0,e=r-1;r--;){var u=n[r];if(r==e||u!==i){var i=u;if(ge(u))hi.call(t,u,1);else if(ye(u,t))delete t[Se(u)];else{var u=mr(u),o=Ae(t,u);null!=o&&delete o[Se(Ue(u))]}}}}function or(t,n){return t+yi(Si()*(n-t+1))}function fr(t,n){var r="";if(!t||1>n||9007199254740991<n)return r;do n%2&&(r+=t),(n=yi(n/2))&&(t+=t);while(n);return r}function cr(t,n){return fo(me(t,n,zu),t+"")}function ar(t,n,r,e){if(!cu(t))return t;n=ye(n,t)?[n]:mr(n);for(var u=-1,i=n.length,o=i-1,f=t;null!=f&&++u<i;){
var c=Se(n[u]),a=r;if(u!=o){var l=f[c],a=e?e(l,c,f):F;a===F&&(a=cu(l)?l:ge(n[u+1])?[]:{})}cn(f,c,a),f=f[c]}return t}function lr(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=Du(u);++e<u;)r[e]=t[e+n];return r}function sr(t,n){var r;return Ki(t,function(t,e,u){return r=n(t,e,u),!r}),!!r}function hr(t,n,r){var e=0,u=t?t.length:e;if(typeof n=="number"&&n===n&&2147483647>=u){for(;e<u;){var i=e+u>>>1,o=t[i];null!==o&&!pu(o)&&(r?o<=n:o<n)?e=i+1:u=i}return u;
}return pr(t,n,zu,r)}function pr(t,n,r,e){n=r(n);for(var u=0,i=t?t.length:0,o=n!==n,f=null===n,c=pu(n),a=n===F;u<i;){var l=yi((u+i)/2),s=r(t[l]),h=s!==F,p=null===s,_=s===s,v=pu(s);(o?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?s<=n:s<n)?u=l+1:i=l}return ki(i,4294967294)}function _r(t,n){for(var r=-1,e=t.length,u=0,i=[];++r<e;){var o=t[r],f=n?n(o):o;if(!r||!tu(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function vr(t){return typeof t=="number"?t:pu(t)?P:+t}function gr(t){if(typeof t=="string")return t;
if(pu(t))return Vi?Vi.call(t):"";var n=t+"";return"0"==n&&1/t==-N?"-0":n}function dr(t,n,r){var e=-1,u=c,i=t.length,o=true,f=[],l=f;if(r)o=false,u=a;else if(200<=i){if(u=n?null:to(t))return M(u);o=false,u=R,l=new qt}else l=n?[]:f;t:for(;++e<i;){var s=t[e],h=n?n(s):s,s=r||0!==s?s:0;if(o&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue t;n&&l.push(h),f.push(s)}else u(l,h,r)||(l!==f&&l.push(h),f.push(s))}return f}function yr(t,n,r,e){for(var u=t.length,i=e?u:-1;(e?i--:++i<u)&&n(t[i],i,t););return r?lr(t,e?0:i,e?i+1:u):lr(t,e?i+1:0,e?u:i);
}function br(t,n){var r=t;return r instanceof Dt&&(r=r.value()),h(n,function(t,n){return n.func.apply(n.thisArg,s([t],n.args))},r)}function xr(t,n,r){for(var e=-1,u=t.length;++e<u;)var i=i?s(xn(i,t[e],n,r),xn(t[e],i,n,r)):t[e];return i&&i.length?dr(i,n,r):[]}function jr(t,n,r){for(var e=-1,u=t.length,i=n.length,o={};++e<u;)r(o,t[e],e<i?n[e]:F);return o}function wr(t){return eu(t)?t:[]}function mr(t){return Ko(t)?t:co(t)}function Ar(t,n,r){var e=t.length;return r=r===F?e:r,!n&&r>=e?t:lr(t,n,r)}function kr(t,n){
if(n)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function Er(t){var n=new t.constructor(t.byteLength);return new oi(n).set(new oi(t)),n}function Or(t,n){if(t!==n){var r=t!==F,e=null===t,u=t===t,i=pu(t),o=n!==F,f=null===n,c=n===n,a=pu(n);if(!f&&!a&&!i&&t>n||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&t<n||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Sr(t,n,r,e){var u=-1,i=t.length,o=r.length,f=-1,c=n.length,a=Ai(i-o,0),l=Du(c+a);for(e=!e;++f<c;)l[f]=n[f];
for(;++u<o;)(e||u<i)&&(l[r[u]]=t[u]);for(;a--;)l[f++]=t[u++];return l}function Ir(t,n,r,e){var u=-1,i=t.length,o=-1,f=r.length,c=-1,a=n.length,l=Ai(i-f,0),s=Du(l+a);for(e=!e;++u<l;)s[u]=t[u];for(l=u;++c<a;)s[l+c]=n[c];for(;++o<f;)(e||u<i)&&(s[l+r[o]]=t[u++]);return s}function Rr(t,n){var r=-1,e=t.length;for(n||(n=Du(e));++r<e;)n[r]=t[r];return n}function zr(t,n,r,e){var u=!r;r||(r={});for(var i=-1,o=n.length;++i<o;){var f=n[i],c=e?e(r[f],t[f],f,r,t):F;c===F&&(c=t[f]),u?hn(r,f,c):cn(r,f,c)}return r;
}function Wr(t,n){return zr(t,ro(t),n)}function Br(t,n){return function(r,u){var i=Ko(r)?e:ln,o=n?n():{};return i(r,t,fe(u,2),o)}}function Lr(t){return cr(function(n,r){var e=-1,u=r.length,i=1<u?r[u-1]:F,o=2<u?r[2]:F,i=3<t.length&&typeof i=="function"?(u--,i):F;for(o&&de(r[0],r[1],o)&&(i=3>u?F:i,u=1),n=Pu(n);++e<u;)(o=r[e])&&t(n,o,e,i);return n})}function Cr(t,n){return function(r,e){if(null==r)return r;if(!ru(r))return t(r,e);for(var u=r.length,i=n?u:-1,o=Pu(r);(n?i--:++i<u)&&false!==e(o[i],i,o););
return r}}function Ur(t){return function(n,r,e){var u=-1,i=Pu(n);e=e(n);for(var o=e.length;o--;){var f=e[t?o:++u];if(false===r(i[f],f,i))break}return n}}function Mr(t,n,r){function e(){return(this&&this!==Pt&&this instanceof e?i:t).apply(u?r:this,arguments)}var u=1&n,i=$r(t);return e}function Dr(t){return function(n){n=xu(n);var r=Wt.test(n)?$(n):F,e=r?r[0]:n.charAt(0);return n=r?Ar(r,1).join(""):n.slice(1),e[t]()+n}}function Tr(t){return function(n){return h(Iu(Su(n).replace(St,"")),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=yn(t.prototype),n=t.apply(r,n);return cu(n)?n:r}}function Fr(t,n,e){function u(){for(var o=arguments.length,f=Du(o),c=o,a=oe(u);c--;)f[c]=arguments[c];
return c=3>o&&f[0]!==a&&f[o-1]!==a?[]:U(f,a),o-=c.length,o<e?Qr(t,n,Zr,u.placeholder,F,f,c,F,F,e-o):r(this&&this!==Pt&&this instanceof u?i:t,this,f)}var i=$r(t);return u}function Nr(t){return function(n,r,e){var u=Pu(n);if(!ru(n)){var i=fe(r,3);n=mu(n),r=function(t){return i(u[t],t,u)}}return r=t(n,r,e),-1<r?u[i?n[r]:r]:F}}function Pr(t){return ue(function(n){var r=n.length,e=r,u=Mt.prototype.thru;for(t&&n.reverse();e--;){var i=n[e];if(typeof i!="function")throw new Vu("Expected a function");if(u&&!o&&"wrapper"==ie(i))var o=new Mt([],true);
}for(e=o?e:r;++e<r;)var i=n[e],u=ie(i),f="wrapper"==u?no(i):F,o=f&&be(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?o[ie(f[0])].apply(o,f[3]):1==i.length&&be(i)?o[u]():o.thru(i);return function(){var t=arguments,e=t[0];if(o&&1==t.length&&Ko(e)&&200<=e.length)return o.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 Zr(t,n,r,e,u,i,o,f,c,a){function l(){for(var d=arguments.length,y=Du(d),b=d;b--;)y[b]=arguments[b];if(_){var x,j=oe(l),b=y.length;for(x=0;b--;)y[b]===j&&++x;
}if(e&&(y=Sr(y,e,u,_)),i&&(y=Ir(y,i,o,_)),d-=x,_&&d<a)return j=U(y,j),Qr(t,n,Zr,l.placeholder,r,y,j,f,c,a-d);if(j=h?r:this,b=p?j[t]:t,d=y.length,f){x=y.length;for(var w=ki(f.length,x),m=Rr(y);w--;){var A=f[w];y[w]=ge(A,x)?m[A]:F}}else v&&1<d&&y.reverse();return s&&c<d&&(y.length=c),this&&this!==Pt&&this instanceof l&&(b=g||$r(b)),b.apply(j,y)}var s=128&n,h=1&n,p=2&n,_=24&n,v=512&n,g=p?F:$r(t);return l}function qr(t,n){return function(r,e){return Ln(r,t,n(e))}}function Vr(t,n){return function(r,e){
var u;if(r===F&&e===F)return n;if(r!==F&&(u=r),e!==F){if(u===F)return e;typeof r=="string"||typeof e=="string"?(r=gr(r),e=gr(e)):(r=vr(r),e=vr(e)),u=t(r,e)}return u}}function Kr(t){return ue(function(n){return n=l(n,S(fe())),cr(function(e){var u=this;return t(n,function(t){return r(t,u,e)})})})}function Gr(t,n){n=n===F?" ":gr(n);var r=n.length;return 2>r?r?fr(n,t):n:(r=fr(n,di(t/T(n))),Wt.test(n)?Ar($(r),0,t).join(""):r.slice(0,t))}function Jr(t,n,e,u){function i(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Du(l+c),h=this&&this!==Pt&&this instanceof i?f:t;++a<l;)s[a]=u[a];
for(;c--;)s[a++]=arguments[++n];return r(h,o?e:this,s)}var o=1&n,f=$r(t);return i}function Yr(t){return function(n,r,e){e&&typeof e!="number"&&de(n,r,e)&&(r=e=F),n=vu(n),r===F?(r=n,n=0):r=vu(r),e=e===F?n<r?1:-1:vu(e);var u=-1;r=Ai(di((r-n)/(e||1)),0);for(var i=Du(r);r--;)i[t?r:++u]=n,n+=e;return i}}function Hr(t){return function(n,r){return typeof n=="string"&&typeof r=="string"||(n=yu(n),r=yu(r)),t(n,r)}}function Qr(t,n,r,e,u,i,o,f,c,a){var l=8&n,s=l?o:F;o=l?F:o;var h=l?i:F;return i=l?F:i,n=(n|(l?32:64))&~(l?64:32),
4&n||(n&=-4),u=[t,n,u,h,s,i,o,f,c,a],r=r.apply(F,u),be(t)&&io(r,u),r.placeholder=e,ke(r,t,n)}function Xr(t){var n=Nu[t];return function(t,r){if(t=yu(t),r=ki(gu(r),292)){var e=(xu(t)+"e").split("e"),e=n(e[0]+"e"+(+e[1]+r)),e=(xu(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return n(t)}}function te(t){return function(n){var r=Et(n);return"[object Map]"==r?L(n):"[object Set]"==r?D(n):O(n,t(n))}}function ne(t,n,r,e,u,i,o,f){var c=2&n;if(!c&&typeof t!="function")throw new Vu("Expected a function");var a=e?e.length:0;
if(a||(n&=-97,e=u=F),o=o===F?o:Ai(gu(o),0),f=f===F?f:gu(f),a-=u?u.length:0,64&n){var l=e,s=u;e=u=F}var h=c?F:no(t);return i=[t,n,r,e,u,l,s,i,o,f],h&&(r=i[1],t=h[1],n=r|t,e=128==t&&8==r||128==t&&256==r&&i[7].length<=h[8]||384==t&&h[7].length<=h[8]&&8==r,131>n||e)&&(1&t&&(i[2]=h[2],n|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Sr(e,r,h[4]):r,i[4]=e?U(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Ir(e,r,h[6]):r,i[6]=e?U(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&t&&(i[8]=null==i[8]?h[8]:ki(i[8],h[8])),
null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=n),t=i[0],n=i[1],r=i[2],e=i[3],u=i[4],f=i[9]=null==i[9]?c?0:t.length:Ai(i[9]-a,0),!f&&24&n&&(n&=-25),ke((h?Hi:io)(n&&1!=n?8==n||16==n?Fr(t,n,f):32!=n&&33!=n||u.length?Zr.apply(F,i):Jr(t,n,r,e):Mr(t,n,r),i),t,n)}function re(t,n,r,e,u,i){var o=2&u,f=t.length,c=n.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(t))&&i.get(n))return c==n;var c=-1,a=true,l=1&u?new qt:F;for(i.set(t,n),i.set(n,t);++c<f;){var s=t[c],h=n[c];if(e)var p=o?e(h,s,c,n,t,i):e(s,h,c,t,n,i);if(p!==F){
if(p)continue;a=false;break}if(l){if(!_(n,function(t,n){if(!R(l,n)&&(s===t||r(s,t,e,u,i)))return l.push(n)})){a=false;break}}else if(s!==h&&!r(s,h,e,u,i)){a=false;break}}return i.delete(t),i.delete(n),a}function ee(t,n,r,e,u,i,o){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 oi(t),new oi(n)))break;return true;case"[object Boolean]":case"[object Date]":case"[object Number]":
return tu(+t,+n);case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var f=L;case"[object Set]":if(f||(f=M),t.size!=n.size&&!(2&i))break;return(r=o.get(t))?r==n:(i|=1,o.set(t,n),n=re(f(t),f(n),e,u,i,o),o.delete(t),n);case"[object Symbol]":if(qi)return qi.call(t)==qi.call(n)}return false}function ue(t){return fo(me(t,F,Le),t+"")}function ie(t){for(var n=t.name+"",r=Di[n],e=Qu.call(Di,n)?r.length:0;e--;){var u=r[e],i=u.func;
if(null==i||i==t)return u.name}return n}function oe(t){return(Qu.call(Ot,"placeholder")?Ot:t).placeholder}function fe(){var t=Ot.iteratee||Wu,t=t===Wu?qn:t;return arguments.length?t(arguments[0],arguments[1]):t}function ce(t,n){var r=t.__data__,e=typeof n;return("string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==n:null===n)?r[typeof n=="string"?"string":"hash"]:r.map}function ae(t){for(var n=mu(t),r=n.length;r--;){var e=n[r],u=t[e];n[r]=[e,u,u===u&&!cu(u)]}return n}function le(t,n){
var r=null==t?F:t[n];return Fn(r)?r:F}function se(t,n,r){n=ye(n,t)?[n]:mr(n);for(var e=-1,u=n.length,i=false;++e<u;){var o=Se(n[e]);if(!(i=null!=t&&r(t,o)))break;t=t[o]}return i||++e!=u?i:(u=t?t.length:0,!!u&&fu(u)&&ge(o,u)&&(Ko(t)||nu(t)))}function he(t){var n=t.length,r=t.constructor(n);return n&&"string"==typeof t[0]&&Qu.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function pe(t){return typeof t.constructor!="function"||xe(t)?{}:yn(ci(t))}function _e(r,e,u,i){var o=r.constructor;switch(e){
case"[object ArrayBuffer]":return Er(r);case"[object Boolean]":case"[object Date]":return new o(+r);case"[object DataView]":return e=i?Er(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=i?Er(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.length);
case"[object Map]":return e=i?u(L(r),true):L(r),h(e,t,new r.constructor);case"[object Number]":case"[object String]":return new o(r);case"[object RegExp]":return e=new r.constructor(r.source,gt.exec(r)),e.lastIndex=r.lastIndex,e;case"[object Set]":return e=i?u(M(r),true):M(r),h(e,n,new r.constructor);case"[object Symbol]":return qi?Pu(qi.call(r)):{}}}function ve(t){return Ko(t)||nu(t)||!!(pi&&t&&t[pi])}function ge(t,n){return n=null==n?9007199254740991:n,!!n&&(typeof t=="number"||jt.test(t))&&-1<t&&0==t%1&&t<n;
}function de(t,n,r){if(!cu(r))return false;var e=typeof n;return!!("number"==e?ru(r)&&ge(n,r.length):"string"==e&&n in r)&&tu(r[n],t)}function ye(t,n){if(Ko(t))return false;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!pu(t))||(rt.test(t)||!nt.test(t)||null!=n&&t in Pu(n))}function be(t){var n=ie(t),r=Ot[n];return typeof r=="function"&&n in Dt.prototype&&(t===r||(n=no(r),!!n&&t===n[0]))}function xe(t){var n=t&&t.constructor;return t===(typeof n=="function"&&n.prototype||Gu)}function je(t,n){
return function(r){return null!=r&&(r[t]===n&&(n!==F||t in Pu(r)))}}function we(t,n,r,e,u,i){return cu(t)&&cu(n)&&(i.set(n,t),Qn(t,n,F,we,i),i.delete(n)),t}function me(t,n,e){return n=Ai(n===F?t.length-1:n,0),function(){for(var u=arguments,i=-1,o=Ai(u.length-n,0),f=Du(o);++i<o;)f[i]=u[n+i];for(i=-1,o=Du(n+1);++i<n;)o[i]=u[i];return o[n]=e(f),r(t,this,o)}}function Ae(t,n){return 1==n.length?t:Sn(t,lr(n,0,-1))}function ke(t,n,r){var e=n+"";n=fo;var u,i=Re;return u=(u=e.match(st))?u[1].split(ht):[],
r=i(u,r),(i=r.length)&&(u=i-1,r[u]=(1<i?"& ":"")+r[u],r=r.join(2<i?", ":" "),e=e.replace(lt,"{\n/* [wrapped with "+r+"] */\n")),n(t,e)}function Ee(t){var n=0,r=0;return function(){var e=Ei(),u=16-(e-r);if(r=e,0<u){if(500<=++n)return arguments[0]}else n=0;return t.apply(F,arguments)}}function Oe(t){for(var n=-1,r=t.length,e=r-1;++n<r;){var u=or(n,e),i=t[u];t[u]=t[n],t[n]=i}return t}function Se(t){if(typeof t=="string"||pu(t))return t;var n=t+"";return"0"==n&&1/t==-N?"-0":n}function Ie(t){if(null!=t){
try{return Hu.call(t)}catch(t){}return t+""}return""}function Re(t,n){return u(Z,function(r){var e="_."+r[0];n&r[1]&&!c(t,e)&&t.push(e)}),t.sort()}function ze(t){if(t instanceof Dt)return t.clone();var n=new Mt(t.__wrapped__,t.__chain__);return n.__actions__=Rr(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}function We(t,n,r){var e=t?t.length:0;return e?(r=null==r?0:gu(r),0>r&&(r=Ai(e+r,0)),g(t,fe(n,3),r)):-1}function Be(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e-1;return r!==F&&(u=gu(r),
u=0>r?Ai(e+u,0):ki(u,e-1)),g(t,fe(n,3),u,true)}function Le(t){return t&&t.length?An(t,1):[]}function Ce(t){return t&&t.length?t[0]:F}function Ue(t){var n=t?t.length:0;return n?t[n-1]:F}function Me(t,n){return t&&t.length&&n&&n.length?ur(t,n):t}function De(t){return t?Ii.call(t):t}function Te(t){if(!t||!t.length)return[];var n=0;return t=f(t,function(t){if(eu(t))return n=Ai(t.length,n),true}),E(n,function(n){return l(t,j(n))})}function $e(t,n){if(!t||!t.length)return[];var e=Te(t);return null==n?e:l(e,function(t){
return r(n,F,t)})}function Fe(t){return t=Ot(t),t.__chain__=true,t}function Ne(t,n){return n(t)}function Pe(){return this}function Ze(t,n){return(Ko(t)?u:Ki)(t,fe(n,3))}function qe(t,n){return(Ko(t)?i:Gi)(t,fe(n,3))}function Ve(t,n){return(Ko(t)?l:Jn)(t,fe(n,3))}function Ke(t,n,r){return n=r?F:n,n=t&&null==n?t.length:n,ne(t,128,F,F,F,F,n)}function Ge(t,n){var r;if(typeof n!="function")throw new Vu("Expected a function");return t=gu(t),function(){return 0<--t&&(r=n.apply(this,arguments)),1>=t&&(n=F),
r}}function Je(t,n,r){return n=r?F:n,t=ne(t,8,F,F,F,F,F,n),t.placeholder=Je.placeholder,t}function Ye(t,n,r){return n=r?F:n,t=ne(t,16,F,F,F,F,F,n),t.placeholder=Ye.placeholder,t}function He(t,n,r){function e(n){var r=c,e=a;return c=a=F,_=n,s=t.apply(e,r)}function u(t){var r=t-p;return t-=_,p===F||r>=n||0>r||g&&t>=l}function i(){var t=Uo();if(u(t))return o(t);var r,e=oo;r=t-_,t=n-(t-p),r=g?ki(t,l-r):t,h=e(i,r)}function o(t){return h=F,d&&c?e(t):(c=a=F,s)}function f(){var t=Uo(),r=u(t);if(c=arguments,
a=this,p=t,r){if(h===F)return _=t=p,h=oo(i,n),v?e(t):s;if(g)return h=oo(i,n),e(p)}return h===F&&(h=oo(i,n)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof t!="function")throw new Vu("Expected a function");return n=yu(n)||0,cu(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Ai(yu(r.maxWait)||0,n):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==F&&Xi(h),_=0,c=p=a=h=F},f.flush=function(){return h===F?s:o(Uo())},f}function Qe(t,n){function r(){var e=arguments,u=n?n.apply(this,e):e[0],i=r.cache;return i.has(u)?i.get(u):(e=t.apply(this,e),
r.cache=i.set(u,e)||i,e)}if(typeof t!="function"||n&&typeof n!="function")throw new Vu("Expected a function");return r.cache=new(Qe.Cache||Zt),r}function Xe(t){if(typeof t!="function")throw new Vu("Expected a function");return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}function tu(t,n){return t===n||t!==t&&n!==n}function nu(t){return eu(t)&&Qu.call(t,"callee")&&(!si.call(t,"callee")||"[object Arguments]"==ni.call(t));
}function ru(t){return null!=t&&fu(t.length)&&!iu(t)}function eu(t){return au(t)&&ru(t)}function uu(t){return!!au(t)&&("[object Error]"==ni.call(t)||typeof t.message=="string"&&typeof t.name=="string")}function iu(t){return t=cu(t)?ni.call(t):"","[object Function]"==t||"[object GeneratorFunction]"==t}function ou(t){return typeof t=="number"&&t==gu(t)}function fu(t){return typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t}function cu(t){var n=typeof t;return null!=t&&("object"==n||"function"==n);
}function au(t){return null!=t&&typeof t=="object"}function lu(t){return typeof t=="number"||au(t)&&"[object Number]"==ni.call(t)}function su(t){return!(!au(t)||"[object Object]"!=ni.call(t))&&(t=ci(t),null===t||(t=Qu.call(t,"constructor")&&t.constructor,typeof t=="function"&&t instanceof t&&Hu.call(t)==ti))}function hu(t){return typeof t=="string"||!Ko(t)&&au(t)&&"[object String]"==ni.call(t)}function pu(t){return typeof t=="symbol"||au(t)&&"[object Symbol]"==ni.call(t)}function _u(t){if(!t)return[];
if(ru(t))return hu(t)?$(t):Rr(t);if(ai&&t[ai]){t=t[ai]();for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r}return n=Et(t),("[object Map]"==n?L:"[object Set]"==n?M:Eu)(t)}function vu(t){return t?(t=yu(t),t===N||t===-N?1.7976931348623157e308*(0>t?-1:1):t===t?t:0):0===t?t:0}function gu(t){t=vu(t);var n=t%1;return t===t?n?t-n:t:0}function du(t){return t?_n(gu(t),0,4294967295):0}function yu(t){if(typeof t=="number")return t;if(pu(t))return P;if(cu(t)&&(t=typeof t.valueOf=="function"?t.valueOf():t,
t=cu(t)?t+"":t),typeof t!="string")return 0===t?t:+t;t=t.replace(ft,"");var n=yt.test(t);return n||xt.test(t)?$t(t.slice(2),n?2:8):dt.test(t)?P:+t}function bu(t){return zr(t,Au(t))}function xu(t){return null==t?"":gr(t)}function ju(t,n,r){return t=null==t?F:Sn(t,n),t===F?r:t}function wu(t,n){return null!=t&&se(t,n,Wn)}function mu(t){return ru(t)?tn(t):Vn(t)}function Au(t){return ru(t)?tn(t,true):Kn(t)}function ku(t,n){return null==t?{}:rr(t,In(t,Au,eo),fe(n))}function Eu(t){return t?I(t,mu(t)):[]}function Ou(t){
return Of(xu(t).toLowerCase())}function Su(t){return(t=xu(t))&&t.replace(wt,nn).replace(It,"")}function Iu(t,n,r){return t=xu(t),n=r?F:n,n===F?Bt.test(t)?t.match(zt)||[]:t.match(pt)||[]:t.match(n)||[]}function Ru(t){return function(){return t}}function zu(t){return t}function Wu(t){return qn(typeof t=="function"?t:vn(t,true))}function Bu(t,n,r){var e=mu(n),i=On(n,e);null!=r||cu(n)&&(i.length||!e.length)||(r=n,n=t,t=this,i=On(n,mu(n)));var o=!(cu(r)&&"chain"in r&&!r.chain),f=iu(t);return u(i,function(r){
var e=n[r];t[r]=e,f&&(t.prototype[r]=function(){var n=this.__chain__;if(o||n){var r=t(this.__wrapped__);return(r.__actions__=Rr(this.__actions__)).push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}return e.apply(t,s([this.value()],arguments))})}),t}function Lu(){}function Cu(t){return ye(t)?j(Se(t)):er(t)}function Uu(){return[]}function Mu(){return false}kt=kt?un.defaults(Pt.Object(),kt,un.pick(Pt,Lt)):Pt;var Du=kt.Array,Tu=kt.Date,$u=kt.Error,Fu=kt.Function,Nu=kt.Math,Pu=kt.Object,Zu=kt.RegExp,qu=kt.String,Vu=kt.TypeError,Ku=Du.prototype,Gu=Pu.prototype,Ju=kt["__core-js_shared__"],Yu=function(){
var t=/[^.]+$/.exec(Ju&&Ju.keys&&Ju.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Hu=Fu.prototype.toString,Qu=Gu.hasOwnProperty,Xu=0,ti=Hu.call(Pu),ni=Gu.toString,ri=Pt._,ei=Zu("^"+Hu.call(Qu).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ui=Vt?kt.Buffer:F,ii=kt.Symbol,oi=kt.Uint8Array,fi=Pu.defineProperty,ci=C(Pu.getPrototypeOf,Pu),ai=ii?ii.iterator:F,li=Pu.create,si=Gu.propertyIsEnumerable,hi=Ku.splice,pi=ii?ii.isConcatSpreadable:F,_i=kt.clearTimeout!==Pt.clearTimeout&&kt.clearTimeout,vi=Tu&&Tu.now!==Pt.Date.now&&Tu.now,gi=kt.setTimeout!==Pt.setTimeout&&kt.setTimeout,di=Nu.ceil,yi=Nu.floor,bi=Pu.getOwnPropertySymbols,xi=ui?ui.isBuffer:F,ji=kt.isFinite,wi=Ku.join,mi=C(Pu.keys,Pu),Ai=Nu.max,ki=Nu.min,Ei=Tu.now,Oi=kt.parseInt,Si=Nu.random,Ii=Ku.reverse,Ri=le(kt,"DataView"),zi=le(kt,"Map"),Wi=le(kt,"Promise"),Bi=le(kt,"Set"),Li=le(kt,"WeakMap"),Ci=le(Pu,"create"),Ui=le(Pu,"defineProperty"),Mi=Li&&new Li,Di={},Ti=Ie(Ri),$i=Ie(zi),Fi=Ie(Wi),Ni=Ie(Bi),Pi=Ie(Li),Zi=ii?ii.prototype:F,qi=Zi?Zi.valueOf:F,Vi=Zi?Zi.toString:F;
Ot.templateSettings={escape:Q,evaluate:X,interpolate:tt,variable:"",imports:{_:Ot}},Ot.prototype=Rt.prototype,Ot.prototype.constructor=Ot,Mt.prototype=yn(Rt.prototype),Mt.prototype.constructor=Mt,Dt.prototype=yn(Rt.prototype),Dt.prototype.constructor=Dt,Ft.prototype.clear=function(){this.__data__=Ci?Ci(null):{},this.size=0},Ft.prototype.delete=function(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t},Ft.prototype.get=function(t){var n=this.__data__;return Ci?(t=n[t],"__lodash_hash_undefined__"===t?F:t):Qu.call(n,t)?n[t]:F;
},Ft.prototype.has=function(t){var n=this.__data__;return Ci?n[t]!==F:Qu.call(n,t)},Ft.prototype.set=function(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ci&&n===F?"__lodash_hash_undefined__":n,this},Nt.prototype.clear=function(){this.__data__=[],this.size=0},Nt.prototype.delete=function(t){var n=this.__data__;return t=an(n,t),!(0>t)&&(t==n.length-1?n.pop():hi.call(n,t,1),--this.size,true)},Nt.prototype.get=function(t){var n=this.__data__;return t=an(n,t),0>t?F:n[t][1]},Nt.prototype.has=function(t){
return-1<an(this.__data__,t)},Nt.prototype.set=function(t,n){var r=this.__data__,e=an(r,t);return 0>e?(++this.size,r.push([t,n])):r[e][1]=n,this},Zt.prototype.clear=function(){this.size=0,this.__data__={hash:new Ft,map:new(zi||Nt),string:new Ft}},Zt.prototype.delete=function(t){return t=ce(this,t).delete(t),this.size-=t?1:0,t},Zt.prototype.get=function(t){return ce(this,t).get(t)},Zt.prototype.has=function(t){return ce(this,t).has(t)},Zt.prototype.set=function(t,n){var r=ce(this,t),e=r.size;return r.set(t,n),
this.size+=r.size==e?0:1,this},qt.prototype.add=qt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},qt.prototype.has=function(t){return this.__data__.has(t)},Kt.prototype.clear=function(){this.__data__=new Nt,this.size=0},Kt.prototype.delete=function(t){var n=this.__data__;return t=n.delete(t),this.size=n.size,t},Kt.prototype.get=function(t){return this.__data__.get(t)},Kt.prototype.has=function(t){return this.__data__.has(t)},Kt.prototype.set=function(t,n){
var r=this.__data__;if(r instanceof Nt){var e=r.__data__;if(!zi||199>e.length)return e.push([t,n]),this.size=++r.size,this;r=this.__data__=new Zt(e)}return r.set(t,n),this.size=r.size,this};var Ki=Cr(kn),Gi=Cr(En,true),Ji=Ur(),Yi=Ur(true),Hi=Mi?function(t,n){return Mi.set(t,n),t}:zu,Qi=Ui?function(t,n){return Ui(t,"toString",{configurable:true,enumerable:false,value:Ru(n),writable:true})}:zu,Xi=_i||function(t){return Pt.clearTimeout(t)},to=Bi&&1/M(new Bi([,-0]))[1]==N?function(t){return new Bi(t)}:Lu,no=Mi?function(t){
return Mi.get(t)}:Lu,ro=bi?C(bi,Pu):Uu,eo=bi?function(t){for(var n=[];t;)s(n,ro(t)),t=ci(t);return n}:Uu;(Ri&&"[object DataView]"!=Et(new Ri(new ArrayBuffer(1)))||zi&&"[object Map]"!=Et(new zi)||Wi&&"[object Promise]"!=Et(Wi.resolve())||Bi&&"[object Set]"!=Et(new Bi)||Li&&"[object WeakMap]"!=Et(new Li))&&(Et=function(t){var n=ni.call(t);if(t=(t="[object Object]"==n?t.constructor:F)?Ie(t):F)switch(t){case Ti:return"[object DataView]";case $i:return"[object Map]";case Fi:return"[object Promise]";case Ni:
return"[object Set]";case Pi:return"[object WeakMap]"}return n});var uo=Ju?iu:Mu,io=Ee(Hi),oo=gi||function(t,n){return Pt.setTimeout(t,n)},fo=Ee(Qi),co=function(t){t=Qe(t,function(t){return 500===n.size&&n.clear(),t});var n=t.cache;return t}(function(t){t=xu(t);var n=[];return et.test(t)&&n.push(""),t.replace(ut,function(t,r,e,u){n.push(e?u.replace(_t,"$1"):r||t)}),n}),ao=cr(function(t,n){return eu(t)?xn(t,An(n,1,eu,true)):[]}),lo=cr(function(t,n){var r=Ue(n);return eu(r)&&(r=F),eu(t)?xn(t,An(n,1,eu,true),fe(r,2)):[];
}),so=cr(function(t,n){var r=Ue(n);return eu(r)&&(r=F),eu(t)?xn(t,An(n,1,eu,true),F,r):[]}),ho=cr(function(t){var n=l(t,wr);return n.length&&n[0]===t[0]?Bn(n):[]}),po=cr(function(t){var n=Ue(t),r=l(t,wr);return n===Ue(r)?n=F:r.pop(),r.length&&r[0]===t[0]?Bn(r,fe(n,2)):[]}),_o=cr(function(t){var n=Ue(t),r=l(t,wr);return n===Ue(r)?n=F:r.pop(),r.length&&r[0]===t[0]?Bn(r,F,n):[]}),vo=cr(Me),go=ue(function(t,n){var r=t?t.length:0,e=pn(t,n);return ir(t,l(n,function(t){return ge(t,r)?+t:t}).sort(Or)),e}),yo=cr(function(t){
return dr(An(t,1,eu,true))}),bo=cr(function(t){var n=Ue(t);return eu(n)&&(n=F),dr(An(t,1,eu,true),fe(n,2))}),xo=cr(function(t){var n=Ue(t);return eu(n)&&(n=F),dr(An(t,1,eu,true),F,n)}),jo=cr(function(t,n){return eu(t)?xn(t,n):[]}),wo=cr(function(t){return xr(f(t,eu))}),mo=cr(function(t){var n=Ue(t);return eu(n)&&(n=F),xr(f(t,eu),fe(n,2))}),Ao=cr(function(t){var n=Ue(t);return eu(n)&&(n=F),xr(f(t,eu),F,n)}),ko=cr(Te),Eo=cr(function(t){var n=t.length,n=1<n?t[n-1]:F,n=typeof n=="function"?(t.pop(),n):F;return $e(t,n);
}),Oo=ue(function(t){function n(n){return pn(n,t)}var r=t.length,e=r?t[0]:0,u=this.__wrapped__;return!(1<r||this.__actions__.length)&&u instanceof Dt&&ge(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:Ne,args:[n],thisArg:F}),new Mt(u,this.__chain__).thru(function(t){return r&&!t.length&&t.push(F),t})):this.thru(n)}),So=Br(function(t,n,r){Qu.call(t,r)?++t[r]:hn(t,r,1)}),Io=Nr(We),Ro=Nr(Be),zo=Br(function(t,n,r){Qu.call(t,r)?t[r].push(n):hn(t,r,[n])}),Wo=cr(function(t,n,e){var u=-1,i=typeof n=="function",o=ye(n),f=ru(t)?Du(t.length):[];
return Ki(t,function(t){var c=i?n:o&&null!=t?t[n]:F;f[++u]=c?r(c,t,e):Cn(t,n,e)}),f}),Bo=Br(function(t,n,r){hn(t,r,n)}),Lo=Br(function(t,n,r){t[r?0:1].push(n)},function(){return[[],[]]}),Co=cr(function(t,n){if(null==t)return[];var r=n.length;return 1<r&&de(t,n[0],n[1])?n=[]:2<r&&de(n[0],n[1],n[2])&&(n=[n[0]]),tr(t,An(n,1),[])}),Uo=vi||function(){return Pt.Date.now()},Mo=cr(function(t,n,r){var e=1;if(r.length)var u=U(r,oe(Mo)),e=32|e;return ne(t,e,n,r,u)}),Do=cr(function(t,n,r){var e=3;if(r.length)var u=U(r,oe(Do)),e=32|e;
return ne(n,e,t,r,u)}),To=cr(function(t,n){return bn(t,1,n)}),$o=cr(function(t,n,r){return bn(t,yu(n)||0,r)});Qe.Cache=Zt;var Fo=cr(function(t,n){n=1==n.length&&Ko(n[0])?l(n[0],S(fe())):l(An(n,1),S(fe()));var e=n.length;return cr(function(u){for(var i=-1,o=ki(u.length,e);++i<o;)u[i]=n[i].call(this,u[i]);return r(t,this,u)})}),No=cr(function(t,n){return ne(t,32,F,n,U(n,oe(No)))}),Po=cr(function(t,n){return ne(t,64,F,n,U(n,oe(Po)))}),Zo=ue(function(t,n){return ne(t,256,F,F,F,n)}),qo=Hr(Rn),Vo=Hr(function(t,n){
return t>=n}),Ko=Du.isArray,Go=Gt?S(Gt):Un,Jo=xi||Mu,Yo=Jt?S(Jt):Mn,Ho=Yt?S(Yt):Tn,Qo=Ht?S(Ht):Nn,Xo=Qt?S(Qt):Pn,tf=Xt?S(Xt):Zn,nf=Hr(Gn),rf=Hr(function(t,n){return t<=n}),ef=Lr(function(t,n){if(xe(n)||ru(n))zr(n,mu(n),t);else for(var r in n)Qu.call(n,r)&&cn(t,r,n[r])}),uf=Lr(function(t,n){zr(n,Au(n),t)}),of=Lr(function(t,n,r,e){zr(n,Au(n),t,e)}),ff=Lr(function(t,n,r,e){zr(n,mu(n),t,e)}),cf=ue(pn),af=cr(function(t){return t.push(F,on),r(of,F,t)}),lf=cr(function(t){return t.push(F,we),r(vf,F,t)}),sf=qr(function(t,n,r){
t[n]=r},Ru(zu)),hf=qr(function(t,n,r){Qu.call(t,n)?t[n].push(r):t[n]=[r]},fe),pf=cr(Cn),_f=Lr(function(t,n,r){Qn(t,n,r)}),vf=Lr(function(t,n,r,e){Qn(t,n,r,e)}),gf=ue(function(t,n){return null==t?{}:(n=l(n,Se),nr(t,xn(In(t,Au,eo),n)))}),df=ue(function(t,n){return null==t?{}:nr(t,l(n,Se))}),yf=te(mu),bf=te(Au),xf=Tr(function(t,n,r){return n=n.toLowerCase(),t+(r?Ou(n):n)}),jf=Tr(function(t,n,r){return t+(r?"-":"")+n.toLowerCase()}),wf=Tr(function(t,n,r){return t+(r?" ":"")+n.toLowerCase()}),mf=Dr("toLowerCase"),Af=Tr(function(t,n,r){
return t+(r?"_":"")+n.toLowerCase()}),kf=Tr(function(t,n,r){return t+(r?" ":"")+Of(n)}),Ef=Tr(function(t,n,r){return t+(r?" ":"")+n.toUpperCase()}),Of=Dr("toUpperCase"),Sf=cr(function(t,n){try{return r(t,F,n)}catch(t){return uu(t)?t:new $u(t)}}),If=ue(function(t,n){return u(n,function(n){n=Se(n),hn(t,n,Mo(t[n],t))}),t}),Rf=Pr(),zf=Pr(true),Wf=cr(function(t,n){return function(r){return Cn(r,t,n)}}),Bf=cr(function(t,n){return function(r){return Cn(t,r,n)}}),Lf=Kr(l),Cf=Kr(o),Uf=Kr(_),Mf=Yr(),Df=Yr(true),Tf=Vr(function(t,n){
return t+n},0),$f=Xr("ceil"),Ff=Vr(function(t,n){return t/n},1),Nf=Xr("floor"),Pf=Vr(function(t,n){return t*n},1),Zf=Xr("round"),qf=Vr(function(t,n){return t-n},0);return Ot.after=function(t,n){if(typeof n!="function")throw new Vu("Expected a function");return t=gu(t),function(){if(1>--t)return n.apply(this,arguments)}},Ot.ary=Ke,Ot.assign=ef,Ot.assignIn=uf,Ot.assignInWith=of,Ot.assignWith=ff,Ot.at=cf,Ot.before=Ge,Ot.bind=Mo,Ot.bindAll=If,Ot.bindKey=Do,Ot.castArray=function(){if(!arguments.length)return[];
var t=arguments[0];return Ko(t)?t:[t]},Ot.chain=Fe,Ot.chunk=function(t,n,r){if(n=(r?de(t,n,r):n===F)?1:Ai(gu(n),0),r=t?t.length:0,!r||1>n)return[];for(var e=0,u=0,i=Du(di(r/n));e<r;)i[u++]=lr(t,e,e+=n);return i},Ot.compact=function(t){for(var n=-1,r=t?t.length:0,e=0,u=[];++n<r;){var i=t[n];i&&(u[e++]=i)}return u},Ot.concat=function(){var t=arguments.length;if(!t)return[];for(var n=Du(t-1),r=arguments[0];t--;)n[t-1]=arguments[t];return s(Ko(r)?Rr(r):[r],An(n,1))},Ot.cond=function(t){var n=t?t.length:0,e=fe();
return t=n?l(t,function(t){if("function"!=typeof t[1])throw new Vu("Expected a function");return[e(t[0]),t[1]]}):[],cr(function(e){for(var u=-1;++u<n;){var i=t[u];if(r(i[0],this,e))return r(i[1],this,e)}})},Ot.conforms=function(t){return gn(vn(t,true))},Ot.constant=Ru,Ot.countBy=So,Ot.create=function(t,n){var r=yn(t);return n?sn(r,n):r},Ot.curry=Je,Ot.curryRight=Ye,Ot.debounce=He,Ot.defaults=af,Ot.defaultsDeep=lf,Ot.defer=To,Ot.delay=$o,Ot.difference=ao,Ot.differenceBy=lo,Ot.differenceWith=so,Ot.drop=function(t,n,r){
var e=t?t.length:0;return e?(n=r||n===F?1:gu(n),lr(t,0>n?0:n,e)):[]},Ot.dropRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===F?1:gu(n),n=e-n,lr(t,0,0>n?0:n)):[]},Ot.dropRightWhile=function(t,n){return t&&t.length?yr(t,fe(n,3),true,true):[]},Ot.dropWhile=function(t,n){return t&&t.length?yr(t,fe(n,3),true):[]},Ot.fill=function(t,n,r,e){var u=t?t.length:0;if(!u)return[];for(r&&typeof r!="number"&&de(t,n,r)&&(r=0,e=u),u=t.length,r=gu(r),0>r&&(r=-r>u?0:u+r),e=e===F||e>u?u:gu(e),0>e&&(e+=u),e=r>e?0:du(e);r<e;)t[r++]=n;
return t},Ot.filter=function(t,n){return(Ko(t)?f:mn)(t,fe(n,3))},Ot.flatMap=function(t,n){return An(Ve(t,n),1)},Ot.flatMapDeep=function(t,n){return An(Ve(t,n),N)},Ot.flatMapDepth=function(t,n,r){return r=r===F?1:gu(r),An(Ve(t,n),r)},Ot.flatten=Le,Ot.flattenDeep=function(t){return t&&t.length?An(t,N):[]},Ot.flattenDepth=function(t,n){return t&&t.length?(n=n===F?1:gu(n),An(t,n)):[]},Ot.flip=function(t){return ne(t,512)},Ot.flow=Rf,Ot.flowRight=zf,Ot.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},Ot.functions=function(t){return null==t?[]:On(t,mu(t))},Ot.functionsIn=function(t){return null==t?[]:On(t,Au(t))},Ot.groupBy=zo,Ot.initial=function(t){return t&&t.length?lr(t,0,-1):[]},Ot.intersection=ho,Ot.intersectionBy=po,Ot.intersectionWith=_o,Ot.invert=sf,Ot.invertBy=hf,Ot.invokeMap=Wo,Ot.iteratee=Wu,Ot.keyBy=Bo,Ot.keys=mu,Ot.keysIn=Au,Ot.map=Ve,Ot.mapKeys=function(t,n){var r={};return n=fe(n,3),kn(t,function(t,e,u){hn(r,n(t,e,u),t)}),r},Ot.mapValues=function(t,n){
var r={};return n=fe(n,3),kn(t,function(t,e,u){hn(r,e,n(t,e,u))}),r},Ot.matches=function(t){return Yn(vn(t,true))},Ot.matchesProperty=function(t,n){return Hn(t,vn(n,true))},Ot.memoize=Qe,Ot.merge=_f,Ot.mergeWith=vf,Ot.method=Wf,Ot.methodOf=Bf,Ot.mixin=Bu,Ot.negate=Xe,Ot.nthArg=function(t){return t=gu(t),cr(function(n){return Xn(n,t)})},Ot.omit=gf,Ot.omitBy=function(t,n){return ku(t,Xe(fe(n)))},Ot.once=function(t){return Ge(2,t)},Ot.orderBy=function(t,n,r,e){return null==t?[]:(Ko(n)||(n=null==n?[]:[n]),
r=e?F:r,Ko(r)||(r=null==r?[]:[r]),tr(t,n,r))},Ot.over=Lf,Ot.overArgs=Fo,Ot.overEvery=Cf,Ot.overSome=Uf,Ot.partial=No,Ot.partialRight=Po,Ot.partition=Lo,Ot.pick=df,Ot.pickBy=ku,Ot.property=Cu,Ot.propertyOf=function(t){return function(n){return null==t?F:Sn(t,n)}},Ot.pull=vo,Ot.pullAll=Me,Ot.pullAllBy=function(t,n,r){return t&&t.length&&n&&n.length?ur(t,n,fe(r,2)):t},Ot.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?ur(t,n,F,r):t},Ot.pullAt=go,Ot.range=Mf,Ot.rangeRight=Df,Ot.rearg=Zo,Ot.reject=function(t,n){
return(Ko(t)?f:mn)(t,Xe(fe(n,3)))},Ot.remove=function(t,n){var r=[];if(!t||!t.length)return r;var e=-1,u=[],i=t.length;for(n=fe(n,3);++e<i;){var o=t[e];n(o,e,t)&&(r.push(o),u.push(e))}return ir(t,u),r},Ot.rest=function(t,n){if(typeof t!="function")throw new Vu("Expected a function");return n=n===F?n:gu(n),cr(t,n)},Ot.reverse=De,Ot.sampleSize=function(t,n,r){return n=(r?de(t,n,r):n===F)?1:gu(n),t=ru(t)?t:Eu(t),t=Oe(Rr(t)),t.length=_n(n,0,t.length),t},Ot.set=function(t,n,r){return null==t?t:ar(t,n,r);
},Ot.setWith=function(t,n,r,e){return e=typeof e=="function"?e:F,null==t?t:ar(t,n,r,e)},Ot.shuffle=function(t){return Oe(ru(t)?Rr(t):Eu(t))},Ot.slice=function(t,n,r){var e=t?t.length:0;return e?(r&&typeof r!="number"&&de(t,n,r)?(n=0,r=e):(n=null==n?0:gu(n),r=r===F?e:gu(r)),lr(t,n,r)):[]},Ot.sortBy=Co,Ot.sortedUniq=function(t){return t&&t.length?_r(t):[]},Ot.sortedUniqBy=function(t,n){return t&&t.length?_r(t,fe(n,2)):[]},Ot.split=function(t,n,r){return r&&typeof r!="number"&&de(t,n,r)&&(n=r=F),r=r===F?4294967295:r>>>0,
r?(t=xu(t))&&(typeof n=="string"||null!=n&&!Qo(n))&&(n=gr(n),!n&&Wt.test(t))?Ar($(t),0,r):t.split(n,r):[]},Ot.spread=function(t,n){if(typeof t!="function")throw new Vu("Expected a function");return n=n===F?0:Ai(gu(n),0),cr(function(e){var u=e[n];return e=Ar(e,0,n),u&&s(e,u),r(t,this,e)})},Ot.tail=function(t){var n=t?t.length:0;return n?lr(t,1,n):[]},Ot.take=function(t,n,r){return t&&t.length?(n=r||n===F?1:gu(n),lr(t,0,0>n?0:n)):[]},Ot.takeRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===F?1:gu(n),
n=e-n,lr(t,0>n?0:n,e)):[]},Ot.takeRightWhile=function(t,n){return t&&t.length?yr(t,fe(n,3),false,true):[]},Ot.takeWhile=function(t,n){return t&&t.length?yr(t,fe(n,3)):[]},Ot.tap=function(t,n){return n(t),t},Ot.throttle=function(t,n,r){var e=true,u=true;if(typeof t!="function")throw new Vu("Expected a function");return cu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),He(t,n,{leading:e,maxWait:n,trailing:u})},Ot.thru=Ne,Ot.toArray=_u,Ot.toPairs=yf,Ot.toPairsIn=bf,Ot.toPath=function(t){
return Ko(t)?l(t,Se):pu(t)?[t]:Rr(co(t))},Ot.toPlainObject=bu,Ot.transform=function(t,n,r){var e=Ko(t)||tf(t);if(n=fe(n,4),null==r)if(e||cu(t)){var i=t.constructor;r=e?Ko(t)?new i:[]:iu(i)?yn(ci(t)):{}}else r={};return(e?u:kn)(t,function(t,e,u){return n(r,t,e,u)}),r},Ot.unary=function(t){return Ke(t,1)},Ot.union=yo,Ot.unionBy=bo,Ot.unionWith=xo,Ot.uniq=function(t){return t&&t.length?dr(t):[]},Ot.uniqBy=function(t,n){return t&&t.length?dr(t,fe(n,2)):[]},Ot.uniqWith=function(t,n){return t&&t.length?dr(t,F,n):[];
},Ot.unset=function(t,n){var r;if(null==t)r=true;else{r=t;var e=n,e=ye(e,r)?[e]:mr(e);r=Ae(r,e),e=Se(Ue(e)),r=!(null!=r&&Qu.call(r,e))||delete r[e]}return r},Ot.unzip=Te,Ot.unzipWith=$e,Ot.update=function(t,n,r){return null==t?t:ar(t,n,(typeof r=="function"?r:zu)(Sn(t,n)),void 0)},Ot.updateWith=function(t,n,r,e){return e=typeof e=="function"?e:F,null!=t&&(t=ar(t,n,(typeof r=="function"?r:zu)(Sn(t,n)),e)),t},Ot.values=Eu,Ot.valuesIn=function(t){return null==t?[]:I(t,Au(t))},Ot.without=jo,Ot.words=Iu,
Ot.wrap=function(t,n){return n=null==n?zu:n,No(n,t)},Ot.xor=wo,Ot.xorBy=mo,Ot.xorWith=Ao,Ot.zip=ko,Ot.zipObject=function(t,n){return jr(t||[],n||[],cn)},Ot.zipObjectDeep=function(t,n){return jr(t||[],n||[],ar)},Ot.zipWith=Eo,Ot.entries=yf,Ot.entriesIn=bf,Ot.extend=uf,Ot.extendWith=of,Bu(Ot,Ot),Ot.add=Tf,Ot.attempt=Sf,Ot.camelCase=xf,Ot.capitalize=Ou,Ot.ceil=$f,Ot.clamp=function(t,n,r){return r===F&&(r=n,n=F),r!==F&&(r=yu(r),r=r===r?r:0),n!==F&&(n=yu(n),n=n===n?n:0),_n(yu(t),n,r)},Ot.clone=function(t){
return vn(t,false,true)},Ot.cloneDeep=function(t){return vn(t,true,true)},Ot.cloneDeepWith=function(t,n){return vn(t,true,true,n)},Ot.cloneWith=function(t,n){return vn(t,false,true,n)},Ot.conformsTo=function(t,n){return null==n||dn(t,n,mu(n))},Ot.deburr=Su,Ot.defaultTo=function(t,n){return null==t||t!==t?n:t},Ot.divide=Ff,Ot.endsWith=function(t,n,r){t=xu(t),n=gr(n);var e=t.length,e=r=r===F?e:_n(gu(r),0,e);return r-=n.length,0<=r&&t.slice(r,e)==n},Ot.eq=tu,Ot.escape=function(t){return(t=xu(t))&&H.test(t)?t.replace(J,rn):t;
},Ot.escapeRegExp=function(t){return(t=xu(t))&&ot.test(t)?t.replace(it,"\\$&"):t},Ot.every=function(t,n,r){var e=Ko(t)?o:jn;return r&&de(t,n,r)&&(n=F),e(t,fe(n,3))},Ot.find=Io,Ot.findIndex=We,Ot.findKey=function(t,n){return v(t,fe(n,3),kn)},Ot.findLast=Ro,Ot.findLastIndex=Be,Ot.findLastKey=function(t,n){return v(t,fe(n,3),En)},Ot.floor=Nf,Ot.forEach=Ze,Ot.forEachRight=qe,Ot.forIn=function(t,n){return null==t?t:Ji(t,fe(n,3),Au)},Ot.forInRight=function(t,n){return null==t?t:Yi(t,fe(n,3),Au)},Ot.forOwn=function(t,n){
return t&&kn(t,fe(n,3))},Ot.forOwnRight=function(t,n){return t&&En(t,fe(n,3))},Ot.get=ju,Ot.gt=qo,Ot.gte=Vo,Ot.has=function(t,n){return null!=t&&se(t,n,zn)},Ot.hasIn=wu,Ot.head=Ce,Ot.identity=zu,Ot.includes=function(t,n,r,e){return t=ru(t)?t:Eu(t),r=r&&!e?gu(r):0,e=t.length,0>r&&(r=Ai(e+r,0)),hu(t)?r<=e&&-1<t.indexOf(n,r):!!e&&-1<d(t,n,r)},Ot.indexOf=function(t,n,r){var e=t?t.length:0;return e?(r=null==r?0:gu(r),0>r&&(r=Ai(e+r,0)),d(t,n,r)):-1},Ot.inRange=function(t,n,r){return n=vu(n),r===F?(r=n,
n=0):r=vu(r),t=yu(t),t>=ki(n,r)&&t<Ai(n,r)},Ot.invoke=pf,Ot.isArguments=nu,Ot.isArray=Ko,Ot.isArrayBuffer=Go,Ot.isArrayLike=ru,Ot.isArrayLikeObject=eu,Ot.isBoolean=function(t){return true===t||false===t||au(t)&&"[object Boolean]"==ni.call(t)},Ot.isBuffer=Jo,Ot.isDate=Yo,Ot.isElement=function(t){return null!=t&&1===t.nodeType&&au(t)&&!su(t)},Ot.isEmpty=function(t){if(ru(t)&&(Ko(t)||typeof t=="string"||typeof t.splice=="function"||Jo(t)||nu(t)))return!t.length;var n=Et(t);if("[object Map]"==n||"[object Set]"==n)return!t.size;
if(xe(t))return!mi(t).length;for(var r in t)if(Qu.call(t,r))return false;return true},Ot.isEqual=function(t,n){return Dn(t,n)},Ot.isEqualWith=function(t,n,r){var e=(r=typeof r=="function"?r:F)?r(t,n):F;return e===F?Dn(t,n,r):!!e},Ot.isError=uu,Ot.isFinite=function(t){return typeof t=="number"&&ji(t)},Ot.isFunction=iu,Ot.isInteger=ou,Ot.isLength=fu,Ot.isMap=Ho,Ot.isMatch=function(t,n){return t===n||$n(t,n,ae(n))},Ot.isMatchWith=function(t,n,r){return r=typeof r=="function"?r:F,$n(t,n,ae(n),r)},Ot.isNaN=function(t){
return lu(t)&&t!=+t},Ot.isNative=function(t){if(uo(t))throw new $u("This method is not supported with core-js. Try https://github.com/es-shims.");return Fn(t)},Ot.isNil=function(t){return null==t},Ot.isNull=function(t){return null===t},Ot.isNumber=lu,Ot.isObject=cu,Ot.isObjectLike=au,Ot.isPlainObject=su,Ot.isRegExp=Qo,Ot.isSafeInteger=function(t){return ou(t)&&-9007199254740991<=t&&9007199254740991>=t},Ot.isSet=Xo,Ot.isString=hu,Ot.isSymbol=pu,Ot.isTypedArray=tf,Ot.isUndefined=function(t){return t===F;
},Ot.isWeakMap=function(t){return au(t)&&"[object WeakMap]"==Et(t)},Ot.isWeakSet=function(t){return au(t)&&"[object WeakSet]"==ni.call(t)},Ot.join=function(t,n){return t?wi.call(t,n):""},Ot.kebabCase=jf,Ot.last=Ue,Ot.lastIndexOf=function(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e;if(r!==F&&(u=gu(r),u=0>u?Ai(e+u,0):ki(u,e-1)),n===n){for(r=u+1;r--&&t[r]!==n;);t=r}else t=g(t,b,u,true);return t},Ot.lowerCase=wf,Ot.lowerFirst=mf,Ot.lt=nf,Ot.lte=rf,Ot.max=function(t){return t&&t.length?wn(t,zu,Rn):F;
},Ot.maxBy=function(t,n){return t&&t.length?wn(t,fe(n,2),Rn):F},Ot.mean=function(t){return x(t,zu)},Ot.meanBy=function(t,n){return x(t,fe(n,2))},Ot.min=function(t){return t&&t.length?wn(t,zu,Gn):F},Ot.minBy=function(t,n){return t&&t.length?wn(t,fe(n,2),Gn):F},Ot.stubArray=Uu,Ot.stubFalse=Mu,Ot.stubObject=function(){return{}},Ot.stubString=function(){return""},Ot.stubTrue=function(){return true},Ot.multiply=Pf,Ot.nth=function(t,n){return t&&t.length?Xn(t,gu(n)):F},Ot.noConflict=function(){return Pt._===this&&(Pt._=ri),
this},Ot.noop=Lu,Ot.now=Uo,Ot.pad=function(t,n,r){t=xu(t);var e=(n=gu(n))?T(t):0;return!n||e>=n?t:(n=(n-e)/2,Gr(yi(n),r)+t+Gr(di(n),r))},Ot.padEnd=function(t,n,r){t=xu(t);var e=(n=gu(n))?T(t):0;return n&&e<n?t+Gr(n-e,r):t},Ot.padStart=function(t,n,r){t=xu(t);var e=(n=gu(n))?T(t):0;return n&&e<n?Gr(n-e,r)+t:t},Ot.parseInt=function(t,n,r){return r||null==n?n=0:n&&(n=+n),Oi(xu(t),n||0)},Ot.random=function(t,n,r){if(r&&typeof r!="boolean"&&de(t,n,r)&&(n=r=F),r===F&&(typeof n=="boolean"?(r=n,n=F):typeof t=="boolean"&&(r=t,
t=F)),t===F&&n===F?(t=0,n=1):(t=vu(t),n===F?(n=t,t=0):n=vu(n)),t>n){var e=t;t=n,n=e}return r||t%1||n%1?(r=Si(),ki(t+r*(n-t+Tt("1e-"+((r+"").length-1))),n)):or(t,n)},Ot.reduce=function(t,n,r){var e=Ko(t)?h:m,u=3>arguments.length;return e(t,fe(n,4),r,u,Ki)},Ot.reduceRight=function(t,n,r){var e=Ko(t)?p:m,u=3>arguments.length;return e(t,fe(n,4),r,u,Gi)},Ot.repeat=function(t,n,r){return n=(r?de(t,n,r):n===F)?1:gu(n),fr(xu(t),n)},Ot.replace=function(){var t=arguments,n=xu(t[0]);return 3>t.length?n:n.replace(t[1],t[2]);
},Ot.result=function(t,n,r){n=ye(n,t)?[n]:mr(n);var e=-1,u=n.length;for(u||(t=F,u=1);++e<u;){var i=null==t?F:t[Se(n[e])];i===F&&(e=u,i=r),t=iu(i)?i.call(t):i}return t},Ot.round=Zf,Ot.runInContext=w,Ot.sample=function(t){t=ru(t)?t:Eu(t);var n=t.length;return n?t[or(0,n-1)]:F},Ot.size=function(t){if(null==t)return 0;if(ru(t))return hu(t)?T(t):t.length;var n=Et(t);return"[object Map]"==n||"[object Set]"==n?t.size:Vn(t).length},Ot.snakeCase=Af,Ot.some=function(t,n,r){var e=Ko(t)?_:sr;return r&&de(t,n,r)&&(n=F),
e(t,fe(n,3))},Ot.sortedIndex=function(t,n){return hr(t,n)},Ot.sortedIndexBy=function(t,n,r){return pr(t,n,fe(r,2))},Ot.sortedIndexOf=function(t,n){var r=t?t.length:0;if(r){var e=hr(t,n);if(e<r&&tu(t[e],n))return e}return-1},Ot.sortedLastIndex=function(t,n){return hr(t,n,true)},Ot.sortedLastIndexBy=function(t,n,r){return pr(t,n,fe(r,2),true)},Ot.sortedLastIndexOf=function(t,n){if(t&&t.length){var r=hr(t,n,true)-1;if(tu(t[r],n))return r}return-1},Ot.startCase=kf,Ot.startsWith=function(t,n,r){return t=xu(t),
r=_n(gu(r),0,t.length),n=gr(n),t.slice(r,r+n.length)==n},Ot.subtract=qf,Ot.sum=function(t){return t&&t.length?k(t,zu):0},Ot.sumBy=function(t,n){return t&&t.length?k(t,fe(n,2)):0},Ot.template=function(t,n,r){var e=Ot.templateSettings;r&&de(t,n,r)&&(n=F),t=xu(t),n=of({},n,e,on),r=of({},n.imports,e.imports,on);var u,i,o=mu(r),f=I(r,o),c=0;r=n.interpolate||mt;var a="__p+='";r=Zu((n.escape||mt).source+"|"+r.source+"|"+(r===tt?vt:mt).source+"|"+(n.evaluate||mt).source+"|$","g");var l="sourceURL"in n?"//# sourceURL="+n.sourceURL+"\n":"";
if(t.replace(r,function(n,r,e,o,f,l){return e||(e=o),a+=t.slice(c,l).replace(At,B),r&&(u=true,a+="'+__e("+r+")+'"),f&&(i=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=(i?a.replace(q,""):a).replace(V,"$1").replace(K,"$1;"),a="function("+(n||"obj")+"){"+(n?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",
n=Sf(function(){return Fu(o,l+"return "+a).apply(F,f)}),n.source=a,uu(n))throw n;return n},Ot.times=function(t,n){if(t=gu(t),1>t||9007199254740991<t)return[];var r=4294967295,e=ki(t,4294967295);for(n=fe(n),t-=4294967295,e=E(e,n);++r<t;)n(r);return e},Ot.toFinite=vu,Ot.toInteger=gu,Ot.toLength=du,Ot.toLower=function(t){return xu(t).toLowerCase()},Ot.toNumber=yu,Ot.toSafeInteger=function(t){return _n(gu(t),-9007199254740991,9007199254740991)},Ot.toString=xu,Ot.toUpper=function(t){return xu(t).toUpperCase();
},Ot.trim=function(t,n,r){return(t=xu(t))&&(r||n===F)?t.replace(ft,""):t&&(n=gr(n))?(t=$(t),r=$(n),n=z(t,r),r=W(t,r)+1,Ar(t,n,r).join("")):t},Ot.trimEnd=function(t,n,r){return(t=xu(t))&&(r||n===F)?t.replace(at,""):t&&(n=gr(n))?(t=$(t),n=W(t,$(n))+1,Ar(t,0,n).join("")):t},Ot.trimStart=function(t,n,r){return(t=xu(t))&&(r||n===F)?t.replace(ct,""):t&&(n=gr(n))?(t=$(t),n=z(t,$(n)),Ar(t,n).join("")):t},Ot.truncate=function(t,n){var r=30,e="...";if(cu(n))var u="separator"in n?n.separator:u,r="length"in n?gu(n.length):r,e="omission"in n?gr(n.omission):e;
t=xu(t);var i=t.length;if(Wt.test(t))var o=$(t),i=o.length;if(r>=i)return t;if(i=r-T(e),1>i)return e;if(r=o?Ar(o,0,i).join(""):t.slice(0,i),u===F)return r+e;if(o&&(i+=r.length-i),Qo(u)){if(t.slice(i).search(u)){var f=r;for(u.global||(u=Zu(u.source,xu(gt.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===F?i:c)}}else t.indexOf(gr(u),i)!=i&&(u=r.lastIndexOf(u),-1<u&&(r=r.slice(0,u)));return r+e},Ot.unescape=function(t){return(t=xu(t))&&Y.test(t)?t.replace(G,en):t},Ot.uniqueId=function(t){
var n=++Xu;return xu(t)+n},Ot.upperCase=Ef,Ot.upperFirst=Of,Ot.each=Ze,Ot.eachRight=qe,Ot.first=Ce,Bu(Ot,function(){var t={};return kn(Ot,function(n,r){Qu.call(Ot.prototype,r)||(t[r]=n)}),t}(),{chain:false}),Ot.VERSION="4.16.1",u("bind bindKey curry curryRight partial partialRight".split(" "),function(t){Ot[t].placeholder=Ot}),u(["drop","take"],function(t,n){Dt.prototype[t]=function(r){var e=this.__filtered__;if(e&&!n)return new Dt(this);r=r===F?1:Ai(gu(r),0);var u=this.clone();return e?u.__takeCount__=ki(r,u.__takeCount__):u.__views__.push({
size:ki(r,4294967295),type:t+(0>u.__dir__?"Right":"")}),u},Dt.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;Dt.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:fe(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}}),u(["head","last"],function(t,n){var r="take"+(n?"Right":"");Dt.prototype[t]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(t,n){var r="drop"+(n?"":"Right");
Dt.prototype[t]=function(){return this.__filtered__?new Dt(this):this[r](1)}}),Dt.prototype.compact=function(){return this.filter(zu)},Dt.prototype.find=function(t){return this.filter(t).head()},Dt.prototype.findLast=function(t){return this.reverse().find(t)},Dt.prototype.invokeMap=cr(function(t,n){return typeof t=="function"?new Dt(this):this.map(function(r){return Cn(r,t,n)})}),Dt.prototype.reject=function(t){return this.filter(Xe(fe(t)))},Dt.prototype.slice=function(t,n){t=gu(t);var r=this;return r.__filtered__&&(0<t||0>n)?new Dt(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),
n!==F&&(n=gu(n),r=0>n?r.dropRight(-n):r.take(n-t)),r)},Dt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Dt.prototype.toArray=function(){return this.take(4294967295)},kn(Dt.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),u=Ot[e?"take"+("last"==n?"Right":""):n],i=e||/^find/.test(n);u&&(Ot.prototype[n]=function(){function n(t){return t=u.apply(Ot,s([t],f)),e&&h?t[0]:t}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Dt,a=f[0],l=c||Ko(o);
l&&r&&typeof a=="function"&&1!=a.length&&(c=l=false);var h=this.__chain__,p=!!this.__actions__.length,a=i&&!h,c=c&&!p;return!i&&l?(o=c?o:new Dt(this),o=t.apply(o,f),o.__actions__.push({func:Ne,args:[n],thisArg:F}),new Mt(o,h)):a&&c?t.apply(this,f):(o=this.thru(n),a?e?o.value()[0]:o.value():o)})}),u("pop push shift sort splice unshift".split(" "),function(t){var n=Ku[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t);Ot.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){
var u=this.value();return n.apply(Ko(u)?u:[],t)}return this[r](function(r){return n.apply(Ko(r)?r:[],t)})}}),kn(Dt.prototype,function(t,n){var r=Ot[n];if(r){var e=r.name+"";(Di[e]||(Di[e]=[])).push({name:n,func:r})}}),Di[Zr(F,2).name]=[{name:"wrapper",func:F}],Dt.prototype.clone=function(){var t=new Dt(this.__wrapped__);return t.__actions__=Rr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Rr(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Rr(this.__views__),
t},Dt.prototype.reverse=function(){if(this.__filtered__){var t=new Dt(this);t.__dir__=-1,t.__filtered__=true}else t=this.clone(),t.__dir__*=-1;return t},Dt.prototype.value=function(){var t,n=this.__wrapped__.value(),r=this.__dir__,e=Ko(n),u=0>r,i=e?n.length:0;t=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c<a;){var l=o[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":t-=s;break;case"take":t=ki(t,f+s);break;case"takeRight":f=Ai(f,t-s)}}if(t={start:f,end:t},o=t.start,f=t.end,t=f-o,
u=u?f:o-1,o=this.__iteratees__,f=o.length,c=0,a=ki(t,this.__takeCount__),!e||200>i||i==t&&a==t)return br(n,this.__actions__);e=[];t:for(;t--&&c<a;){for(u+=r,i=-1,l=n[u];++i<f;){var h=o[i],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},Ot.prototype.at=Oo,Ot.prototype.chain=function(){return Fe(this)},Ot.prototype.commit=function(){return new Mt(this.value(),this.__chain__)},Ot.prototype.next=function(){this.__values__===F&&(this.__values__=_u(this.value()));
var t=this.__index__>=this.__values__.length;return{done:t,value:t?F:this.__values__[this.__index__++]}},Ot.prototype.plant=function(t){for(var n,r=this;r instanceof Rt;){var e=ze(r);e.__index__=0,e.__values__=F,n?u.__wrapped__=e:n=e;var u=e,r=r.__wrapped__}return u.__wrapped__=t,n},Ot.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof Dt?(this.__actions__.length&&(t=new Dt(this)),t=t.reverse(),t.__actions__.push({func:Ne,args:[De],thisArg:F}),new Mt(t,this.__chain__)):this.thru(De);
},Ot.prototype.toJSON=Ot.prototype.valueOf=Ot.prototype.value=function(){return br(this.__wrapped__,this.__actions__)},Ot.prototype.first=Ot.prototype.head,ai&&(Ot.prototype[ai]=Pe),Ot}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Pt._=un, define(function(){return un})):qt?((qt.exports=un)._=un,Zt._=un):Pt._=un}).call(this);

429
dist/mapping.fp.js vendored
View File

@@ -1,429 +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',
'extendAll': 'assignInAll',
'extendAllWith': 'assignInAllWith',
'extendWith': 'assignInWith',
'first': 'head',
// Methods that are curried variants of others.
'conforms': 'conformsTo',
'matches': 'isMatch',
'property': 'get',
// Ramda aliases.
'__': 'placeholder',
'F': 'stubFalse',
'T': 'stubTrue',
'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',
'dropLast': 'dropRight',
'dropLastWhile': 'dropRightWhile',
'equals': 'isEqual',
'identical': 'eq',
'indexBy': 'keyBy',
'init': 'initial',
'invertObj': 'invert',
'juxt': 'over',
'omitAll': 'omit',
'nAry': 'ary',
'path': 'get',
'pathEq': 'matchesProperty',
'pathOr': 'getOr',
'paths': 'at',
'pickAll': 'pick',
'pipe': 'flow',
'pluck': 'map',
'prop': 'get',
'propEq': 'matchesProperty',
'propOr': 'getOr',
'props': 'at',
'symmetricDifference': 'xor',
'symmetricDifferenceBy': 'xorBy',
'symmetricDifferenceWith': 'xorWith',
'takeLast': 'takeRight',
'takeLastWhile': 'takeRightWhile',
'unapply': 'rest',
'unnest': 'flatten',
'useWith': 'overArgs',
'where': 'conformsTo',
'whereEq': 'isMatch',
'zipObj': 'zipObject'
};
/** Used to map ary to method names. */
exports.aryMethod = {
'1': [
'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create',
'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow',
'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll',
'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse',
'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
'uniqueId', 'words', 'zipAll'
],
'2': [
'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith',
'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith',
'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN',
'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference',
'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq',
'every', 'filter', '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', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit',
'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial',
'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', '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',
'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',
'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',
'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',
'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',
'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight',
'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,
'findFrom': 1,
'findIndex': 1,
'findIndexFrom': 1,
'findKey': 1,
'findLast': 1,
'findLastFrom': 1,
'findLastIndex': 1,
'findLastIndexFrom': 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 = {
'assignInAllWith': [1, 2, 0],
'assignInWith': [1, 2, 0],
'assignAllWith': [1, 2, 0],
'assignWith': [1, 2, 0],
'differenceBy': [1, 2, 0],
'differenceWith': [1, 2, 0],
'getOr': [2, 1, 0],
'intersectionBy': [1, 2, 0],
'intersectionWith': [1, 2, 0],
'isEqualWith': [1, 2, 0],
'isMatchWith': [2, 1, 0],
'mergeAllWith': [1, 2, 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],
'rangeStep': [1, 2, 0],
'rangeStepRight': [1, 2, 0],
'setWith': [3, 1, 2, 0],
'sortedIndexBy': [2, 1, 0],
'sortedLastIndexBy': [2, 1, 0],
'unionBy': [1, 2, 0],
'unionWith': [1, 2, 0],
'updateWith': [3, 1, 2, 0],
'xorBy': [1, 2, 0],
'xorWith': [1, 2, 0],
'zipWith': [1, 2, 0]
};
/** Used to map method names to spread configs. */
exports.methodSpread = {
'assignAll': { 'start': 0 },
'assignAllWith': { 'afterRearg': true, 'start': 1 },
'assignInAll': { 'start': 0 },
'assignInAllWith': { 'afterRearg': true, 'start': 1 },
'defaultsAll': { 'start': 0 },
'defaultsDeepAll': { 'start': 0 },
'invokeArgs': { 'start': 2 },
'invokeArgsMap': { 'start': 2 },
'mergeAll': { 'start': 0 },
'mergeAllWith': { 'afterRearg': true, 'start': 1 },
'partial': { 'start': 1 },
'partialRight': { 'start': 1 },
'without': { 'start': 1 },
'zipAll': { 'start': 0 }
};
/** 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,
'assignAll': true,
'assignAllWith': true,
'assignIn': true,
'assignInAll': true,
'assignInAllWith': true,
'assignInWith': true,
'assignWith': true,
'defaults': true,
'defaultsAll': true,
'defaultsDeep': true,
'defaultsDeepAll': true,
'merge': true,
'mergeAll': true,
'mergeAllWith': 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 = {
'assignAll': 'assign',
'assignAllWith': 'assignWith',
'assignInAll': 'assignIn',
'assignInAllWith': 'assignInWith',
'curryN': 'curry',
'curryRightN': 'curryRight',
'defaultsAll': 'defaults',
'defaultsDeepAll': 'defaultsDeep',
'findFrom': 'find',
'findIndexFrom': 'findIndex',
'findLastFrom': 'findLast',
'findLastIndexFrom': 'findLastIndex',
'getOr': 'get',
'includesFrom': 'includes',
'indexOfFrom': 'indexOf',
'invokeArgs': 'invoke',
'invokeArgsMap': 'invokeMap',
'lastIndexOfFrom': 'lastIndexOf',
'mergeAll': 'merge',
'mergeAllWith': 'mergeWith',
'padChars': 'pad',
'padCharsEnd': 'padEnd',
'padCharsStart': 'padStart',
'propertyOf': 'get',
'rangeStep': 'range',
'rangeStepRight': 'rangeRight',
'restFrom': 'rest',
'spreadFrom': 'spread',
'trimChars': 'trim',
'trimCharsEnd': 'trimEnd',
'trimCharsStart': 'trimStart',
'zipAll': 'zip'
};
/** Used to track methods that skip fixing their arity. */
exports.skipFixed = {
'castArray': true,
'flow': true,
'flowRight': true,
'iteratee': true,
'mixin': true,
'rearg': 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,
'propertyOf': true,
'random': true,
'range': true,
'rangeRight': true,
'subtract': true,
'zip': true,
'zipObject': true,
'zipObjectDeep': true
};
/***/ }
/******/ ])
});
;

File diff suppressed because it is too large Load Diff

View File

@@ -1,535 +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 wrapImmutable(func, cloner) {
return function() {
var length = arguments.length;
if (!length) {
return;
}
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,
'toInteger': util.toInteger,
'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,
toInteger = helpers.toInteger,
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 pairs = [];
each(keys(source), function(key) {
if (isFunction(source[key])) {
pairs.push([key, func.prototype[key]]);
}
});
mixin(func, Object(source));
each(pairs, function(pair) {
var value = pair[1];
if (isFunction(value)) {
func.prototype[pair[0]] = value;
} else {
delete func.prototype[pair[0]];
}
});
return func;
};
},
'nthArg': function(nthArg) {
return function(n) {
var arity = n < 0 ? 1 : (toInteger(n) + 1);
return curry(nthArg(n), arity);
};
},
'rearg': function(rearg) {
return function(func, indexes) {
var arity = indexes ? indexes.length : 0;
return curry(rearg(func, indexes), arity);
};
},
'runInContext': function(runInContext) {
return function(context) {
return baseConvert(util, runInContext(context), options);
};
}
};
/*--------------------------------------------------------------------------*/
/**
* Casts `func` to a function with an arity capped iteratee if needed.
*
* @private
* @param {string} name The name of the function to inspect.
* @param {Function} func The function to inspect.
* @returns {Function} Returns the cast function.
*/
function castCap(name, func) {
if (config.cap) {
var indexes = mapping.iterateeRearg[name];
if (indexes) {
return iterateeRearg(func, indexes);
}
var n = !isLib && mapping.iterateeAry[name];
if (n) {
return iterateeAry(func, n);
}
}
return func;
}
/**
* Casts `func` to a curried function if needed.
*
* @private
* @param {string} name The name of the function to inspect.
* @param {Function} func The function to inspect.
* @param {number} n The arity of `func`.
* @returns {Function} Returns the cast function.
*/
function castCurry(name, func, n) {
return (forceCurry || (config.curry && n > 1))
? curry(func, n)
: func;
}
/**
* Casts `func` to a fixed arity function if needed.
*
* @private
* @param {string} name The name of the function to inspect.
* @param {Function} func The function to inspect.
* @param {number} n The arity cap.
* @returns {Function} Returns the cast function.
*/
function castFixed(name, func, n) {
if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {
var data = mapping.methodSpread[name],
start = data && data.start;
return start === undefined ? ary(func, n) : spread(func, start);
}
return func;
}
/**
* Casts `func` to an rearged function if needed.
*
* @private
* @param {string} name The name of the function to inspect.
* @param {Function} func The function to inspect.
* @param {number} n The arity of `func`.
* @returns {Function} Returns the cast function.
*/
function castRearg(name, func, n) {
return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]))
? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n])
: func;
}
/**
* 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,
lastIndex = length - 1,
result = clone(Object(object)),
nested = result;
while (nested != null && ++index < length) {
var key = path[index],
value = nested[key];
if (value != null) {
nested[path[index]] = clone(index == lastIndex ? value : 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 transformed.
*
* @private
* @param {Function} func The function to wrap.
* @param {Function} transform The argument transform.
* @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 = wrapImmutable(func, cloneArray);
}
else if (mutateMap.object[name]) {
wrapped = wrapImmutable(func, createCloner(func));
}
else if (mutateMap.set[name]) {
wrapped = wrapImmutable(func, cloneByPath);
}
}
each(aryMethodKeys, function(aryKey) {
each(mapping.aryMethod[aryKey], function(otherName) {
if (name == otherName) {
var spreadData = mapping.methodSpread[name],
afterRearg = spreadData && spreadData.afterRearg;
result = afterRearg
? castFixed(name, castRearg(name, wrapped, aryKey), aryKey)
: castRearg(name, castFixed(name, wrapped, aryKey), aryKey);
result = castCap(name, result);
result = castCurry(name, 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;

View File

@@ -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;

View File

@@ -1,367 +0,0 @@
/** Used to map aliases to their real names. */
exports.aliasToReal = {
// Lodash aliases.
'each': 'forEach',
'eachRight': 'forEachRight',
'entries': 'toPairs',
'entriesIn': 'toPairsIn',
'extend': 'assignIn',
'extendAll': 'assignInAll',
'extendAllWith': 'assignInAllWith',
'extendWith': 'assignInWith',
'first': 'head',
// Methods that are curried variants of others.
'conforms': 'conformsTo',
'matches': 'isMatch',
'property': 'get',
// Ramda aliases.
'__': 'placeholder',
'F': 'stubFalse',
'T': 'stubTrue',
'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',
'dropLast': 'dropRight',
'dropLastWhile': 'dropRightWhile',
'equals': 'isEqual',
'identical': 'eq',
'indexBy': 'keyBy',
'init': 'initial',
'invertObj': 'invert',
'juxt': 'over',
'omitAll': 'omit',
'nAry': 'ary',
'path': 'get',
'pathEq': 'matchesProperty',
'pathOr': 'getOr',
'paths': 'at',
'pickAll': 'pick',
'pipe': 'flow',
'pluck': 'map',
'prop': 'get',
'propEq': 'matchesProperty',
'propOr': 'getOr',
'props': 'at',
'symmetricDifference': 'xor',
'symmetricDifferenceBy': 'xorBy',
'symmetricDifferenceWith': 'xorWith',
'takeLast': 'takeRight',
'takeLastWhile': 'takeRightWhile',
'unapply': 'rest',
'unnest': 'flatten',
'useWith': 'overArgs',
'where': 'conformsTo',
'whereEq': 'isMatch',
'zipObj': 'zipObject'
};
/** Used to map ary to method names. */
exports.aryMethod = {
'1': [
'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create',
'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow',
'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll',
'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse',
'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
'uniqueId', 'words', 'zipAll'
],
'2': [
'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith',
'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith',
'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN',
'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference',
'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq',
'every', 'filter', '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', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit',
'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial',
'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', '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',
'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',
'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',
'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',
'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',
'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight',
'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,
'findFrom': 1,
'findIndex': 1,
'findIndexFrom': 1,
'findKey': 1,
'findLast': 1,
'findLastFrom': 1,
'findLastIndex': 1,
'findLastIndexFrom': 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 = {
'assignInAllWith': [1, 2, 0],
'assignInWith': [1, 2, 0],
'assignAllWith': [1, 2, 0],
'assignWith': [1, 2, 0],
'differenceBy': [1, 2, 0],
'differenceWith': [1, 2, 0],
'getOr': [2, 1, 0],
'intersectionBy': [1, 2, 0],
'intersectionWith': [1, 2, 0],
'isEqualWith': [1, 2, 0],
'isMatchWith': [2, 1, 0],
'mergeAllWith': [1, 2, 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],
'rangeStep': [1, 2, 0],
'rangeStepRight': [1, 2, 0],
'setWith': [3, 1, 2, 0],
'sortedIndexBy': [2, 1, 0],
'sortedLastIndexBy': [2, 1, 0],
'unionBy': [1, 2, 0],
'unionWith': [1, 2, 0],
'updateWith': [3, 1, 2, 0],
'xorBy': [1, 2, 0],
'xorWith': [1, 2, 0],
'zipWith': [1, 2, 0]
};
/** Used to map method names to spread configs. */
exports.methodSpread = {
'assignAll': { 'start': 0 },
'assignAllWith': { 'afterRearg': true, 'start': 1 },
'assignInAll': { 'start': 0 },
'assignInAllWith': { 'afterRearg': true, 'start': 1 },
'defaultsAll': { 'start': 0 },
'defaultsDeepAll': { 'start': 0 },
'invokeArgs': { 'start': 2 },
'invokeArgsMap': { 'start': 2 },
'mergeAll': { 'start': 0 },
'mergeAllWith': { 'afterRearg': true, 'start': 1 },
'partial': { 'start': 1 },
'partialRight': { 'start': 1 },
'without': { 'start': 1 },
'zipAll': { 'start': 0 }
};
/** 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,
'assignAll': true,
'assignAllWith': true,
'assignIn': true,
'assignInAll': true,
'assignInAllWith': true,
'assignInWith': true,
'assignWith': true,
'defaults': true,
'defaultsAll': true,
'defaultsDeep': true,
'defaultsDeepAll': true,
'merge': true,
'mergeAll': true,
'mergeAllWith': 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 = {
'assignAll': 'assign',
'assignAllWith': 'assignWith',
'assignInAll': 'assignIn',
'assignInAllWith': 'assignInWith',
'curryN': 'curry',
'curryRightN': 'curryRight',
'defaultsAll': 'defaults',
'defaultsDeepAll': 'defaultsDeep',
'findFrom': 'find',
'findIndexFrom': 'findIndex',
'findLastFrom': 'findLast',
'findLastIndexFrom': 'findLastIndex',
'getOr': 'get',
'includesFrom': 'includes',
'indexOfFrom': 'indexOf',
'invokeArgs': 'invoke',
'invokeArgsMap': 'invokeMap',
'lastIndexOfFrom': 'lastIndexOf',
'mergeAll': 'merge',
'mergeAllWith': 'mergeWith',
'padChars': 'pad',
'padCharsEnd': 'padEnd',
'padCharsStart': 'padStart',
'propertyOf': 'get',
'rangeStep': 'range',
'rangeStepRight': 'rangeRight',
'restFrom': 'rest',
'spreadFrom': 'spread',
'trimChars': 'trim',
'trimCharsEnd': 'trimEnd',
'trimCharsStart': 'trimStart',
'zipAll': 'zip'
};
/** Used to track methods that skip fixing their arity. */
exports.skipFixed = {
'castArray': true,
'flow': true,
'flowRight': true,
'iteratee': true,
'mixin': true,
'rearg': 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,
'propertyOf': true,
'random': true,
'range': true,
'rangeRight': true,
'subtract': true,
'zip': true,
'zipObject': true,
'zipObjectDeep': true
};

View File

@@ -1,6 +0,0 @@
/**
* The default argument placeholder value for methods.
*
* @type {Object}
*/
module.exports = {};

View File

@@ -1,71 +0,0 @@
'use strict';
const _ = require('lodash');
const fs = require('fs-extra');
const glob = require('glob');
const path = require('path');
const 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 base name and compiled template 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), (result, filePath) => {
const 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,
globTemplate,
min,
write
};

View File

@@ -1,9 +0,0 @@
'use strict';
const _mapping = require('../../fp/_mapping');
const util = require('./util');
const Hash = util.Hash;
/*----------------------------------------------------------------------------*/
module.exports = new Hash(_mapping);

View File

@@ -1,39 +0,0 @@
'use strict';
const _ = require('lodash');
const fs = require('fs-extra');
const uglify = require('uglify-js');
const 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`.
* (e.g. the `destPath` of `path/to/foo.js` would be `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');
}
const output = uglify.minify(srcPath, _.defaults(options || {}, uglifyOptions));
fs.writeFile(destPath, output.code, 'utf-8', callback);
}
module.exports = minify;

View File

@@ -1,22 +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': {
'collapse_vars': true,
'negate_iife': false,
'pure_getters': true,
'unsafe': true,
'warnings': false
},
'output': {
'ascii_only': true,
'comments': /@license/,
'max_line_len': 500
}
};

View File

@@ -1,40 +0,0 @@
'use strict';
const _ = require('lodash');
/*----------------------------------------------------------------------------*/
/**
* Creates a hash object. If a `properties` object is provided, its own
* enumerable properties are assigned to the created hash.
*
* @memberOf util
* @param {Object} [properties] The properties to assign to the hash.
* @returns {Object} Returns the new hash object.
*/
function Hash(properties) {
return _.transform(properties, (result, value, key) => {
result[key] = (_.isPlainObject(value) && !(value instanceof Hash))
? new Hash(value)
: value;
}, this);
}
Hash.prototype = Object.create(null);
/**
* This method throws any error it receives.
*
* @memberOf util
* @param {Object} [error] The error object.
*/
function pitch(error) {
if (error != null) {
throw error;
}
}
module.exports = {
Hash,
pitch
};

View File

@@ -1,56 +0,0 @@
'use strict';
const _ = require('lodash');
const async = require('async');
const path = require('path');
const webpack = require('webpack');
const file = require('../common/file');
const util = require('../common/util');
const basePath = path.join(__dirname, '..', '..');
const distPath = path.join(basePath, 'dist');
const fpPath = path.join(basePath, 'fp');
const filename = 'lodash.fp.js';
const 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
]
};
const mappingConfig = {
'entry': path.join(fpPath, '_mapping.js'),
'output': {
'path': distPath,
'filename': 'mapping.fp.js',
'library': 'mapping',
'libraryTarget': 'umd'
}
};
/*----------------------------------------------------------------------------*/
/**
* Creates browser builds of the FP converter and mappings at the `target` path.
*
* @private
* @param {string} target The output directory path.
*/
function build() {
async.series([
_.partial(webpack, mappingConfig),
_.partial(webpack, fpConfig),
file.min(path.join(distPath, filename))
], util.pitch);
}
build();

View File

@@ -1,78 +0,0 @@
'use strict';
const _ = require('lodash');
const fs = require('fs-extra');
const path = require('path');
const file = require('../common/file');
const mapping = require('../common/mapping');
const util = require('../common/util');
const templatePath = path.join(__dirname, 'template/doc');
const template = file.globTemplate(path.join(templatePath, '*.jst'));
const argNames = ['a', 'b', 'c', 'd'];
const templateData = {
mapping,
toArgOrder,
toFuncList
};
/**
* Converts arranged argument `indexes` into a named argument string
* representation of their order.
*
* @private
* @param {number[]} indexes The arranged argument indexes.
* @returns {string} Returns the named argument string.
*/
function toArgOrder(indexes) {
const reordered = [];
_.each(indexes, (newIndex, index) => {
reordered[newIndex] = argNames[index];
});
return '`(' + reordered.join(', ') + ')`';
}
/**
* Converts `funcNames` into a chunked list string representation.
*
* @private
* @param {string[]} funcNames The function names.
* @returns {string} Returns the function list string.
*/
function toFuncList(funcNames) {
let chunks = _.chunk(funcNames.slice().sort(), 5);
let lastChunk = _.last(chunks);
const lastName = lastChunk ? lastChunk.pop() : undefined;
chunks = _.reject(chunks, _.isEmpty);
lastChunk = _.last(chunks);
let result = '`' + _.map(chunks, chunk => chunk.join('`, `') + '`').join(',\n`');
if (lastName == null) {
return result;
}
if (_.size(chunks) > 1 || _.size(lastChunk) > 1) {
result += ',';
}
result += ' &';
result += _.size(lastChunk) < 5 ? ' ' : '\n';
return result + '`' + lastName + '`';
}
/*----------------------------------------------------------------------------*/
/**
* Creates the FP-Guide wiki at the `target` path.
*
* @private
* @param {string} target The output file path.
*/
function build(target) {
target = path.resolve(target);
fs.writeFile(target, template.wiki(templateData), util.pitch);
}
build(_.last(process.argv));

View File

@@ -1,150 +0,0 @@
'use strict';
const _ = require('lodash');
const async = require('async');
const glob = require('glob');
const path = require('path');
const file = require('../common/file');
const mapping = require('../common/mapping');
const util = require('../common/util');
const templatePath = path.join(__dirname, 'template/modules');
const template = file.globTemplate(path.join(templatePath, '*.jst'));
const aryMethods = _.union(
mapping.aryMethod[1],
mapping.aryMethod[2],
mapping.aryMethod[3],
mapping.aryMethod[4]
);
const categories = [
'array',
'collection',
'date',
'function',
'lang',
'math',
'number',
'object',
'seq',
'string',
'util'
];
const ignored = [
'_*.js',
'core.js',
'core.min.js',
'fp.js',
'index.js',
'lodash.js',
'lodash.min.js'
];
/**
* Checks if `name` is a method alias.
*
* @private
* @param {string} name The name to check.
* @returns {boolean} Returns `true` if `name` is a method alias, else `false`.
*/
function isAlias(name) {
return _.has(mapping.aliasToReal, name);
}
/**
* Checks if `name` is a category name.
*
* @private
* @param {string} name The name to check.
* @returns {boolean} Returns `true` if `name` is a category name, else `false`.
*/
function isCategory(name) {
return _.includes(categories, name);
}
/**
* Checks if `name` belongs to a method that's passed thru and not wrapped.
*
* @private
* @param {string} name The name to check.
* @returns {boolean} Returns `true` if `name` is of a pass thru method,
* else `false`.
*/
function isThru(name) {
return !_.includes(aryMethods, name);
}
/**
* Gets metadata for `func`.
*
* @private
* @param {Function} func The function to query.
* @returns {*} Returns the metadata for `func`.
*/
function getTemplate(moduleName) {
const data = {
'name': _.get(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);
}
/*----------------------------------------------------------------------------*/
/**
* Creates FP modules at the `target` path.
*
* @private
* @param {string} target The output directory path.
*/
function build(target) {
target = path.resolve(target);
const fpPath = path.join(target, 'fp');
// Glob existing lodash module paths.
const modulePaths = glob.sync(path.join(target, '*.js'), {
'nodir': true,
'ignore': ignored.map(filename => {
return path.join(target, filename);
})
});
// Add FP alias and remapped module paths.
_.each([mapping.aliasToReal, mapping.remap], data => {
_.forOwn(data, (realName, alias) => {
const modulePath = path.join(target, alias + '.js');
if (!_.includes(modulePaths, modulePath)) {
modulePaths.push(modulePath);
}
});
});
const actions = modulePaths.map(modulePath => {
const 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, util.pitch);
}
build(_.last(process.argv));

View File

@@ -1,226 +0,0 @@
## lodash/fp
The `lodash/fp` module promotes a more
[functional programming](https://en.wikipedia.org/wiki/Functional_programming)
(FP) friendly style by exporting 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='https://cdn.jsdelivr.net/g/lodash@4(lodash.min.js+lodash.fp.min.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:<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), methodName => {
const 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 Lodashs variadic methods:<br>
<%= toFuncList(_.keys(mapping.remap)) %>
#### Aliases
There are <%= _.size(mapping.aliasToReal) %> method aliases:<br>
<%= _.map(_.keys(mapping.aliasToReal).sort(), alias => {
const 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 Schroeders 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. Thats 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 });
// Heres 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());
```
## Tooling
Use [eslint-plugin-lodash-fp](https://www.npmjs.com/package/eslint-plugin-lodash-fp)
to help use `lodash/fp` more efficiently.

View File

@@ -1,7 +0,0 @@
module.exports = {
'cap': false,
'curry': false,
'fixed': false,
'immutable': false,
'rearg': false
};

View File

@@ -1,15 +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'),
'toInteger': require('../toInteger'),
'toPath': require('../toPath')
};

View File

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

View File

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

View File

@@ -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;

View File

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

View File

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

View File

@@ -1,5 +0,0 @@
var convert = require('./convert'),
func = convert('<%= name %>', require('../<%= _.get(mapping.remap, name, name) %>'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,31 +0,0 @@
'use strict';
const async = require('async');
const path = require('path');
const file = require('../common/file');
const util = require('../common/util');
const basePath = path.join(__dirname, '..', '..');
const distPath = path.join(basePath, 'dist');
const filename = 'lodash.js';
const baseLodash = path.join(basePath, filename);
const distLodash = path.join(distPath, filename);
/*----------------------------------------------------------------------------*/
/**
* Creates browser builds of Lodash at the `target` path.
*
* @private
* @param {string} target The output directory path.
*/
function build() {
async.series([
file.copy(baseLodash, distLodash),
file.min(distLodash)
], util.pitch);
}
build();

View File

@@ -1,83 +0,0 @@
'use strict';
const _ = require('lodash');
const docdown = require('docdown');
const fs = require('fs-extra');
const path = require('path');
const util = require('../common/util');
const basePath = path.join(__dirname, '..', '..');
const docPath = path.join(basePath, 'doc');
const readmePath = path.join(docPath, 'README.md');
const pkg = require('../../package.json');
const version = pkg.version;
const config = {
'base': {
'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': {
'style': 'github',
'sublinks': [npmLink('&#x24C3;', 'See the npm package')]
},
'site': {
'entryLink': '<a href="${entryHref}" class="fa fa-link"></a>',
'sourceLink': '[source](${sourceHref})',
'tocHref': '',
'tocLink': '',
'sublinks': [npmLink('npm package')]
}
};
/**
* Composes a npm link from `text` and optional `title`.
*
* @private
* @param {string} text The link text.
* @param {string} [title] The link title.
* @returns {string} Returns the composed npm link.
*/
function npmLink(text, title) {
return (
'<% if (name == "templateSettings" || !/^(?:methods|properties|seq)$/i.test(category)) {' +
'print(' +
'"[' + text + '](https://www.npmjs.com/package/lodash." + name.toLowerCase() + ' +
'"' + (title == null ? '' : ' \\"' + title + '\\"') + ')"' +
');' +
'} %>'
);
}
/**
* Post-process `markdown` to make adjustments.
*
* @private
* @param {string} markdown The markdown to process.
* @returns {string} Returns the processed markdown.
*/
function postprocess(markdown) {
// Wrap symbol property identifiers in brackets.
return markdown.replace(/\.(Symbol\.(?:[a-z]+[A-Z]?)+)/g, '[$1]');
}
/*----------------------------------------------------------------------------*/
/**
* Creates the documentation markdown formatted for 'github' or 'site'.
*
* @private
* @param {string} type The format type.
*/
function build(type) {
const options = _.defaults({}, config.base, config[type]);
const markdown = docdown(options);
fs.writeFile(readmePath, postprocess(markdown), util.pitch);
}
build(_.last(process.argv));

View File

@@ -1,34 +0,0 @@
'use strict';
const _ = require('lodash');
const async = require('async');
const path = require('path');
const file = require('../common/file');
const util = require('../common/util');
const basePath = path.join(__dirname, '..', '..');
const distPath = path.join(basePath, 'dist');
const 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']
];
/*----------------------------------------------------------------------------*/
/**
* Creates supplementary Lodash modules at the `target` path.
*
* @private
* @param {string} target The output directory path.
*/
function build(target) {
const actions = _.map(filePairs, pair =>
file.copy(pair[0], path.join(target, pair[1])));
async.series(actions, util.pitch);
}
build(_.last(process.argv));

View File

@@ -1,212 +0,0 @@
'use strict';
const _ = require('lodash');
const fs = require('fs');
const marky = require('marky-markdown');
const path = require('path');
const util = require('../common/util');
const basePath = path.join(__dirname, '..', '..');
const docPath = path.join(basePath, 'doc');
const readmePath = path.join(docPath, 'README.md');
const highlights = {
'html': [
'string'
],
'js': [
'comment',
'console',
'delimiter',
'method',
'modifier',
'name',
'numeric',
'string',
'support',
'type'
]
};
/**
* Converts Lodash method references into documentation links.
*
* @private
* @param {Object} $ The Cheerio object.
*/
function autoLink($) {
$('.doc-container code').each(function() {
const $code = $(this);
const html = $code.html();
if (/^_\.\w+$/.test(html)) {
const id = html.split('.')[1];
$code.replaceWith(`<a href="#${ id }"><code>_.${ id }</code></a>`);
}
});
}
/**
* Removes horizontal rules from the document.
*
* @private
* @param {Object} $ The Cheerio object.
*/
function removeHorizontalRules($) {
$('hr').remove();
}
/**
* Removes marky-markdown specific ids and class names.
*
* @private
* @param {Object} $ The Cheerio object.
*/
function removeMarkyAttributes($) {
$('[id^="user-content-"]')
.attr('class', null)
.attr('id', null);
$(':header:not(h3) > a').each(function() {
const $a = $(this);
$a.replaceWith($a.html());
});
}
/**
* Renames "_" id and anchor references to "lodash".
*
* @private
* @param {Object} $ The Cheerio object.
*/
function renameLodashId($) {
$('#_').attr('id', 'lodash');
$('[href="#_"]').attr('href', '#lodash');
}
/**
* Repairs broken marky-markdown headers.
* See https://github.com/npm/marky-markdown/issues/217 for more details.
*
* @private
* @param {Object} $ The Cheerio object.
*/
function repairMarkyHeaders($) {
$('p:empty + h3').prev().remove();
$('h3 ~ p:empty').each(function() {
const $p = $(this);
let node = this.prev;
while ((node = node.prev) && node.name != 'h3' && node.name != 'p') {
$p.prepend(node.next);
}
});
$('h3 code em').parent().each(function() {
const $code = $(this);
$code.html($code.html().replace(/<\/?em>/g, '_'));
});
}
/**
* Cleans up highlights blocks by removing extraneous class names and elements.
*
* @private
* @param {Object} $ The Cheerio object.
*/
function tidyHighlights($) {
$('.highlight').each(function() {
let $spans;
const $parent = $(this);
const ext = $parent.find('.source,.text').first().attr('class').split(' ').pop();
$parent.addClass(ext);
// Remove line indicators for single line snippets.
$parent.children('pre').each(function() {
const $divs = $(this).children('div');
if ($divs.length == 1) {
$divs.replaceWith($divs.html());
}
});
// Remove extraneous class names.
$parent.find('[class]').each(function() {
const $element = $(this);
const classes = $element.attr('class').split(' ');
const attr = _.intersection(classes, highlights[ext]).join(' ');
$element.attr('class', attr || null);
});
// Collapse nested comment highlights.
$parent.find(`[class~="comment"]`).each(function() {
const $element = $(this);
$element.text($element.text().trim());
});
// Collapse nested string highlights.
$parent.find(`[class~="string"]`).each(function() {
const $element = $(this);
$element.text($element.text());
});
// Collapse nested spans.
while (($spans = $parent.find('span:not([class])')).length) {
$spans.each(function() {
let $span = $(this);
while ($span[0] && $span[0].name == 'span' && !$span.attr('class')) {
const $parent = $span.parent();
$span.replaceWith($span.html());
$span = $parent;
}
});
}
});
}
/*----------------------------------------------------------------------------*/
/**
* Creates the documentation HTML.
*
* @private
*/
function build() {
const markdown = fs
// Load markdown.
.readFileSync(readmePath, 'utf8')
// Uncomment docdown HTML hints.
.replace(/(<)!--\s*|\s*--(>)/g, '$1$2');
const $ = marky(markdown, { 'sanitize': false });
const $header = $('h1').first().remove();
const version = $header.find('span').first().text().trim().slice(1);
// Auto-link Lodash method references.
autoLink($);
// Rename "_" id references to "lodash".
renameLodashId($);
// Remove docdown horizontal rules.
removeHorizontalRules($);
// Remove marky-markdown attribute additions.
removeMarkyAttributes($);
// Repair marky-markdown wrapping around headers.
repairMarkyHeaders($);
// Cleanup highlights.
tidyHighlights($);
const html = [
// Append YAML front matter.
'---',
'id: docs',
'layout: docs',
'title: Lodash Documentation',
'version: ' + (version || null),
'---',
'',
// Wrap in raw tags to avoid Liquid template tag processing.
'{% raw %}',
$.html().trim(),
'{% endraw %}',
''
].join('\n');
fs.writeFile(path.join(docPath, version + '.html'), html, util.pitch);
}
build();

16895
lodash.js

File diff suppressed because it is too large Load Diff

View File

@@ -1,63 +1,50 @@
{
"name": "lodash",
"version": "4.16.1",
"version": "5.0.0",
"license": "MIT",
"private": true,
"main": "lodash.js",
"engines": { "node": ">=4.0.0" },
"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 && npm run test:doc",
"doc:fp": "node lib/fp/build-doc",
"doc:site": "node lib/main/build-doc site",
"doc:sitehtml": "optional-dev-dependency marky-markdown@^8.1.0 && npm run doc:site && node lib/main/build-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:doc": "markdown-doctest doc/*.md",
"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": {
"async": "^2.0.1",
"benchmark": "^2.1.1",
"chalk": "^1.1.3",
"codecov.io": "~0.1.6",
"coveralls": "^2.11.14",
"curl-amd": "~0.8.12",
"docdown": "~0.7.1",
"dojo": "^1.11.2",
"ecstatic": "^2.1.0",
"fs-extra": "~0.30.0",
"glob": "^7.0.6",
"istanbul": "0.4.5",
"jquery": "^3.1.0",
"jscs": "^3.0.7",
"lodash": "4.15.0",
"lodash-doc-globals": "^0.1.1",
"markdown-doctest": "^0.8.1",
"optional-dev-dependency": "^1.3.0",
"platform": "^1.3.1",
"qunit-extras": "^2.1.0",
"qunitjs": "^2.0.1",
"request": "^2.75.0",
"requirejs": "^2.3.2",
"sauce-tunnel": "^2.5.0",
"uglify-js": "2.7.3",
"webpack": "^1.13.2"
"@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"
},
"greenkeeper": {
"ignore": [
"lodash"
"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
}

View File

@@ -1,112 +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 = {};
/*--------------------------------------------------------------------------*/
// Initialize controls.
addEventListener('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;
}());
buildList.addEventListener('change', eventHandler);
otherList.addEventListener('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));

View File

@@ -1,80 +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: 2.5em;
}
#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 1em 0.5em 1em;
overflow: hidden;
}
#perf-toolbar label {
display: inline-block;
margin-right: 0.5em;
}
#perf-toolbar span {
display: inline-block;
float: right;
line-height: 2.1em;
margin-left: 1em;
margin-top: 0;
}
</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>

File diff suppressed because it is too large Load Diff

18
src/.eslintrc.cjs Normal file
View 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
View 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
View 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
View 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
View 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
View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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
View 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
View 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

View 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

View 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

View 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
View 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

View 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

View 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

View 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

View 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
View 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

View 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

View 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

View 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
View 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

View 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

View 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

View 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

View 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

View 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

View 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