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

Method extractChildElements

packages/core/src/utils/Utils.ts:727–731  ·  view source on GitHub ↗
(items: readonly string[], prefix: string, allSymbol?: string)

Source from the content-addressed store, hash-verified

725 }
726
727 static extractChildElements(items: readonly string[], prefix: string, allSymbol?: string): string[] {
728 return items
729 .filter(field => field === allSymbol || field.startsWith(`${prefix}.`))
730 .map(field => (field === allSymbol ? allSymbol : field.substring(prefix.length + 1)));
731 }
732
733 /**
734 * Tries to detect TypeScript support.

Callers 6

getFieldsForJoinedLoadFunction · 0.80
mapPropToFieldNamesFunction · 0.80
extractChildOptionsMethod · 0.80
findChildrenMethod · 0.80
populateFieldMethod · 0.80

Calls 2

filterMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected