Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Streams no Javascript
Search
Lucas Santos
November 28, 2018
Programming
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Streams no Javascript
Palestra sobre o uso de streams no Javascript
Lucas Santos
November 28, 2018
Transcript
49 slides
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
More Decks by Lucas Santos
See All by Lucas Santos
The Hitchhiker's Guide for an Amazing API with TypeScript
khaosdoctor
0
150
Escalando globalmente com TypeScript e JavaScript na Klarna
khaosdoctor
0
240
The future of JavaScript
khaosdoctor
0
110
TypeScript tips that could save your life
khaosdoctor
0
280
É hora de falar sobre Deno
khaosdoctor
0
110
JS Software testing for beginners
khaosdoctor
0
120
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
87
The Dark Side of JavaScript
khaosdoctor
0
110
Integrating Containers Into JavaScript
khaosdoctor
0
100
Other Decks in Programming
See All in Programming
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
170
RaspberryPi 5で軽くはじめるk3sとtailscaleを用いたホームサーバー構築 (1)
nasum
0
360
Getting Started with Vibe Coding
miccheng
0
240
AI Augmentation Techniques with Liberty
ivargrimstad
1
510
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
6k
protojson における文字化けの扱い
kazuki1023
0
440
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
310
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
350
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
240
LLM 101: Exploring LLMs, Starting with Tokens.
dalinaum
0
110
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
690
SODA - FACT BOOK(EN)
sodainc
1
260
Featured
See All Featured
Visualization
eitanlees
153
17k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
880
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
The agentic SEO stack - context over prompts
schlessera
0
1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.2k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
900
The SEO identity crisis: Don't let AI make you average
varn
0
630
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
43k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.7k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.3k