UNPKG

1.55 kBTypeScriptView Raw
1/**
2 * Check if a value is `null` or `undefined`
3 *
4 * @since 0.1.0
5 *
6 * @param {any|null|undefined} [item]
7 * @returns {item is null | undefined}
8 */
9export function isNil(item?: any | null | undefined): item is null | undefined;
10/**
11 * Check if a value is a plain JavaScript object.
12 *
13 * @since 0.1.0
14 *
15 * @param {*} [item]
16 * @returns {boolean}
17 */
18export function isPlainObject(item?: any): boolean;
19/**
20 * Flatten nested objects in to a new object where the keys represent the original access
21 * path. Only goes through plain JavaScript objects and ignores arrays.
22 *
23 * @since 0.1.0
24 *
25 * @param {object} data The object to serialize
26 * @param {*} [result]
27 * @param {string} [path]
28 * @returns {Record<string, any>}
29 */
30export function flatten(data: object, result?: any, path?: string | undefined): Record<string, any>;
31/**
32 * The opposite of 'flatten'.
33 *
34 * @since 0.1.0
35 *
36 * @param {Record<string, any>} data
37 * @returns {object}
38 */
39export function unFlatten(data: Record<string, any>): object;
40/**
41 *
42 * @since 0.1.0
43 *
44 * @param {string} input
45 * @returns {string}
46 */
47export function camelToSnakeCase(input: string): string;
48/**
49 * Deep merge source objects on to 'target'. Mutates 'target' in place.
50 *
51 * @function
52 * @since 0.1.0
53 *
54 * @type {(target: any, ...sources: any[]) => object}
55 * @param {object} target The destination object.
56 * @param {...object} [sources] The source objects.
57 * @returns {object} Returns `object`.
58 */
59export const merge: (target: any, ...sources: any[]) => object;
60//# sourceMappingURL=lodash.d.ts.map
\No newline at end of file