/**
 * @since Last modified: 2023-12-04 17:14:56
 * @function preventDefault
 * @description Compatibility writing of stop default events.
 * @param  {*} event - Mouse event or touch event.
 * @param  {boolean} [enhance=false] - Whether to stop the incident bubbling and transfer.
 * @returns null
 * @see {@link https://codepen.io/axui/pen/zYeMmgb|demo @ codepen}
 * @example
 * ax.preventDefault(event);
 * <!--return null-->
 */
'use strict';
const preventDefault = (event, enhance = false) => {
    event.cancelable ? event.preventDefault() : null;
    enhance ? event.stopPropagation() : null;
};
export default preventDefault;
