A lazy array defers and coalesces insertions and removals until it is accessed. It implements a rope-like interface using an augmented skip list.
var lazy = new LazyArray();
lazy.insert(0, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
lazy.replace(4, 4, ["a", "b", "c"]);
lazy.remove(3, 2);
lazy.flatten();
=> [1, 2, 3, "b", "c", 9, 10]
npm install
bower install
grunt dev
Point your browser to http://localhost:8000.