(data: Record<string, unknown>, key: string)
| 181 | } |
| 182 | |
| 183 | function string(data: Record<string, unknown>, key: string) { |
| 184 | const value = data[key] |
| 185 | if (typeof value === "string") return value |
| 186 | if (typeof value === "number" || typeof value === "boolean") return String(value) |
| 187 | return undefined |
| 188 | } |
| 189 | |
| 190 | function boolean(data: Record<string, unknown>, key: string) { |
| 191 | const value = data[key] |