Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/uploads/../uploads/../../../../instantly.picotech.app/homes/../../wa.picotech.app/public_html/node_modules/path-exists/../duplexify/./../@protobufjs/../cheerio/../@socket.io/../ee-first/../path-exists/../dotenv/../y18n/../methods/../../node_modules/validator/../dotenv/.././asynckit/lib
الملفات الموجودة في هذا الـ Path:
.
..
abort.js
async.js
defer.js
iterate.js
readable_asynckit.js
readable_parallel.js
readable_serial.js
readable_serial_ordered.js
state.js
streamify.js
terminator.js

مشاهدة ملف: abort.js

// 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]();
  }
}