@volverjs/ui-vue
Version:
@volverjs/ui-vue is a lightweight Vue 3 component library to accompany @volverjs/style.
15 lines (14 loc) • 831 B
TypeScript
/**
* Validates if all files in a FileList meet the restrictions of the accept attribute
* @param {FileList} fileList - The FileList object to validate
* @param {string} [acceptValue] - The value of the accept attribute (e.g. ".jpg,.png,image/*")
* @returns {boolean} - true if all files are valid, false otherwise
*/
export declare function validateFileList(fileList: FileList, acceptValue?: string): boolean;
/**
* Filters a FileList and returns only the files that match the accept attribute criteria
* @param {FileList} fileList - The FileList object to filter
* @param {string} [acceptValue] - The value of the accept attribute (e.g. ".jpg,.png,image/*")
* @returns {File[]} - Array of files that match the accept criteria
*/
export declare function filterFileList(fileList: FileList, acceptValue?: string): File[];