Skip to content

Commit

Permalink
pushed fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Marak committed May 15, 2010
1 parent b7127e4 commit 2f27c0e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/name.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var Helper = require('../helper');
var definitions = require('./definitions');
var sys = require('sys');

exports.first_name = function(){

Expand All @@ -9,17 +10,19 @@ exports.first_name = function(){
};

exports.findName = function() {
switch(Helper.randomNumber(8))
var r = Helper.randomNumber(8);
sys.puts('random is: ' + r);
switch(r)
{
case 0:
return Helper.randomize(definitions.name_prefix) + " " + Helper.randomize(definitions.first_name) + " " + Helper.randomize(definitions.last_name);
break;
case 1:
return Helper.randomize(definitions.first_name) + " " + Helper.randomize(definitions.last_name); + " " + Helper.randomize(definitions.name_suffix);
break;
case 2,3,4,5,6,7:
return Helper.randomize(definitions.first_name) + Helper.randomize(definitions.last_name);
break;
}

return Helper.randomize(definitions.first_name) + Helper.randomize(definitions.last_name);

};

0 comments on commit 2f27c0e

Please sign in to comment.