Message from JavaScript discussions

November 2017

— Https://hastebin.com/safejukubu.js

— 

This builds the paths

main: function (state) {
strategies.nodePaths.main(state);
state.paths[state.paths.length] = Array.from(state.currentPath);
state.paths[state.paths.length - 1].push(state.accessor);
if (state.isLast) {
return state.paths;
}
}

— state.currentPath is maintained by nodePaths

— There is a lot of that in the lib, sub-strategies that rely on others

— That's why I want to add more... you can run any number at once, and they will work together towards a common goal

Message permanent page

— 

diffPaths -> paths -> nodePaths -> bfsIterator

   |

   V

 diff

— So really, when you have that composition, anything is possible

— Since you can re-use everything

— The tests for the lib are extensive :)

— It is kind of funny because the lib can be used to run it's own tests... for instance it can diff objects that are returned against known correct data... I had it testing itself for awhile but decided to write simpler test-only versions of those algorithms so there was no dependency like that

Message permanent page

— Just add some more. I spent 2 years building an algorithm cooperation framework so it's ready for a lot at once

Message permanent page

— You could chain together hundreds of algorithms if you wanted... I originally was going to use promises to do this but decided instead on a more manual chaining method with direct calls, for more flexibility

Message permanent page