Or even worse, when you want to remove an item for a specific task using .splice (not .slice) and the whole list is affected:
items.splice(2, 2) // [ 1 ]
items // now it lost all items and kept only [ 1 ]
/5
The "Change Array by copy" proposal provides additional methods on Array.prototype to enable changes on the array by returning a new copy of it with the change.
Using the new set o features, the actual array won't change when you perform that kind of task 🤯❤️
/6
Not just to "fix" the language it has feature proposals but also to extend functionalities.
/7
I remember trying to group values on an object by doing the following:
And last, but not least, the "Array.fromAsync" proposal came to help us build arrays from Async Iterators 😬🤯
All of these features you can find on the @TC39 website and GitHub repo to follow the progress and the expected dates for them to finally become part of the lang
/10
Tell me here in the comments, what feature did you like most? What kind of function do you think JavaScript is still missing?
I've been creating videos on my youtube channel that you rarely will see in another place on the internet 🤩
You'll find there subjects like Recreating @nodejs from scratch, Web APIs and recreating web protocols such as the Web Socket using JS with no frameworks, etc
/2
And others, which are amazing experiments, such as recreating a code coverage tool from scratch and how to process terabytes of data using JavaScript
If you search about those subjects you'd reach out to my videos but why not have them as blog posts as well?
/3
Estava produzindo uma super aula do meu curso de Node.js Streams (em inglês), ensinando sobre como paralelizar o processamento de arquivos usando Node.js
A ideia é subir um processo para cada arquivo, e cada processo filtra os usuários que possuem o email em dominio gmail
/2
Só que eu automatizei a validação para verificar que todos os itens foram processados e enviados para um arquivo de saida
Então primeiro fui lá e usei o `grep` para filtrar o texto do arquivo e o `wc -l`, para obter a quantidade de linhas.
/3