Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New API to allow setting custom value display #65

Open
nodegin opened this issue Mar 3, 2024 · 0 comments
Open

New API to allow setting custom value display #65

nodegin opened this issue Mar 3, 2024 · 0 comments

Comments

@nodegin
Copy link

nodegin commented Mar 3, 2024

Hello, thank you so much for this awesome library!

It would be helpful to allow passing a function like:

valueFormatter: (value) => {
  if (typeof value === 'string') {
    if (value.length === 0) return ['yellow', '(empty string)']
  }
  if (typeof value === 'undefined') {
    return ['yellow', '(undefined)']
  }
  if (typeof value === 'number') {
    return ['white', value]
  }
  return ['green', value]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant