Skip to content

mmun/lazy-array.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lazy Array

A lazy array defers and coalesces insertions and removals until it is accessed. It implements a rope-like interface using an augmented skip list.

Example

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]

Getting started

Running the tests

npm install
bower install
grunt dev

Point your browser to http://localhost:8000.

About

A lazy array for JavaScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages