Files
wanderer/assets/js/hooks/Mapper/helpers/getSystemById.ts
Dmitry Popov 4136aaad76 Initial commit
2024-09-18 01:55:30 +04:00

7 lines
365 B
TypeScript

import { SolarSystemRawType, SolarSystemStaticInfoRaw } from '@/hooks/Mapper/types';
export const getSystemById = (systems: SolarSystemRawType[], systemId: string) => systems.find(x => x.id === systemId);
export const getSystemStaticById = (systems: SolarSystemStaticInfoRaw[], systemId: string) =>
systems.find(x => x.solar_system_id.toString() === systemId);