You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/plugins.md
+41-18Lines changed: 41 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,54 +19,77 @@ Here is an example to provide number differences in deltas (when left and right
19
19
This, way when diffing 2 numbers instead of obtaining ```[ oldValue, newValue ] ```, the difference between both values will be saved, this could be useful for counters simultaneously incremented in multiple client applications (patches that both increment a value would be combined, instead of failing with a conflict).
20
20
21
21
```javascript
22
+
23
+
/*
24
+
Plugin a new diff filter
25
+
*/
26
+
22
27
var diffpatcher =jsondiffpatch.create();
23
28
varNUMERIC_DIFFERENCE=-8;
24
29
25
30
varnumericDiffFilter=function(context) {
26
31
if (typeofcontext.left==='number'&&typeofcontext.right==='number') {
0 commit comments