UNPKG

@kwiz/common

Version:

KWIZ common utilities and helpers for M365 platform

23 lines (22 loc) 981 B
export declare const ImageFileTypes: string[]; export declare const DocumentFileTypes: string[]; export declare const VideoFileTypes: string[]; export declare const OfficeFileTypes: string[]; /** @deprecated use validateFilenameExplicit */ export declare function validateFilename(fileNameWithExtension: string): { hasIllegalCharacter: boolean; hasIllegalName: boolean; valid: boolean; }; /** @deprecated use validateFoldernameExplicit */ export declare function validateFoldername(folderName: string): { hasIllegalCharacter: boolean; hasIllegalName: boolean; valid: boolean; }; export declare function validateAndSetFilename(fileNameWithExtension: string): string; export declare function getFileExtension(fileName: string, options?: { /** send to to return "" when fileName does not have an extension, otherwise it returns the fileName */ emptyIfMissing?: boolean; }): string; export declare function formatFileSize(sizeInBytes: number): string;