code: function compare(tree_key, key) {
    let buf
  
    if (Buffer.isBuffer(key)) {
      buf = key
    } else if (typeof key == 'string') {
      buf = Buffer.from(key)
    } else {
      throw new TypeError('Argument `key` must be a Buffer or a string')
    }
  
    return Buffer.compare(tree_key, buf)
  }
docs: compare 2 keys
  @param tree_key {Buffer}
  @param key {string|Buffer}
  @returns {number}