From 50b381600df85b956c8410fd3ab385fb47e60da2 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 14 Jun 2021 16:33:36 +0300 Subject: [PATCH] notes... Signed-off-by: Alex A. Naanou --- diff2.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/diff2.js b/diff2.js index 5582241..011c211 100644 --- a/diff2.js +++ b/diff2.js @@ -18,8 +18,9 @@ var types = require('ig-types') // - generate a spec - DONE // - serializable // - support props -// - build object via spec +// - build object via spec - DONE // - update object via spec +// - contextual updates // - subtract specs (diff) // - full // - relaxed -- ignore item order @@ -454,15 +455,23 @@ function(...attrs){ // NOTE: to set this needs the full basepath to exist... // // XXX need to write a map key to an item that does not exist... -// XXX for arrays ans sets need a way to insert values after a specific -// index, this would require: +// XXX need a way to insert values after a specific index/key, this +// would require: // - indicated this in spec: // a) AFTER/BEFORE symbol(s) in path (???) +// here there are two ways to think about this: +// - AFTER means *replace* the item after +// - AFTER means *between* this and the item after // b) context (a-la diff) // - insert to array: // .splice(i, 0, ) // - insert into set: +// .splice(..) +// - insert into map // ??? +// - insert into object +// ??? +// ...revise... // XXX str2path and passing in a list path produce different results... var atPath = module.atPath =