UNPKG

@flatfile/plugin-autocast

Version:

A plugin for automatically casting values in Flatfile.

17 lines (14 loc) 748 B
import { TRecordValue } from '@flatfile/hooks'; import { FlatfileListener } from '@flatfile/listener'; declare function autocast(sheetSlug: string, fieldFilters?: string[], options?: { chunkSize?: number; parallel?: number; debug?: boolean; }): (listener: FlatfileListener) => void; declare function castString(value: TRecordValue): TRecordValue; declare function castNumber(value: TRecordValue): TRecordValue; declare const TRUTHY_VALUES: (string | number)[]; declare const FALSY_VALUES: (string | number)[]; declare function castBoolean(value: TRecordValue): TRecordValue; declare function castDate(value: TRecordValue): TRecordValue; export { FALSY_VALUES, TRUTHY_VALUES, autocast, castBoolean, castDate, castNumber, castString };