decktape/libs/util.js
Antonin Stefanutti 27cc94447f Polish
2017-08-25 15:18:08 +02:00

10 lines
334 B
JavaScript

'use strict';
module.exports.call = f => async val => { await f(val); return val };
module.exports.delay = delay => value => new Promise(resolve => setTimeout(resolve, delay, value));
module.exports.pause = delay => new Promise(resolve => setTimeout(resolve, delay));
module.exports.wait = ms => () => module.exports.delay(ms);