UNPKG

@mindfiredigital/pivothead

Version:

PivotHead is a powerful and flexible library for creating interactive pivot tables in JavaScript applications. It provides a core engine for data manipulation and, in the future, will be compatible with wrappers for React, Vue, Svelte, and Angular, making

33 lines 1.27 kB
import type { FileConnectionResult, ConnectionOptions, DataRecord } from '../../types/interfaces'; declare const SUPPORTED_CSV_EXTENSIONS: string[]; declare const SUPPORTED_JSON_EXTENSIONS: string[]; export { SUPPORTED_CSV_EXTENSIONS, SUPPORTED_JSON_EXTENSIONS }; /** * Opens a file picker dialog */ export declare function openFilePicker(extensions: string[]): Promise<File | null>; /** * Validates file before processing */ export declare function validateFile(file: File, options: ConnectionOptions): FileConnectionResult; /** * Reads file as text with optional progress callback */ export declare function readFileAsText(file: File, onProgress?: (progress: number) => void): Promise<string>; /** * Gets file extension from filename */ export declare function getFileExtension(filename: string): string; /** * Formats file size for human reading */ export declare function formatFileSize(bytes: number): string; /** * Validates data structure and returns warnings */ export declare function validateDataStructure(data: DataRecord[], columns: string[]): string[]; /** * Extracts array from nested JSON using dot notation path */ export declare function extractArrayFromPath(obj: unknown, path: string): DataRecord[]; //# sourceMappingURL=fileUtils.d.ts.map