![]() |
VOOZH | about |
The v8.Serializer.writeDouble() method is an inbuilt application programming interface of the v8.Serializer module which is used to write a JS number value to the internal buffer. For use inside of custom serializer._writeHostObject().
Syntax:
v8.Serializer.writeDouble( Value );
Parameters: This method accepts single parameter as mentioned above and described below:
Return Value: This method does not return anything but writes a JS number value to the internal buffer.
Below examples illustrate the use of v8.Serializer.writeDouble() method in Node.js:
Example 1: Filename: index.js Run index.js file using the following command:node index.js
Output:
<Buffer ba da 8a fd 65 97 b6 40>Example 2: Filename: index.js Run index.js file using the following command:
node index.js
Output:
<Buffer > <Buffer 5c 8f c2 f5 28 dc 5e 40>Reference: https://nodejs.org/api/v8.html#v8_serializer_writedouble_value