Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Override equals and compare on map item

  • Loading branch information...
commit e14cf49343cff39ef50c75e07e8942b099962f34 1 parent f03d1a6
@kriskowal authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 generic-map.js
View
8 generic-map.js
@@ -157,3 +157,11 @@ function Item(key, value) {
this.value = value;
}
+Item.prototype.equals = function (that) {
+ return Object.equals(this.key, that.key) && Object.equals(this.value, that.value);
+};
+
+Item.prototype.compare = function (that) {
+ return Object.compare(this.key, that.key);
+};
+
Please sign in to comment.
Something went wrong with that request. Please try again.