Added arraysEqual.
diff --git a/js/encoding/DataUtils.js b/js/encoding/DataUtils.js
index 1f998af..b51bf1e 100644
--- a/js/encoding/DataUtils.js
+++ b/js/encoding/DataUtils.js
@@ -372,3 +372,17 @@
return string;
}*/
+/**
+ * Return true if a1 and a2 are the same length with equal elements.
+ */
+DataUtils.arraysEqual = function(a1, a2){
+ if (a1.length != a2.length)
+ return false;
+
+ for (var i = 0; i < a1.length; ++i) {
+ if (a1[i] != a2[i])
+ return false;
+ }
+
+ return true;
+}
\ No newline at end of file