From b8f7daad40b7bfc515e2c6400cf16d907ee08d30 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 22 Oct 2020 15:05:36 +0300 Subject: [PATCH] notes... Signed-off-by: Alex A. Naanou --- diff.js | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/diff.js b/diff.js index cb39839..dd9bde3 100644 --- a/diff.js +++ b/diff.js @@ -2428,23 +2428,6 @@ Types.set(Array, { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/*/ XXX Set... -Types.set(Set, { - handle: function(obj, diff, A, B, options){ - // XXX - } - walk: function(diff, func, path){ - // XXX - }, - reverse: function(change){ - // XXX - }, -}) -//*/ - - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// XXX add JS types like Map, Set, ... // XXX Q: can Map/Set be supported??? // - there is not uniform item access // -> need to type path elements @@ -2464,6 +2447,10 @@ Types.set(Set, { // - use a best overall match as indication... // - serialize... // ...will need a way to sort the items in a stable way... +// - might be possible to use "links" within a diff to represent +// recursion and identical items, but this will not resolve +// Map key patches outside the diff... +// ...api to link in items -- i.e. "replace that in diff with this"??? /*/ XXX for now unsupported types will be treated as object... Types.set(Map, { handle: function(obj, diff, A, B, options){ @@ -2473,6 +2460,22 @@ Types.set(Map, { //*/ +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +/*/ XXX Set... +Types.set(Set, { + handle: function(obj, diff, A, B, options){ + // XXX + } + walk: function(diff, func, path){ + // XXX + }, + reverse: function(change){ + // XXX + }, +}) +//*/ + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /*/ Pattern... // XXX need to accompany this with a walk pattern protocol....