-
Notifications
You must be signed in to change notification settings - Fork 52
Compare this with Lodash.get #18
Comments
@williamtran29 The are indeed very similar. Here are the differences that I can come up with (having never used
I hope this is helpful. Thanks for the question! |
I think this is a non-issue as you can just do |
one thing to keep in mind about the default value (3rd parameter) to anyone migrating from lodash.get to idx may find this codemod that i wrote useful https://github.com/brettjashford/codemods |
@brettjashford For what it's worth, the optional chaining proposal just reached stage 3 recently, so in the near future I think that'll totally replace // Old
idx(foo, x => x.bar.baz)
// New
x?.bar?.baz Babel supports it, and TypeScript support is coming. However, do note that there's subtle differences between |
interesting, thanks for pointing that out! i'm eagerly awaiting typescript 3.7 with optional chaining support. planning to write an idx -> optional chaining codemod then, although it probably won't take into account the |
Hi,
Could you let me know? What is different between this plugin with Lodash.get?
https://lodash.com/docs/#get
Thanks
The text was updated successfully, but these errors were encountered: