(fieldId: string, value)
| 50 | ): boolean => /\[.*\]/.test(fieldId) && !isFieldIdInSchema(fieldId, schema); |
| 51 | |
| 52 | export const formatFieldForArrayField = (fieldId: string, value) => { |
| 53 | const formattedValue = set({}, fieldId, value); |
| 54 | const keys = Boolean(fieldId) ? Object.keys(formattedValue) : ['']; |
| 55 | const id = Array.isArray(keys) && keys.length > 0 ? keys[0] : ''; |
| 56 | return { |
| 57 | id, |
| 58 | value: Array.isArray(formattedValue[id]) |
| 59 | ? [...formattedValue[id]] |
| 60 | : formattedValue[id], |
| 61 | }; |
| 62 | }; |
no test coverage detected
searching dependent graphs…