MCPcopy Create free account
hub / github.com/R-js/libRmath.js / sendObject

Method sendObject

src/packages/common/DefaultObjectLogger.ts:24–31  ·  view source on GitHub ↗
(namespace: string, constructor: T, ...args: ConstructorParameters<T>)

Source from the content-addressed store, hash-verified

22 return (namespace in this.namespaces);
23 }
24 sendObject<T extends abstract new (...args: any) => Error>(namespace: string, constructor: T, ...args: ConstructorParameters<T>): void {
25 if (!this.isEnabled(namespace)) {
26 return;
27 }
28 const obj = new (constructor as any)(...args);
29 const finalNamespace = this.prefix ? `${this.prefix}/${namespace}` : namespace;
30 this.logs.push({ ns: finalNamespace, obj });
31 }
32}

Callers 1

errorObjectFunction · 0.80

Calls 1

isEnabledMethod · 0.95

Tested by

no test coverage detected