A splay tree implementation in JavaScript