packages/search/lib/commands/CONFIG_GET.ts
raw| 1 | export function transformArguments(option: string) { |
| 2 | return ['FT.CONFIG', 'GET', option]; |
| 3 | } |
| 4 | |
| 5 | interface ConfigGetReply { |
| 6 | [option: string]: string | null; |
| 7 | } |
| 8 | |
| 9 | export function transformReply(rawReply: Array<[string, string | null]>): ConfigGetReply { |
| 10 | const transformedReply: ConfigGetReply = Object.create(null); |
| 11 | for (const [key, value] of rawReply) { |
| 12 | transformedReply[key] = value; |
| 13 | } |
| 14 | |
| 15 | return transformedReply; |
| 16 | } |