@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 14 lines 572 Bytes
Raw
1 /**
2 * Coerce a distilled Location `TagMap` (`{ [key]: string | undefined }`) into a
3 * plain `Record<string, string>`, dropping any undefined values. Amazon
4 * Location returns tags directly on every `Describe*` response, so this is the
5 * single normalization used to feed `diffTags`/`hasAlchemyTags`.
6 */
7 export const toTagRecord = (
8 tags: { [key: string]: string | undefined } | undefined,
9 ): Record<string, string> =>
10 Object.fromEntries(
11 Object.entries(tags ?? {}).filter(
12 (entry): entry is [string, string] => typeof entry[1] === "string",
13 ),
14 );