VOOZH about

URL: https://www.geeksforgeeks.org/node-js/node-js-v8-serializer-writeheader-method/

⇱ Node.js v8.Serializer.writeHeader() Method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Node.js v8.Serializer.writeHeader() Method

Last Updated : 28 Jul, 2020

The v8.Serializer.writeHeader() method is an inbuilt application programming interface of the v8.Serializer module, is used to write out a header, that contains the serialization format version.

Syntax:
v8.Serializer.writeHeader();

Parameters: This method does not have any parameters.

Return Value: This method does not return anything but writes a header to the internal buffer.

Below examples illustrate the use of v8.Serializer.writeHeader() method in Node.js.

Example 1: Filename: index.js Run index.js file using the following command:
node index.js
Output:
<Buffer >
undefined
<Buffer ff 0d>
Example 2: Filename: index.js Run index.js file using the following command:
node index.js
Output:
undefined
Reference: https://nodejs.org/api/v8.html#v8_serializer_writeheader
Comment

Explore