UNPKG

svelte-common

Version:

common components and utils used in svelte apps

17 lines (16 loc) 668 B
export function formatBytes(bytes: any, decimals?: number): string; export function formatDurationISO(seconds: any): string; export function formatDuration(seconds: any): string; export function formatSecondsSinceEpoch(sse: any): string; /** * Create a derived store where all the object keys are prefixed. * ``` * { a: 1, b: 2 } -> { foo_a: 1 foo_b: 2 } // prefix: foo_ * ``` * @param {writable} store we derive from * @param {string} prefix for each key * @returns {writable} */ export function keyPrefixStore(store: typeof writable, prefix: string): typeof writable; export const dateFormatter: Intl.DateTimeFormat; import { writable } from "svelte/store";