Erick Wendel Profile picture
Aug 24 6 tweets 3 min read
wowwww look at those new functions meant to help us consume @Nodejs Streams as JSON, text, blob, and much more! 😱🎉

🧵 /1
The Node.js project is on fire! Every day we see new functions, new shortcuts, and design improvements.

The Node.js project has been receiving a lot of new utility functions and this new set will help us save time when working with Node.js Streams

/2
Now Node.js itself will consume the whole data stream for you and then try parsing to the chosen format

Thanks to @jasnell for implementing it! 🤩

In the image below, I'm reading data from a file, but it'd also work for Web APIs, Net Sockets, Strings, Buffers, and much more

/3
Notice that the "before" approach in the image would also be replaced by the new Streams operators ".toArray" if you're using the Node.js v18+:

JSON.parse((await file.toArray()).join(''))

/4
Instead of piping, gathering, and then parsing data in memory the process will be much easier using this new API, what do you think?

/5
Tell me, what utility do you think Node.js is still missing? Some tasks that you repetitively do to create some functionality on your systems that you wish it'd be natively on the Node.js core

#tips #nodejs #streams #techthread #nodejsevolving #100daysofcode #javascript

/6

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Erick Wendel

Erick Wendel Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @erickwendel_

Aug 23
Fiiiiiiinaly we have a native solution to catch CLI arguments in @nodejs🔥😱

🧵 /1 Image
There was a long discussion on how many existing npm packages were made to parse CLI args and why the Node.js project hasn't had any native solution yet.

/2
You may have heard of existing packages that are very popular around there to make CLI programs such as commander, yargs and this new function came with interesting ideas.

/3
Read 7 tweets
Aug 22
What I've learned after giving over 100 talks around the world 🤯😱

🧵 /1 Image
Today I brought something special for you! I'll show how I reached 10 different countries, what I learned to keep myself calm while speaking to huge audiences, and much more!

/2
This video is very special for me as I'm sharing my experiences and the reason behind Why I started giving talks in the first place.

/3
Read 8 tweets
Aug 15
The JavaScript language is changing and the ECMAScript 2023 is on 🔥

Come and check what's new now 🤯🧵 /1
I love seeing how the language is evolving fast and especially how JS proposals that have been in discussions for years are finally going to the last stage to become part of the language. /2
I prepared a bunch of videos on my channel showing in practice the benefits and what problems those proposals are meant to solve

/3
Read 7 tweets
Jul 11
Why JavaScript Generators fix 90% of your problems when working with big loads of data 🤯

Let's? 🧵 /1 Image
I've seen many people facing performance problems on the @nodejs platform or even on vanilla JS on the browser and when I ask what's happening they usually blame the language. /2
Although, when I look at the implementation, I see they are trying to process all the data simultaneously. /3
Read 10 tweets
Jul 6
wooowwwww, I know that you've always wanted to compare objects in JS as `obj === obj` so I brought good news for you 🤩🔥

Let's begin🧵 /1
I don't know about you but I'm really excited about this feature, let me show you how it works 🔥

/2
The #ECMAScript proposal for the #Record and #Tuple value types is Stage 2 which means that it could change at any time but there're packages and playgrounds for you to try out this feature before it's available on the language.

/3
Read 11 tweets
Jul 5
Aewwww agora simmmmmm, atendendo a pedidos eu trouxe uma super surpresaaaaaaaa 🔥🔥

Boraaaaaaaaa🧵 /1
No ultimo mês estive palestrando em grandes eventos pelo mundo e muita gente acompanhou a parada de perto. /2
Fui para Athenas na Grécia, para Amsterdã em Netherlands palestrar para mais de 2 mil pessoas (como na foto) e por fim em Tel Aviv em Israel para também mais de 2 mil pessoas presencialmente 🚀🚀 /3
Read 8 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(