UNPKG

js-upsert

Version:

`js-upsert` is a lightweight JavaScript library designed to simplify updating deeply nested properties within objects. It provides an intuitive and efficient way to manage complex object structures, ensuring non-destructive updates. This makes `js-upsert`

12 lines (10 loc) 464 B
import { typeParam_upsert, UpsertType } from './types/upsert.type'; type configType = { returnType?: "object" | "array"; }; export declare function upserter<HayStackType>(haystack: HayStackType, needle: any, config?: configType): void; export declare function upsert<HayStackType>(haystack: HayStackType, ...needles: typeParam_upsert<HayStackType>[]): UpsertType<HayStackType>; declare const _default: { upsert: typeof upsert; }; export default _default;