(key: string)
| 136 | }; |
| 137 | |
| 138 | const extractMetaName = (key: string): string => { |
| 139 | const trimmedKey = key.trim(); |
| 140 | if (!trimmedKey) return ""; |
| 141 | |
| 142 | const slashIndex = trimmedKey.lastIndexOf("/"); |
| 143 | if (slashIndex === -1) { |
| 144 | return trimmedKey; |
| 145 | } |
| 146 | |
| 147 | return trimmedKey.slice(slashIndex + 1); |
| 148 | }; |
| 149 | |
| 150 | /** |
| 151 | * Validates the "name" portion of a metadata key, regardless of whether a prefix exists. |