@@ -284,7 +284,7 @@ Additionally, the [`buf.values()`][], [`buf.keys()`][], and
284
284
The ` Buffer ` class is a global type for dealing with binary data directly.
285
285
It can be constructed in a variety of ways.
286
286
287
- ### Class Method : ` Buffer.alloc(size[, fill[, encoding]]) `
287
+ ### Static method : ` Buffer.alloc(size[, fill[, encoding]]) `
288
288
<!-- YAML
289
289
added: v5.10.0
290
290
changes:
@@ -349,7 +349,7 @@ data that might not have been allocated for `Buffer`s.
349
349
350
350
A ` TypeError ` will be thrown if ` size ` is not a number.
351
351
352
- ### Class Method : ` Buffer.allocUnsafe(size) `
352
+ ### Static method : ` Buffer.allocUnsafe(size) `
353
353
<!-- YAML
354
354
added: v5.10.0
355
355
changes:
@@ -398,7 +398,7 @@ pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal
398
398
difference is subtle but can be important when an application requires the
399
399
additional performance that [ ` Buffer.allocUnsafe() ` ] [ ] provides.
400
400
401
- ### Class Method : ` Buffer.allocUnsafeSlow(size) `
401
+ ### Static method : ` Buffer.allocUnsafeSlow(size) `
402
402
<!-- YAML
403
403
added: v5.12.0
404
404
-->
@@ -446,7 +446,7 @@ socket.on('readable', () => {
446
446
447
447
A ` TypeError ` will be thrown if ` size ` is not a number.
448
448
449
- ### Class Method : ` Buffer.byteLength(string[, encoding]) `
449
+ ### Static method : ` Buffer.byteLength(string[, encoding]) `
450
450
<!-- YAML
451
451
added: v0.1.90
452
452
changes:
@@ -485,7 +485,7 @@ When `string` is a `Buffer`/[`DataView`][]/[`TypedArray`][]/[`ArrayBuffer`][]/
485
485
[ ` SharedArrayBuffer ` ] [ ] , the byte length as reported by ` .byteLength `
486
486
is returned.
487
487
488
- ### Class Method : ` Buffer.compare(buf1, buf2) `
488
+ ### Static method : ` Buffer.compare(buf1, buf2) `
489
489
<!-- YAML
490
490
added: v0.11.13
491
491
changes:
@@ -513,7 +513,7 @@ console.log(arr.sort(Buffer.compare));
513
513
// (This result is equal to: [buf2, buf1].)
514
514
```
515
515
516
- ### Class Method : ` Buffer.concat(list[, totalLength]) `
516
+ ### Static method : ` Buffer.concat(list[, totalLength]) `
517
517
<!-- YAML
518
518
added: v0.7.11
519
519
changes:
@@ -560,7 +560,7 @@ console.log(bufA.length);
560
560
// Prints: 42
561
561
```
562
562
563
- ### Class Method : ` Buffer.from(array) `
563
+ ### Static method : ` Buffer.from(array) `
564
564
<!-- YAML
565
565
added: v5.10.0
566
566
-->
@@ -581,7 +581,7 @@ appropriate for `Buffer.from()` variants.
581
581
` Buffer.from(array) ` and [ ` Buffer.from(string) ` ] [ ] may also use the internal
582
582
` Buffer ` pool like [ ` Buffer.allocUnsafe() ` ] [ ] does.
583
583
584
- ### Class Method : ` Buffer.from(arrayBuffer[, byteOffset[, length]]) `
584
+ ### Static method : ` Buffer.from(arrayBuffer[, byteOffset[, length]]) `
585
585
<!-- YAML
586
586
added: v5.10.0
587
587
-->
@@ -632,7 +632,7 @@ A `TypeError` will be thrown if `arrayBuffer` is not an [`ArrayBuffer`][] or a
632
632
[ ` SharedArrayBuffer ` ] [ ] or another type appropriate for ` Buffer.from() `
633
633
variants.
634
634
635
- ### Class Method : ` Buffer.from(buffer) `
635
+ ### Static method : ` Buffer.from(buffer) `
636
636
<!-- YAML
637
637
added: v5.10.0
638
638
-->
@@ -657,7 +657,7 @@ console.log(buf2.toString());
657
657
A ` TypeError ` will be thrown if ` buffer ` is not a ` Buffer ` or another type
658
658
appropriate for ` Buffer.from() ` variants.
659
659
660
- ### Class Method : ` Buffer.from(object[, offsetOrEncoding[, length]]) `
660
+ ### Static method : ` Buffer.from(object[, offsetOrEncoding[, length]]) `
661
661
<!-- YAML
662
662
added: v8.2.0
663
663
-->
@@ -691,7 +691,7 @@ const buf = Buffer.from(new Foo(), 'utf8');
691
691
A ` TypeError ` will be thrown if ` object ` does not have the mentioned methods or
692
692
is not of another type appropriate for ` Buffer.from() ` variants.
693
693
694
- ### Class Method : ` Buffer.from(string[, encoding]) `
694
+ ### Static method : ` Buffer.from(string[, encoding]) `
695
695
<!-- YAML
696
696
added: v5.10.0
697
697
-->
@@ -717,7 +717,7 @@ console.log(buf1.toString('latin1'));
717
717
A ` TypeError ` will be thrown if ` string ` is not a string or another type
718
718
appropriate for ` Buffer.from() ` variants.
719
719
720
- ### Class Method : ` Buffer.isBuffer(obj) `
720
+ ### Static method : ` Buffer.isBuffer(obj) `
721
721
<!-- YAML
722
722
added: v0.1.101
723
723
-->
@@ -727,7 +727,7 @@ added: v0.1.101
727
727
728
728
Returns ` true ` if ` obj ` is a ` Buffer ` , ` false ` otherwise.
729
729
730
- ### Class Method : ` Buffer.isEncoding(encoding) `
730
+ ### Static method : ` Buffer.isEncoding(encoding) `
731
731
<!-- YAML
732
732
added: v0.9.1
733
733
-->
@@ -3206,13 +3206,13 @@ introducing security vulnerabilities into an application.
3206
3206
[ RFC 4648, Section 5 ] : https://tools.ietf.org/html/rfc4648#section-5
3207
3207
[ WHATWG Encoding Standard ] : https://encoding.spec.whatwg.org/
3208
3208
[ `ArrayBuffer` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer
3209
- [ `Buffer.alloc()` ] : #buffer_class_method_buffer_alloc_size_fill_encoding
3210
- [ `Buffer.allocUnsafe()` ] : #buffer_class_method_buffer_allocunsafe_size
3211
- [ `Buffer.allocUnsafeSlow()` ] : #buffer_class_method_buffer_allocunsafeslow_size
3212
- [ `Buffer.from(array)` ] : #buffer_class_method_buffer_from_array
3213
- [ `Buffer.from(arrayBuf)` ] : #buffer_class_method_buffer_from_arraybuffer_byteoffset_length
3214
- [ `Buffer.from(buffer)` ] : #buffer_class_method_buffer_from_buffer
3215
- [ `Buffer.from(string)` ] : #buffer_class_method_buffer_from_string_encoding
3209
+ [ `Buffer.alloc()` ] : #buffer_static_method_buffer_alloc_size_fill_encoding
3210
+ [ `Buffer.allocUnsafe()` ] : #buffer_static_method_buffer_allocunsafe_size
3211
+ [ `Buffer.allocUnsafeSlow()` ] : #buffer_static_method_buffer_allocunsafeslow_size
3212
+ [ `Buffer.from(array)` ] : #buffer_static_method_buffer_from_array
3213
+ [ `Buffer.from(arrayBuf)` ] : #buffer_static_method_buffer_from_arraybuffer_byteoffset_length
3214
+ [ `Buffer.from(buffer)` ] : #buffer_static_method_buffer_from_buffer
3215
+ [ `Buffer.from(string)` ] : #buffer_static_method_buffer_from_string_encoding
3216
3216
[ `Buffer.poolSize` ] : #buffer_class_property_buffer_poolsize
3217
3217
[ `DataView` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView
3218
3218
[ `ERR_INVALID_BUFFER_SIZE` ] : errors.html#ERR_INVALID_BUFFER_SIZE
0 commit comments