ethereum-optimism / optimism-ts-services

[Optimism] Client-Side Services
15 stars 6 forks source link

Define custom prettifier keys for common key types #34

Open snario opened 3 years ago

snario commented 3 years ago

We could define a custom prettifier key for things like retryAgainS to show the duration in a human readable format.

e.g.,

{
  customPrettifiers: {
    retryAgainS: prettifyQuery
  }
}
//...
const prettifyQuery = value => {
  return Math.floor(value / 1000) + 's'
}

_Originally posted by @snario in https://github.com/ethereum-optimism/optimism-ts-services/pull/33#discussion_r590613593_

snario commented 3 years ago

cc @tynes if you think there are any other major keys to take human readability into account