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.
Parameters
Section titled “Parameters”transforms
Section titled “transforms”Readonly<Record<string, TransformAst>>
Record mapping source keys to their transforms
Returns
Section titled “Returns”TransformAst for the mapSources meta-transform
Example
Section titled “Example”new Planner() .in(sources({ config: loadFile('config.json'), users: loadFile('users.csv'), })) .mapIn(mapSources({ config: parseJson(), users: parseCsv({ header: true }), })) // ...