UNPKG

burdy

Version:

Open Source Headless Platform

23 lines (22 loc) 991 B
/** * Format bytes as human-readable text. * * @param bytes Number of bytes. * @param si True to use metric (SI) units, aka powers of 1000. False to use * binary (IEC), aka powers of 1024. * @param dp Number of decimal places to display. * * @return Formatted string. */ import { ISiteSettings } from '@shared/interfaces/model'; export declare const humanFileSize: (bytes: number, dp?: number) => string; export declare const copyToClipboard: (str: any) => void; export declare const getMeta: (obj: any, key: string) => any; export declare const getMetaValue: (obj: any, key: string) => any; /** * The function returns true if the string passed to it has no content. */ export declare const isEmptyString: (str: any) => boolean; export declare const isTrue: (str: string | boolean | number) => boolean; export declare const findSettingsValue: (settings: ISiteSettings[], key: string) => string; export declare const testPaths: (paths: string[], path: string) => string;