A tiny (265 byte) utility to create state machine components using two pure functions.
The API is a single function that accepts 2 pure functions as arguments:
A tiny (265 byte) utility to create state machine components using two pure functions.
The API is a single function that accepts 2 pure functions as arguments:
| "use strict"; | |
| // animation utils | |
| // =============== | |
| const trackTime = id => { | |
| const [entry] = performance.getEntriesByName(id); | |
| if (!entry) { | |
| performance.mark(id); |