MCPcopy Create free account
hub / github.com/FlashpointProject/launcher / getExtensionID

Function getExtensionID

src/back/extensions/ExtensionsScanner.ts:122–128  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

120 * @param name Name of the extension
121 */
122function 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

Callers 1

parseExtensionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected