UNPKG

@ryusei/code

Version:

<div align="center"> <a href="https://code.ryuseijs.com"> <img alt="RyuseiCode" src="https://code.ryuseijs.com/images/svg/logo.svg" width="70"> </a>

11 lines (10 loc) 274 B
/** * Checks if the default action of the event is prevented or not. * * @param e - An Event object. * * @return `true` if the default action is prevented, or otherwise `false`. */ export function isPrevented( e: Event ): boolean { return e && e.defaultPrevented; }