aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarak <[email protected]>2020-06-10 11:49:35 -0500
committerGitHub <[email protected]>2020-06-10 11:49:35 -0500
commitad095d1544b2aba54aa41ad2a9ab2b2d1addfabb (patch)
tree646a51f93db9930e09196e56a1bb5e82e33b937a /lib
parenta4e7842235e83d1272b8398c9a99f8126c3a510a (diff)
parent34bf995ab27c504db60b14b0e3af3fd99635760a (diff)
downloadfaker-ad095d1544b2aba54aa41ad2a9ab2b2d1addfabb.tar.xz
faker-ad095d1544b2aba54aa41ad2a9ab2b2d1addfabb.zip
Merge pull request #823 from ashishra0/add-product-description
add random product description generator
Diffstat (limited to 'lib')
-rw-r--r--lib/commerce.js9
-rw-r--r--lib/index.js2
-rw-r--r--lib/locales/en/commerce/index.js1
-rw-r--r--lib/locales/en/commerce/product_description.js14
4 files changed, 25 insertions, 1 deletions
diff --git a/lib/commerce.js b/lib/commerce.js
index 79316256..6de8ffb9 100644
--- a/lib/commerce.js
+++ b/lib/commerce.js
@@ -113,6 +113,15 @@ var Commerce = function (faker) {
return faker.random.arrayElement(faker.definitions.commerce.product_name.product);
};
+ /**
+ * productDescription
+ *
+ * @method faker.commerce.productDescription
+ */
+ self.productDescription = function() {
+ return faker.random.arrayElement(faker.definitions.commerce.product_description);
+ };
+
return self;
};
diff --git a/lib/index.js b/lib/index.js
index a4e8b26a..c9c00d9c 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -107,7 +107,7 @@ function Faker (opts) {
"phone_number": ["formats"],
"finance": ["account_type", "transaction_type", "currency", "iban", "credit_card"],
"internet": ["avatar_uri", "domain_suffix", "free_email", "example_email", "password"],
- "commerce": ["color", "department", "product_name", "price", "categories"],
+ "commerce": ["color", "department", "product_name", "price", "categories", "product_description"],
"database": ["collation", "column", "engine", "type"],
"system": ["mimeTypes", "directoryPaths"],
"date": ["month", "weekday"],
diff --git a/lib/locales/en/commerce/index.js b/lib/locales/en/commerce/index.js
index c05b5272..89187f7c 100644
--- a/lib/locales/en/commerce/index.js
+++ b/lib/locales/en/commerce/index.js
@@ -3,3 +3,4 @@ module['exports'] = commerce;
commerce.color = require("./color");
commerce.department = require("./department");
commerce.product_name = require("./product_name");
+commerce.product_description = require("./product_description");
diff --git a/lib/locales/en/commerce/product_description.js b/lib/locales/en/commerce/product_description.js
new file mode 100644
index 00000000..05ab517c
--- /dev/null
+++ b/lib/locales/en/commerce/product_description.js
@@ -0,0 +1,14 @@
+module["exports"] = [
+ "Ergonomic executive chair upholstered in bonded black leather and PVC padded seat and back for all-day comfort and support",
+ "The automobile layout consists of a front-engine design, with transaxle-type transmissions mounted at the rear of the engine and four wheel drive",
+ "New ABC 13 9370, 13.3, 5th Gen CoreA5-8250U, 8GB RAM, 256GB SSD, power UHD Graphics, OS 10 Home, OS Office A & J 2016",
+ "The slim & simple Maple Gaming Keyboard from Dev Byte comes with a sleek body and 7- Color RGB LED Back-lighting for smart functionality",
+ "The Apollotech B340 is an affordable wireless mouse with reliable connectivity, 12 months battery life and modern design",
+ "The Nagasaki Lander is the trademarked name of several series of Nagasaki sport bikes, that started with the 1984 ABC800J",
+ "The Football Is Good For Training And Recreational Purposes",
+ "Carbonite web goalkeeper gloves are ergonomically designed to give easy fit",
+ "Boston's most advanced compression wear technology increases muscle oxygenation, stabilizes active muscles",
+ "New range of formal shirts are designed keeping you in mind. With fits and styling that will make you stand apart",
+ "The beautiful range of Apple Naturalé that has an exciting mix of natural ingredients. With the Goodness of 100% Natural Ingredients",
+ "Andy shoes are designed to keeping in mind durability as well as trends, the most stylish range of shoes & sandals"
+]; \ No newline at end of file