Module 16 ¡ Map, Set, WeakMap, Iterators, Generators and Regular Expressions
Full Programs: An LRU Cache, a Word Index, a Paged Feed, a Tokenizer, a Log Parser and a Memo
ProReading
The last lesson took every method apart. Working code puts them back together. Six programs follow, each a tool you will meet in real codebases. Each one is small enough to read in a minute, and each leans on one idea from this module.
Checking what this lesson needs for youâĻ
What is inside Full Programs: An LRU Cache, a Word Index, a Paged Feed, a Tokenizer, a Log Parser and a Memo
- The shape of these programs
- An LRU cache on a Map
- A word index: a Map of Sets
- A paged feed through an async generator
- A tokenizer with a sticky regex
- A log parser with named groups
- A memo per object with a WeakMap