MCPcopy Create free account
hub / github.com/commandoperator/cmdop-sdk / methodsOf

Function methodsOf

node/src/_parity.ts:29–42  ·  view source on GitHub ↗

Public, non-pagination instance methods of a resource class, snake_cased.

(cls: { prototype: object })

Source from the content-addressed store, hash-verified

27
28/** Public, non-pagination instance methods of a resource class, snake_cased. */
29function methodsOf(cls: { prototype: object }): string[] {
30 return Object.getOwnPropertyNames(cls.prototype)
31 .filter((n) => n !== "constructor")
32 .filter((n) => !n.startsWith("_") && !n.startsWith("#"))
33 .filter((n) => !PAGINATION_HELPERS.has(n))
34 // sub-resource accessors (`members`, `machines`) live on FleetsResource as
35 // getters, not methods — they are namespaces, surfaced separately below.
36 .filter((n) => {
37 const d = Object.getOwnPropertyDescriptor(cls.prototype, n);
38 return typeof d?.value === "function";
39 })
40 .map(toSnake)
41 .sort();
42}
43
44/** The actual Node SDK surface, keyed by namespace path. */
45export function actualSurface(): Record<string, string[]> {

Callers 1

actualSurfaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected