- Issue created by @larowlan
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
We're using it only in 2
.ts
files. Removing this to avoid relying on unmaintained software is important. Thanks for spotting this! - First commit to issue fork.
- 🇸🇬Singapore anish.a Singapore
I need some guidance on it. One lodash function we use is debounce. Are we supposed to create a new custom debounce function?
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
- 🇪🇸Spain idiaz.roncero Madrid
Just as a reminder and for it it helps, Drupal already ships a debounce function. The library can be found on core/drupal.debounce, on core.libraries.yml.
- 🇸🇬Singapore anish.a Singapore
Thank you. That helps. Will send an initial MR soon.
- Assigned to sanket.tale
- 🇮🇳India sanket.tale
Hi @wim-leers
I am a beginner. Tried to remove lodash dependency completely. But getting errors. Will try to solve it.
- 🇬🇧United Kingdom jessebaker
It looks like
camelCase
,kebabCase
,isEmpty
anddebounce
are the 4 lodash functions we use (so far).I don't think there is value is moving
camelCase
,kebabCase
into our codebase vs importing them.The 'native'
isEmpty
solution given on you-dont-need/You-Dont-Need-Lodash-Underscore is not as full featured as the one from lodash which supports object, collection, map, or set (vs native which supports only objects and arrays).The
debounce
method in Drupal core is based on underscore and which is even more out of date than lodash! Lodash'sdebounce
is significantly more feature rich and controllable.Given that lodash is static (has no external dependencies), is battle-hardened and is used sparingly I am afraid that I don't see the value in duplicating functions from it into our code base (which would also mean bringing along their tests) vs just importing them.
I apologise to those of you who have contributed here on not reviewing and closing this sooner.