Skip to content

Commit

Permalink
Buffer.slice: Added description for the case when end is greater than…
Browse files Browse the repository at this point in the history
… buffer length

Fixes nodejs#14714 - issue
  • Loading branch information
vishal7201 committed Aug 9, 2017
1 parent 7ec28a0 commit 991183c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -1907,6 +1907,9 @@ changes:
Returns a new `Buffer` that references the same memory as the original, but
offset and cropped by the `start` and `end` indices.

Specifying 'end' greater than ['buf.length'] will return the same result as that of
'end' equal to [buf.length]

*Note*: Modifying the new `Buffer` slice will modify the memory in the
original `Buffer` because the allocated memory of the two objects overlap.

Expand Down

0 comments on commit 991183c

Please sign in to comment.