MCPcopy
hub / github.com/breejs/bree / removeSafeTimer

Method removeSafeTimer

src/index.js:751–761  ·  view source on GitHub ↗

* A friendly helper to clear safe-timers timeout and interval * @param {string} type * @param {string} name

(type, name)

Source from the content-addressed store, hash-verified

749 * @param {string} name
750 */
751 removeSafeTimer(type, name) {
752 if (this[type].has(name)) {
753 const timer = this[type].get(name);
754
755 if (typeof timer === 'object' && typeof timer.clear === 'function') {
756 timer.clear();
757 }
758
759 this[type].delete(name);
760 }
761 }
762
763 createWorker(filename, options) {
764 return new Worker(filename, options);

Callers 2

stopMethod · 0.95
handleJobCompletionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected