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

Reword stream docs to clarify that decodeStrings encodes strings #25468

Closed
wants to merge 2 commits into from

Commits on Jan 13, 2019

  1. doc: reword stream docs to clarify that decodeStrings encodes strings

    I was implementing a Writable stream and misunderstood `decodeStrings`
    to mean 'will decode `Buffer`s into `string`s before calling `_write`'.
    This change adds a little more detail to the description of
    `decodeStrings` to clarify its effect on a Writable stream & what gets
    passed to `_write`.
    
    Changing the name of the option to `encodeStrings` would make it much
    easier to understand, but the name was chosen in 2012 and the option
    used in many projects (22k mentions of 'decodeStringsr in JS projects in
    GitHub). Deprecating the old name & rolling out a replacement is beyond
    my capabilities as a first-time contributor.
    
    Fixes: nodejs#25464
    dgholz committed Jan 13, 2019
    Configuration menu
    Copy the full SHA
    2aaa4d2 View commit details
    Browse the repository at this point in the history
  2. doc: suggestions from @addaleax

    dgholz committed Jan 13, 2019
    Configuration menu
    Copy the full SHA
    b990419 View commit details
    Browse the repository at this point in the history