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

Method defaultValue

packages/core/src/utils/Utils.ts:835–837  ·  view source on GitHub ↗
(prop: T, option: keyof T, defaultValue: any)

Source from the content-addressed store, hash-verified

833 }
834
835 static defaultValue<T extends Dictionary>(prop: T, option: keyof T, defaultValue: any): void {
836 prop[option] = option in prop ? prop[option] : defaultValue;
837 }
838
839 static findDuplicates<T>(items: T[]): T[] {
840 return items.reduce((acc, v, i, arr) => {

Callers 13

mapOptionsMethod · 0.80
initIndexesMethod · 0.80
initNullabilityMethod · 0.80
initManyToManyFieldsMethod · 0.80
initManyToOneFieldsMethod · 0.80
addEmbeddedMethod · 0.80
addManyToOneMethod · 0.80
addManyToManyMethod · 0.80
addOneToOneMethod · 0.80
EmbeddedFunction · 0.80
EmbeddedFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected