We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4189700 commit 32b50fbCopy full SHA for 32b50fb
examples/semi_random_users.coffee
@@ -0,0 +1,26 @@
1
+random = require '../lib/RandomData'
2
+
3
+randomUser = (n) ->
4
+ login: "user#{n}"
5
+ password: "password#{n}"
6
+ first_name: random.firstName()
7
+ middle_initial: random.middleInitial()
8
+ last_name: random.lastName()
9
+ address_line_1: random.addressLine1()
10
+ address_line_2: random.addressLine2()
11
+ city: random.city()
12
+ state: random.usStateName()
13
+ zip: random.usZipLong()
14
+ home_phone: random.usPhone()
15
+ cell_phone: random.usPhone()
16
17
+if process.argv.length != 3
18
+ console.log "random_users.coffee: Generate random user data."
19
+ console.log "Usage: coffee [ NUM_USERS ]"
20
+ process.exit 1
21
22
+num_users = (Number) process.argv[2]
23
24
+users = (randomUser(i) for i in [1..num_users])
25
+console.log users
26
0 commit comments