Skip to content

Commit

Permalink
refactor: alias isEventHandler to isEvent (resolves #452)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jul 31, 2023
1 parent 0181d33 commit 21d0ce7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/event/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,6 @@ export class H3Event<
}
}

export function isEvent(input: any): input is H3Event {
return "__is_event__" in input;
}

export function createEvent(
req: NodeIncomingMessage,
res: NodeServerResponse
Expand Down
2 changes: 2 additions & 0 deletions src/event/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export function isEventHandler(input: any): input is EventHandler {
return "__is_handler__" in input;
}

export const isEvent = isEventHandler;

export function toEventHandler(
input: any,
_?: any,
Expand Down

0 comments on commit 21d0ce7

Please sign in to comment.