Erick Wendel Profile picture
Aug 23 7 tweets 4 min read
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
The best thing is that this native module is not meant to replace all existing packages but to empower them to easily catch those CLI args and perform complex operations.

/4
Before parseArgs, as the image below shows, we had to convert all args using the `process.argv`, parse, and handle positional arguments from strings.

It was really painful and it opens a lot of potential vulnerabilities if not implemented right.

/5
Now, the solution happens to not only catch the objects but cast booleans and strings from there making the process even easier

Thanks to @BenjaminCoe, @ruyadorno, @darcy, and all other members of the @nodejs tooling working group who implemented and released this feature 🤩

/6
I'm super excited with what's coming from the Node.js project and the speed of how it's been evolving, what else should we wait for from the platform?

#nodejs #cli #commandlineinterface #javascript #tooling #wgtooling #news #js

/7

• • •

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 24
wowwww look at those new functions meant to help us consume @nodejs Streams as JSON, text, blob, and much more! 😱🎉

🧵 /1 Image
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
Read 6 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!

:(