mirror of
https://github.com/immich-app/immich.git
synced 2025-03-28 02:39:37 +01:00
14 lines
306 B
TypeScript
14 lines
306 B
TypeScript
import { isNumberInRange } from '../numbers';
|
|
|
|
export function parseISO(input: string): number | null {
|
|
const values = input.split(',');
|
|
|
|
for (const value of values) {
|
|
const iso = Number.parseInt(value, 10);
|
|
if (isNumberInRange(iso, 0, 2 ** 32)) {
|
|
return iso;
|
|
}
|
|
}
|
|
|
|
return null;
|
|
}
|