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
lodash almost gone #1069
lodash almost gone #1069
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1069 +/- ##
=======================================
Coverage 88.30% 88.30%
=======================================
Files 4 4
Lines 171 171
Branches 23 23
=======================================
Hits 151 151
Misses 1 1
Partials 19 19 Continue to review full report at Codecov.
|
Ah yeah, that get/set in the prompt file will be hard to re-implement... I'd keep those there for simplicity; the new version (if it ever gets to stable 😅) would get rid of this since it's standalone prompt packages. I think the other instances can be replaced with similar logic. Not sure the |
Yep, thought about it too. but wasn't 100% sure what gets passed in there. I'm new to this project... |
also here is a crazy idea while doing all this work, i found this: Inquirer.js/packages/inquirer/lib/objects/choices.js Lines 94 to 122 in 3a796d8
Why not just go with: class Choices extends Array {
push(...args) {
super.push(...args.map((val) => new Choice(val))
}
} Then you can have all array methods (iterators, .at(), .values(), .entries()) and so on :P |
Ah yes, that was initially implemented before we were able to extend native classes (and even before For the |
There are 3 remaining files after this gets merged.
They are slightly more annoying and harder to refactor out cuz of things like
Lodash 'where' clause
in_.get
for example.i would have use optional chaining...
Will leave the rest to you to decide what to do with it: