Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mfornos committed Oct 24, 2024
1 parent 8f8aa78 commit ec2bc00
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/server/src/common/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ export function asJSON(o: unknown) {
typeof v === 'bigint' ? v.toString() : v instanceof Binary ? v.asHex() : v,
)
}

export function asSerializable<T>(o: T) {
return typeof o === 'string' ? o : safeDestr<T>(asJSON(o))
}

export function getEventValue(module: string, name: string | string[], events: Event[]) {
return events.find((e) =>
e.module === module && Array.isArray(name) ? name.includes(e.name) : e.name === name,
Expand Down

0 comments on commit ec2bc00

Please sign in to comment.