download
raw
497 Bytes
// API
module.exports = abort;
/**
* Aborts leftover active jobs
*
* @param {object} state - current state object
*/
function abort(state)
{
Object.keys(state.jobs).forEach(clean.bind(state));
// reset leftover jobs
state.jobs = {};
}
/**
* Cleans up leftover job by invoking abort function for the provided job id
*
* @this state
* @param {string|number} key - job id to abort
*/
function clean(key)
{
if (typeof this.jobs[key] == 'function')
{
this.jobs[key]();
}
}

Xet Storage Details

Size:
497 Bytes
·
Xet hash:
cf5ad909494768086f53ed0b2c1e888ee33bb7102563a3a4dd965f20000c665f

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.