events: simplify removeAllListeners logic
Unnecessary checks were being performed on if the event existed before being removed. _events starts out as null, so reset to null when emptied. Checking typeof is a lot cheaper than isArray().
parent
dd171d24
Please register or sign in to comment