From 991183c13f3d68213def8924d98674f4a42fdc7a Mon Sep 17 00:00:00 2001 From: vishal7201 Date: Thu, 10 Aug 2017 01:46:14 +0530 Subject: [PATCH 1/4] Buffer.slice: Added description for the case when end is greater than buffer length Fixes #14714 - issue --- doc/api/buffer.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index f8681c6be8e28e..2f8d883fe1a421 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -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. From bd350f75c3f43a8c61e992dbfbfcb3f286292306 Mon Sep 17 00:00:00 2001 From: Vishal Bisht Date: Thu, 10 Aug 2017 09:22:18 +0530 Subject: [PATCH 2/4] Update buffer.md --- doc/api/buffer.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 2f8d883fe1a421..88d38cb0d12d02 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -1907,8 +1907,8 @@ 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] +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. From 3767aa239cd73ee1f4507d3756e48abe994093f6 Mon Sep 17 00:00:00 2001 From: Vishal Bisht Date: Thu, 10 Aug 2017 09:45:30 +0530 Subject: [PATCH 3/4] markdown corrected in Buffer.slice() --- doc/api/buffer.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 88d38cb0d12d02..c36b4f562ad6ff 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -1907,8 +1907,8 @@ 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`] +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. From 65053236109e86c3e4f1e1b379cb69d6a15c9bf3 Mon Sep 17 00:00:00 2001 From: Vishal Bisht Date: Thu, 10 Aug 2017 17:33:55 +0530 Subject: [PATCH 4/4] full stop added in buf.slice([start[, end]]) Missing full stop added in for paragraph describing buf.slice([start[, end]]) --- doc/api/buffer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index c36b4f562ad6ff..4f5cc304db6bd6 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -1908,7 +1908,7 @@ 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`] +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.