This commit is contained in:
dahyeon committed 2026-05-03 00:21:15 -07:00
1 parent 5286e4d1ed
commit 62368c720e
12 files changed
+477 -59

No files matched your search

@@ -26,6 +26,8 @@ const POSITION_ALIASES: Record<string, Position> = {
// SUP
sup: 'SUP',
supp: 'SUP',
spt: 'SUP',
sp: 'SUP',
support: 'SUP',
서폿: 'SUP',
서포터: 'SUP',
@@ -71,7 +73,7 @@ export function parsePositionList(input: string): ParsedPositions {
const seen = new Set<Position>();
for (const token of tokens) {
const key = token.toLowerCase().replace(/\s+/g, '');
const key = normalizePositionAlias(token);
const mapped = POSITION_ALIASES[key];
if (!mapped) {
throw new PositionParseError('unknown', token);
@@ -85,3 +87,11 @@ export function parsePositionList(input: string): ParsedPositions {
return { positions };
}
export function isPositionAlias(input: string): boolean {
return Boolean(POSITION_ALIASES[normalizePositionAlias(input)]);
}
function normalizePositionAlias(input: string): string {
return input.toLowerCase().replace(/\s+/g, '');
}