Skip to content
Browse files

untested .replace()

  • Loading branch information...
1 parent 048eb83 commit 6cfad80d1a941adb4b578d7f37520500850ee342 @substack substack committed Sep 29, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 index.js
View
5 index.js
@@ -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.
Something went wrong with that request. Please try again.