How to use the worker-timers.clearInterval function in worker-timers

To help you get started, we’ve selected a few worker-timers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Nike-Inc / cerberus / dashboard / app / actions / authenticationActions.js View on Github external
return function(dispatch, getState) {
        let sessionExpirationCheckIntervalId = getState().auth.sessionExpirationCheckIntervalId
        log.debug(`Removing session expiration check interval, id: ${sessionExpirationCheckIntervalId}`)
        try {
            workerTimers.clearInterval(sessionExpirationCheckIntervalId)
        } catch(err) {
            console.log(`Failed to clear auth token timeout, id=${sessionExpirationCheckIntervalId}`)
            console.log(err)
        }
        dispatch(removeSessionExpirationCheck())
    }
}

worker-timers

A replacement for setInterval() and setTimeout() which works in unfocused windows.

MIT
Latest version published 3 days ago

Package Health Score

73 / 100
Full package analysis