aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCliff Pyles <[email protected]>2015-12-12 18:02:11 -0500
committerMarak <[email protected]>2016-02-08 16:50:51 +0530
commitf8b2d388364cbfe544cc1fc3c390ff736ad7ac03 (patch)
tree0c8ff0be22c6d144379670ecf9571084c40df859 /lib
parentc693520a1277637bee82ea841135a9afc55d078b (diff)
downloadfaker-f8b2d388364cbfe544cc1fc3c390ff736ad7ac03.tar.xz
faker-f8b2d388364cbfe544cc1fc3c390ff736ad7ac03.zip
adding schema for internet.userName
Diffstat (limited to 'lib')
-rw-r--r--lib/internet.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/internet.js b/lib/internet.js
index 80b647fc..d2365b95 100644
--- a/lib/internet.js
+++ b/lib/internet.js
@@ -54,6 +54,29 @@ var Internet = function (faker) {
return result;
};
+ self.userName.schema = {
+ "description": "Generates a username based on one of several patterns. The pattern is chosen randomly.",
+ "sampleResults": [
+ "Kirstin39",
+ "Kirstin.Smith",
+ "Kirstin.Smith39",
+ "KirstinSmith",
+ "KirstinSmith39",
+ ],
+ "properties": {
+ "firstName": {
+ "type": "string",
+ "required": false,
+ "description": "The first name of the user"
+ },
+ "lastName": {
+ "type": "string",
+ "required": false,
+ "description": "The last name of the user"
+ }
+ }
+ };
+
self.protocol = function () {
var protocols = ['http','https'];
return faker.random.arrayElement(protocols);