Delay function execution until user stops typing
const debounce = (fn, ms = 300) => { let t; return (...args) => { clearTimeout(t); t = setTimeout(() => fn(...args), ms) } }
Capitalize the first character of a string
Copy text to the user's clipboard using the Clipboard API
Deep copy an object (works for JSON-serializable data)
Flatten a deeply nested array