Mutt Forms Plugin - JSON Patch extension
A simple plugin to allow for JSON patch diff's to be generated from originally populated data vs user inputed data
Install:
npm install mutt-forms-json-patch --save
Usage:
import Mutt from 'mutt-forms'
import MuttJsonPatch from 'mutt-forms-json-patch'
Mutt.use(MuttJsonPatch)
let form = Mutt({}, {})
form.populate({
name: 'Test'
})
// Some changes to the form...
let patch = form.getJSONPatch()