* Returns the extensions ID given its author and name from its manifest * * @param author Author of the extension * @param name Name of the extension
(author: string, name: string)
| 120 | * @param name Name of the extension |
| 121 | */ |
| 122 | function getExtensionID(author: string, name: string) { |
| 123 | const fAuthor = author.toLowerCase().replace(' ', '-'); |
| 124 | if (name.includes(' ') || name.toLowerCase() !== name) { |
| 125 | throw new Error('Extension names may not include uppercase or space characters!'); |
| 126 | } |
| 127 | return `${fAuthor}.${name}`; |
| 128 | } |
| 129 | |
| 130 | /** |
| 131 | * Parses an extension |