UNPKG

rxdb

Version:

A local-first realtime NoSQL Database for JavaScript applications - https://rxdb.info/

27 lines (25 loc) 473 B
/** * Custom build of the mingo updater for smaller build size */ import { update } from "mingo/updater"; import { clone } from '../utils/index.ts'; import type { UpdateQuery } from '../../types/index'; export function mingoUpdater<T>( d: T, op: UpdateQuery<T> ): T { const cloned = clone(d); update<any>( cloned, op, undefined, undefined, { cloneMode: "none" } ); return cloned; }