aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndy Coupe <[email protected]>2020-11-18 21:44:30 +0000
committerAndy Coupe <[email protected]>2020-11-18 21:44:30 +0000
commit0108e3deabab280f79b8d0df5488bb9b13199d01 (patch)
treef18acc83f7b6b4451204fe7cc8e654e8749ea8d3 /lib
parent91dc8a3372426bc691be56153b33e81a16459f49 (diff)
downloadfaker-0108e3deabab280f79b8d0df5488bb9b13199d01.tar.xz
faker-0108e3deabab280f79b8d0df5488bb9b13199d01.zip
add vrm and test
Diffstat (limited to 'lib')
-rw-r--r--lib/vehicle.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/vehicle.js b/lib/vehicle.js
index 8eaed13e..59b868b4 100644
--- a/lib/vehicle.js
+++ b/lib/vehicle.js
@@ -109,6 +109,25 @@ var Vehicle = function (faker) {
"description": "Generates a color",
"sampleResults": ["red", "white", "black"]
};
+
+ /**
+ * vrm
+ *
+ * @method faker.vehicle.vrm
+ */
+ self.vrm = function () {
+ return (
+ faker.random.alpha({ count: 2, upcase: true }) +
+ faker.random.number({ min: 0, max: 9 }) +
+ faker.random.number({ min: 0, max: 9 }) +
+ faker.random.alpha({ count: 3, upcase: true })
+ ).toUpperCase();
+ };
+
+ self.color.schema = {
+ "description": "Generates a vehicle vrm",
+ "sampleResults": ["MF56UPA", "GL19AAQ", "SF20TTA"]
+ };
};
module["exports"] = Vehicle;