Skip to content

Commit 06c6160

Browse files
committed
- Enhancement: Encode a portion of a buffer;
replacement for PR niklasvh#7 by relying on ES defaults
1 parent e9457cc commit 06c6160

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/base64-arraybuffer.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
lookup[chars.charCodeAt(i)] = i;
1717
}
1818

19-
exports.encode = function(arraybuffer) {
20-
var bytes = new Uint8Array(arraybuffer),
19+
exports.encode = function(arraybuffer, byteOffset, length) {
20+
var bytes = new Uint8Array(arraybuffer, byteOffset, length),
2121
i, len = bytes.length, base64 = "";
2222

2323
for (i = 0; i < len; i+=3) {

0 commit comments

Comments
 (0)