Skip to content

Commit

Permalink
few more functions added to address
Browse files Browse the repository at this point in the history
  • Loading branch information
FotoVerite committed May 15, 2010
1 parent 60b882a commit c5abfe4
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@ sys.puts(JSON.stringify(Faker.Address.city()));
sys.puts(JSON.stringify(Faker.Address.streetName()));
sys.puts(JSON.stringify(Faker.Address.streetAddress()));
sys.puts(JSON.stringify(Faker.Address.streetAddress(true)));
sys.puts(JSON.stringify(Faker.Address.ukCountry()));
sys.puts(JSON.stringify(Faker.Address.ukCounty()));
sys.puts(JSON.stringify(Faker.PhoneNumber.phoneNumber()));
sys.puts(JSON.stringify(Faker.Internet.userName()));
sys.puts(JSON.stringify(Faker.Internet.email()));
sys.puts(JSON.stringify(Faker.Internet.domainName()));
sys.puts(JSON.stringify(Faker.Company.companyName()));
sys.puts(JSON.stringify(Faker.Company.catchPhrase()));
sys.puts(JSON.stringify(Faker.Company.bs()));



9 changes: 9 additions & 0 deletions lib/address.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,12 @@ exports.secondaryAddress = function() {
)
);
};


exports.ukCounty = function(){
return Helper.randomize(definitions.uk_county);
};

exports.ukCountry = function(){
return Helper.randomize(definitions.uk_country);
};
4 changes: 2 additions & 2 deletions lib/company.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ exports.companySuffix = function() {
};

exports.catchPhrase = function() {
Helper.randomize(definition.catch_phrase_adjective) + " " + Helper.randomize(definitions.catch_phrase_descriptor) + " "+ Helper.randomize(definitions.catch_phrase_noun);
return Helper.randomize(definitions.catch_phrase_adjective) + " " + Helper.randomize(definitions.catch_phrase_descriptor) + " "+ Helper.randomize(definitions.catch_phrase_noun);
};

exports.bs = function() {
Helper.randomize(definition.bs_adjective) + " " + Helper.randomize(definitions.bs_descriptor) + " "+ Helper.randomize(definitions.bs_noun);
return Helper.randomize(definitions.bs_adjective) + " " + Helper.randomize(definitions.bs_buzz) + " "+ Helper.randomize(definitions.bs_noun);
};
8 changes: 6 additions & 2 deletions lib/internet.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,9 @@ exports.userName = function() {
};

exports.domainName = function() {
Helper.randomize(definitions.catch_phrase_adjective) + "." + Helper.randomize(definitions.domain_suffix);
};
return this.domainWord() + "." + Helper.randomize(definitions.domain_suffix);
};

exports.domainWord = function() {
return Helper.randomize(definitions.first_name).toLowerCase();
}

0 comments on commit c5abfe4

Please sign in to comment.