From 30c719d595fca160358aef602865beef780b5df0 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sun, 12 Aug 2018 15:20:31 +0300 Subject: [PATCH] docs... Signed-off-by: Alex A. Naanou --- diff.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/diff.js b/diff.js index a79969c..911ab9c 100644 --- a/diff.js +++ b/diff.js @@ -614,21 +614,20 @@ object.makeConstructor('OF', Object.assign(new LogicType(), { // // number - array key // // NOTE: this is actually not different // // from a string... -// // array/2 - a set of 2 keys for A and B respectively -// // NOTE: if one of the array items in undefined -// // or null then it means that the item -// // does not exist in the corresponding -// // array... -// // NOTE: if both of the array items are arrays -// // it means that we are splicing array -// // sections instead of array elements... -// // XXX should this be: -// // [ -// // null | index | [index, length], -// // null | index | [index, length], -// // ] -// // ...this way would will be able to drop -// // the .length... +// // [ +// // null | index | [index, length], +// // null | index | [index, length], +// // ] +// // - a set of 2 keys for A and B respectively +// // if one of the array items in undefined or +// // null then it means that the item does not +// // exist in the corresponding array... +// // if both of the array items are arrays it +// // means that we are splicing array sections +// // instead of array elements... +// // length indicates the size of the spliced +// // out section... +// // XXX revise docs... // path: [, ...], // // // values in A and B... @@ -1558,6 +1557,7 @@ Types.set(Array, { .concat(this.typeCall(Object, 'walk', {items: attrs}, func, path)) }, // XXX add object compatibility checks... + // XXX revise... patch: function(obj, key, change){ var i = key instanceof Array ? key[0] : key var j = key instanceof Array ? key[1] : key