From 7d3f14f17a891cc9ef83b33ca47dc8ba83604e54 Mon Sep 17 00:00:00 2001 From: Adam Meily Date: Wed, 24 Aug 2016 13:19:07 -0400 Subject: [PATCH] add support for sending Uint8Array objects --- lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index ea67db9..3c1e04c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -192,7 +192,7 @@ function OutBatch() { } OutBatch.prototype.append = function (buf, flags, cb) { - if (!Buffer.isBuffer(buf)) { + if (!Buffer.isBuffer(buf) && !(Uint8Array && buf instanceof Uint8Array)) { buf = new Buffer(String(buf), 'utf8'); }