Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Streams no Javascript
Search
Lucas Santos
November 28, 2018
Programming
0
92
Streams no Javascript
Palestra sobre o uso de streams no Javascript
Lucas Santos
November 28, 2018
Tweet
Share
More Decks by Lucas Santos
See All by Lucas Santos
The Hitchhiker's Guide for an Amazing API with TypeScript
khaosdoctor
0
97
Escalando globalmente com TypeScript e JavaScript na Klarna
khaosdoctor
0
190
The future of JavaScript
khaosdoctor
0
60
TypeScript tips that could save your life
khaosdoctor
0
210
É hora de falar sobre Deno
khaosdoctor
0
75
JS Software testing for beginners
khaosdoctor
0
81
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
42
The Dark Side of JavaScript
khaosdoctor
0
78
Integrating Containers Into JavaScript
khaosdoctor
0
70
Other Decks in Programming
See All in Programming
Building AI Agents with TypeScript #TSKaigiHokuriku
izumin5210
6
1.3k
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
8
2.3k
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
6
3.2k
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
130
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
6
2.1k
ローターアクトEクラブ アメリカンナイト:川端 柚菜 氏(Japan O.K. ローターアクトEクラブ 会長):2720 Japan O.K. ロータリーEクラブ2025年12月1日卓話
2720japanoke
0
730
AIコーディングエージェント(Manus)
kondai24
0
170
AIコーディングエージェント(skywork)
kondai24
0
160
TestingOsaka6_Ozono
o3
0
150
複数人でのCLI/Infrastructure as Codeの暮らしを良くする
shmokmt
5
2.3k
sbt 2
xuwei_k
0
290
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
400
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Agile that works and the tools we love
rasmusluckow
331
21k
4 Signs Your Business is Dying
shpigford
186
22k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
100
Visualization
eitanlees
150
16k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Rails Girls Zürich Keynote
gr2m
95
14k
Designing Experiences People Love
moore
143
24k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
The Cult of Friendly URLs
andyhume
79
6.7k
Become a Pro
speakerdeck
PRO
31
5.7k
Transcript
Streams no JavaScript O que são? O que comem? Onde
Vivem?
$ whoami Lucas Santos /khaosdoctor @_staticvoid lsantos.me @khaosdoctor Lead Solutions
Architect
trainingcenter.io 2018.abcdevelopers.org obarra.co
Streams?
Array 1 2 3 4 5 6 7 8 9
10 11
Stream 2 3 4 5 6 7 8 9 10
11 1 Em espera
Stream 2 3 4 5 6 7 8 9 10
11 1 Requisitado 3 4 5 6 7 8 9 10 11 2 Em espera
Exemplos
Exemplos - Netflix - Youtube - Twitch - IoT Devices
- Logs - Steam Link - Gulp
Vantagens Não é só porque é legal Velocidade Eficiência
Implementações
Implementações - Node.js (https://nodejs.org/api/stream.html) - Bacon.js (https://baconjs.github.io/) - RxJS (https://rxjs-dev.firebaseapp.com/)
- Vanilla JS - Experimental (https://mzl.la/2zlQKkH)
Tipos de Streams
Readable Stream
Streams somente de leitura Stream Leitor
Writable Stream
Streams somente de escrita Stream Dados
Outros exemplos
Duplex Streams Tudo junto
Streams de leitura e escrita Stream Dados
Transform Streams Para quando não é o que queremos
Stream de transformação Transform Stream Dados Dados Modificados
Demo
Streams podem conter qualquer coisa - Eventos - Texto -
Números - Bits - Booleans
O que a gente pode fazer?
Pipe Stream Stream Leitor Pipe
Demo
Tee Stream Tee Stream Stream
Demo
Map
Demo
Filter
Demo
Scan
Demo
Skip
Demo
Take
Demo
Debounce
Demo
Debounce Immediate
Demo
Merge
Demo
Outros exemplos
<refs> - bit.ly/sobre-baconjs - bit.ly/sobre-debounce - bit.ly/imasters-streams - bit.ly/streams-node-medium -
mzl.la/mdn-streams - bit.ly/guia-rapido-streams - bit.ly/graficos-streams - bit.ly/mdn-exemplos - github.com/khaosdoctor/palestra-streams
/khaosdoctor @_staticvoid lsantos.me @khaosdoctor
Dê seu feedback! https://goo.gl/forms/kSZQlVGFYLpbkTLo1