froq-util

froq-util
is a small util library for some useful stuff, needed for the froq
packages.
Usage
npm install froq-util
We use npm package debug
. To make me verbose use DEBUG=froq-util
.
Parallel
Promise.all
sometimes feels strange.
; const google twitter = ;
Retry
retry is non-blocking lazy looping, also with defer = 0
; // simple const resp = await ;// resp.status: 200 (e.g.) // more complex const total = 30000; // millisconst defer = 1000; // 1sec between each tryconst max = 100; // max iterations (as a total limit of tries at all) await ;// throws: Error err (e.g.)// all exceptions in `err.exceptions`