core/factories/field.factory.ts
core/factories/field.factory.ts is a file in GovLab Patterns. 6 lines of code and 1 definition.
import { FieldAnalyzer } from "#core/analyzers/field.analyzer";
export const buildAnalyzers = function buildAnalyzers(
mapping: ReadonlyMap<string, readonly string[]>,
): Map<string, FieldAnalyzer> {
return new Map([...mapping].map(([field, representations]) => [field, new FieldAnalyzer(field, representations)]));
};