JONAS and The Difference Engine
I came to refer to those utilities as "The Difference Engine" with a nod toward Charles Babbage and his mechanism of that name. Where JONAS had abstracted frequently used DOM, string and number interactions, these were array utilities and alternatives either for mechanisms that existed in other libraries, but did not perform well, or mechanisms that did not exist in those libraries precisely as I needed them to.
These are mechanisms for manipulating, interrogating or comparing arrays. Additional mechanisms for working with objects, strings and numbers are gradually being developed or modified.
These utilities are suited to installed server-side applications and distributed client-side applications emphasising computational performance. They are useful where you need to iterate as fast as possible, or where processor operations are limited.
A class for comparing two arrays and returng a third array which contains:
- Elements in both arrays;
- Elements in the first array, but not the second;
- Elements whose position has changed.
In addition, the class has a method for describing how an element maps from the first array to the second.
ArrayEngine, StringEngine, NumberEngine and ObjectEngine to follow.