@@ -497,7 +497,6 @@ console.log(buf1.toString());
497497// Prints: this is a tC)st
498498console .log (buf1 .toString (' ascii' ));
499499
500-
501500const buf2 = new Buffer (' 7468697320697320612074c3a97374' , ' hex' );
502501
503502// Prints: this is a tést
@@ -906,7 +905,6 @@ console.log(buf1.toString());
906905// Prints: this is a tC)st
907906console .log (buf1 .toString (' ascii' ));
908907
909-
910908const buf2 = Buffer .from (' 7468697320697320612074c3a97374' , ' hex' );
911909
912910// Prints: this is a tést
@@ -1366,7 +1364,6 @@ console.log(buf.indexOf(Buffer.from('a buffer example')));
13661364// Prints: 8
13671365console .log (buf .indexOf (Buffer .from (' a buffer example' ).slice (0 , 8 )));
13681366
1369-
13701367const utf16Buffer = Buffer .from (' \u039a\u0391\u03a3\u03a3\u0395 ' , ' ucs2' );
13711368
13721369// Prints: 4
@@ -1477,7 +1474,6 @@ console.log(buf.lastIndexOf('buffer', 5));
14771474// Prints: -1
14781475console .log (buf .lastIndexOf (' buffer' , 4 ));
14791476
1480-
14811477const utf16Buffer = Buffer .from (' \u039a\u0391\u03a3\u03a3\u0395 ' , ' ucs2' );
14821478
14831479// Prints: 6
@@ -2000,7 +1996,6 @@ buf1.swap16();
20001996// Prints: <Buffer 02 01 04 03 06 05 08 07>
20011997console .log (buf1);
20021998
2003-
20041999const buf2 = Buffer .from ([0x1 , 0x2 , 0x3 ]);
20052000
20062001// Throws an exception: RangeError: Buffer size must be a multiple of 16-bits
@@ -2030,7 +2025,6 @@ buf1.swap32();
20302025// Prints: <Buffer 04 03 02 01 08 07 06 05>
20312026console .log (buf1);
20322027
2033-
20342028const buf2 = Buffer .from ([0x1 , 0x2 , 0x3 ]);
20352029
20362030// Throws an exception: RangeError: Buffer size must be a multiple of 32-bits
@@ -2060,7 +2054,6 @@ buf1.swap64();
20602054// Prints: <Buffer 08 07 06 05 04 03 02 01>
20612055console .log (buf1);
20622056
2063-
20642057const buf2 = Buffer .from ([0x1 , 0x2 , 0x3 ]);
20652058
20662059// Throws an exception: RangeError: Buffer size must be a multiple of 64-bits
@@ -2132,7 +2125,6 @@ console.log(buf1.toString('ascii'));
21322125// Prints: abcde
21332126console .log (buf1 .toString (' ascii' , 0 , 5 ));
21342127
2135-
21362128const buf2 = Buffer .from (' tést' );
21372129
21382130// Prints: 74c3a97374
0 commit comments