Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup: mark optional parameters
Co-authored-by: Akhil Marsonya <akhil.marsonya27@gmail.com>
  • Loading branch information
Ayase-252 and marsonya committed Apr 21, 2021
commit 1d2dc412d67a2905e217eee72cd0143b4b32c37b
4 changes: 2 additions & 2 deletions lib/string_decoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ for (let i = 0; i < encodings.length; ++i)
* buffers into a series of JS strings without breaking apart multi-byte
* characters.
*
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the above description inside the comment?

* @param {string} encoding
* @param {string} [encoding=utf-8]
*/
function StringDecoder(encoding) {
this.encoding = normalizeEncoding(encoding);
Expand Down Expand Up @@ -109,7 +109,7 @@ StringDecoder.prototype.write = function write(buf) {
* After end() is called, the stringDecoder object can be reused for new
* input.
*
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
*
* Returns any remaining input stored in the internal buffer as a string.
* After end() is called, the stringDecoder object can be reused for new input.

* @param {string | Buffer | TypedArray | DataView} buf
* @param {string | Buffer | TypedArray | DataView} [buf]
* @returns {string}
*/
StringDecoder.prototype.end = function end(buf) {
Expand Down