@ismail424/svelte-formly
Version:
<p align="center"> <img width="100%" height="300" src="./logo.png" alt="Svelte Formly" /> </p>
23 lines (22 loc) • 643 B
TypeScript
/**
* Convert byts to diffirents sizes types.
* @param {number} bytes
*/
export declare function bytesToSize(bytes: any): string;
/**
* Get extension file.
* @param {file} file.
*/
export declare function getFileExtension(file: File): string;
/**
* Validate by types.
* @param {file} file .file object.
* @param {array} allowedFileTypes list allowed types file.
*/
export declare function extensions(file: File, allowedFileTypes: string[]): boolean;
/**
* Validate by size.
* @param {file} file .file object.
* @param {number} maxFileSize max size file.
*/
export declare function maxSize(file: File, maxFileSize: any): boolean;