@jswork/next-delay
v1.0.0
Published
Delay for next.
Readme
next-delay
Delay for next.
installation
npm install -S @jswork/next-delayusage
import '@jswork/next-delay';solution
function sleeper(ms) {
return function(x) {
return new Promise(resolve => setTimeout(() => resolve(x), ms));
};
}resources
- https://stackoverflow.com/questions/38956121/how-to-add-delay-to-promise-inside-then
license
Code released under the MIT license.
