Compare commits

..

1001 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
John-David Dalton
27218a95af Bump to v4.16.1. 2016-09-20 09:40:52 -07:00
John-David Dalton
8e150ad6bc Rebuild lodash and docs. 2016-09-20 09:40:52 -07:00
John-David Dalton
c8914a890c Excuse more Underscore _.escape tests. 2016-09-20 09:40:52 -07:00
John-David Dalton
b25a86f352 Use lodashStable.escape in more places. 2016-09-20 07:49:59 -07:00
John-David Dalton
ec8e279235 Add _.escape and _.unescape tests for backticks. 2016-09-20 07:49:40 -07:00
John-David Dalton
1cc16029db Avoid attempting to (un)escape backticks. [closes #2660] 2016-09-20 07:31:21 -07:00
John-David Dalton
5c912bcc62 Wrap runInContext in parentheses as a hint to avoid deferred parsing. 2016-09-19 17:13:18 -07:00
John-David Dalton
b3742c8d3c Update coveralls to 2.11.14. 2016-09-19 17:13:18 -07:00
John-David Dalton
c3a7516712 Increment package version to enable ci tests. 2016-09-19 17:13:18 -07:00
John-David Dalton
12319d5775 Bump to v4.16.0. 2016-09-17 22:13:04 -07:00
John-David Dalton
45e1965936 Rebuild lodash and docs. 2016-09-17 22:10:52 -07:00
John-David Dalton
6091c8ec49 Remove outdated _.runInContext example. [ci skip] 2016-09-17 19:12:45 -07:00
John-David Dalton
cfb7dab0f3 Update deps. 2016-09-17 18:42:43 -07:00
John-David Dalton
2d9f3cde0f Add greenkeeper ignore field to packagre.json. [ci skip] 2016-09-17 16:28:15 -07:00
John-David Dalton
e5f4770247 Break out _.sampleSize and _.shuffle into array helpers. 2016-09-16 08:27:46 -07:00
Greenkeeper
dc7c321514 Update coveralls to 2.11.13. 2016-09-15 10:55:21 -07:00
John-David Dalton
40164659b1 Simplify changelog reference. [ci skip] 2016-09-15 10:16:59 -07:00
Mark Stosberg
7829f3d224 Add CHANGELOG in the expected place and link it to where it's actually maintained. (#2648)
Ref: https://github.com/lodash/lodash/issues/875
2016-09-15 10:10:09 -07:00
John-David Dalton
92359257c1 Update tested Chrome version in sauce. 2016-09-14 11:15:34 -07:00
John-David Dalton
d2a2b3a8c4 Reduce n_ note. [ci skip] 2016-09-10 21:05:32 -07:00
John-David Dalton
4019eb65f2 Use jsdelivr combo src for fp example. [ci skip] 2016-09-10 14:22:38 -07:00
John-David Dalton
4c5bead5c6 Update Node usage comments. [ci skip] 2016-09-10 13:34:07 -07:00
John-David Dalton
0163aae357 Trim code snippet comments. 2016-09-10 13:08:45 -07:00
John-David Dalton
8fa23a94a0 Use nullish checks instead of coercing to booleans. 2016-09-10 10:48:36 -07:00
John-David Dalton
8176d56c72 Move arraySample definition to fix builds. 2016-09-06 14:24:53 -07:00
John-David Dalton
5add168743 Update requirejs. 2016-09-06 13:00:59 -07:00
John-David Dalton
27e59404d3 Add engines field to package.json. 2016-09-06 12:43:28 -07:00
John-David Dalton
54f5ac7b8d Simplify nested highlights selector. 2016-09-06 08:04:38 -07:00
John-David Dalton
5c688cc0b7 Remove rogue html-minifier reference. 2016-09-05 23:20:37 -07:00
John-David Dalton
86efb0ea09 Use an arrow function. 2016-09-05 23:18:39 -07:00
John-David Dalton
bc13666222 Reduce highlights further. 2016-09-05 22:49:26 -07:00
John-David Dalton
d1abde7d1a Remove broken HTML escaping. 2016-09-05 02:08:07 -07:00
John-David Dalton
691db4d406 Refine the auto-link selector. 2016-09-05 01:54:33 -07:00
John-David Dalton
fb833b0c19 Cleanup build-site.js. 2016-09-04 22:32:21 -07:00
John-David Dalton
4d2181ad83 Use template string literals in build-doc.js. 2016-09-04 22:26:48 -07:00
John-David Dalton
9dd291a96e Move html-minifier use to lodash.github.io. 2016-09-04 01:23:16 -07:00
John-David Dalton
1344803e7e Minify highlights snippets. 2016-09-03 09:22:57 -07:00
John-David Dalton
4a5f8fa974 Split _.sample out to arraySample. 2016-09-01 20:03:40 -07:00
John-David Dalton
212e4a6407 Add more doc notes on the order of results. [ci skip] [closes #2622] 2016-09-01 11:41:38 -07:00
John-David Dalton
d47123779e Avoid inserting empty details. 2016-09-01 01:30:29 -07:00
John-David Dalton
fc734a6371 Increase the HOT_COUNT to avoid shorting out setting fp toString methods. 2016-09-01 01:12:12 -07:00
John-David Dalton
02be5b808e Rename “_” id references to “lodash”. 2016-08-30 22:32:32 -07:00
John-David Dalton
0d757fdc40 Ensure _.has returns the correct result for nested sparse arrays. [closes #2614] 2016-08-30 19:20:52 -07:00
John-David Dalton
0263a879c4 Add _.template note for disabling the ES template literal delimiter. [ci skip] 2016-08-29 16:19:23 -07:00
John-David Dalton
c309ed1c49 Add collapse_vars to the Uglify options. 2016-08-29 08:23:37 -07:00
John-David Dalton
e58de14437 Add memoizeCapped. 2016-08-29 08:07:34 -07:00
John-David Dalton
78a7fa1d14 Add Node.js test note. [ci skip] 2016-08-29 08:07:34 -07:00
John-David Dalton
77178a9583 Replace chaining _.forEach doc example with regular usage. [ci skip] 2016-08-29 07:37:47 -07:00
Georgii Dolzhykov
d2ab33eb52 Minor doc fix for mergeWith. [closes #2610] [ci skip] 2016-08-29 07:23:14 -07:00
John-David Dalton
7b3194660c Fix failing _.memoize test in IE 11. 2016-08-28 18:46:19 -07:00
John-David Dalton
f627b25e9d Remove cache.clear existance check. 2016-08-28 18:46:19 -07:00
John-David Dalton
1bbb7c9d3b Add _.memoize tests for max cache size and immutable maps. 2016-08-28 18:46:19 -07:00
John-David Dalton
08a4ae1f56 Add _.memoize tests for max cache size. 2016-08-28 18:46:19 -07:00
John-David Dalton
7c398f8019 Add Stack#size. 2016-08-28 18:46:03 -07:00
John-David Dalton
6651023f7f Unescape delete properties. 2016-08-27 19:58:03 -07:00
John-David Dalton
021df666a3 Cleanup test method flags. 2016-08-27 19:43:44 -07:00
John-David Dalton
d7e60cb6d0 Add more object assignments tests. 2016-08-27 19:29:41 -07:00
John-David Dalton
4cd26e6860 Add more “__proto__” assignment tests. 2016-08-27 19:17:11 -07:00
John-David Dalton
946a3bf5c8 Remove unneeded value guards in tests. 2016-08-27 18:36:40 -07:00
John-David Dalton
b10e6a01b2 Add _.memoize cache limit. 2016-08-27 18:21:42 -07:00
John-David Dalton
e23341a118 Fix deburred long S value. [closes #2606] 2016-08-27 16:52:46 -07:00
John-David Dalton
4446fb13a3 Change postfix increment operators to prefix. 2016-08-27 15:46:40 -07:00
John-David Dalton
4dfbde7716 Add shortOut helper. 2016-08-27 15:35:36 -07:00
John-David Dalton
3c03d4a1f3 Add castRest, flatRest, and overRest helpers. 2016-08-27 11:26:42 -07:00
John-David Dalton
a0ecdfff0b Minor _.defer doc example nit. [ci skip] 2016-08-27 11:26:41 -07:00
John-David Dalton
60023a23df Exit concat early if no arguments are provided. 2016-08-27 10:44:18 -07:00
John-David Dalton
e96442631c Scope markdown-doctest to the doc folder. 2016-08-27 09:17:45 -07:00
John-David Dalton
94750bfa3c Use ES6 in lib files. 2016-08-27 08:54:37 -07:00
John-David Dalton
5cc02555d0 Update Chrome and Firefox in sauce. 2016-08-25 15:44:26 -07:00
John-David Dalton
6e2f7e2f38 Update glob to 7.0.6. 2016-08-25 07:29:29 -07:00
John-David Dalton
de92cc32e6 Add __proto__ guards to more methods. 2016-08-25 07:00:40 -07:00
John-David Dalton
e97205409d Make the readme mimic the homepage more. [ci skip] 2016-08-24 08:22:27 -07:00
Zakaria Ridouh
091d8e3dbf add npm install guide (#2592) 2016-08-23 17:04:03 -07:00
John-David Dalton
171ca53c29 Split defineProperty to nativeDefineProperty. 2016-08-23 12:26:44 -07:00
John-David Dalton
5be61796d9 Use quotes instead of backticks. 2016-08-22 23:24:10 -07:00
John-David Dalton
1aee1c6cb8 Fix IE11 test fail. 2016-08-22 23:09:41 -07:00
John-David Dalton
343f48b08c Ensure __proto__ is treated as a regular key in assignments. [closes #2591] 2016-08-22 11:06:02 -07:00
John-David Dalton
358ecfd2eb Add writable descriptor to setToString. 2016-08-22 10:56:07 -07:00
John-David Dalton
8066ad7e65 Rename bash to shell. [ci skip] 2016-08-22 00:09:05 -07:00
John-David Dalton
7ae0d0099d Reduce highlights class names. 2016-08-21 23:58:28 -07:00
John-David Dalton
2e4fc41c9b Update marky-markdown to 8.1.0. 2016-08-21 21:04:37 -07:00
Greenkeeper
71247ff556 Update deps. 2016-08-21 19:07:06 -07:00
John-David Dalton
5ef163f143 Drop lesser used or soon to be unsupported Node.js versions from travis. 2016-08-21 19:06:24 -07:00
John-David Dalton
510cbfaa3f Cleanup fp test labels. 2016-08-18 10:45:08 -07:00
John-David Dalton
bd3fcab9c0 Add fp.rangeStep and fp.rangeStepRight. [closes #2584] 2016-08-18 10:45:08 -07:00
John-David Dalton
9841e6aa4c Use cacheHas in equalArrays. 2016-08-17 12:04:07 -07:00
John-David Dalton
1bf125eebd Add strictIndexOf and strictLastIndexOf helpers. 2016-08-17 12:04:06 -07:00
John-David Dalton
f9936b8b54 Add setToString helper. 2016-08-17 12:04:06 -07:00
John-David Dalton
d11aa6de06 Update _.sortBy doc example with preferred usage. [ci skip] 2016-08-17 12:04:06 -07:00
John-David Dalton
1c4fccc0fd Remove Edge note since it’s covered by the IE 11 note. [ci skip] 2016-08-17 12:04:06 -07:00
John-David Dalton
aa0323f04d Update Node.js compat comment. [ci skip] 2016-08-17 12:04:06 -07:00
John-David Dalton
2916e9dd11 Remove nonEnumShadows. 2016-08-13 14:17:41 -07:00
John-David Dalton
6958d7abd4 Newline nits. [ci skip] 2016-08-13 14:13:46 -07:00
John-David Dalton
9e661cb858 Excuse more Underscore tests. 2016-08-13 14:13:34 -07:00
John-David Dalton
a972026c67 Drop Node 0.10 testing in travis. 2016-08-13 13:52:20 -07:00
John-David Dalton
2b1bda7418 Remove old Chrome and Firefox fixes. 2016-08-13 13:50:21 -07:00
John-David Dalton
a6a3f3ed80 Remove isHostObject helper. 2016-08-13 13:29:41 -07:00
John-David Dalton
5cca51e978 Remove escaping backticks. 2016-08-13 13:29:41 -07:00
John-David Dalton
7c971587dc Increment package version to enable ci tests. 2016-08-13 13:29:41 -07:00
John-David Dalton
40a13d4b86 Bump to v4.15.0. 2016-08-12 07:20:51 -07:00
John-David Dalton
a0971d016d Rebuild lodash and docs. 2016-08-11 23:09:09 -07:00
John-David Dalton
410e9e3eb8 Update _.deburr tests. 2016-08-11 23:05:31 -07:00
John-David Dalton
37813c3826 Add _.negate test for accepting multiple arguments. 2016-08-11 23:05:28 -07:00
John-David Dalton
e00c243662 Update bug comments. [ci skip] 2016-08-11 23:05:27 -07:00
John-David Dalton
f504f5aac5 Minor comment nit. [ci skip] 2016-08-10 23:51:13 -07:00
John-David Dalton
0b63f2c259 Implement reAsciiWord by a negated character class to match more when unicode is dropped. 2016-08-10 23:18:15 -07:00
John-David Dalton
14fb27ce77 Update _.debounce test to hit code branch. 2016-08-10 18:44:46 -07:00
John-David Dalton
7da7d7b7e0 Update ecstatic to 2.1.0. 2016-08-10 18:44:21 -07:00
John-David Dalton
907add6acc Have travis cache the npm cache instead of node_modules. 2016-08-10 12:51:04 -07:00
John-David Dalton
f110e3ddcd Add Latin Extended-A support to comments/docs. [ci skip] 2016-08-10 12:51:04 -07:00
John-David Dalton
ed206e5611 Added latin extended-a block support to _.deburr. [closes #2511] 2016-08-10 12:50:57 -07:00
John-David Dalton
e4d8af175b Remove String reference. 2016-08-09 20:15:51 -07:00
John-David Dalton
ba7ddc8cdc Minor format nit. [ci skip] 2016-08-09 18:18:45 -07:00
John-David Dalton
389f5790a7 Remove npm update —dev from travis. 2016-08-09 18:17:59 -07:00
John-David Dalton
6071982dd9 Rework ascii and unicode helpers. 2016-08-09 18:08:20 -07:00
Greenkeeper
f71c0bd4c3 Update ecstatic to 2.0.0. 2016-08-09 12:22:47 -07:00
John-David Dalton
50b45d013a Fix typo in FP doc template. [ci skip] 2016-08-09 07:49:17 -07:00
John-David Dalton
93a047e77c Remove chatty npm update from lodash-cli in travis. 2016-08-09 00:01:22 -07:00
John-David Dalton
a3bf0e8888 Simplify _.size. 2016-08-08 23:39:02 -07:00
John-David Dalton
d8fa2f3e89 Fix safari test. 2016-08-08 20:47:21 -07:00
John-David Dalton
e361c5a5b3 Preserve lodash-cli node_modules in travis. 2016-08-08 18:58:46 -07:00
John-David Dalton
3ef032cbaf Add npm prune and update to travis. 2016-08-08 17:14:12 -07:00
John-David Dalton
36cf5a7ff3 Remove _.isFunction use from _.toNumber. 2016-08-08 16:38:56 -07:00
John-David Dalton
6d930d6920 Simplify _.isEmpty. 2016-08-08 16:38:51 -07:00
John-David Dalton
f676a8c9c1 Increment package version to enable ci tests. 2016-08-08 15:52:44 -07:00
John-David Dalton
941ffee2d3 Bump to v4.14.2. 2016-08-07 21:46:32 -07:00
John-David Dalton
0a71f3372f Rebuild lodash and docs. 2016-08-07 20:56:55 -07:00
John-David Dalton
f817f68487 Update docdown to 0.7.1. 2016-08-07 16:07:06 -07:00
John-David Dalton
826975f392 Add trailing newline to generated docs. 2016-08-07 14:40:28 -07:00
John-David Dalton
5f244d3c31 Remove em elements from code blocks. 2016-08-07 14:14:23 -07:00
John-David Dalton
71be34859f Wrap doc site in raw tags. 2016-08-07 13:55:38 -07:00
John-David Dalton
f9a4705c9c Add node_modules to travis cache. 2016-08-06 23:01:52 -07:00
John-David Dalton
a546842792 Upgrade travis to phantom.js v2. 2016-08-06 20:38:08 -07:00
John-David Dalton
ba86e20179 Fix IE 9 test fails. 2016-08-06 20:08:43 -07:00
John-David Dalton
b32fc6f6e6 Minor function/method nit. [ci skip] 2016-08-06 17:15:54 -07:00
John-David Dalton
1f13a34687 Add nativeKeysIn and cleanup object coercion. 2016-08-06 17:07:45 -07:00
John-David Dalton
f212b4850d Update links to ecma-262/7.0. [ci skip] 2016-08-04 21:54:03 -07:00
John-David Dalton
1b4555afb6 Restructure keys methods. 2016-08-04 21:53:55 -07:00
John-David Dalton
358013c67e Cleanup overArg description. [ci skip] 2016-08-04 09:40:01 -07:00
John-David Dalton
a98667ca05 Remove old JIT and engine bug guards. 2016-08-03 22:06:03 -07:00
John-David Dalton
02e9f4c333 Simplify _.isEmpty. 2016-08-03 21:42:52 -07:00
John-David Dalton
d7951db01b Fix test fail in es builds. 2016-08-03 17:22:20 -07:00
John-David Dalton
21fba2df9f Reduce deps of _.initial and _.tail. 2016-08-03 13:04:10 -07:00
John-David Dalton
a4947139a6 Overwrite primitives in paths of set methods. [closes #2558] 2016-08-03 10:48:22 -07:00
John-David Dalton
c01e7580cd Avoid error in Edge accessing localStorage when loading tests via the file: protocol. 2016-08-03 08:34:40 -07:00
John-David Dalton
8b4f22ed75 Update marky-markdown wrapping fix. 2016-08-02 12:07:06 -07:00
John-David Dalton
669b76bf99 Update marky-markdown. 2016-08-02 00:16:07 -07:00
Greenkeeper
efee02ace7 Update docdown to 0.7.0. 2016-08-01 20:20:31 -07:00
John-David Dalton
cd8adf5611 Minor doc formatting nits. [ci skip] 2016-08-01 17:28:22 -07:00
John-David Dalton
d216106b88 Add private tag to unexposed functions. [ci skip] 2016-08-01 17:25:16 -07:00
John-David Dalton
6dd8fb12ad Ensure fp.nthArg returns a curried function. 2016-08-01 16:55:12 -07:00
John-David Dalton
a4999575d0 Cleanup npm link creation. 2016-08-01 14:39:37 -07:00
John-David Dalton
fcaff8ff28 Update timeout related doc type tags. [closes #2553] [ci skip] 2016-08-01 08:53:30 -07:00
John-David Dalton
cf0b3e3212 Update docdown options. 2016-07-31 22:16:11 -07:00
John-David Dalton
bccb4150fd Add _.every doc note on matching empty collections. [ci skip] 2016-07-31 16:32:55 -07:00
John-David Dalton
9a297b0eb5 Cleanup partial comparison notes. [ci skip] 2016-07-31 16:32:08 -07:00
Dan J Miller
9c4baf7645 Clarify how comparison with empty sources is handled by _.matches, _.isMatch and _.matchesProperty. (#2548) 2016-07-31 00:54:48 -07:00
John-David Dalton
73b2f20509 Use lodash-doc-globals. 2016-07-30 23:48:17 -07:00
John-David Dalton
642690e692 Fix failing amd test. 2016-07-30 12:10:46 -07:00
John-David Dalton
1468c74c36 Make doubley sure Date.now, clearTimeout, and setTimeout are mockable. 2016-07-30 12:10:46 -07:00
Greenkeeper
0bfa1ec2d0 Update lodash to 4.14.1. 2016-07-30 12:10:46 -07:00
John-David Dalton
7c74464d7a Remove prepublish hook because we don’ publish this branch. [ci skip] 2016-07-30 12:10:46 -07:00
John-David Dalton
de051ac1ac Increment package version to enable ci tests. 2016-07-30 12:10:46 -07:00
John-David Dalton
ba0c4c413d Bump to v4.14.1. 2016-07-29 00:40:38 -07:00
John-David Dalton
7e6f5ef4f5 Rebuild lodash and docs. 2016-07-29 00:40:38 -07:00
John-David Dalton
712eeb009f Add missing semicolon. [ci skip] 2016-07-29 00:40:38 -07:00
Johannes Scharlach
b54e28deb7 Prevent failing circular reference detection. (#2543) 2016-07-28 23:12:53 -07:00
John-David Dalton
1f44cebac3 Update coveralls to 2.11.12. 2016-07-28 23:12:53 -07:00
John-David Dalton
9c05e8392b Add stack.delete for other in equalArrays and equalObjects. 2016-07-28 23:12:53 -07:00
John-David Dalton
9a67fec48a Remove stack.delete from baseMergeDeep. 2016-07-28 23:12:53 -07:00
John-David Dalton
1966ac7979 Prevent failed circular reference detection in _.defaultsDeep. [closes #2537] 2016-07-28 23:12:53 -07:00
John-David Dalton
8b624217c5 Cleanup _.debounce and _.throttle docs. [ci skip] 2016-07-28 23:12:53 -07:00
John-David Dalton
40499af9b9 Fix freeModule typo. 2016-07-28 23:12:53 -07:00
John-David Dalton
b3bd359a0d Use stubArray for easier readability. 2016-07-28 23:12:52 -07:00
John-David Dalton
de07e3f874 Add keys methods tests for array-like values. 2016-07-28 23:12:52 -07:00
John-David Dalton
c7e8953b68 Cleanup array-like tests. 2016-07-28 23:12:52 -07:00
John-David Dalton
80e7fe4bf9 Remove freeGlobal prerequisite for freeExports. [closes #2527] 2016-07-28 23:12:52 -07:00
John-David Dalton
2bc199d7fc Move method equivalence notes. [ci skip] 2016-07-28 23:12:52 -07:00
John-David Dalton
9b710d8e81 Use _.toFinite in random and range methods. 2016-07-28 23:12:52 -07:00
John-David Dalton
cc6a0ee98d Minor .gitignore cleanup. 2016-07-28 23:12:52 -07:00
Brad Buchanan
c9492d79a1 Document behavior of _.debounce when wait is 0 (#2530)
Clarify that when `leading` is false a debounced method with `wait=0` will not invoke immediately, but on the next tick (like `setTimeout`), but when `leading` is true the invocation will be immediate.
2016-07-28 23:12:52 -07:00
Brad Buchanan
94c4719c0d Fix missing semicolon (#2529)
I started on a documentation change but `npm run validate` after my initial pull revealed this linting error:

```
> jscs lodash.js

requireSemicolons: Missing semicolon after statement at lodash.js :
  5864 |    function isFlattenable(value) {
  5865 |      return isArray(value) || isArguments(value) ||
  5866 |        !!(spreadableSymbol && value && value[spreadableSymbol])
-----------------------------------------------------------------------^
  5867 |    }
  5868 |
```
2016-07-28 23:12:51 -07:00
John-David Dalton
c253e8d7b8 Ensure paths with consecutive empty brackets or dots are parsed correctly. 2016-07-28 23:12:51 -07:00
John-David Dalton
98f12fb8e1 Update qunitjs to 2.0.1. 2016-07-28 23:12:51 -07:00
John-David Dalton
e05a40bb16 Bump to v4.14.0. 2016-07-28 23:12:51 -07:00
John-David Dalton
c73bb67486 Rebuild lodash and docs. 2016-07-28 23:12:40 -07:00
John-David Dalton
3ad0cbc86d Minor _.includes test cleanup. 2016-07-24 08:38:09 -07:00
John-David Dalton
6402af7db9 Use String#slice instead of String#indexOf for _.endsWith and _.startsWith. 2016-07-24 08:38:09 -07:00
John-David Dalton
6a41a79ded Move switch optimization to negate. 2016-07-23 23:33:30 -07:00
John-David Dalton
fbd9a804a9 Use negate in reject. 2016-07-23 22:11:34 -07:00
John-David Dalton
694e1175a1 Remove arity hint from lazy reject. 2016-07-23 22:11:34 -07:00
John-David Dalton
80dbd4cbfa Add props param to basePickBy. 2016-07-23 22:11:34 -07:00
John-David Dalton
d459f4ac7c Add more arity hints. 2016-07-23 22:11:34 -07:00
John-David Dalton
2c5c4bfbea Remove switch statement from baseRest. 2016-07-22 21:06:15 -07:00
John-David Dalton
a1a68bb5d7 Update async to 2.0.1 and request to 2.74.0. 2016-07-22 18:51:57 -07:00
John-David Dalton
984a10c1b1 Add isConcatSpreadable to flatten methods. 2016-07-22 18:51:57 -07:00
John-David Dalton
3c4c06cb5e Update benchmark.js to 2.1.1. 2016-07-21 08:39:58 -07:00
John-David Dalton
8d28a5ca3f Minor var palcement nit. 2016-07-19 17:58:58 -07:00
John-David Dalton
801c4a56c3 Remove old browser addListener helper. 2016-07-19 17:58:26 -07:00
John-David Dalton
ea000e6ce7 Style nit in sauce helper. 2016-07-19 17:58:26 -07:00
John-David Dalton
6723cdfa07 Update tested firefox version in sauce. 2016-07-18 11:29:43 -07:00
John-David Dalton
2cf10711f5 Remove toc links from site. 2016-07-18 09:01:25 -07:00
John-David Dalton
bde171e947 Update doc options. 2016-07-18 09:01:25 -07:00
John-David Dalton
2696615523 Update docdown to 0.6.1 and jscs to 3.0.7. 2016-07-18 09:01:13 -07:00
John-David Dalton
f98028d1d8 Cleanup doc notes. [ci skip] 2016-07-17 21:33:41 -07:00
John-David Dalton
97475fc365 Remove checkGlobal helper. 2016-07-17 20:10:01 -07:00
John-David Dalton
ea7aa52ea3 Cleanup “coerce arguments” bits of function descriptions. 2016-07-17 20:10:01 -07:00
John-David Dalton
ec4ae5978b Add baseRest. 2016-07-17 20:10:01 -07:00
Samuel Greene
90d73143e1 Don't rearg zipObjectDeep (#2503) 2016-07-17 20:10:01 -07:00
John-David Dalton
249f0cd72c Add _.isEqual test for transitive equivalence. 2016-07-17 20:10:01 -07:00
John-David Dalton
232cc1ab34 Minor comment typo. [ci skip] 2016-07-17 20:10:01 -07:00
Greenkeeper
2cea31cb1b Update async to version 2.0.0 and coveralls to 2.11.11. 2016-07-17 20:10:01 -07:00
John-David Dalton
02c4d60861 Remove thisGlobal use. 2016-07-17 20:10:01 -07:00
John-David Dalton
8c9073308a Add back excused Underscore isSet test for IE11. 2016-07-17 20:10:01 -07:00
John-David Dalton
8cb5455671 Add fp.zipAll. 2016-07-17 20:10:00 -07:00
John-David Dalton
8bc44e3bff Update qunit-extras to 2.1.0. 2016-07-17 20:10:00 -07:00
John-David Dalton
73f84baaec Add more excused underscore debounce tests. 2016-07-17 20:10:00 -07:00
John-David Dalton
d3acace1c4 Update uglify options to disable negate_iffe. 2016-07-17 20:10:00 -07:00
Greenkeeper
7f3539d001 Update request to 2.73.0. 2016-07-17 20:10:00 -07:00
John-David Dalton
3ef19f1ab1 Add lodash-webpack-plugin reference to readme. [ci skip] 2016-07-17 20:10:00 -07:00
John-David Dalton
749b2db846 Update jquery to 3.1.0 and marky-markdown to 7.0.2.
chore(package): update jquery to version 3.1.0 (#2483)

https://greenkeeper.io/
2016-07-17 20:10:00 -07:00
John-David Dalton
a3e99b5d89 Use optional-dev-dependency. 2016-07-17 20:10:00 -07:00
John-David Dalton
dbbb3fbb55 Add comments and cleanup build-site.js. 2016-07-17 20:10:00 -07:00
John-David Dalton
6eeac45d23 Update vendors. 2016-07-17 20:10:00 -07:00
John-David Dalton
5669cc0a0b Remove hrs. 2016-07-17 20:09:59 -07:00
John-David Dalton
d986901a1c Narrow header anchor selector. 2016-07-17 20:09:59 -07:00
John-David Dalton
5394bbf06a Make newline formatting explicit. 2016-07-17 20:09:59 -07:00
John-David Dalton
d7b2f922b5 Remove "v" prefix from version. 2016-07-17 20:09:59 -07:00
John-David Dalton
9ab55443eb Fix _.isEqualWith and _.isMatchWith test fails. 2016-07-17 20:09:59 -07:00
John-David Dalton
67c7a43e6f Move marky-markdown to an optional dep. 2016-07-17 20:09:59 -07:00
Alex Wachira
26a4bfb838 Make "lodash/fp" doc link point to untagged branch. [ci skip] 2016-07-17 20:09:59 -07:00
John-David Dalton
e7a16b2e64 Make "Contributing" doc link point to untagged branch. [ci skip] 2016-07-17 20:09:45 -07:00
John-David Dalton
a5612ed668 Update uglify-js to 2.7.0 and jscs to 3.0.6. 2016-07-17 20:09:03 -07:00
John-David Dalton
f55d15692b Remove more markymark meta data. 2016-07-17 20:08:13 -07:00
John-David Dalton
107994859b Remove markymark links from h4s. 2016-07-17 20:08:13 -07:00
John-David Dalton
a8d3689061 Ensure _.isEqual works more consistently with circular references. 2016-07-17 20:08:12 -07:00
Y-Less
4fb4ec5328 Links to creation equivalents for in-place modification functions. (#2468)
See issue #2467
2016-07-17 20:08:12 -07:00
John-David Dalton
9bc8519656 Cleanup build-site script. 2016-07-17 20:08:12 -07:00
Benjamin Tan
af36d2d8e5 Ensure proper tags are generated. (#2465) 2016-07-17 20:08:12 -07:00
Zack Hall
6b0069f10f Add doc-site build script (#2461) 2016-07-17 20:08:12 -07:00
John-David Dalton
a64b629333 Combine _.isMatch and _.matches tests. 2016-06-29 12:31:07 -07:00
John-David Dalton
fc4cc977ed Remove backticks from package name. 2016-06-29 12:31:07 -07:00
John-David Dalton
7483520c8c Cleanup .gitignore. 2016-06-29 12:31:07 -07:00
John-David Dalton
5d18fb8c70 Simplify uglify options. 2016-06-29 12:31:07 -07:00
John-David Dalton
1163bfac5c Add _.conformsTo tests. 2016-06-29 12:31:07 -07:00
John-David Dalton
d643bbd7e4 Add conformsTo to lodash doc block. [ci skip] 2016-06-26 09:55:47 -07:00
Dan J Miller
32158935f8 Change second param of _.invokeMap as path in docs. [ci skip] 2016-06-24 19:41:01 -07:00
John-David Dalton
50bf1ea784 Ensure _.first supports shortcut fusion. [closes #2447] 2016-06-24 07:05:27 -07:00
Greenkeeper
fa29123c5e Update deps. 2016-06-22 07:15:55 -07:00
John-David Dalton
314c652818 Update Chrome versions in sauce. 2016-06-22 07:15:45 -07:00
John-David Dalton
a3dd60370e Cleanup fp tests. 2016-06-18 22:31:45 -07:00
John-David Dalton
3d82567118 Add isEvenIndex helper to fp tests. 2016-06-18 22:31:45 -07:00
John-David Dalton
eaac5e02c0 Add fp.propertyOf test. 2016-06-18 21:59:56 -07:00
John-David Dalton
3bd5703bdb Downgrade QUnit for Backbone test support. 2016-06-18 21:30:38 -07:00
John-David Dalton
bf80a75474 Make fp.propertyOf and remap of fp.get. 2016-06-18 12:49:48 -07:00
John-David Dalton
bea7016223 Make fp.property and alias of fp.get. 2016-06-18 12:49:48 -07:00
John-David Dalton
c8ff2b4612 Update qunit to 2.0.0. 2016-06-18 12:49:48 -07:00
John-David Dalton
6c673cd19b Cleanup wrapper details helpers. 2016-06-18 12:49:47 -07:00
John-David Dalton
c1ae43e041 Update glob to 7.0.4 and markdown-doctest to 0.8.0. 2016-06-18 12:49:38 -07:00
Brandon Horst
9605072200 Formalize which value is picked by _.unionBy and _.unionWith to pick the result from the first array in which it occurs. 2016-06-18 12:47:44 -07:00
John-David Dalton
9cabc7c222 Ensute _.assignWith respects customizer results of undefined. [closes #2424] 2016-06-18 12:47:44 -07:00
Dan J Miller
b2b3391827 Fixed display of transforms param in overArgs docs. (#2422) 2016-06-18 12:47:43 -07:00
John-David Dalton
19e94b8889 Move split out functions. 2016-06-18 12:47:43 -07:00
John-David Dalton
4bee8c9ead Add docs for split out functions. [ci skip] 2016-06-18 12:47:43 -07:00
John-David Dalton
3f1ae77306 Assign pair[0] to a variable. 2016-06-18 12:47:43 -07:00
John-David Dalton
9f6d6d7b37 Remove isFlattenableIteratee predicate to resolve regression. [closes #2418] 2016-06-18 12:47:43 -07:00
John-David Dalton
adac412f58 Split out setWrapToString. 2016-06-18 12:47:43 -07:00
John-David Dalton
31ca38515a Make wrap functions more debuggable. 2016-06-18 12:47:43 -07:00
John-David Dalton
4a35929979 Cleanup wrap comments. 2016-06-18 12:47:42 -07:00
John-David Dalton
4a0610f107 Replace _.result use with _.get. 2016-06-18 12:47:42 -07:00
John-David Dalton
9a1b3d813a Rename wrapper function. 2016-06-18 12:47:42 -07:00
John-David Dalton
a7a4862491 Add missing context references. 2016-06-18 12:47:42 -07:00
John-David Dalton
5783536837 Update dojo to 1.11.2 and jquery to 3.0.0. 2016-06-18 12:47:42 -07:00
John-David Dalton
f8646d1a5d Minor space nit. 2016-06-10 12:19:28 -07:00
John-David Dalton
39bb7064e7 Minor doc nits. [ci skip] 2016-06-10 12:19:28 -07:00
John-David Dalton
388bf6934d Ensure fp.rearg returns a curried function. [closes #2413] 2016-06-08 23:55:25 -07:00
John-David Dalton
5122e9271c Add conforms to aliasToReal fp mapping. 2016-06-08 23:26:57 -07:00
John-David Dalton
32b36435f8 Add baseIsXyz helpers. 2016-06-08 10:53:49 -07:00
John-David Dalton
807ad48bbc Add compat note to addSetEntry. [ci skip] 2016-06-07 12:19:35 -07:00
John-David Dalton
b5842314b4 Make LARGE_ARRAY_SIZE check in stackSet align with others. 2016-06-07 08:33:48 -07:00
John-David Dalton
efb4db2b86 Isolate caches of tests. 2016-06-07 07:20:01 -07:00
John-David Dalton
ecbf8cd722 Add map cache test for changing values. 2016-06-07 07:08:33 -07:00
John-David Dalton
9992144130 Cleanup clone tests. 2016-06-07 07:08:14 -07:00
Greenkeeper
1f9cba6f53 Update markdown-doctest to 0.7.0. 2016-06-06 23:46:34 -07:00
John-David Dalton
2465a6bdbd Add fp.mergeAllWith test. 2016-06-06 23:46:06 -07:00
John-David Dalton
1a7199fd6b Cleanup fp tests. 2016-06-06 23:20:13 -07:00
John-David Dalton
57f0a4c6d7 Add conformsTo to fp aryMethod mapping. 2016-06-06 20:00:15 -07:00
John-David Dalton
138cf77916 Add fp.assignAllWith, fp.extendAllWith, and fp.mergeAllWith. 2016-06-06 19:58:51 -07:00
John-David Dalton
43d1ca89c2 Add _.ary and _.unary tests for this binding and minimum arg count. 2016-06-06 17:49:33 -07:00
John-David Dalton
51e619b18f Cleanup this binding test labels. 2016-06-06 17:48:35 -07:00
John-David Dalton
21df7426e2 Ensure _.divide and _.multiply return 1 when no arguments are specified. [closes #2405] 2016-06-06 15:58:24 -07:00
John-David Dalton
2f6b2ca0c7 Add back clearTimeout use for debounced.cancel. 2016-06-06 10:03:43 -07:00
John-David Dalton
cf1b9f9595 Update jscs to 3.0.4. 2016-06-05 22:55:57 -07:00
John-David Dalton
b0ec8339fa Cleanup and simplify doc examples. [ci skip] 2016-06-05 16:43:19 -07:00
John-David Dalton
762748684e Add _.conformsTo. 2016-06-05 15:08:39 -07:00
John-David Dalton
bdfd5880e9 Adjust freeExports and freeModule assignment. 2016-06-03 10:01:46 -07:00
John-David Dalton
9e55e5bcea Move root exposure back to the AMD branch. 2016-06-03 06:27:30 -07:00
John-David Dalton
887576e4a5 Update sauce-tunnel to 2.5.0. 2016-06-02 15:31:48 -07:00
John-David Dalton
ccd1d6ab29 Simplify _.isBuffer. 2016-06-02 14:48:25 -07:00
John-David Dalton
fcbb63ad60 Ensure helpers work when provided < 1 or > 1 argument. 2016-06-02 09:06:02 -07:00
John-David Dalton
1607e7914c Use faster C++ helpers when available. 2016-06-02 08:42:00 -07:00
John-David Dalton
68e98397ab Add matches to aliasToReal fp mapping. 2016-06-01 07:33:57 -07:00
John-David Dalton
3983d4f473 Update whereEq alias. 2016-06-01 00:19:19 -07:00
John-David Dalton
9eda959489 Another round of fp aliases. 2016-06-01 00:18:49 -07:00
John-David Dalton
4880f9923c Add fp.assignAll, fp.assignInAll, fp.defaultsAll, fp.defaultsDeepAll, and fp.mergeAll. 2016-06-01 00:02:23 -07:00
John-David Dalton
87e8a4290e Add more fp aliases. 2016-05-31 20:37:50 -07:00
John-David Dalton
fd96d59963 Add strict mode directive to a few more files. 2016-05-31 10:47:29 -07:00
John-David Dalton
1a1771f0b5 Align method descriptions with "This method" instead of "A method". [ci skip] 2016-05-31 10:46:57 -07:00
John-David Dalton
22ed53260f Add basePropertyOf helper. 2016-05-31 08:27:24 -07:00
John-David Dalton
77cf88a3bf Add util.pitch. 2016-05-30 22:00:20 -07:00
John-David Dalton
695d74d7c5 Add jsdocs to fp build modules. 2016-05-29 17:14:01 -07:00
John-David Dalton
a164735369 Shorten return statement descriptions for isXyz methods. [ci skip] 2016-05-29 17:14:00 -07:00
John-David Dalton
6ccea636b1 Remove argument number specifier in methodSpread note. [closes #2390] [ci skip] 2016-05-29 15:02:27 -07:00
John-David Dalton
0ccaf76661 Cleanup common lib docs. [ci skip] 2016-05-28 23:15:12 -07:00
John-David Dalton
593f6f9f86 Correct doc block for overArg helper in _baseConvert. [ci skip] 2016-05-28 10:16:28 -07:00
John-David Dalton
fbdda6df03 Add overArg helper. 2016-05-27 15:36:48 -07:00
John-David Dalton
a7dcce3e8d Simplify jsdoc arg signatures. 2016-05-27 14:38:32 -07:00
John-David Dalton
ee5718003b Simplify getSymbols fallback. 2016-05-27 13:46:00 -07:00
John-David Dalton
a43065ec08 Add baseGetTag helper. 2016-05-26 08:59:01 -07:00
John-David Dalton
1740ee91da Minor space nit. [ci skip] 2016-05-26 07:15:18 -07:00
John-David Dalton
90f95306f9 Make _.defaultTo return the defaultValue for NaN and nullish values. 2016-05-26 07:15:18 -07:00
John-David Dalton
0964f9175e Cleanup test descriptions with NaN. [ci skip] 2016-05-26 07:15:17 -07:00
John-David Dalton
dbde3f8826 Add link for sorted feature requests to contributing.md. [ci skip] 2016-05-26 07:15:17 -07:00
John-David Dalton
33e08baf3f Update umd doc note. [ci skip] 2016-05-26 07:15:12 -07:00
John-David Dalton
6e67ebab05 Cleanup _.defaultTo. 2016-05-25 08:46:14 -07:00
Mateo Calle
5fbc5303ff Added _.defaultTo. (#2381) 2016-05-24 21:35:56 -07:00
John-David Dalton
e582ad226a Use heavy round-tipped rightwards arrow instead of the plain rightwards arrow. 2016-05-24 21:19:50 -07:00
John-David Dalton
dfb71a3a50 Pop stacks when possible. 2016-05-24 21:15:23 -07:00
John-David Dalton
5355f4f25e Remove indexOfNaN in favor of baseFindIndex. 2016-05-24 12:42:14 -07:00
John-David Dalton
98c422d227 Avoid inspecting the entire key-value array when adding values to a stack. 2016-05-24 09:43:00 -07:00
John-David Dalton
e18b577d20 Add Map guard to stackSet. 2016-05-24 00:23:21 -07:00
John-David Dalton
7226df593e Clarify createSet doc description. [ci skip] 2016-05-24 00:22:59 -07:00
John-David Dalton
8a376f647e Cleanup iteratee arguments test labels. 2016-05-23 23:56:55 -07:00
John-David Dalton
050087f6c4 Cleanup "find" tests. 2016-05-23 23:56:23 -07:00
John-David Dalton
c67e347255 Make _.isEqual treat invalid dates as equiv. 2016-05-23 16:39:54 -07:00
John-David Dalton
3fdac985c7 Reduce createFind. 2016-05-23 16:39:04 -07:00
John-David Dalton
02ff3e6258 Remove "unique" mention from _.difference docs. [ci skip] [closes #2372] 2016-05-23 11:03:10 -07:00
John-David Dalton
65ce1b0bb5 Remove unnecessary type tag. [ci skip] 2016-05-23 10:07:25 -07:00
John-David Dalton
7e8528104b Increment package version to enable ci tests. 2016-05-23 10:07:25 -07:00
John-David Dalton
40ac55acb6 Bump to v4.13.1. 2016-05-23 08:58:01 -07:00
John-David Dalton
42c639d252 Rebuild lodash and docs. 2016-05-23 08:57:55 -07:00
John-David Dalton
d110b64ee4 Ensure _.find and _.findLast pass the correct key param to predicate. [closes #2367] 2016-05-23 08:47:43 -07:00
John-David Dalton
a2617d810c Add failing tests for #2367. 2016-05-23 08:47:24 -07:00
John-David Dalton
90d07bc04c Simplify isMaskable assignment. 2016-05-22 22:11:15 -07:00
845 changed files with 38754 additions and 134087 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,
@@ -13,27 +19,25 @@ Feature requests should be submitted in the
[issue tracker](https://github.com/lodash/lodash/issues), with a description of
the expected behavior & use case, where theyll remain closed until sufficient interest,
[e.g. :+1: reactions](https://help.github.com/articles/about-discussions-in-issues-and-pull-requests/),
has been shown by the community. Before submitting a request, please search for
similar ones in the
has been [shown by the community](https://github.com/lodash/lodash/issues?q=label%3A%22votes+needed%22+sort%3Areactions-%2B1-desc).
Before submitting a request, please search for similar ones in the
[closed issues](https://github.com/lodash/lodash/issues?q=is%3Aissue+is%3Aclosed+label%3Aenhancement).
## Pull Requests
For additions or bug fixes you should only need to modify `lodash.js`. Include
updated unit tests in the `test` directory as part of your pull request. 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

15
.gitignore vendored
View File

@@ -1,9 +1,8 @@
.DS_Store
*.custom.*
*.log
*.map
lodash.compat.min.js
coverage
node_modules
.opt-in
.opt-out
*.log*
dist/
node_modules/
*.code-workspace
*.lockb
*.sublime-project
*.sublime-workspace

1
.husky/.gitignore vendored Normal file
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,48 +0,0 @@
'use strict';
delete global['__core-js_shared__'];
var _ = require('./lodash.js');
function mockQuery() {
return {
'on': function(eventName, callback) {
callback();
}
};
}
mockQuery.each = _.each;
module.exports = {
'babel': false,
'globals': {
'_': _,
// Example mocks.
'asyncSave': _.noop,
'addContactToList': _.noop,
'batchLog': _.noop,
'calculateLayout': _.noop,
'createApplication': _.noop,
'data': { 'user': 'mock'},
'mainText': '',
'renewToken': _.noop,
'sendMail': _.noop,
'updatePosition': _.noop,
// DOM mocks.
'document': { 'body': { 'childNodes': [], 'nodeName': 'BODY' } },
'element': {},
'EventSource': _.noop,
'jQuery': mockQuery,
'window': {},
// Node.js mocks.
'Buffer': Buffer,
'fs': { 'writeFileSync': _.noop },
'path': require('path'),
'process': process,
'setImmediate': setImmediate
}
};

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,86 +0,0 @@
language: node_js
sudo: false
node_js:
- "6"
env:
global:
- BIN="node" ISTANBUL=false OPTION=""
- SAUCE_LABS=false SAUCE_USERNAME="lodash"
- secure: "tg1JFsIFnxzLaTboFPOnm+aJCuMm5+JdhLlESlqg9x3fwro++7KCnwHKLNovhchaPe4otC43ZMB/nfWhDnDm11dKbm/V6HlTkED+dadTsaLxVDg6J+7yK41QhokBPJOxLV78iDaNaAQVYEirAgZ0yn8kFubxmNKV+bpCGQNc9yU="
matrix:
-
- BIN="phantomjs"
- ISTANBUL=true
- SAUCE_LABS=true
matrix:
include:
- node_js: "0.10"
env:
- node_js: "0.12"
env:
- node_js: "4"
env:
- node_js: "5"
env:
git:
depth: 10
branches:
only:
- master
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/4aab6358b0e9aed0b628
on_success: change
on_failure: always
before_install:
- "nvm use $TRAVIS_NODE_VERSION"
- "npm set loglevel error"
- "npm set progress false"
- "npm i -g npm@\"^2.0.0\""
- |
PATTERN[0]="|\s*if\s*\(isHostObject\b[\s\S]+?\}(?=\n)|"
PATTERN[1]="|\s*if\s*\(enumerate\b[\s\S]+?\};\s*\}|"
PATTERN[2]="|\s*while\s*\([^)]+\)\s*\{\s*iteratee\(index\);\s*\}|"
PATTERN[3]="|\s*else\s*\{\s*assocSet\(data\b[\s\S]+?\}|"
PATTERN[4]="|\bcase\s+(?:dataView|promise|set|map|weakMap)CtorString:.+|g"
PATTERN[5]="|\bindex,\s*iterable\)\s*===\s*false\)[^}]+?(break;)|"
PATTERN[6]="|\s*if\s*\(\!lodashFunc\)\s*\{\s*return;\s*\}|"
PATTERN[7]="|\s*define\([\s\S]+?\);|"
PATTERN[8]="|\s*root\._\s*=\s*_;|"
if [ $ISTANBUL == true ]; then
set -e
for PTRN in ${PATTERN[@]}; do
node ./test/remove.js "$PTRN" ./lodash.js
done
fi
- "git clone --depth=10 --branch=master git://github.com/lodash/lodash-cli ./node_modules/lodash-cli"
- "mkdir -p ./node_modules/lodash-cli/node_modules/lodash && cd $_ && cp ../../../../lodash.js ./lodash.js && cp ../../../../package.json ./package.json"
- "cd ../../ && npm i && 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\""

1
CHANGELOG Normal file
View File

@@ -0,0 +1 @@
https://github.com/lodash/lodash/wiki/Changelog

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,46 +1,72 @@
# lodash v4.13.0
# 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/4.13.0/.github/CONTRIBUTING.md) |
[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):
```bash
$ npm run build
```shell
$ bun run build
$ lodash -o ./dist/lodash.js
$ lodash core -o ./dist/lodash.core.js
```
## Download
Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.13.0/LICENSE) & supports [modern environments](#support).<br>
* [Core build](https://raw.githubusercontent.com/lodash/lodash/4.17.10-npm/core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.17.10-npm/core.min.js))
* [Full build](https://raw.githubusercontent.com/lodash/lodash/4.17.10-npm/lodash.js) ([~24 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.17.10-npm/lodash.min.js))
* [CDN copies](https://www.jsdelivr.com/projects/lodash) [![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.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.
* [Core build](https://raw.githubusercontent.com/lodash/lodash/4.13.0/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.13.0/dist/lodash.core.min.js))
* [Full build](https://raw.githubusercontent.com/lodash/lodash/4.13.0/dist/lodash.js) ([~22 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.13.0/dist/lodash.min.js))
* [CDN copies](https://www.jsdelivr.com/projects/lodash)
## Installation
In a browser:
```html
<script src="lodash.js"></script>
```
Using bun:
```shell
$ bun i lodash
```
In [Bun](https://bun.sh):
```js
// Load the full build.
var _ = require('lodash');
// Load the core build.
var _ = require('lodash/core');
// Load the FP build for immutable auto-curried iteratee-first data-last methods.
var fp = require('lodash/fp');
// Load method categories.
var array = require('lodash/array');
var object = require('lodash/fp/object');
// Cherry-pick methods for smaller browserify/rollup/webpack bundles.
var at = require('lodash/at');
var curryN = require('lodash/fp/curryN');
```
Looking for Lodash modules written in ES6 or smaller bundle sizes? Check out [lodash-es](https://www.npmjs.com/package/lodash-es).
## Why Lodash?
Lodash makes JavaScript easier by taking the hassle out of working with arrays,<br>
numbers, objects, strings, etc. 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-amd](https://www.npmjs.com/package/lodash-amd)
* [lodash-es](https://www.npmjs.com/package/lodash-es) & [babel-plugin-lodash](https://www.npmjs.com/package/babel-plugin-lodash)
* [lodash/fp](https://github.com/lodash/lodash/tree/4.13.0-npm/fp)
* [lodash](https://www.npmjs.com/package/lodash) & [per method packages](https://www.npmjs.com/search?q=keywords:lodash-modularized)
* [lodash-es](https://www.npmjs.com/package/lodash-es), [babel-plugin-lodash](https://www.npmjs.com/package/babel-plugin-lodash), & [lodash-webpack-plugin](https://www.npmjs.com/package/lodash-webpack-plugin)

35
SECURITY.md Normal file
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"

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

879
dist/lodash.fp.js vendored
View File

@@ -1,879 +0,0 @@
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["fp"] = factory();
else
root["fp"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
var baseConvert = __webpack_require__(1);
/**
* Converts `lodash` to an immutable auto-curried iteratee-first data-last
* version with conversion `options` applied.
*
* @param {Function} lodash The lodash function to convert.
* @param {Object} [options] The options object. See `baseConvert` for more details.
* @returns {Function} Returns the converted `lodash`.
*/
function browserConvert(lodash, options) {
return baseConvert(lodash, lodash, options);
}
if (typeof _ == 'function') {
_ = browserConvert(_.runInContext());
}
module.exports = browserConvert;
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
var mapping = __webpack_require__(2),
mutateMap = mapping.mutate,
fallbackHolder = __webpack_require__(3);
/**
* Creates a function, with an arity of `n`, that invokes `func` with the
* arguments it receives.
*
* @private
* @param {Function} func The function to wrap.
* @param {number} n The arity of the new function.
* @returns {Function} Returns the new function.
*/
function baseArity(func, n) {
return n == 2
? function(a, b) { return func.apply(undefined, arguments); }
: function(a) { return func.apply(undefined, arguments); };
}
/**
* Creates a function that invokes `func`, with up to `n` arguments, ignoring
* any additional arguments.
*
* @private
* @param {Function} func The function to cap arguments for.
* @param {number} n The arity cap.
* @returns {Function} Returns the new function.
*/
function baseAry(func, n) {
return n == 2
? function(a, b) { return func(a, b); }
: function(a) { return func(a); };
}
/**
* Creates a clone of `array`.
*
* @private
* @param {Array} array The array to clone.
* @returns {Array} Returns the cloned array.
*/
function cloneArray(array) {
var length = array ? array.length : 0,
result = Array(length);
while (length--) {
result[length] = array[length];
}
return result;
}
/**
* Creates a function that clones a given object using the assignment `func`.
*
* @private
* @param {Function} func The assignment function.
* @returns {Function} Returns the new cloner function.
*/
function createCloner(func) {
return function(object) {
return func({}, object);
};
}
/**
* Creates a function that wraps `func` and uses `cloner` to clone the first
* argument it receives.
*
* @private
* @param {Function} func The function to wrap.
* @param {Function} cloner The function to clone arguments.
* @returns {Function} Returns the new immutable function.
*/
function immutWrap(func, cloner) {
return function() {
var length = arguments.length;
if (!length) {
return result;
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var result = args[0] = cloner.apply(undefined, args);
func.apply(undefined, args);
return result;
};
}
/**
* The base implementation of `convert` which accepts a `util` object of methods
* required to perform conversions.
*
* @param {Object} util The util object.
* @param {string} name The name of the function to convert.
* @param {Function} func The function to convert.
* @param {Object} [options] The options object.
* @param {boolean} [options.cap=true] Specify capping iteratee arguments.
* @param {boolean} [options.curry=true] Specify currying.
* @param {boolean} [options.fixed=true] Specify fixed arity.
* @param {boolean} [options.immutable=true] Specify immutable operations.
* @param {boolean} [options.rearg=true] Specify rearranging arguments.
* @returns {Function|Object} Returns the converted function or object.
*/
function baseConvert(util, name, func, options) {
var setPlaceholder,
isLib = typeof name == 'function',
isObj = name === Object(name);
if (isObj) {
options = func;
func = name;
name = undefined;
}
if (func == null) {
throw new TypeError;
}
options || (options = {});
var config = {
'cap': 'cap' in options ? options.cap : true,
'curry': 'curry' in options ? options.curry : true,
'fixed': 'fixed' in options ? options.fixed : true,
'immutable': 'immutable' in options ? options.immutable : true,
'rearg': 'rearg' in options ? options.rearg : true
};
var forceCurry = ('curry' in options) && options.curry,
forceFixed = ('fixed' in options) && options.fixed,
forceRearg = ('rearg' in options) && options.rearg,
placeholder = isLib ? func : fallbackHolder,
pristine = isLib ? func.runInContext() : undefined;
var helpers = isLib ? func : {
'ary': util.ary,
'assign': util.assign,
'clone': util.clone,
'curry': util.curry,
'forEach': util.forEach,
'isArray': util.isArray,
'isFunction': util.isFunction,
'iteratee': util.iteratee,
'keys': util.keys,
'rearg': util.rearg,
'spread': util.spread,
'toPath': util.toPath
};
var ary = helpers.ary,
assign = helpers.assign,
clone = helpers.clone,
curry = helpers.curry,
each = helpers.forEach,
isArray = helpers.isArray,
isFunction = helpers.isFunction,
keys = helpers.keys,
rearg = helpers.rearg,
spread = helpers.spread,
toPath = helpers.toPath;
var aryMethodKeys = keys(mapping.aryMethod);
var wrappers = {
'castArray': function(castArray) {
return function() {
var value = arguments[0];
return isArray(value)
? castArray(cloneArray(value))
: castArray.apply(undefined, arguments);
};
},
'iteratee': function(iteratee) {
return function() {
var func = arguments[0],
arity = arguments[1],
result = iteratee(func, arity),
length = result.length;
if (config.cap && typeof arity == 'number') {
arity = arity > 2 ? (arity - 2) : 1;
return (length && length <= arity) ? result : baseAry(result, arity);
}
return result;
};
},
'mixin': function(mixin) {
return function(source) {
var func = this;
if (!isFunction(func)) {
return mixin(func, Object(source));
}
var 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;
};
},
'runInContext': function(runInContext) {
return function(context) {
return baseConvert(util, runInContext(context), options);
};
}
};
/*--------------------------------------------------------------------------*/
/**
* Creates a clone of `object` by `path`.
*
* @private
* @param {Object} object The object to clone.
* @param {Array|string} path The path to clone by.
* @returns {Object} Returns the cloned object.
*/
function cloneByPath(object, path) {
path = toPath(path);
var index = -1,
length = path.length,
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 passed
* thru `transform`.
*
* @private
* @param {Function} func The function to wrap.
* @param {...Function} transform The functions to transform the first argument.
* @returns {Function} Returns the new function.
*/
function overArg(func, transform) {
return function() {
var length = arguments.length;
if (!length) {
return func();
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var index = config.rearg ? 0 : (length - 1);
args[index] = transform(args[index]);
return func.apply(undefined, args);
};
}
/**
* Creates a function that wraps `func` and applys the conversions
* rules by `name`.
*
* @private
* @param {string} name The name of the function to wrap.
* @param {Function} func The function to wrap.
* @returns {Function} Returns the converted function.
*/
function wrap(name, func) {
name = mapping.aliasToReal[name] || name;
var result,
wrapped = func,
wrapper = wrappers[name];
if (wrapper) {
wrapped = wrapper(func);
}
else if (config.immutable) {
if (mutateMap.array[name]) {
wrapped = immutWrap(func, cloneArray);
}
else if (mutateMap.object[name]) {
wrapped = immutWrap(func, createCloner(func));
}
else if (mutateMap.set[name]) {
wrapped = immutWrap(func, cloneByPath);
}
}
each(aryMethodKeys, function(aryKey) {
each(mapping.aryMethod[aryKey], function(otherName) {
if (name == otherName) {
var aryN = !isLib && mapping.iterateeAry[name],
reargIndexes = mapping.iterateeRearg[name],
spreadStart = mapping.methodSpread[name];
result = wrapped;
if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {
result = spreadStart === undefined
? ary(result, aryKey)
: spread(result, spreadStart);
}
if (config.rearg && aryKey > 1 && (forceRearg || !mapping.skipRearg[name])) {
result = rearg(result, mapping.methodRearg[name] || mapping.aryRearg[aryKey]);
}
if (config.cap) {
if (reargIndexes) {
result = iterateeRearg(result, reargIndexes);
} else if (aryN) {
result = iterateeAry(result, aryN);
}
}
if (forceCurry || (config.curry && aryKey > 1)) {
forceCurry && console.log(forceCurry, name);
result = curry(result, aryKey);
}
return false;
}
});
return !result;
});
result || (result = wrapped);
if (result == func) {
result = forceCurry ? curry(result, 1) : function() {
return func.apply(this, arguments);
};
}
result.convert = createConverter(name, func);
if (mapping.placeholder[name]) {
setPlaceholder = true;
result.placeholder = func.placeholder = placeholder;
}
return result;
}
/*--------------------------------------------------------------------------*/
if (!isObj) {
return wrap(name, func);
}
var _ = func;
// Convert methods by ary cap.
var pairs = [];
each(aryMethodKeys, function(aryKey) {
each(mapping.aryMethod[aryKey], function(key) {
var func = _[mapping.remap[key] || key];
if (func) {
pairs.push([key, wrap(key, func)]);
}
});
});
// Convert remaining methods.
each(keys(_), function(key) {
var func = _[key];
if (typeof func == 'function') {
var length = pairs.length;
while (length--) {
if (pairs[length][0] == key) {
return;
}
}
func.convert = createConverter(key, func);
pairs.push([key, func]);
}
});
// Assign to `_` leaving `_.prototype` unchanged to allow chaining.
each(pairs, function(pair) {
_[pair[0]] = pair[1];
});
_.convert = convertLib;
if (setPlaceholder) {
_.placeholder = placeholder;
}
// Assign aliases.
each(keys(_), function(key) {
each(mapping.realToAlias[key] || [], function(alias) {
_[alias] = _[key];
});
});
return _;
}
module.exports = baseConvert;
/***/ },
/* 2 */
/***/ function(module, exports) {
/** Used to map aliases to their real names. */
exports.aliasToReal = {
// Lodash aliases.
'each': 'forEach',
'eachRight': 'forEachRight',
'entries': 'toPairs',
'entriesIn': 'toPairsIn',
'extend': 'assignIn',
'extendWith': 'assignInWith',
'first': 'head',
// Ramda aliases.
'__': 'placeholder',
'all': 'every',
'allPass': 'overEvery',
'always': 'constant',
'any': 'some',
'anyPass': 'overSome',
'apply': 'spread',
'assoc': 'set',
'assocPath': 'set',
'complement': 'negate',
'compose': 'flowRight',
'contains': 'includes',
'dissoc': 'unset',
'dissocPath': 'unset',
'equals': 'isEqual',
'identical': 'eq',
'init': 'initial',
'invertObj': 'invert',
'juxt': 'over',
'omitAll': 'omit',
'nAry': 'ary',
'path': 'get',
'pathEq': 'matchesProperty',
'pathOr': 'getOr',
'paths': 'at',
'pickAll': 'pick',
'pipe': 'flow',
'pluck': 'map',
'prop': 'get',
'propEq': 'matchesProperty',
'propOr': 'getOr',
'props': 'at',
'unapply': 'rest',
'unnest': 'flatten',
'useWith': 'overArgs',
'whereEq': 'filter',
'zipObj': 'zipObject'
};
/** Used to map ary to method names. */
exports.aryMethod = {
'1': [
'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor',
'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method',
'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse',
'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
'uniqueId', 'words'
],
'2': [
'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll',
'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference',
'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith',
'eq', 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast',
'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth',
'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight',
'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf',
'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch',
'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues',
'matchesProperty', 'maxBy', 'meanBy', 'merge', 'minBy', 'multiply', 'nth',
'omit', 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt',
'partial', 'partialRight', 'partition', 'pick', 'pickBy', 'pull', 'pullAll',
'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',
'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',
'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',
'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',
'zipObjectDeep'
],
'3': [
'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',
'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',
'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',
'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',
'padCharsStart', 'pullAllBy', 'pullAllWith', 'reduce', 'reduceRight', 'replace',
'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy',
'unionWith', 'update', 'xorBy', 'xorWith', 'zipWith'
],
'4': [
'fill', 'setWith', 'updateWith'
]
};
/** Used to map ary to rearg configs. */
exports.aryRearg = {
'2': [1, 0],
'3': [2, 0, 1],
'4': [3, 2, 0, 1]
};
/** Used to map method names to their iteratee ary. */
exports.iterateeAry = {
'dropRightWhile': 1,
'dropWhile': 1,
'every': 1,
'filter': 1,
'find': 1,
'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 = {
'assignInWith': [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],
'mergeWith': [1, 2, 0],
'padChars': [2, 1, 0],
'padCharsEnd': [2, 1, 0],
'padCharsStart': [2, 1, 0],
'pullAllBy': [2, 1, 0],
'pullAllWith': [2, 1, 0],
'setWith': [3, 1, 2, 0],
'sortedIndexBy': [2, 1, 0],
'sortedLastIndexBy': [2, 1, 0],
'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 = {
'invokeArgs': 2,
'invokeArgsMap': 2,
'partial': 1,
'partialRight': 1,
'without': 1
};
/** Used to identify methods which mutate arrays or objects. */
exports.mutate = {
'array': {
'fill': true,
'pull': true,
'pullAll': true,
'pullAllBy': true,
'pullAllWith': true,
'pullAt': true,
'remove': true,
'reverse': true
},
'object': {
'assign': true,
'assignIn': true,
'assignInWith': true,
'assignWith': true,
'defaults': true,
'defaultsDeep': true,
'merge': true,
'mergeWith': true
},
'set': {
'set': true,
'setWith': true,
'unset': true,
'update': true,
'updateWith': true
}
};
/** Used to track methods with placeholder support */
exports.placeholder = {
'bind': true,
'bindKey': true,
'curry': true,
'curryRight': true,
'partial': true,
'partialRight': true
};
/** Used to map real names to their aliases. */
exports.realToAlias = (function() {
var hasOwnProperty = Object.prototype.hasOwnProperty,
object = exports.aliasToReal,
result = {};
for (var key in object) {
var value = object[key];
if (hasOwnProperty.call(result, value)) {
result[value].push(key);
} else {
result[value] = [key];
}
}
return result;
}());
/** Used to map method names to other names. */
exports.remap = {
'curryN': 'curry',
'curryRightN': 'curryRight',
'findFrom': 'find',
'findIndexFrom': 'findIndex',
'findLastFrom': 'findLast',
'findLastIndexFrom': 'findLastIndex',
'getOr': 'get',
'includesFrom': 'includes',
'indexOfFrom': 'indexOf',
'invokeArgs': 'invoke',
'invokeArgsMap': 'invokeMap',
'lastIndexOfFrom': 'lastIndexOf',
'padChars': 'pad',
'padCharsEnd': 'padEnd',
'padCharsStart': 'padStart',
'restFrom': 'rest',
'spreadFrom': 'spread',
'trimChars': 'trim',
'trimCharsEnd': 'trimEnd',
'trimCharsStart': 'trimStart'
};
/** Used to track methods that skip fixing their arity. */
exports.skipFixed = {
'castArray': true,
'flow': true,
'flowRight': true,
'iteratee': true,
'mixin': true,
'runInContext': true
};
/** Used to track methods that skip rearranging arguments. */
exports.skipRearg = {
'add': true,
'assign': true,
'assignIn': true,
'bind': true,
'bindKey': true,
'concat': true,
'difference': true,
'divide': true,
'eq': true,
'gt': true,
'gte': true,
'isEqual': true,
'lt': true,
'lte': true,
'matchesProperty': true,
'merge': true,
'multiply': true,
'overArgs': true,
'partial': true,
'partialRight': true,
'random': true,
'range': true,
'rangeRight': true,
'subtract': true,
'zip': true,
'zipObject': true
};
/***/ },
/* 3 */
/***/ function(module, exports) {
/**
* The default argument placeholder value for methods.
*
* @type {Object}
*/
module.exports = {};
/***/ }
/******/ ])
});
;

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

@@ -1,17 +0,0 @@
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.fp=e():t.fp=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){function n(t,e){return i(t,t,e)}var i=r(1);"function"==typeof _&&(_=n(_.runInContext())),
t.exports=n},function(t,e,r){function n(t,e){return 2==e?function(e,r){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}}function i(t,e){return 2==e?function(e,r){return t(e,r)}:function(e){return t(e)}}function a(t){for(var e=t?t.length:0,r=Array(e);e--;)r[e]=t[e];return r}function o(t){return function(e){return t({},e)}}function s(t,e){return function(){var r=arguments.length;if(!r)return i;for(var n=Array(r);r--;)n[r]=arguments[r];var i=n[0]=e.apply(void 0,n);return t.apply(void 0,n),
i}}function u(t,e,r,c){function f(t,e){e=D(e);for(var r=-1,n=e.length,i=n-1,a=w(Object(t)),o=a;null!=o&&++r<n;){var s=e[r],u=o[s];null!=u&&(o[e[r]]=w(r==i?u:Object(u))),o=o[s]}return a}function h(t){return N.runInContext.convert(t)(void 0)}function y(t,e){var r=c;return function(n){var i=I?E:F,a=I?E[t]:e,o=C(C({},r),n);return u(i,t,a,o)}}function m(t,e){return v(t,function(t){return"function"==typeof t?i(t,e):t})}function g(t,e){return v(t,function(t){var r=e.length;return n(z(i(t,r),e),r)})}function v(t,e){
return function(){var r=arguments.length;if(!r)return t();for(var n=Array(r);r--;)n[r]=arguments[r];var i=A.rearg?0:r-1;return n[i]=e(n[i]),t.apply(void 0,n)}}function x(t,e){t=p.aliasToReal[t]||t;var r,n=e,i=_[t];return i?n=i(e):A.immutable&&(d.array[t]?n=s(e,a):d.object[t]?n=s(e,o(e)):d.set[t]&&(n=s(e,f))),M(T,function(e){return M(p.aryMethod[e],function(i){if(t==i){var a=!I&&p.iterateeAry[t],o=p.iterateeRearg[t],s=p.methodSpread[t];return r=n,!A.fixed||!b&&p.skipFixed[t]||(r=void 0===s?j(r,e):K(r,s)),
A.rearg&&e>1&&(k||!p.skipRearg[t])&&(r=z(r,p.methodRearg[t]||p.aryRearg[e])),A.cap&&(o?r=g(r,o):a&&(r=m(r,a))),(O||A.curry&&e>1)&&(O&&console.log(O,t),r=L(r,e)),!1}}),!r}),r||(r=n),r==e&&(r=O?L(r,1):function(){return e.apply(this,arguments)}),r.convert=y(t,e),p.placeholder[t]&&(W=!0,r.placeholder=e.placeholder=B),r}var W,I="function"==typeof e,R=e===Object(e);if(R&&(c=r,r=e,e=void 0),null==r)throw new TypeError;c||(c={});var A={cap:"cap"in c?c.cap:!0,curry:"curry"in c?c.curry:!0,fixed:"fixed"in c?c.fixed:!0,
immutable:"immutable"in c?c.immutable:!0,rearg:"rearg"in c?c.rearg:!0},O="curry"in c&&c.curry,b="fixed"in c&&c.fixed,k="rearg"in c&&c.rearg,B=I?r:l,E=I?r.runInContext():void 0,F=I?r:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isFunction:t.isFunction,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,spread:t.spread,toPath:t.toPath},j=F.ary,C=F.assign,w=F.clone,L=F.curry,M=F.forEach,q=F.isArray,P=F.isFunction,S=F.keys,z=F.rearg,K=F.spread,D=F.toPath,T=S(p.aryMethod),_={
castArray:function(t){return function(){var e=arguments[0];return q(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 A.cap&&"number"==typeof r?(r=r>2?r-2:1,a&&r>=a?n:i(n,r)):n}},mixin:function(t){return function(e){var r=this;if(!P(r))return t(r,Object(e));var n=[];return M(S(e),function(t){P(e[t])&&n.push([t,r.prototype[t]])}),t(r,Object(e)),M(n,function(t){var e=t[1];P(e)?r.prototype[t[0]]=e:delete r.prototype[t[0]];
}),r}},runInContext:function(e){return function(r){return u(t,e(r),c)}}};if(!R)return x(e,r);var N=r,V=[];return M(T,function(t){M(p.aryMethod[t],function(t){var e=N[p.remap[t]||t];e&&V.push([t,x(t,e)])})}),M(S(N),function(t){var e=N[t];if("function"==typeof e){for(var r=V.length;r--;)if(V[r][0]==t)return;e.convert=y(t,e),V.push([t,e])}}),M(V,function(t){N[t[0]]=t[1]}),N.convert=h,W&&(N.placeholder=B),M(S(N),function(t){M(p.realToAlias[t]||[],function(e){N[e]=N[t]})}),N}var p=r(2),d=p.mutate,l=r(3);
t.exports=u},function(t,e){e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendWith:"assignInWith",first:"head",__:"placeholder",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",equals:"isEqual",identical:"eq",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",
nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",unapply:"rest",unnest:"flatten",useWith:"overArgs",whereEq:"filter",zipObj:"zipObject"},e.aryMethod={1:["attempt","castArray","ceil","create","curry","curryRight","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","methodOf","mixin","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words"],
2:["add","after","ary","assign","assignIn","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],
3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],
4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,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={assignInWith:[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],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],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={invokeArgs:2,invokeArgsMap:2,partial:1,partialRight:1,without:1},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignIn:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsDeep:!0,merge:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,r=e.aliasToReal,n={};
for(var i in r){var a=r[i];t.call(n,a)?n[a].push(i):n[a]=[i]}return n}(),e.remap={curryN:"curry",curryRightN:"curryRight",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart"
},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0}},function(t,e){t.exports={}}])});

16387
dist/lodash.js vendored

File diff suppressed because it is too large Load Diff

127
dist/lodash.min.js vendored
View File

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

371
dist/mapping.fp.js vendored
View File

@@ -1,371 +0,0 @@
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["mapping"] = factory();
else
root["mapping"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports) {
/** Used to map aliases to their real names. */
exports.aliasToReal = {
// Lodash aliases.
'each': 'forEach',
'eachRight': 'forEachRight',
'entries': 'toPairs',
'entriesIn': 'toPairsIn',
'extend': 'assignIn',
'extendWith': 'assignInWith',
'first': 'head',
// Ramda aliases.
'__': 'placeholder',
'all': 'every',
'allPass': 'overEvery',
'always': 'constant',
'any': 'some',
'anyPass': 'overSome',
'apply': 'spread',
'assoc': 'set',
'assocPath': 'set',
'complement': 'negate',
'compose': 'flowRight',
'contains': 'includes',
'dissoc': 'unset',
'dissocPath': 'unset',
'equals': 'isEqual',
'identical': 'eq',
'init': 'initial',
'invertObj': 'invert',
'juxt': 'over',
'omitAll': 'omit',
'nAry': 'ary',
'path': 'get',
'pathEq': 'matchesProperty',
'pathOr': 'getOr',
'paths': 'at',
'pickAll': 'pick',
'pipe': 'flow',
'pluck': 'map',
'prop': 'get',
'propEq': 'matchesProperty',
'propOr': 'getOr',
'props': 'at',
'unapply': 'rest',
'unnest': 'flatten',
'useWith': 'overArgs',
'whereEq': 'filter',
'zipObj': 'zipObject'
};
/** Used to map ary to method names. */
exports.aryMethod = {
'1': [
'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor',
'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method',
'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse',
'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
'uniqueId', 'words'
],
'2': [
'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll',
'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference',
'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith',
'eq', 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast',
'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth',
'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight',
'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf',
'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch',
'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues',
'matchesProperty', 'maxBy', 'meanBy', 'merge', 'minBy', 'multiply', 'nth',
'omit', 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt',
'partial', 'partialRight', 'partition', 'pick', 'pickBy', 'pull', 'pullAll',
'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',
'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',
'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',
'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',
'zipObjectDeep'
],
'3': [
'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',
'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',
'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',
'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',
'padCharsStart', 'pullAllBy', 'pullAllWith', 'reduce', 'reduceRight', 'replace',
'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy',
'unionWith', 'update', 'xorBy', 'xorWith', 'zipWith'
],
'4': [
'fill', 'setWith', 'updateWith'
]
};
/** Used to map ary to rearg configs. */
exports.aryRearg = {
'2': [1, 0],
'3': [2, 0, 1],
'4': [3, 2, 0, 1]
};
/** Used to map method names to their iteratee ary. */
exports.iterateeAry = {
'dropRightWhile': 1,
'dropWhile': 1,
'every': 1,
'filter': 1,
'find': 1,
'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 = {
'assignInWith': [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],
'mergeWith': [1, 2, 0],
'padChars': [2, 1, 0],
'padCharsEnd': [2, 1, 0],
'padCharsStart': [2, 1, 0],
'pullAllBy': [2, 1, 0],
'pullAllWith': [2, 1, 0],
'setWith': [3, 1, 2, 0],
'sortedIndexBy': [2, 1, 0],
'sortedLastIndexBy': [2, 1, 0],
'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 = {
'invokeArgs': 2,
'invokeArgsMap': 2,
'partial': 1,
'partialRight': 1,
'without': 1
};
/** Used to identify methods which mutate arrays or objects. */
exports.mutate = {
'array': {
'fill': true,
'pull': true,
'pullAll': true,
'pullAllBy': true,
'pullAllWith': true,
'pullAt': true,
'remove': true,
'reverse': true
},
'object': {
'assign': true,
'assignIn': true,
'assignInWith': true,
'assignWith': true,
'defaults': true,
'defaultsDeep': true,
'merge': true,
'mergeWith': true
},
'set': {
'set': true,
'setWith': true,
'unset': true,
'update': true,
'updateWith': true
}
};
/** Used to track methods with placeholder support */
exports.placeholder = {
'bind': true,
'bindKey': true,
'curry': true,
'curryRight': true,
'partial': true,
'partialRight': true
};
/** Used to map real names to their aliases. */
exports.realToAlias = (function() {
var hasOwnProperty = Object.prototype.hasOwnProperty,
object = exports.aliasToReal,
result = {};
for (var key in object) {
var value = object[key];
if (hasOwnProperty.call(result, value)) {
result[value].push(key);
} else {
result[value] = [key];
}
}
return result;
}());
/** Used to map method names to other names. */
exports.remap = {
'curryN': 'curry',
'curryRightN': 'curryRight',
'findFrom': 'find',
'findIndexFrom': 'findIndex',
'findLastFrom': 'findLast',
'findLastIndexFrom': 'findLastIndex',
'getOr': 'get',
'includesFrom': 'includes',
'indexOfFrom': 'indexOf',
'invokeArgs': 'invoke',
'invokeArgsMap': 'invokeMap',
'lastIndexOfFrom': 'lastIndexOf',
'padChars': 'pad',
'padCharsEnd': 'padEnd',
'padCharsStart': 'padStart',
'restFrom': 'rest',
'spreadFrom': 'spread',
'trimChars': 'trim',
'trimCharsEnd': 'trimEnd',
'trimCharsStart': 'trimStart'
};
/** Used to track methods that skip fixing their arity. */
exports.skipFixed = {
'castArray': true,
'flow': true,
'flowRight': true,
'iteratee': true,
'mixin': true,
'runInContext': true
};
/** Used to track methods that skip rearranging arguments. */
exports.skipRearg = {
'add': true,
'assign': true,
'assignIn': true,
'bind': true,
'bindKey': true,
'concat': true,
'difference': true,
'divide': true,
'eq': true,
'gt': true,
'gte': true,
'isEqual': true,
'lt': true,
'lte': true,
'matchesProperty': true,
'merge': true,
'multiply': true,
'overArgs': true,
'partial': true,
'partialRight': true,
'random': true,
'range': true,
'rangeRight': true,
'subtract': true,
'zip': true,
'zipObject': true
};
/***/ }
/******/ ])
});
;

File diff suppressed because it is too large Load Diff

View File

@@ -1,466 +0,0 @@
var mapping = require('./_mapping'),
mutateMap = mapping.mutate,
fallbackHolder = require('./placeholder');
/**
* Creates a function, with an arity of `n`, that invokes `func` with the
* arguments it receives.
*
* @private
* @param {Function} func The function to wrap.
* @param {number} n The arity of the new function.
* @returns {Function} Returns the new function.
*/
function baseArity(func, n) {
return n == 2
? function(a, b) { return func.apply(undefined, arguments); }
: function(a) { return func.apply(undefined, arguments); };
}
/**
* Creates a function that invokes `func`, with up to `n` arguments, ignoring
* any additional arguments.
*
* @private
* @param {Function} func The function to cap arguments for.
* @param {number} n The arity cap.
* @returns {Function} Returns the new function.
*/
function baseAry(func, n) {
return n == 2
? function(a, b) { return func(a, b); }
: function(a) { return func(a); };
}
/**
* Creates a clone of `array`.
*
* @private
* @param {Array} array The array to clone.
* @returns {Array} Returns the cloned array.
*/
function cloneArray(array) {
var length = array ? array.length : 0,
result = Array(length);
while (length--) {
result[length] = array[length];
}
return result;
}
/**
* Creates a function that clones a given object using the assignment `func`.
*
* @private
* @param {Function} func The assignment function.
* @returns {Function} Returns the new cloner function.
*/
function createCloner(func) {
return function(object) {
return func({}, object);
};
}
/**
* Creates a function that wraps `func` and uses `cloner` to clone the first
* argument it receives.
*
* @private
* @param {Function} func The function to wrap.
* @param {Function} cloner The function to clone arguments.
* @returns {Function} Returns the new immutable function.
*/
function immutWrap(func, cloner) {
return function() {
var length = arguments.length;
if (!length) {
return result;
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var result = args[0] = cloner.apply(undefined, args);
func.apply(undefined, args);
return result;
};
}
/**
* The base implementation of `convert` which accepts a `util` object of methods
* required to perform conversions.
*
* @param {Object} util The util object.
* @param {string} name The name of the function to convert.
* @param {Function} func The function to convert.
* @param {Object} [options] The options object.
* @param {boolean} [options.cap=true] Specify capping iteratee arguments.
* @param {boolean} [options.curry=true] Specify currying.
* @param {boolean} [options.fixed=true] Specify fixed arity.
* @param {boolean} [options.immutable=true] Specify immutable operations.
* @param {boolean} [options.rearg=true] Specify rearranging arguments.
* @returns {Function|Object} Returns the converted function or object.
*/
function baseConvert(util, name, func, options) {
var setPlaceholder,
isLib = typeof name == 'function',
isObj = name === Object(name);
if (isObj) {
options = func;
func = name;
name = undefined;
}
if (func == null) {
throw new TypeError;
}
options || (options = {});
var config = {
'cap': 'cap' in options ? options.cap : true,
'curry': 'curry' in options ? options.curry : true,
'fixed': 'fixed' in options ? options.fixed : true,
'immutable': 'immutable' in options ? options.immutable : true,
'rearg': 'rearg' in options ? options.rearg : true
};
var forceCurry = ('curry' in options) && options.curry,
forceFixed = ('fixed' in options) && options.fixed,
forceRearg = ('rearg' in options) && options.rearg,
placeholder = isLib ? func : fallbackHolder,
pristine = isLib ? func.runInContext() : undefined;
var helpers = isLib ? func : {
'ary': util.ary,
'assign': util.assign,
'clone': util.clone,
'curry': util.curry,
'forEach': util.forEach,
'isArray': util.isArray,
'isFunction': util.isFunction,
'iteratee': util.iteratee,
'keys': util.keys,
'rearg': util.rearg,
'spread': util.spread,
'toPath': util.toPath
};
var ary = helpers.ary,
assign = helpers.assign,
clone = helpers.clone,
curry = helpers.curry,
each = helpers.forEach,
isArray = helpers.isArray,
isFunction = helpers.isFunction,
keys = helpers.keys,
rearg = helpers.rearg,
spread = helpers.spread,
toPath = helpers.toPath;
var aryMethodKeys = keys(mapping.aryMethod);
var wrappers = {
'castArray': function(castArray) {
return function() {
var value = arguments[0];
return isArray(value)
? castArray(cloneArray(value))
: castArray.apply(undefined, arguments);
};
},
'iteratee': function(iteratee) {
return function() {
var func = arguments[0],
arity = arguments[1],
result = iteratee(func, arity),
length = result.length;
if (config.cap && typeof arity == 'number') {
arity = arity > 2 ? (arity - 2) : 1;
return (length && length <= arity) ? result : baseAry(result, arity);
}
return result;
};
},
'mixin': function(mixin) {
return function(source) {
var func = this;
if (!isFunction(func)) {
return mixin(func, Object(source));
}
var 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;
};
},
'runInContext': function(runInContext) {
return function(context) {
return baseConvert(util, runInContext(context), options);
};
}
};
/*--------------------------------------------------------------------------*/
/**
* Creates a clone of `object` by `path`.
*
* @private
* @param {Object} object The object to clone.
* @param {Array|string} path The path to clone by.
* @returns {Object} Returns the cloned object.
*/
function cloneByPath(object, path) {
path = toPath(path);
var index = -1,
length = path.length,
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 passed
* thru `transform`.
*
* @private
* @param {Function} func The function to wrap.
* @param {...Function} transform The functions to transform the first argument.
* @returns {Function} Returns the new function.
*/
function overArg(func, transform) {
return function() {
var length = arguments.length;
if (!length) {
return func();
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var index = config.rearg ? 0 : (length - 1);
args[index] = transform(args[index]);
return func.apply(undefined, args);
};
}
/**
* Creates a function that wraps `func` and applys the conversions
* rules by `name`.
*
* @private
* @param {string} name The name of the function to wrap.
* @param {Function} func The function to wrap.
* @returns {Function} Returns the converted function.
*/
function wrap(name, func) {
name = mapping.aliasToReal[name] || name;
var result,
wrapped = func,
wrapper = wrappers[name];
if (wrapper) {
wrapped = wrapper(func);
}
else if (config.immutable) {
if (mutateMap.array[name]) {
wrapped = immutWrap(func, cloneArray);
}
else if (mutateMap.object[name]) {
wrapped = immutWrap(func, createCloner(func));
}
else if (mutateMap.set[name]) {
wrapped = immutWrap(func, cloneByPath);
}
}
each(aryMethodKeys, function(aryKey) {
each(mapping.aryMethod[aryKey], function(otherName) {
if (name == otherName) {
var aryN = !isLib && mapping.iterateeAry[name],
reargIndexes = mapping.iterateeRearg[name],
spreadStart = mapping.methodSpread[name];
result = wrapped;
if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {
result = spreadStart === undefined
? ary(result, aryKey)
: spread(result, spreadStart);
}
if (config.rearg && aryKey > 1 && (forceRearg || !mapping.skipRearg[name])) {
result = rearg(result, mapping.methodRearg[name] || mapping.aryRearg[aryKey]);
}
if (config.cap) {
if (reargIndexes) {
result = iterateeRearg(result, reargIndexes);
} else if (aryN) {
result = iterateeAry(result, aryN);
}
}
if (forceCurry || (config.curry && aryKey > 1)) {
forceCurry && console.log(forceCurry, name);
result = curry(result, aryKey);
}
return false;
}
});
return !result;
});
result || (result = wrapped);
if (result == func) {
result = forceCurry ? curry(result, 1) : function() {
return func.apply(this, arguments);
};
}
result.convert = createConverter(name, func);
if (mapping.placeholder[name]) {
setPlaceholder = true;
result.placeholder = func.placeholder = placeholder;
}
return result;
}
/*--------------------------------------------------------------------------*/
if (!isObj) {
return wrap(name, func);
}
var _ = func;
// Convert methods by ary cap.
var pairs = [];
each(aryMethodKeys, function(aryKey) {
each(mapping.aryMethod[aryKey], function(key) {
var func = _[mapping.remap[key] || key];
if (func) {
pairs.push([key, wrap(key, func)]);
}
});
});
// Convert remaining methods.
each(keys(_), function(key) {
var func = _[key];
if (typeof func == 'function') {
var length = pairs.length;
while (length--) {
if (pairs[length][0] == key) {
return;
}
}
func.convert = createConverter(key, func);
pairs.push([key, func]);
}
});
// Assign to `_` leaving `_.prototype` unchanged to allow chaining.
each(pairs, function(pair) {
_[pair[0]] = pair[1];
});
_.convert = convertLib;
if (setPlaceholder) {
_.placeholder = placeholder;
}
// Assign aliases.
each(keys(_), function(key) {
each(mapping.realToAlias[key] || [], function(alias) {
_[alias] = _[key];
});
});
return _;
}
module.exports = baseConvert;

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,309 +0,0 @@
/** Used to map aliases to their real names. */
exports.aliasToReal = {
// Lodash aliases.
'each': 'forEach',
'eachRight': 'forEachRight',
'entries': 'toPairs',
'entriesIn': 'toPairsIn',
'extend': 'assignIn',
'extendWith': 'assignInWith',
'first': 'head',
// Ramda aliases.
'__': 'placeholder',
'all': 'every',
'allPass': 'overEvery',
'always': 'constant',
'any': 'some',
'anyPass': 'overSome',
'apply': 'spread',
'assoc': 'set',
'assocPath': 'set',
'complement': 'negate',
'compose': 'flowRight',
'contains': 'includes',
'dissoc': 'unset',
'dissocPath': 'unset',
'equals': 'isEqual',
'identical': 'eq',
'init': 'initial',
'invertObj': 'invert',
'juxt': 'over',
'omitAll': 'omit',
'nAry': 'ary',
'path': 'get',
'pathEq': 'matchesProperty',
'pathOr': 'getOr',
'paths': 'at',
'pickAll': 'pick',
'pipe': 'flow',
'pluck': 'map',
'prop': 'get',
'propEq': 'matchesProperty',
'propOr': 'getOr',
'props': 'at',
'unapply': 'rest',
'unnest': 'flatten',
'useWith': 'overArgs',
'whereEq': 'filter',
'zipObj': 'zipObject'
};
/** Used to map ary to method names. */
exports.aryMethod = {
'1': [
'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor',
'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method',
'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse',
'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
'uniqueId', 'words'
],
'2': [
'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll',
'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference',
'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith',
'eq', 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast',
'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth',
'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight',
'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf',
'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch',
'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues',
'matchesProperty', 'maxBy', 'meanBy', 'merge', 'minBy', 'multiply', 'nth',
'omit', 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt',
'partial', 'partialRight', 'partition', 'pick', 'pickBy', 'pull', 'pullAll',
'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',
'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',
'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',
'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',
'zipObjectDeep'
],
'3': [
'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',
'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',
'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',
'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',
'padCharsStart', 'pullAllBy', 'pullAllWith', 'reduce', 'reduceRight', 'replace',
'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy',
'unionWith', 'update', 'xorBy', 'xorWith', 'zipWith'
],
'4': [
'fill', 'setWith', 'updateWith'
]
};
/** Used to map ary to rearg configs. */
exports.aryRearg = {
'2': [1, 0],
'3': [2, 0, 1],
'4': [3, 2, 0, 1]
};
/** Used to map method names to their iteratee ary. */
exports.iterateeAry = {
'dropRightWhile': 1,
'dropWhile': 1,
'every': 1,
'filter': 1,
'find': 1,
'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 = {
'assignInWith': [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],
'mergeWith': [1, 2, 0],
'padChars': [2, 1, 0],
'padCharsEnd': [2, 1, 0],
'padCharsStart': [2, 1, 0],
'pullAllBy': [2, 1, 0],
'pullAllWith': [2, 1, 0],
'setWith': [3, 1, 2, 0],
'sortedIndexBy': [2, 1, 0],
'sortedLastIndexBy': [2, 1, 0],
'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 = {
'invokeArgs': 2,
'invokeArgsMap': 2,
'partial': 1,
'partialRight': 1,
'without': 1
};
/** Used to identify methods which mutate arrays or objects. */
exports.mutate = {
'array': {
'fill': true,
'pull': true,
'pullAll': true,
'pullAllBy': true,
'pullAllWith': true,
'pullAt': true,
'remove': true,
'reverse': true
},
'object': {
'assign': true,
'assignIn': true,
'assignInWith': true,
'assignWith': true,
'defaults': true,
'defaultsDeep': true,
'merge': true,
'mergeWith': true
},
'set': {
'set': true,
'setWith': true,
'unset': true,
'update': true,
'updateWith': true
}
};
/** Used to track methods with placeholder support */
exports.placeholder = {
'bind': true,
'bindKey': true,
'curry': true,
'curryRight': true,
'partial': true,
'partialRight': true
};
/** Used to map real names to their aliases. */
exports.realToAlias = (function() {
var hasOwnProperty = Object.prototype.hasOwnProperty,
object = exports.aliasToReal,
result = {};
for (var key in object) {
var value = object[key];
if (hasOwnProperty.call(result, value)) {
result[value].push(key);
} else {
result[value] = [key];
}
}
return result;
}());
/** Used to map method names to other names. */
exports.remap = {
'curryN': 'curry',
'curryRightN': 'curryRight',
'findFrom': 'find',
'findIndexFrom': 'findIndex',
'findLastFrom': 'findLast',
'findLastIndexFrom': 'findLastIndex',
'getOr': 'get',
'includesFrom': 'includes',
'indexOfFrom': 'indexOf',
'invokeArgs': 'invoke',
'invokeArgsMap': 'invokeMap',
'lastIndexOfFrom': 'lastIndexOf',
'padChars': 'pad',
'padCharsEnd': 'padEnd',
'padCharsStart': 'padStart',
'restFrom': 'rest',
'spreadFrom': 'spread',
'trimChars': 'trim',
'trimCharsEnd': 'trimEnd',
'trimCharsStart': 'trimStart'
};
/** Used to track methods that skip fixing their arity. */
exports.skipFixed = {
'castArray': true,
'flow': true,
'flowRight': true,
'iteratee': true,
'mixin': true,
'runInContext': true
};
/** Used to track methods that skip rearranging arguments. */
exports.skipRearg = {
'add': true,
'assign': true,
'assignIn': true,
'bind': true,
'bindKey': true,
'concat': true,
'difference': true,
'divide': true,
'eq': true,
'gt': true,
'gte': true,
'isEqual': true,
'lt': true,
'lte': true,
'matchesProperty': true,
'merge': true,
'multiply': true,
'overArgs': true,
'partial': true,
'partialRight': true,
'random': true,
'range': true,
'rangeRight': true,
'subtract': true,
'zip': true,
'zipObject': 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';
var _ = require('lodash'),
fs = require('fs-extra'),
glob = require('glob'),
path = require('path');
var minify = require('../common/minify.js');
/*----------------------------------------------------------------------------*/
/**
* Creates a [fs.copy](https://github.com/jprichardson/node-fs-extra#copy)
* function with `srcPath` and `destPath` partially applied.
*
* @memberOf file
* @param {string} srcPath The path of the file to copy.
* @param {string} destPath The path to copy the file to.
* @returns {Function} Returns the partially applied function.
*/
function copy(srcPath, destPath) {
return _.partial(fs.copy, srcPath, destPath);
}
/**
* Creates an object of compiled template and base name pairs that match `pattern`.
*
* @memberOf file
* @param {string} pattern The glob pattern to be match.
* @returns {Object} Returns the object of compiled templates.
*/
function globTemplate(pattern) {
return _.transform(glob.sync(pattern), function(result, filePath) {
var key = path.basename(filePath, path.extname(filePath));
result[key] = _.template(fs.readFileSync(filePath, 'utf8'));
}, {});
}
/**
* Creates a `minify` function with `srcPath` and `destPath` partially applied.
*
* @memberOf file
* @param {string} srcPath The path of the file to minify.
* @param {string} destPath The path to write the file to.
* @returns {Function} Returns the partially applied function.
*/
function min(srcPath, destPath) {
return _.partial(minify, srcPath, destPath);
}
/**
* Creates a [fs.writeFile](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback)
* function with `filePath` and `data` partially applied.
*
* @memberOf file
* @param {string} destPath The path to write the file to.
* @param {string} data The data to write to the file.
* @returns {Function} Returns the partially applied function.
*/
function write(destPath, data) {
return _.partial(fs.writeFile, destPath, data);
}
/*----------------------------------------------------------------------------*/
module.exports = {
'copy': copy,
'globTemplate': globTemplate,
'min': min,
'write': write
};

View File

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

View File

@@ -1,39 +0,0 @@
'use strict';
var _ = require('lodash'),
fs = require('fs-extra'),
uglify = require('uglify-js');
var uglifyOptions = require('./uglify.options');
/*----------------------------------------------------------------------------*/
/**
* Asynchronously minifies the file at `srcPath`, writes it to `destPath`, and
* invokes `callback` upon completion. The callback is invoked with one argument:
* (error).
*
* If unspecified, `destPath` is `srcPath` with an extension of `.min.js`. For
* example, a `srcPath` of `path/to/foo.js` would have a `destPath` of `path/to/foo.min.js`.
*
* @param {string} srcPath The path of the file to minify.
* @param {string} [destPath] The path to write the file to.
* @param {Function} callback The function invoked upon completion.
* @param {Object} [option] The UglifyJS options object.
*/
function minify(srcPath, destPath, callback, options) {
if (_.isFunction(destPath)) {
if (_.isObject(callback)) {
options = callback;
}
callback = destPath;
destPath = undefined;
}
if (!destPath) {
destPath = srcPath.replace(/(?=\.js$)/, '.min');
}
var output = uglify.minify(srcPath, _.defaults(options || {}, uglifyOptions));
fs.writeFile(destPath, output.code, 'utf-8', callback);
}
module.exports = minify;

View File

@@ -1,23 +0,0 @@
'use strict';
/**
* The UglifyJS options object for
* [compress](https://github.com/mishoo/UglifyJS2#compressor-options),
* [mangle](https://github.com/mishoo/UglifyJS2#mangler-options), and
* [output](https://github.com/mishoo/UglifyJS2#beautifier-options) options.
*/
module.exports = {
'compress': {
'pure_getters': true,
'unsafe': true,
'warnings': false
},
'mangle': {
'except': ['define']
},
'output': {
'ascii_only': true,
'comments': /^!|@cc_on|@license|@preserve/i,
'max_line_len': 500
}
};

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,227 +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='path/to/lodash.js'></script>
<script src='path/to/lodash.fp.js'></script>
<script>
// Loading `lodash.fp.js` converts `_` to its fp variant.
_.defaults({ 'a': 2, 'b': 2 })({ 'a': 1 });
// → { 'a: 1, 'b': 2 }
// Use `noConflict` to restore the pre-fp variant.
var fp = _.noConflict();
_.defaults({ 'a': 1 }, { 'a': 2, 'b': 2 });
// → { 'a: 1, 'b': 2 }
fp.defaults({ 'a': 2, 'b': 2 })({ 'a': 1 });
// → { 'a: 1, 'b': 2 }
</script>
```
In Node.js:
```js
// Load the fp build.
var fp = require('lodash/fp');
// Load a method category.
var object = require('lodash/fp/object');
// Load a single method for smaller builds with browserify/rollup/webpack.
var extend = require('lodash/fp/extend');
```
## Mapping
Immutable auto-curried iteratee-first data-last methods sound great, but what
does that really mean for each method? Below is a breakdown of the mapping used
to convert each method.
#### Capped Iteratee Arguments
Iteratee arguments are capped to avoid gotchas with variadic iteratees.
```js
// The `lodash/map` iteratee receives three arguments:
// (value, index|key, collection)
_.map(['6', '8', '10'], parseInt);
// → [6, NaN, 2]
// The `lodash/fp/map` iteratee is capped at one argument:
// (value)
fp.map(parseInt)(['6', '8', '10']);
// → [6, 8, 10]
```
Methods that cap iteratees to one argument:<br>
<%= toFuncList(_.keys(_.pickBy(mapping.iterateeAry, _.partial(_.eq, _, 1)))) %>
Methods that cap iteratees to two arguments:<br>
<%= toFuncList(_.keys(_.pickBy(mapping.iterateeAry, _.partial(_.eq, _, 2)))) %>
The iteratee of `mapKeys` is invoked with one argument: (key)
#### Fixed Arity
Methods have fixed arities to support auto-currying.
```js
// `lodash/padStart` accepts an optional `chars` param.
_.padStart('a', 3, '-')
// → '--a'
// `lodash/fp/padStart` does not.
fp.padStart(3)('a');
// → ' a'
fp.padCharsStart('-')(3)('a');
// → '--a'
```
Methods with a fixed arity of one:<br>
<%= toFuncList(_.difference(mapping.aryMethod[1], _.keys(mapping.skipFixed))) %>
Methods with a fixed arity of two:<br>
<%= toFuncList(_.difference(mapping.aryMethod[2], _.keys(mapping.skipFixed))) %>
Methods with a fixed arity of three:<br>
<%= toFuncList(_.difference(mapping.aryMethod[3], _.keys(mapping.skipFixed))) %>
Methods with a fixed arity of four:<br>
<%= toFuncList(_.difference(mapping.aryMethod[4], _.keys(mapping.skipFixed))) %>
#### Rearranged Arguments
Method arguments are rearranged to make composition easier.
```js
// `lodash/filter` is data-first iteratee-last:
// (collection, iteratee)
var compact = _.partial(_.filter, _, Boolean);
compact(['a', null, 'c']);
// → ['a', 'c']
// `lodash/fp/filter` is iteratee-first data-last:
// (iteratee, collection)
var compact = fp.filter(Boolean);
compact(['a', null, 'c']);
// → ['a', 'c']
```
##### Most methods follow these rules
A fixed arity of two has an argument order of:<br>
<%= toArgOrder(mapping.aryRearg[2]) %>
A fixed arity of three has an argument order of:<br>
<%= toArgOrder(mapping.aryRearg[3]) %>
A fixed arity of four has an argument order of:<br>
<%= toArgOrder(mapping.aryRearg[4]) %>
##### Exceptions to the rules
Methods that accept an array of arguments as their second parameter:<br>
<%= toFuncList(_.keys(mapping.methodSpread)) %>
Methods with unchanged argument orders:<br>
<%= toFuncList(_.keys(mapping.skipRearg)) %>
Methods with custom argument orders:<br>
<%= _.map(_.keys(mapping.methodRearg), function(methodName) {
var orders = mapping.methodRearg[methodName];
return ' * `_.' + methodName + '` has an order of ' + toArgOrder(orders);
}).join('\n') %>
#### New Methods
Not all variadic methods have corresponding new method variants. Feel free to
[request](https://github.com/lodash/lodash/blob/master/.github/CONTRIBUTING.md#feature-requests)
any additions.
Methods created to accommodate Lodashs variadic methods:<br>
<%= toFuncList(_.keys(mapping.remap)) %>
#### Aliases
There are <%= _.size(mapping.aliasToReal) %> method aliases:<br>
<%= _.map(_.keys(mapping.aliasToReal).sort(), function(alias) {
var realName = mapping.aliasToReal[alias];
return ' * `_.' + alias + '` is an alias of `_.' + realName + '`';
}).join('\n') %>
## Placeholders
The placeholder argument, which defaults to `_`, may be used to fill in method
arguments in a different order. Placeholders are filled by the first available
arguments of the curried returned function.
```js
// The equivalent of `2 > 5`.
_.gt(2)(5);
// → false
// The equivalent of `_.gt(5, 2)` or `5 > 2`.
_.gt(_, 2)(5);
// → true
```
## Chaining
The `lodash/fp` module **does not** convert chain sequence methods. See
[Izaak 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,14 +0,0 @@
module.exports = {
'ary': require('../ary'),
'assign': require('../_baseAssign'),
'clone': require('../clone'),
'curry': require('../curry'),
'forEach': require('../_arrayEach'),
'isArray': require('../isArray'),
'isFunction': require('../isFunction'),
'iteratee': require('../iteratee'),
'keys': require('../_baseKeys'),
'rearg': require('../rearg'),
'spread': require('../spread'),
'toPath': require('../toPath')
};

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('../<%= _.result(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('../<%= _.result(mapping.remap, name, name) %>'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

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

View File

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

View File

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

16387
lodash.js

File diff suppressed because it is too large Load Diff

View File

@@ -1,55 +1,50 @@
{
"name": "lodash",
"version": "4.13.0",
"version": "5.0.0",
"license": "MIT",
"private": true,
"main": "lodash.js",
"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",
"prepublish": "npm run build",
"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",
"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": "^1.5.2",
"benchmark": "^2.1.0",
"chalk": "^1.1.3",
"codecov.io": "~0.1.6",
"coveralls": "^2.11.9",
"curl-amd": "~0.8.12",
"docdown": "~0.5.1",
"dojo": "^1.11.1",
"ecstatic": "^1.4.1",
"fs-extra": "~0.30.0",
"glob": "^7.0.3",
"istanbul": "0.4.3",
"jquery": "^2.2.4",
"jscs": "^3.0.1",
"lodash": "4.11.2",
"markdown-doctest": "^0.6.0",
"platform": "^1.3.1",
"qunit-extras": "^2.0.0",
"qunitjs": "~1.23.1",
"request": "^2.69.0",
"requirejs": "^2.2.0",
"sauce-tunnel": "^2.4.0",
"uglify-js": "2.6.2",
"webpack": "^1.13.1"
}
"@commitlint/cli": "17.7.1",
"@commitlint/config-conventional": "17.7.0",
"@types/eslint": "8.44.2",
"@types/jest": "29.5.5",
"@typescript-eslint/eslint-plugin": "6.7.0",
"@typescript-eslint/parser": "6.7.0",
"eslint": "8.49.0",
"eslint-config-airbnb-base": "15.0.0",
"eslint-config-airbnb-typescript": "17.1.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-import": "2.28.1",
"eslint-plugin-prettier": "5.0.0",
"husky": "8.0.3",
"lint-staged": "14.0.1",
"lodash": "4.17.21",
"prettier": "3.0.3"
},
"lint-staged": {
"src/**/*.{ts}": [
"eslint --fix"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"commit-msg": "bun run commitlint --edit $1"
}
},
"engines": {
"node": "^18.17.1",
"yarn": "^1.22.19"
},
"volta": {
"node": "18.17.1",
"yarn": "1.22.19"
},
"engineStrict": true
}

View File

@@ -1,131 +0,0 @@
;(function(window) {
'use strict';
/** The base path of the lodash builds. */
var basePath = '../';
/** The lodash build to load. */
var build = (build = /build=([^&]+)/.exec(location.search)) && decodeURIComponent(build[1]);
/** The other library to load. */
var other = (other = /other=([^&]+)/.exec(location.search)) && decodeURIComponent(other[1]);
/** The `ui` object. */
var ui = {};
/*--------------------------------------------------------------------------*/
/**
* Registers an event listener on an element.
*
* @private
* @param {Element} element The element.
* @param {string} eventName The name of the event.
* @param {Function} handler The event handler.
* @returns {Element} The element.
*/
function addListener(element, eventName, handler) {
if (typeof element.addEventListener != 'undefined') {
element.addEventListener(eventName, handler, false);
} else if (typeof element.attachEvent != 'undefined') {
element.attachEvent('on' + eventName, handler);
}
}
/*--------------------------------------------------------------------------*/
// Initialize controls.
addListener(window, 'load', function() {
function eventHandler(event) {
var buildIndex = buildList.selectedIndex,
otherIndex = otherList.selectedIndex,
search = location.search.replace(/^\?|&?(?:build|other)=[^&]*&?/g, '');
if (event.stopPropagation) {
event.stopPropagation();
} else {
event.cancelBubble = true;
}
location.href =
location.href.split('?')[0] + '?' +
(search ? search + '&' : '') +
'build=' + (buildIndex < 0 ? build : buildList[buildIndex].value) + '&' +
'other=' + (otherIndex < 0 ? other : otherList[otherIndex].value);
}
var span1 = document.createElement('span');
span1.style.cssText = 'float:right';
span1.innerHTML =
'<label for="perf-build">Build: </label>' +
'<select id="perf-build">' +
'<option value="lodash">lodash</option>' +
'</select>';
var span2 = document.createElement('span');
span2.style.cssText = 'float:right';
span2.innerHTML =
'<label for="perf-other">Other Library: </label>' +
'<select id="perf-other">' +
'<option value="underscore-dev">Underscore (development)</option>' +
'<option value="underscore">Underscore (production)</option>' +
'<option value="lodash">lodash</option>' +
'</select>';
var buildList = span1.lastChild,
otherList = span2.lastChild,
toolbar = document.getElementById('perf-toolbar');
toolbar.appendChild(span2);
toolbar.appendChild(span1);
buildList.selectedIndex = (function() {
switch (build) {
case 'lodash':
case null: return 0;
}
return -1;
}());
otherList.selectedIndex = (function() {
switch (other) {
case 'underscore-dev': return 0;
case 'lodash': return 2;
case 'underscore':
case null: return 1;
}
return -1;
}());
addListener(buildList, 'change', eventHandler);
addListener(otherList, 'change', eventHandler);
});
// The lodash build file path.
ui.buildPath = (function() {
var result;
switch (build) {
case null: build = 'lodash';
case 'lodash': result = 'dist/lodash.min.js'; break;
default: return build;
}
return basePath + result;
}());
// The other library file path.
ui.otherPath = (function() {
var result;
switch (other) {
case 'lodash': result = 'dist/lodash.min.js'; break;
case 'underscore-dev': result = 'vendor/underscore/underscore.js'; break;
case null: other = 'underscore';
case 'underscore': result = 'vendor/underscore/underscore-min.js'; break;
default: return other;
}
return basePath + result;
}());
ui.urlParams = { 'build': build, 'other': other };
window.ui = ui;
}(this));

View File

@@ -1,69 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>lodash Performance Suite</title>
<style>
html, body {
margin: 0;
padding: 0;
height: 100%;
}
#FirebugUI {
top: 2em;
}
#perf-toolbar {
background-color: #EEE;
color: #5E740B;
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
font-size: small;
padding: 0.5em 0 0.5em 2em;
overflow: hidden;
}
</style>
</head>
<body>
<div id="perf-toolbar"></div>
<script src="../lodash.js"></script>
<script src="../node_modules/platform/platform.js"></script>
<script src="../node_modules/benchmark/benchmark.js"></script>
<script src="../vendor/firebug-lite/src/firebug-lite-debug.js"></script>
<script src="./asset/perf-ui.js"></script>
<script>
document.write('<script src="' + ui.buildPath + '"><\/script>');
</script>
<script>
var lodash = _.noConflict();
</script>
<script>
document.write('<script src="' + ui.otherPath + '"><\/script>');
</script>
<script src="perf.js"></script>
<script>
(function() {
var measured,
perfNow,
begin = new Date;
function init() {
var fbUI = document.getElementById('FirebugUI'),
fbDoc = fbUI && (fbDoc = fbUI.contentWindow || fbUI.contentDocument).document || fbDoc,
fbCommandLine = fbDoc && fbDoc.getElementById('fbCommandLine');
if (!fbCommandLine) {
return setTimeout(init, 15);
}
fbUI.style.height = (
Math.max(document.documentElement.clientHeight, document.body.clientHeight) -
document.getElementById('perf-toolbar').clientHeight
) + 'px';
fbDoc.body.style.height = fbDoc.documentElement.style.height = '100%';
setTimeout(run, 15);
}
window.onload = init;
}());
</script>
</body>
</html>

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