src/index.js
function _removeIdlePromise(idleQueue, promise) {
    if (!promise) return;

    // remove timeout if exists
    if (promise._timeoutObj)
        clearTimeout(promise._timeoutObj);

    // remove handle-nr if exists
    if (idleQueue._pHM.has(promise)) {
        const handle = idleQueue._pHM.get(promise);
        idleQueue._hPM.delete(handle);
        idleQueue._pHM.delete(promise);
    }

    // remove from queue
    idleQueue._iC.delete(promise);
}
function _removeIdlePromise(idleQueue, promise) {
    if (!promise) return;

    // remove timeout if exists
    if (promise._timeoutObj)
        clearTimeout(promise._timeoutObj);

    // remove handle-nr if exists
    if (idleQueue._pHM.has(promise)) {
        const handle = idleQueue._pHM.get(promise);
        idleQueue._hPM.delete(handle);
        idleQueue._pHM.delete(promise);
    }

    // remove from queue
    idleQueue._iC.delete(promise);
}
function _removeIdlePromise ( idleQueue , promise ) { if ( ! promise ) return ; // remove timeout if exists if ( promise . _timeoutObj ) clearTimeout ( promise . _timeoutObj ) ; // remove handle-nr if exists if ( idleQueue . _pHM . has ( promise ) ) { const handle = idleQueue . _pHM . get ( promise ) ; idleQueue . _hPM . delete ( handle ) ; idleQueue . _pHM . delete ( promise ) ; } // remove from queue idleQueue . _iC . delete ( promise ) ; }
removes the promise from the queue and maps and also its corresponding handle-number
@param  {Promise} promise from requestIdlePromise()
@return {void}
removes the promise from the queue and maps and also its corresponding handle - number