UNPKG

@utilify/core

Version:

Modern, strongly typed, and safe utility function library for JavaScript and TypeScript. Includes type checking, manipulation of arrays, objects, strings, dates, colors, numbers, regular expressions, and more. Compatible with Browser, Node.js, Deno, and B

9 lines 406 B
/** * Checks if an object has a value at a given path. * @template T * @param {T} obj - The object to check. * @param {string|string[]} path - The path to check (dot/bracket notation or array). * @returns {boolean} True if the path exists, false otherwise. */ export default function has<T extends Record<PropertyKey, any>>(obj: T, path: string | string[]): boolean; //# sourceMappingURL=has.d.ts.map