Skip to content

mapSources

mapSources(transforms): TransformAst

Defined in: sources.ts:35

Create a TransformAst that applies per-key transforms to a sources record.

Keys in the input record that don’t have a matching transform entry pass through unchanged.

Readonly<Record<string, TransformAst>>

Record mapping source keys to their transforms

TransformAst

TransformAst for the mapSources meta-transform

new Planner()
.in(sources({
config: loadFile('config.json'),
users: loadFile('users.csv'),
}))
.mapIn(mapSources({
config: parseJson(),
users: parseCsv({ header: true }),
}))
// ...