Skip to content

Instantly share code, notes, and snippets.

View stoutlabs's full-sized avatar
📡
Working from home...

Daniel Stout stoutlabs

📡
Working from home...
View GitHub Profile
@stoutlabs
stoutlabs / oneliners.js
Created April 1, 2019 16:59 — forked from mikowl/oneliners.js
👑 Awesome one-liners you might find useful while coding.
// By @coderitual
// https://twitter.com/coderitual/status/1112297299307384833
// Remove any duplicates from an array of primitives.
const unique = [...new Set(arr)]
// Sleep in async functions. Use: await sleep(2000).
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms)));
// Type this in your code to break chrome debugger in that line.