@signaldb/core
Version:
SignalDB is a client-side database that provides a simple MongoDB-like interface to the data with first-class typescript support to achieve an optimistic UI. Data persistence can be achieved by using storage providers that store the data through a JSON in
10 lines (9 loc) • 501 B
TypeScript
/**
* Retrieves the value at a specified path within an object.
* Supports dot and bracket notation for navigating nested properties.
* @template T - The type of the object to retrieve the value from.
* @param value - The object to navigate.
* @param path - The path (dot or bracket notation) to the desired value.
* @returns The value at the specified path, or `undefined` if the path does not exist.
*/
export default function get<T extends Record<string, any>>(value: T, path: string): any;