@equinor/videx-wellog
Version:
Visualisation components for wellbore log data
25 lines (24 loc) • 862 B
TypeScript
export type DebounceFunction = (func: Function, ...args: any) => void;
/**
* Rounding function that rounds of to specified decimal
*/
export declare function round(v: number, decimals: number): number;
/**
* Format a numeric value as a string, rounded to the specified
* number of decimals.
*/
export declare function numberFormatter(v: number, decimals?: number): string;
/**
* Simple and quick hashing function for strings
*/
export declare function hashString(str: string): number;
/**
* Creates a debounce function that can be used to easily
* throttle function calls
*/
export declare function debouncer(debounceInterval?: number): DebounceFunction;
/**
* Calculate font color based on background color
* Dark background will give white text color and vice versa
*/
export declare function getContrastYIQ(rgbString: string): "white" | "black";