MCPcopy
hub / github.com/flightcontrolhq/superjson / isInstanceOfRegisteredClass

Function isInstanceOfRegisteredClass

src/transformer.ts:239–250  ·  view source on GitHub ↗
(
  potentialClass: any,
  superJson: SuperJSON
)

Source from the content-addressed store, hash-verified

237);
238
239export function isInstanceOfRegisteredClass(
240 potentialClass: any,
241 superJson: SuperJSON
242): potentialClass is any {
243 if (potentialClass?.constructor) {
244 const isRegistered = !!superJson.classRegistry.getIdentifier(
245 potentialClass.constructor
246 );
247 return isRegistered;
248 }
249 return false;
250}
251
252const classRule = compositeTransformation(
253 isInstanceOfRegisteredClass,

Callers 1

isDeepFunction · 0.85

Calls 1

getIdentifierMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…