Closed ArjixWasTaken closed 11 months ago
I guess one could argue that lodash uses a custom slice
, whilst you use the built-in slice.
I also think it is important to inform the differences of the two implementations other than just suggesting a native solution and ignoring the fact that one of the things lodash is aiming to improve is performance.
So yes, there's a huge difference between in "you don't need lodash" and "you might not need lodash".
This implies that lodash is not using native ecmascript features, or at least that when lodash came out, you couldn't do what it does, and now you can.
But my main wonder is, since lodash is written in javascript, how come you claim the features it provides are not natively available? I would understand if you actually meant built-in method replacements, but you provide entire functions as replacements...
The "Native" alternative, is really not anymore native than what lodash has...
the implementation of
_.chunk
for reference:So like, define "native", because you really make zero sense. If I copy the source code of
_.chunk
into my code w/o having lodash as a dependency, does that make it "native"?If so, wouldn't using a tree shaker in the bundling step be the better option than manually using alternatives? Unless this is about projects that only need one lodash function and don't need the rest.
But even then a tree-shaker is pretty good at removing excess code.
Now, if you advertised this repo as an educational one, with the intent of teaching how to achieve what lodash does w/o using lodash, then that would make a lot of sense, but that is not in the README.