MCPcopy
hub / github.com/smapiot/piral / getLoadedVersions

Function getLoadedVersions

src/framework/piral-base/src/utils/system.ts:7–11  ·  view source on GitHub ↗
(prefix: string)

Source from the content-addressed store, hash-verified

5const systemRegister = System.constructor.prototype.register;
6
7function getLoadedVersions(prefix: string) {
8 return [...System.entries()]
9 .filter(([name]) => name.startsWith(prefix))
10 .map(([name]) => name.substring(prefix.length));
11}
12
13function findMatchingPackage(id: string) {
14 const sep = id.indexOf('@', 1);

Callers 1

findMatchingPackageFunction · 0.85

Calls 2

mapMethod · 0.80
filterMethod · 0.65

Tested by

no test coverage detected