@color-delta-e/utils
Version:
Utils package for color-delta-e
18 lines (13 loc) • 648 B
TypeScript
import { ColorTuple, deltaValueType } from 'color-delta-e';
interface FilterOptions {
threshold?: number;
type?: deltaValueType;
}
declare function filter<T extends any[]>(comparitor: string | ColorTuple, filterList: T, options?: FilterOptions): any[];
declare function pipe(...funcs: Array<(...args: any[]) => any>): (base: string, startingList: any[], options?: Record<string, any>) => any[];
interface SortOptions {
direction?: 'asc' | 'dec';
type?: Exclude<deltaValueType, 'hex'>;
}
declare function sort<T extends any[]>(comparitor: string | ColorTuple, toSort: T, options?: SortOptions): T;
export { filter, pipe, sort };