(eventName)
| 134 | //bind the events |
| 135 | bindEvents = (instance, events) => { |
| 136 | let _loop = (eventName) => { |
| 137 | // ignore the event config which not satisfy |
| 138 | if (typeof eventName === 'string' && typeof events[eventName] === 'function') { |
| 139 | // binding event |
| 140 | instance.off(eventName) |
| 141 | instance.on(eventName, (param) => { |
| 142 | events[eventName](param, instance) |
| 143 | }) |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | for (let eventName in events) { |
| 148 | _loop(eventName) |
no outgoing calls
no test coverage detected