import { AnyObject, Maybe } from 'yummies/types'; type DeepArray = TValue | Array>; /** * Recursively flattens a nested array and maps the collected values. * * @example * ```ts * flatMapDeep([1, [2, [3]]], (value) => value * 2); // [2, 4, 6] * ``` */ declare const flatMapDeep: (arr: DeepArray, fn: (value: TSource, i: number, arr: TSource[]) => TNewValue) => TNewValue[]; /** * Checks whether an object has at least one enumerable key. * * @example * ```ts * hasEnumerableKeys({ id: 1 }); // true * hasEnumerableKeys({}); // false * ``` */ declare const hasEnumerableKeys: (input: AnyObject) => boolean; /** * Performs a shallow comparison for arrays, plain objects, dates and regular expressions. * * @example * ```ts * isShallowEqual({ id: 1 }, { id: 1 }); // true * ``` */ declare const isShallowEqual: (a: unknown, b: unknown) => boolean; /** * Checks whether a property key is unsafe and can lead to prototype pollution. * * @example * isUnsafeProperty('__proto__'); // true * isUnsafeProperty('name'); // false */ declare const isUnsafeProperty: (key: any) => boolean; /** * Parses JSON safely and returns a fallback value when parsing fails. * * @example * ```ts * safeJsonParse('{"enabled":true}', {}); // { enabled: true } * ``` */ declare const safeJsonParse: (json: Maybe, fallback?: TFallback) => TValue | TFallback; /** * Wraps a value in an array when it is not already an array. * * @example * ```ts * toArray('item'); // ['item'] * ``` */ declare const toArray: (value: TValue | TValue[]) => TValue[]; export { flatMapDeep, hasEnumerableKeys, isShallowEqual, isUnsafeProperty, safeJsonParse, toArray };