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

Remove lodash.get #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ericcornelissen
Copy link
Contributor

This refactors the code base to get rid of lodash.get, which has been deprecated in favor of the ?. operator. Since this project promises support with node >= 8.12 and ?. is in Node.js since v14 I do not use it in these changes. Rather, I use old school JavaScript to achieve the same effect as these two alternatives. In most cases where lodash.get was being used it was pretty much useless and thus would not even require ?., instead maybe providing an alternative for a default value. In some other cases its use side-stepped the type checker and the refactored code adds the appropriate type checks.

This refactors the code base to get rid of lodash.get, which has been
deprecated in favor of the `?.` operator. Since this project promises
support with node >= 8.12 (see package.json:16) and `?.` is in Node.js
since v14 I do not use it in these changes. Rather, I use old school
JavaScript to achieve the same effect as these two alternatives. In most
cases where `lodash.get` was being used it was pretty much useless and
thus would not even require `?.`. In some cases it side-stepped the type
checker and the refactored code adds the appropriate type checks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant