type LowercasedKeys> = { [P in keyof T & string as Lowercase

]: T[P]; }; type UppercasedKeys> = { [P in keyof T & string as Uppercase

]: T[P]; }; /** * Removes (shakes out) undefined entries from an * object. Optional second argument shakes out values * by custom evaluation. */ export declare const shake: (obj: T, filter?: (value: any) => boolean) => Omit; /** * Map over all the keys of an object to return * a new object */ export declare const mapKeys: (obj: Record, mapFunc: (key: TKey, value: TValue) => TNewKey) => Record; /** * Map over all the keys to create a new object */ export declare const mapValues: (obj: Record, mapFunc: (value: TValue, key: TKey) => TNewValue) => Record; /** * Map over all the keys to create a new object */ export declare const mapEntries: (obj: Record, toEntry: (key: TKey, value: TValue) => [TNewKey, TNewValue]) => Record; /** * Returns an object with { [keys]: value } * inverted as { [value]: key } */ export declare const invert: (obj: Record) => Record; /** * Convert all keys in an object to lower case */ export declare const lowerize: >(obj: T) => LowercasedKeys; /** * Convert all keys in an object to upper case */ export declare const upperize: >(obj: T) => UppercasedKeys; /** * Creates a shallow copy of the given obejct/value. * @param {*} obj value to clone * @returns {*} shallow clone of the given value */ export declare const clone: (obj: T) => T; /** * Convert an object to a list, mapping each entry * into a list item */ export declare const listify: (obj: Record, toItem: (key: TKey, value: TValue) => KResult) => KResult[]; /** * Pick a list of properties from an object * into a new object */ export declare const pick: (obj: T, keys: TKeys[]) => Pick; /** * Omit a list of properties from an object * returning a new object with the properties * that remain */ export declare const omit: (obj: T, keys: TKeys[]) => Omit; /** * Dynamically get a nested value from an array or * object with a string. * * @example get(person, 'friends[0].name') */ export declare const get: (value: any, path: string, defaultValue?: TDefault) => TDefault; /** * Opposite of get, dynamically set a nested value into * an object using a key path. Does not modify the given * initial object. * * @example * set({}, 'name', 'ra') // => { name: 'ra' } * set({}, 'cards[0].value', 2) // => { cards: [{ value: 2 }] } */ export declare const set: (initial: T, path: string, value: K) => T; /** * Merges two objects together recursivly into a new * object applying values from right to left. * Recursion only applies to child object properties. */ export declare const assign: >(initial: X, override: X) => X; /** * Get a string list of all key names that exist in * an object (deep). * * @example * keys({ name: 'ra' }) // ['name'] * keys({ name: 'ra', children: [{ name: 'hathor' }] }) // ['name', 'children.0.name'] */ export declare const keys: (value: TValue) => string[]; /** * Flattens a deep object to a single demension, converting * the keys to dot notation. * * @example * crush({ name: 'ra', children: [{ name: 'hathor' }] }) * // { name: 'ra', 'children.0.name': 'hathor' } */ export declare const crush: (value: TValue) => object; /** * The opposite of crush, given an object that was * crushed into key paths and values will return * the original object reconstructed. * * @example * construct({ name: 'ra', 'children.0.name': 'hathor' }) * // { name: 'ra', children: [{ name: 'hathor' }] } */ export declare const construct: (obj: TObject) => object; export {};