{"version":3,"file":"eventToType.cjs","names":[],"sources":["../../../src/events/functions/eventToType.ts"],"sourcesContent":["import type { EventObject } from '../types';\n\nexport type EventToType_F = (event: EventObject | string) => string;\n\n/**\n * Converts an event to its type.\n * If the event is a string, it returns the string.\n * If the event is an object, it returns the type property of the object.\n * @param event of type {@linkcode EventObject} or string\n * @returns string representing the type of the event\n */\nexport const eventToType: EventToType_F = event => {\n  const check = typeof event === 'string';\n  if (check) return event;\n  return event.type;\n};\n"],"mappings":";;;;;;;;;AAWA,MAAa,eAA6B,UAAS;AAEjD,KADc,OAAO,UAAU,SACpB,QAAO;AAClB,QAAO,MAAM"}