aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarak <[email protected]>2021-03-09 09:06:19 -0500
committerGitHub <[email protected]>2021-03-09 09:06:19 -0500
commit3cd9d21d24b0796c0505285ec64ce9e75f1979a8 (patch)
tree911279c1b02b92ccfde2786a684a79d9355fd9aa /lib
parentb3382c1d7a5ce6d08c372b11068092c35d5fe826 (diff)
parenteb681348d5b5ac1fcafce3eacb78995f57407447 (diff)
downloadfaker-3cd9d21d24b0796c0505285ec64ce9e75f1979a8.tar.xz
faker-3cd9d21d24b0796c0505285ec64ce9e75f1979a8.zip
Merge pull request #1127 from JasonHong1998/more-vehicles
Issue #1097: add bicycleType in the vehicle module
Diffstat (limited to 'lib')
-rw-r--r--lib/locales/en/vehicle/bicycle.js20
-rw-r--r--lib/locales/en/vehicle/index.js1
-rw-r--r--lib/vehicle.js14
3 files changed, 35 insertions, 0 deletions
diff --git a/lib/locales/en/vehicle/bicycle.js b/lib/locales/en/vehicle/bicycle.js
new file mode 100644
index 00000000..519e3525
--- /dev/null
+++ b/lib/locales/en/vehicle/bicycle.js
@@ -0,0 +1,20 @@
+module["exports"] = [
+ "Adventure Road Bicycle",
+ "BMX Bicycle",
+ "City Bicycle",
+ "Cruiser Bicycle",
+ "Cyclocross Bicycle",
+ "Dual-Sport Bicycle",
+ "Fitness Bicycle",
+ "Flat-Foot Comfort Bicycle",
+ "Folding Bicycle",
+ "Hybrid Bicycle",
+ "Mountain Bicycle",
+ "Recumbent Bicycle",
+ "Road Bicycle",
+ "Tandem Bicycle",
+ "Touring Bicycle",
+ "Track/Fixed-Gear Bicycle",
+ "Triathlon/Time Trial Bicycle",
+ "Tricycle"
+]; \ No newline at end of file
diff --git a/lib/locales/en/vehicle/index.js b/lib/locales/en/vehicle/index.js
index 73407875..4a2c8172 100644
--- a/lib/locales/en/vehicle/index.js
+++ b/lib/locales/en/vehicle/index.js
@@ -4,3 +4,4 @@ vehicle.manufacturer = require("./manufacturer");
vehicle.model = require("./model");
vehicle.type = require("./vehicle_type");
vehicle.fuel = require("./fuel");
+vehicle.bicycle = require("./bicycle"); \ No newline at end of file
diff --git a/lib/vehicle.js b/lib/vehicle.js
index 7f1ae782..125055e6 100644
--- a/lib/vehicle.js
+++ b/lib/vehicle.js
@@ -129,6 +129,20 @@ var Vehicle = function (faker) {
"description": "Generates a vehicle vrm",
"sampleResults": ["MF56UPA", "GL19AAQ", "SF20TTA"]
};
+
+ /**
+ * bicycle
+ *
+ * @method faker.vehicle.bicycle
+ */
+ self.bicycle = function () {
+ return faker.random.arrayElement(faker.definitions.vehicle.bicycle_type);
+ };
+
+ self.bicycle.schema = {
+ "description": "Generates a type of bicycle",
+ "sampleResults": ["Adventure Road Bicycle", "City Bicycle", "Recumbent Bicycle"]
+ };
};
module["exports"] = Vehicle;