(
attribute: T,
changedAttributes?: T[]
)
| 104 | // - empty array: never add |
| 105 | // - array with values: only add if attribute is in the array |
| 106 | const shouldAddToChangedMap = <T>( |
| 107 | attribute: T, |
| 108 | changedAttributes?: T[] |
| 109 | ): boolean => { |
| 110 | if (changedAttributes === undefined) { |
| 111 | return true; |
| 112 | } |
| 113 | if (changedAttributes.length === 0) { |
| 114 | return false; |
| 115 | } |
| 116 | return changedAttributes.includes(attribute); |
| 117 | }; |
| 118 | |
| 119 | export interface GenerateDiffOptions { |
| 120 | includeTables?: boolean; |
no outgoing calls
no test coverage detected