UNPKG

@aappddeevv/dynamics-client-ui

Version:

## What is it? A library to help you create great dynamics applications.

16 lines (15 loc) 687 B
/** Misc data management utilities. */ /** Decent string hash. */ export declare function hash(str: string): number; /** Clean the id of brackets and lowercase everything. */ export declare function cleanId(id: string): string; /** Wrap an id with {} and cap it, if needed. */ export declare function wrapId(id: string): string; /** Simple normalization of data using a function to obtain the key. */ export declare function normalize<T, U>(id: (t: T) => string, data: Array<T>, tx: (t: T) => U): { [id: string]: U; }; /** Normalize with a key that accessed via a simple key lookup. */ export declare function normalizeWith<T>(key: string, data: Array<T>): { [id: string]: T; };