Role: You are a senior JavaScript developer.
Task: Write debounce(fn, wait) with cancel().
Format: One ES module and three Vitest tests.
Constraints: No libraries.
- 01debounce.js · ES moduleDONE
- 023 Vitest testsPASS
- 03cancel() supportedOK
Now receiving // Signal 001
Receive