File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -592,6 +592,27 @@ describe('Test lib.js:', function() {
592592 // not data arrays but yes on arrays that were previously expanded. This is a bit
593593 // tricky to get to work just right and currently doesn't have any known use since
594594 // container arrays are not multiply nested.
595+ //
596+ // Additional notes on what works or what doesn't work. This case does *not* work
597+ // because the two nested arrays that would result from the expansion need to be
598+ // deep merged.
599+ //
600+ // Lib.expandObjectPaths({'marker.range[0]': 5, 'marker.range[1]': 2})
601+ //
602+ // // => {marker: {range: [null, 2]}}
603+ //
604+ // This case *does* work becuase the array merging does not require a deep extend:
605+ //
606+ // Lib.expandObjectPaths({'range[0]': 5, 'range[1]': 2}
607+ //
608+ // // => {range: [5, 2]}
609+ //
610+ // Finally note that this case works fine becuase there's no merge necessary:
611+ //
612+ // Lib.expandObjectPaths({'marker.range[1]': 2})
613+ //
614+ // // => {marker: {range: [null, 2]}}
615+ //
595616 /*
596617 it('combines changes', function() {
597618 var input = {'marker[1].range[1]': 5, 'marker[1].range[0]': 4};
You can’t perform that action at this time.
0 commit comments