List how extension
julianodev opened this issue · comments
Lucas Juliano commented
Hello, how cool is this lib, but why do not you use it as an extension of type List? Then I would not have to use new every time I have a list and I want to use the methods I need to create a new instance of List that does not sound very cool to me
Thanks
Flavio Corpa commented
Hi! Thanks for your love for the library, I'm glad you find it useful! In JavaScript/TypeScript, there is no List
prototype, only the Array
one, and it is generally not considered a good practice to modify native prototypes, rather, to build your own wrappers/abstractions and work with them. That is exactly what this library is! 😉