mirror of
https://github.com/mosh-hamedani/helpdesk.git
synced 2026-05-21 11:58:19 +02:00
5 lines
136 B
TypeScript
5 lines
136 B
TypeScript
export function parseId(raw: unknown): number | null {
|
|
const id = Number(raw);
|
|
return Number.isInteger(id) && id > 0 ? id : null;
|
|
}
|