@@ -164,12 +164,12 @@ however, subtle incompatibilities between the `Buffer` API and the
164
164
165
165
In particular:
166
166
167
- * While [ ` TypedArray# slice() ` ] [ ] creates a copy of part of the ` TypedArray ` ,
168
- [ ` Buffer# slice() ` ] [ `buf.slice()` ] creates a view over the existing ` Buffer `
167
+ * While [ ` TypedArray.prototype. slice() ` ] [ ] creates a copy of part of the ` TypedArray ` ,
168
+ [ ` Buffer.prototype. slice() ` ] [ `buf.slice()` ] creates a view over the existing ` Buffer `
169
169
without copying. This behavior can be surprising, and only exists for legacy
170
- compatibility. [ ` TypedArray# subarray() ` ] [ ] can be used to achieve the behavior
171
- of [ ` Buffer# slice() ` ] [ `buf.slice()` ] on both ` Buffer ` s and other
172
- ` TypedArray ` s.
170
+ compatibility. [ ` TypedArray.prototype. subarray() ` ] [ ] can be used to achieve
171
+ the behavior of [ ` Buffer.prototype. slice() ` ] [ `buf.slice()` ] on both ` Buffer ` s
172
+ and other ` TypedArray ` s.
173
173
* [ ` buf.toString() ` ] [ ] is incompatible with its ` TypedArray ` equivalent.
174
174
* A number of methods, e.g. [ ` buf.indexOf() ` ] [ ] , support additional arguments.
175
175
@@ -947,9 +947,9 @@ added: v0.1.90
947
947
Copies data from a region of ` buf ` to a region in ` target ` , even if the ` target `
948
948
memory region overlaps with ` buf ` .
949
949
950
- [ ` TypedArray# set() ` ] [ ] performs the same operation, and is available for all
951
- TypedArrays, including Node.js ` Buffer ` s, although it takes different
952
- function arguments.
950
+ [ ` TypedArray.prototype. set() ` ] [ ] performs the same operation, and is available
951
+ for all TypedArrays, including Node.js ` Buffer ` s, although it takes
952
+ different function arguments.
953
953
954
954
``` js
955
955
// Create two `Buffer` instances.
@@ -1210,7 +1210,7 @@ an integer between 0 and 255.
1210
1210
1211
1211
If ` byteOffset ` is not a number, it will be coerced to a number. If the result
1212
1212
of coercion is ` NaN ` or ` 0 ` , then the entire buffer will be searched. This
1213
- behavior matches [ ` String# indexOf() ` ] [ ] .
1213
+ behavior matches [ ` String.prototype. indexOf() ` ] [ ] .
1214
1214
1215
1215
``` js
1216
1216
const b = Buffer .from (' abcdef' );
@@ -1310,7 +1310,7 @@ an integer between 0 and 255.
1310
1310
1311
1311
If ` byteOffset ` is not a number, it will be coerced to a number. Any arguments
1312
1312
that coerce to ` NaN ` , like ` {} ` or ` undefined ` , will search the whole buffer.
1313
- This behavior matches [ ` String# lastIndexOf() ` ] [ ] .
1313
+ This behavior matches [ ` String.prototype. lastIndexOf() ` ] [ ] .
1314
1314
1315
1315
``` js
1316
1316
const b = Buffer .from (' abcdef' );
@@ -1981,7 +1981,7 @@ offset and cropped by the `start` and `end` indices.
1981
1981
Specifying ` end ` greater than [ ` buf.length ` ] [ ] will return the same result as
1982
1982
that of ` end ` equal to [ ` buf.length ` ] [ ] .
1983
1983
1984
- This method is inherited from [ ` TypedArray# subarray() ` ] [ ] .
1984
+ This method is inherited from [ ` TypedArray.prototype. subarray() ` ] [ ] .
1985
1985
1986
1986
Modifying the new ` Buffer ` slice will modify the memory in the original ` Buffer `
1987
1987
because the allocated memory of the two objects overlap.
@@ -3396,13 +3396,13 @@ introducing security vulnerabilities into an application.
3396
3396
[ `ERR_OUT_OF_RANGE` ] : errors.md#ERR_OUT_OF_RANGE
3397
3397
[ `JSON.stringify()` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
3398
3398
[ `SharedArrayBuffer` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer
3399
- [ `String# indexOf()` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf
3400
- [ `String# lastIndexOf()` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf
3399
+ [ `String.prototype. indexOf()` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf
3400
+ [ `String.prototype. lastIndexOf()` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf
3401
3401
[ `String.prototype.length` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length
3402
- [ `TypedArray#set()` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set
3403
- [ `TypedArray#slice()` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice
3404
- [ `TypedArray#subarray()` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray
3405
3402
[ `TypedArray.from()` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from
3403
+ [ `TypedArray.prototype.set()` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set
3404
+ [ `TypedArray.prototype.slice()` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice
3405
+ [ `TypedArray.prototype.subarray()` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray
3406
3406
[ `TypedArray` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
3407
3407
[ `Uint8Array` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array
3408
3408
[ `buf.buffer` ] : #buffer_buf_buffer
0 commit comments