Skip to content

Commit d708700

Browse files
committed
doc: deprecate buffer's parent property
`buffer.parent` property is actually an alias of `buffer.buffer` property. This patch actually doc-deprecates it and points the users to the `buffer.buffer` property. PR-URL: #8332 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
1 parent 03d440e commit d708700

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

doc/api/buffer.md

+7
Original file line numberDiff line numberDiff line change
@@ -1329,6 +1329,12 @@ buf = buf.slice(0, 5);
13291329
console.log(buf.length);
13301330
```
13311331

1332+
### buf.parent
1333+
1334+
> Stability: 0 - Deprecated: Use [`buf.buffer`] instead.
1335+
1336+
The `buf.parent` property is a deprecated alias for `buf.buffer`.
1337+
13321338
### buf.readDoubleBE(offset[, noAssert])
13331339
### buf.readDoubleLE(offset[, noAssert])
13341340
<!-- YAML
@@ -2429,6 +2435,7 @@ console.log(buf);
24292435
```
24302436

24312437
[`buf.compare()`]: #buffer_buf_compare_target_targetstart_targetend_sourcestart_sourceend
2438+
[`buf.buffer`]: #buffer_buf_buffer
24322439
[`buf.entries()`]: #buffer_buf_entries
24332440
[`buf.indexOf()`]: #buffer_buf_indexof_value_byteoffset_encoding
24342441
[`buf.fill()`]: #buffer_buf_fill_value_offset_end_encoding

0 commit comments

Comments
 (0)