Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: replace _.entries, _.entriesIn and _.toPairs with Object.entries #8275

Merged

Conversation

pgrzesik
Copy link
Contributor

Replace _.entries, _.entriesIn and _.toPairs with Object.entries to reduce lodash usage.

Note about toPairs: I decided to not split it into multiple PRs as toPairs in lodash has the same functionality as entries.

Note about entriesIn: There was only one instance of it and I didn't notice any use/reliance on prototypal inheritance for tags so I think it's safe to replace it with Object.entries as the only difference is in it not including inherited properties.

Addresses: #7747

@codecov-commenter
Copy link

Codecov Report

Merging #8275 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #8275   +/-   ##
=======================================
  Coverage   88.02%   88.02%           
=======================================
  Files         248      248           
  Lines        9312     9312           
=======================================
  Hits         8197     8197           
  Misses       1115     1115           
Impacted Files Coverage Δ
lib/classes/ConfigSchemaHandler/index.js 89.52% <100.00%> (ø)
.../classes/ConfigSchemaHandler/normalizeAjvErrors.js 95.79% <100.00%> (ø)
lib/classes/PluginManager.js 96.46% <100.00%> (ø)
lib/plugins/aws/invokeLocal/index.js 69.66% <100.00%> (ø)
...ins/aws/package/compile/events/alb/lib/validate.js 97.82% <100.00%> (ø)
...kage/compile/events/apiGateway/lib/method/index.js 100.00% <100.00%> (ø)
...ompile/events/apiGateway/lib/method/integration.js 98.33% <100.00%> (ø)
...ckage/compile/events/apiGateway/lib/stage/index.js 100.00% <100.00%> (ø)
...age/compile/events/apiGateway/lib/usagePlanKeys.js 97.14% <100.00%> (ø)
...lugins/aws/package/compile/events/httpApi/index.js 92.59% <100.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8943693...dac6e1c. Read the comment docs.

Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks great, thank you @pgrzesik !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants