UNPKG

swallowify

Version:

Stop propagation of the current event

12 lines (11 loc) 224 B
'use strict'; module.exports = function(fn) { return typeof fn === 'function' ? function(event) { event.stopPropagation(); return fn(event); } : function() { return false; }; };