Added JavaScript conformance tests. All tests pass!
diff --git a/js/binary/utils.js b/js/binary/utils.js
index bbf99cd..3ecd08e 100644
--- a/js/binary/utils.js
+++ b/js/binary/utils.js
@@ -970,6 +970,10 @@
return /** @type {!Uint8Array} */(new Uint8Array(data));
}
+ if (data.constructor === Buffer) {
+ return /** @type {!Uint8Array} */(new Uint8Array(data));
+ }
+
if (data.constructor === Array) {
data = /** @type {!Array.<number>} */(data);
return /** @type {!Uint8Array} */(new Uint8Array(data));
diff --git a/js/message.js b/js/message.js
index 05d34e9..b769cc2 100644
--- a/js/message.js
+++ b/js/message.js
@@ -202,7 +202,7 @@
/**
- * Does this browser support Uint8Aray typed arrays?
+ * Does this JavaScript environment support Uint8Aray typed arrays?
* @type {boolean}
* @private
*/