From aea2cbe539cf8fbe9750d3e3c14b97b9d4267651 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sun, 4 Jan 2026 05:24:23 +0300 Subject: [PATCH] notes... Signed-off-by: Alex A. Naanou --- serialize.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/serialize.js b/serialize.js index dc0f25a..7ad7449 100644 --- a/serialize.js +++ b/serialize.js @@ -1,6 +1,25 @@ /********************************************************************** * +* TODO would be useful to split this into: +* - object traversal using object path +* Object.walk(..) -- a-la Python's walk(..) +* Object.graph(..) +* like .map(..) but deep and paths instead of indexes... +* - get/set object by path +* Object.get(..) / Object.set(..) * +* XXX the current path implementation is fully complient to the task at +* hand but it will not suite the diff task as there is no way to know +* the meaning of the path element without seeing the object (map/set +* indexes)... +* a different path format would suit both tasks and make things more +* universal: +* [1, 'a', ['map', 5, 0], ['set', 3]] +* \ \ +---------+-+ +------+-+ +* \ \ \ +------ Set index +* \ \ +----------------- Map index +* \ +------------------------------ Objecct index (string) +* +--------------------------------- Array index (number) * **********************************************************************/ ((typeof define)[0]=='u'?function(f){module.exports=f(require)}:define)