UNPKG

@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

14 lines (13 loc) 353 B
import { update } from "mingo"; import deepClone from "./index19.mjs"; function modify(item, modifier) { const hasOperators = Object.keys(modifier).some((key) => key.startsWith("$")); if (!hasOperators) return modifier; const clonedItem = deepClone(item); update(clonedItem, modifier); return clonedItem; } export { modify as default };