Created
April 12, 2017 11:59
-
-
Save dolvik/0f214a8dfb7faddc69a7f956043d45ee to your computer and use it in GitHub Desktop.
Small util functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const delayed = (ms, fn, ctx) => (...args) => { | |
setTimeout(fn.bind(ctx, ...args), ms); | |
}; | |
const revert = (arr) => arr.reduce((acc, curr, i, arr) => acc.concat(arr[arr.length - i - 1]), [] ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment