0
I have adapted this from object-oriented methods to a more basic function style of JavaScript below. It is essentially a B+tree which doesn't do key-based lookup but does index-based lookup. And it has some added constraints of keeping arrays always powers of two up to 32 (1, 2, 4, 8, 16, and 32)...