Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function applyPatch(patch) {
const record = getRecord(patch.id)
const prevDocument = record.snapshot
return new Patcher(patch).apply(prevDocument)
}
function applyPatches(patches) {
(acc, patch) => new Patcher(patch).applyViaAccessor(acc),
this.state.value
gradientPatches.forEach(gPatch => {
nextValue = new Patcher(gPatch).applyViaAccessor(nextValue)
})
return nextValue.getAttribute(FAKE_KEY)