Permalink
Browse files

untested .replace()

  • Loading branch information...
substack committed Sep 29, 2011
1 parent 048eb83 commit 6cfad80d1a941adb4b578d7f37520500850ee342
Showing with 5 additions and 0 deletions.
  1. +5 −0 index.js
View
@@ -79,3 +79,8 @@ Coach.prototype.swap = function (x, y) {
this.routes[x] = ry;
this.routes[y] = rx;
};
+
+Coach.prototype.replace = function (from, to) {
+ this.routes[from] = this.routes[to];
+ delete this.routes[from];
+};

0 comments on commit 6cfad80

Please sign in to comment.