summaryrefslogtreecommitdiff
path: root/lib/buffer.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/buffer.js')
-rw-r--r--lib/buffer.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/buffer.js b/lib/buffer.js
index ef46482151..e58a34b67e 100644
--- a/lib/buffer.js
+++ b/lib/buffer.js
@@ -42,6 +42,9 @@ Buffer.prototype.toString = function (encoding, start, stop) {
case 'binary':
return this.binarySlice(start, stop);
+ case 'base64':
+ return this.base64Slice(start, stop);
+
default:
throw new Error('Unknown encoding');
}