doc: add documentation for blob.bytes() method
Description: This pull request adds documentation for the blob.bytes() method in the buffer module. The method was introduced in Node.js v20.16.0, but it was not documented. This PR aims to provide a clear description and examples for the blob.bytes() method.
Motivation: The blob.bytes() method allows users to obtain the bytes of a Blob object as a Buffer. This method was introduced in a recent release but is currently undocumented.
Fixes: https://github.com/nodejs/node/issues/54105
Documentation:
blob.bytes()
The blob.bytes()
method returns the bytes of the Blob
object as a Buffer
.
const blob = new Blob(['hello']);
console.log(blob.bytes()); // Outputs: <Buffer 68 65 6c 6c 6f>
Additional Notes: I included the text.txt file incorrectly while testing git push for the first time. I'd appreciate it if you could ignore it. I'll be more careful in the future!