Skip to content

Return empty string for empty buffer #42

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

owahltinez
Copy link

When calling getContentsAsString(), function should always return a string type. If the buffer is empty, return value should be an empty string. This matches the type definitions at https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/stream-buffers/index.d.ts

Change return short-circuit from `false` to empty string or empty buffer.
When calling getContentsAsString(), function should always return a string type. If the buffer is empty, return value should be an empty string. This matches the type definitions at https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/stream-buffers/index.d.ts
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant