(input: unknown)
| 171 | } |
| 172 | |
| 173 | export function stringifyInput(input: unknown): string { |
| 174 | if (_.isPlainObject(input)) { |
| 175 | return JSON.stringify(input).replace(/"/g, '\\"') |
| 176 | } |
| 177 | if (_.isDate(input)) { |
| 178 | return input.toISOString() |
| 179 | } |
| 180 | if (Array.isArray(input)) { |
| 181 | return `[${input.map((x) => stringifyInput(x)).join(',')}]` |
| 182 | } |
| 183 | return (input as string) ?? '' |
| 184 | } |
| 185 | |
| 186 | export function findOutputKeys(input: Record<string, any>, key: string): string[] { |
| 187 | const regex = new RegExp(`{{\\s*${key}\\.(\\w+)\\s*}}`, 'g') |
no outgoing calls
no test coverage detected