Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

buffer nodejs

//To create a buffer, use Buffer.from();
//To learn more about what buffers are, check out this link: https://nodejs.org/en/knowledge/advanced/buffers/how-to-use-buffers/

/* Example: */ 

var buf = Buffer.from([anything that is a str or num], [encoding (string)]);

//To read a buffer, do this

var toString = buf.toString([encoding])
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #buffer #nodejs
ADD COMMENT
Topic
Name
8+3 =