Skip to content

Commit 6d7242b

Browse files
committed
Document defaults for buffer.copy()
1 parent a326eeb commit 6d7242b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

doc/api/buffers.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ buffer object. It does not change when the contents of the buffer are changed.
113113
// 1234
114114
// 1234
115115

116-
### buffer.copy(targetBuffer, targetStart, sourceStart, sourceEnd=buffer.length)
116+
### buffer.copy(targetBuffer, targetStart, sourceStart=0, sourceEnd=buffer.length)
117117

118118
Does a memcpy() between buffers.
119119

lib/buffer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ Buffer.prototype.toString = function (encoding, start, end) {
280280
Buffer.byteLength = SlowBuffer.byteLength;
281281

282282

283-
// copy(targetBuffer, targetStart, sourceStart, sourceEnd=buffer.length)
283+
// copy(targetBuffer, targetStart, sourceStart=0, sourceEnd=buffer.length)
284284
Buffer.prototype.copy = function copy (target, target_start, start, end) {
285285
var source = this;
286286
start || (start = 0);

0 commit comments

Comments
 (0)