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

README is confusing on the constructor usage #49

Closed
rprieto opened this issue May 19, 2016 · 2 comments
Closed

README is confusing on the constructor usage #49

rprieto opened this issue May 19, 2016 · 2 comments

Comments

@rprieto
Copy link

rprieto commented May 19, 2016

The README at https://www.npmjs.com/package/pino#constructor says pino([stream], [opts]). I thought this meant we can call pino(process.stdout, {extreme: true}). However that doesn't work, which makes sense when we look at the code:

function pino (opts, stream) {
  if (opts && opts._writableState) {
    stream = opts
    opts = null
  }
}

Should the README say pino([opts], [stream]) (reversed)?

@mcollina
Copy link
Member

Thanks, fixed!

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants