MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / isEntity

Method isEntity

packages/core/src/entity/EntityHelper.ts:37–39  ·  view source on GitHub ↗
(data: any)

Source from the content-addressed store, hash-verified

35 */
36export class EntityHelper {
37 static isEntity(data: any): boolean {
38 return data != null && typeof data === 'object' && !!(data as any)[entitySymbol];
39 }
40
41 static decorate<T extends object>(meta: EntityMetadata<T>, em: EntityManager): void {
42 const fork = em.fork(); // use fork so we can access `EntityFactory`

Callers 15

createMethod · 0.45
checkMethod · 0.45
cbMethod · 0.45
assignPropertyMethod · 0.45
autoWireOneToOneMethod · 0.45
assignReferenceMethod · 0.45
createCollectionItemMethod · 0.45
refFunction · 0.45
relFunction · 0.45
validateParamsFunction · 0.45
populateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected