(value: PayloadRecord)
| 41 | }; |
| 42 | |
| 43 | const copyStringRecord = (value: PayloadRecord): PayloadRecord | null => { |
| 44 | const keys = Reflect.ownKeys(value).filter((key) => key !== '__proto__'); |
| 45 | if (keys.some((key) => typeof key !== 'string')) { |
| 46 | return null; |
| 47 | } |
| 48 | return Object.fromEntries((keys as string[]).map((key) => [key, value[key]])); |
| 49 | }; |
| 50 | |
| 51 | const isFilledString = (value: unknown): value is string => |
| 52 | typeof value === 'string' && value.length >= 1; |
no outgoing calls
no test coverage detected