MCPcopy Index your code
hub / github.com/loopbackio/loopback-next / isClass

Function isClass

packages/boot/src/booters/booter-utils.ts:34–38  ·  view source on GitHub ↗
(target: any)

Source from the content-addressed store, hash-verified

32 */
33// eslint-disable-next-line @typescript-eslint/no-explicit-any
34export function isClass(target: any): target is Constructor<any> {
35 return (
36 typeof target === 'function' && target.toString().indexOf('class') === 0
37 );
38}
39
40/**
41 * Returns an Array of Classes from given files. Works by requiring the file,

Callers 2

loadClassesFromFilesFunction · 0.85

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected