( metadata: Record<string, string>, )
| 125 | }; |
| 126 | |
| 127 | const filterReservedMetadata = ( |
| 128 | metadata: Record<string, string>, |
| 129 | ): Record<string, string> => { |
| 130 | return Object.entries(metadata).reduce<Record<string, string>>( |
| 131 | (acc, [key, value]) => { |
| 132 | if ( |
| 133 | !isReservedMetaKey(key) && |
| 134 | hasValidMetaPrefix(key) && |
| 135 | hasValidMetaName(key) |
| 136 | ) { |
| 137 | acc[key] = value; |
| 138 | } |
| 139 | return acc; |
| 140 | }, |
| 141 | {}, |
| 142 | ); |
| 143 | }; |
| 144 | |
| 145 | const App = () => { |
| 146 | const [resources, setResources] = useState<Resource[]>([]); |
no test coverage detected