code: function compareTransactions(first, second) {
    if (first.ledger_index === second.ledger_index) {
      return signum(
        Number(first.meta.TransactionIndex) -
        Number(second.meta.TransactionIndex));
    }
    return Number(first.ledger_index) < Number(second.ledger_index) ? -1 : 1;
  }
docs: Order two rippled transactions based on their ledger_index.
  If two transactions took place in the same ledger, sort
  them based on TransactionIndex
  See: https://ripple.com/build/transactions/
  
  @param {Object} first
  @param {Object} second
  @returns {Number} [-1, 0, 1]