lib/avltree.js
function lookup(tree, key) {
  if (!tree) {
    return null
  }

  switch (compare(tree.key, key)) {
    case 0:
      return tree
    case 1:
      return lookup(tree.right, key)
    case -1:
      return lookup(tree.left, key)
    default:
      break
  }
}
function lookup(tree, key) {
  if (!tree) {
    return null
  }

  switch (compare(tree.key, key)) {
    case 0:
      return tree
    case 1:
      return lookup(tree.right, key)
    case -1:
      return lookup(tree.left, key)
    default:
      break
  }
}
function lookup ( tree , key ) { if ( ! tree ) { return null } switch ( compare ( tree . key , key ) ) { case 0 : return tree case 1 : return lookup ( tree . right , key ) case - 1 : return lookup ( tree . left , key ) default : break } }
search `key` in AVL tree
@param tree {Object}
@param key {Buffer|String}
@returns {Buffer|Object|null}
search key in AVL tree