Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 306 Bytes

File metadata and controls

16 lines (11 loc) · 306 Bytes

TYPE.Replace()

Replaces a whole object when applying a patch.

Returns Object

Examples

import { applyPatch, TYPE } from 'dop'

const target = { data: { a:1, b:2 } }
const patch = { data: TYPE.Replace({ c:3 }) }
applyPatch(target, patch)
target // { data: { c:3 } }