Skip to content

Instantly share code, notes, and snippets.

View malcolm-kee's full-sized avatar

Malcolm Kee malcolm-kee

View GitHub Profile
@malcolm-kee
malcolm-kee / wait-promise.js
Created December 30, 2018 16:19
A utility to slow down promise-based function
export const waitPromise = (promiseCall, amount = 0) => (...args) =>
new Promise(resolve => setTimeout(() => resolve(promiseCall(...args)), amount));