(model: ModelMetadata)
| 165 | } |
| 166 | |
| 167 | function inheritableModelMetadata(model: ModelMetadata) { |
| 168 | const { |
| 169 | id: _id, |
| 170 | benchmarks: _benchmarks, |
| 171 | license: _license, |
| 172 | links: _links, |
| 173 | weights: _weights, |
| 174 | ...metadata |
| 175 | } = model; |
| 176 | |
| 177 | return Object.fromEntries( |
| 178 | Object.entries(metadata).filter(([, value]) => value !== undefined), |
| 179 | ); |
| 180 | } |
| 181 | |
| 182 | function applyOmit(target: Record<string, unknown>, paths: string[]) { |
| 183 | omitLoop: for (const omit of paths) { |