UNPKG

@stihl-design-system/components

Version:

Welcome to the STIHL Design System react component library.

13 lines (12 loc) 484 B
/** * Formats a file size in bytes into a human-readable string using appropriate units (bytes, kb, mb). * * @param {number} fileSizeInBytes - The size of the file in bytes. * @returns {string} The formatted file size as a string with the appropriate unit (bytes, kb, mb). * * @example * formatFileSize(500); // "500 bytes" * formatFileSize(2048); // "2 kb" * formatFileSize(10485760); // "10 mb" */ export declare const formatFileSize: (fileSizeInBytes: number) => string;