Skip to content

mapSpec

mapSpec<T>(source, fn, description?): MapSpec<T>

Defined in: extract/spec.ts:477

Apply a transform function to a successful extraction result. If the source spec fails, the failure propagates unchanged. If the transform function throws, fails with ‘format’ kind.

T extends Spec

T

(value) => unknown

string

MapSpec<T>

mapSpec(
row.colWhere(header, cell.equals('Amount')).string(),
v => parseFloat(v as string),
'parseFloat'
)