Permalink
Browse files

minor per improvement

  • Loading branch information...
1 parent 17562fd commit 2fc0f062d33b77a613f11bf373ad84d282f0b911 @aaronpowell committed Dec 4, 2011
Showing with 5 additions and 10 deletions.
  1. +5 −10 lib/tbd.js
View
@@ -133,28 +133,23 @@
utils.sequential = function(start) {
if (start.constructor === Number) {
return function () {
- var x = start;
- start++;
- return x;
+ return start++;
};
} else if (start.constructor === String) {
var letters = 'abcdefghijklmnopqrstuvwxyz'.split('');
if (start.length === 1) {
start = letters.indexOf(start);
return function () {
- var x = start;
- start++;
- return letters[x];
+ return letters[start++];
};
} else {
var index = -1;
return function () {
- var x = index;
- index++;
- if (x === -1) {
+ if (index === -1) {
+ index++;
return start;
}
- return start + letters[x];
+ return start + letters[index++];
};
}
} else {

0 comments on commit 2fc0f06

Please sign in to comment.