![]() |
VOOZH | about |
The v8.Serializer.writeUint32() method is an inbuilt application programming interface of the v8.Serializer module, which is used to write the raw 32-bit integer value to the internal buffer. For use inside of custom serializer._writeHostObject().
Syntax:v8.Serializer.writeUint32( value );
Parameters: This method accepts single parameter as mentioned above and described below.
Return Value: This method does not return anything but writes a raw 32-bit integer value to the internal buffer.
Below examples illustrate the use of v8.Serializer.writeUint32() method in Node.js:
Example 1:
Filename: index.js Run index.js file using the following command:node index.js
Output:
Undefined <Buffer 97 2d>
Example 2:
Filename: index.js Run index.js file using the following command:node index.js
Output:
<Buffer > <Buffer 82 e8 01> writing two 32 bits number one after another <Buffer 82 e8 01 82 e8 01> reading after write 5783
Reference: https://nodejs.org/api/v8.html#v8_serializer_writeuint32_value