aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Bergman <[email protected]>2010-05-15 01:47:27 -0400
committerMatthew Bergman <[email protected]>2010-05-15 01:47:27 -0400
commitc5abfe4ae7b288a3293e1dec02895995935048f8 (patch)
treef9f899ae121cd1c7aa353955e6519b1c6a21e891
parent60b882a8c50994a2f2a2d778c2dc6fe50a5d585d (diff)
downloadfaker-c5abfe4ae7b288a3293e1dec02895995935048f8.tar.xz
faker-c5abfe4ae7b288a3293e1dec02895995935048f8.zip
few more functions added to address
-rw-r--r--index.js5
-rw-r--r--lib/address.js9
-rw-r--r--lib/company.js4
-rw-r--r--lib/internet.js8
4 files changed, 22 insertions, 4 deletions
diff --git a/index.js b/index.js
index 10b4ffc3..0a80bda4 100644
--- a/index.js
+++ b/index.js
@@ -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()));
diff --git a/lib/address.js b/lib/address.js
index 629750b1..f33105e2 100644
--- a/lib/address.js
+++ b/lib/address.js
@@ -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);
+}; \ No newline at end of file
diff --git a/lib/company.js b/lib/company.js
index a9437879..3cd31594 100644
--- a/lib/company.js
+++ b/lib/company.js
@@ -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);
}; \ No newline at end of file
diff --git a/lib/internet.js b/lib/internet.js
index 1e59d2d3..9e7a8539 100644
--- a/lib/internet.js
+++ b/lib/internet.js
@@ -18,5 +18,9 @@ exports.userName = function() {
};
exports.domainName = function() {
- Helper.randomize(definitions.catch_phrase_adjective) + "." + Helper.randomize(definitions.domain_suffix);
-}; \ No newline at end of file
+ return this.domainWord() + "." + Helper.randomize(definitions.domain_suffix);
+};
+
+exports.domainWord = function() {
+ return Helper.randomize(definitions.first_name).toLowerCase();
+} \ No newline at end of file