MCPcopy Create free account
hub / github.com/chhoumann/quickadd / getUserScriptPreloadKey

Function getUserScriptPreloadKey

src/utils/userScript.ts:32–41  ·  view source on GitHub ↗
(
	command: IUserScript,
)

Source from the content-addressed store, hash-verified

30 * never consume each other's preloaded entry.
31 */
32export function getUserScriptPreloadKey(
33 command: IUserScript,
34): string | undefined {
35 const base = command.path ?? command.id;
36 if (base === undefined) return undefined;
37 const { memberAccess } = getUserScriptMemberAccess(command.name ?? "");
38 return memberAccess && memberAccess.length > 0
39 ? `${base}::${memberAccess.join("::")}`
40 : base;
41}
42
43// Slightly modified version of Templater's user script import implementation
44// Source: https://github.com/SilentVoid13/Templater

Callers 2

executeUserScriptMethod · 0.90

Calls 1

Tested by

no test coverage detected