maxwait
A Node package for timing functions max execution time and timeout once the specified time is reached.
Usage
const MaxWait = defualt // or // https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort const controller = const signal = controllersignal // let's create a MaxWait instance with max wait of 5000 millisecons const maxWait = 5000 // register a handler to be called if timeout was reached maxWait // start the count down maxWaitstart