* A friendly helper to clear safe-timers timeout and interval * @param {string} type * @param {string} name
(type, name)
| 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); |
no outgoing calls
no test coverage detected