From 6d7242b4851ca87944cbb6bbae3aab733f1e5cae Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 29 Nov 2010 19:52:47 -0800 Subject: [PATCH] Document defaults for buffer.copy() --- doc/api/buffers.markdown | 2 +- lib/buffer.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/buffers.markdown b/doc/api/buffers.markdown index 782f601594..37e7ffc72c 100644 --- a/doc/api/buffers.markdown +++ b/doc/api/buffers.markdown @@ -113,7 +113,7 @@ buffer object. It does not change when the contents of the buffer are changed. // 1234 // 1234 -### buffer.copy(targetBuffer, targetStart, sourceStart, sourceEnd=buffer.length) +### buffer.copy(targetBuffer, targetStart, sourceStart=0, sourceEnd=buffer.length) Does a memcpy() between buffers. diff --git a/lib/buffer.js b/lib/buffer.js index b777bf0725..7418aad458 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -280,7 +280,7 @@ Buffer.prototype.toString = function (encoding, start, end) { Buffer.byteLength = SlowBuffer.byteLength; -// copy(targetBuffer, targetStart, sourceStart, sourceEnd=buffer.length) +// copy(targetBuffer, targetStart, sourceStart=0, sourceEnd=buffer.length) Buffer.prototype.copy = function copy (target, target_start, start, end) { var source = this; start || (start = 0);