diff --git a/index.js b/index.js index 79dd8841..268b06ce 100644 --- a/index.js +++ b/index.js @@ -112,6 +112,12 @@ const Twilio = { } _eventHandlers[type].get(handler).remove() _eventHandlers[type].delete(handler) + }, + removeAllListeners(type) { + _eventHandlers[type].forEach(value => { + value.remove() + }) + _eventHandlers[type].clear() } }