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

Handle timestamp 0 in prettifyTime #76

Merged
merged 1 commit into from Aug 15, 2019
Merged

Commits on Aug 12, 2019

  1. Handle timestamp 0 in prettifyTime

    When trying to format a log object like the following:
    
    ```json
    {
      "level": 30,
      "time": 0,
      "name": "foobar",
      "msg": "I like cake",
      "v": 1
    }
    ```
    
    pino-pretty previously tried to format the timestamp `undefined` instead of
    taking the `0` time. This commit looks not at the truthiness of the value, but
    its existence.
    Zirak committed Aug 12, 2019
    Copy the full SHA
    f42786d View commit details
    Browse the repository at this point in the history