MCPcopy Index your code
hub / github.com/melonjs/melonJS / get

Function get

packages/melonjs/src/plugin/plugin.ts:130–142  ·  view source on GitHub ↗
(
	classType: string | (new (...args: any[]) => BasePlugin),
)

Source from the content-addressed store, hash-verified

128 * @returns a plugin instance or undefined
129 */
130export function get(
131 classType: string | (new (...args: any[]) => BasePlugin),
132): BasePlugin | undefined {
133 for (const name in cache) {
134 if (typeof classType === "string") {
135 if (classType === name) {
136 return cache[name];
137 }
138 } else if (cache[name] instanceof classType) {
139 return cache[name];
140 }
141 }
142}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected