Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

They are the two most common node abstractions. You can get by without them but it's pretty important to know about them.

Streams are the more important one. Once you embrace streams in your applications a lot of things become easier. For example here's a small script I wrote at work to process some csvs and do stuff with them

https://gist.github.com/jb55/0ea6aba86e269f1e526b

Needless to say before I knew about streams that program was twice as large and twice as buggy. Also check out substack's stream handbook to learn more, they are really handy.



Can you show the 'before' for comparison?


"small"


It's 28 SLoC. That's pretty small.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: