code: function cancelEvent(ev: ?SyntheticEvent<*>) {
    if (!ev) return;
    ev.preventDefault && ev.preventDefault();
    ev.stopPropagation && ev.stopPropagation();
  }
docs: /* --
  *cancelEvent()**
  
  Calls `preventDefault()` and `stopPropagation()` on the provided event.
  
  **ev** *?SyntheticEvent<*>*: event to be cancelled
  --