![]() |
VOOZH | about |
The v8.Serializer.writeRawBytes() method is an inbuilt application programming interface of the v8.Serializer module which is used to write a raw buffer data to the internal buffer. For use inside of custom serializer._writeHostObject().
Syntax:
v8.Serializer.writeRawBytes( Buffer );
Parameters: This method accepts single parameter as mentioned above and described below:
Return Value: This method does not return anything but writes raw buffer data to the internal buffer.
Below examples illustrate the use of v8.Serializer.writeRawBytes() method in Node.js.
Example 1: Filename: index.js Run index.js file using the following command:node index.js
Output:
<Buffer ff 0d 49 ae 5a>Example 2: Filename: index.js Run index.js file using the following command:
node index.js
Output:
<Buffer > GeeksforGeeks
Reference: https://nodejs.org/api/v8.html#v8_serializer_writerawbytes_buffer