Skip to content

Commit

Permalink
untested .replace()
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Sep 29, 2011
1 parent 048eb83 commit 6cfad80
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.js
Expand Up @@ -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.