source: trip-planner-front/node_modules/colord/helpers.d.ts@ e29cc2e

Last change on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 888 bytes
Line 
1export declare const isPresent: (value: unknown) => boolean;
2export declare const round: (number: number, digits?: number, base?: number) => number;
3export declare const floor: (number: number, digits?: number, base?: number) => number;
4/**
5 * Clamps a value between an upper and lower bound.
6 * We use ternary operators because it makes the minified code
7 * is 2 times shorter then `Math.min(Math.max(a,b),c)`
8 * NaN is clamped to the lower bound
9 */
10export declare const clamp: (number: number, min?: number, max?: number) => number;
11/**
12 * Processes and clamps a degree (angle) value properly.
13 * Any `NaN` or `Infinity` will be converted to `0`.
14 * Examples: -1 => 359, 361 => 1
15 */
16export declare const clampHue: (degrees: number) => number;
17/**
18 * Converts a hue value to degrees from 0 to 360 inclusive.
19 */
20export declare const parseHue: (value: string, unit?: string) => number;
Note: See TracBrowser for help on using the repository browser.