jxdnsong
2020-10-23 a7929e6b3ec9ac17233f39e55a2b8ac63ea75f42
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
define([
    './stateData'
], function (stateData) {
 
    var states = stateData.items;
    function getRandomStateAbbreviation() {
        return states[Math.floor(Math.random() * states.length)].abbreviation;
    }
 
    var typesData = [];
    for (var i = 0; i < 12; i++) {
        typesData.push({
            id: i,
            integer: Math.floor(Math.random() * 100),
            floatNum: Math.random() * 100,
            date: new Date(new Date().getTime() * Math.random() * 2),
            date2: new Date(new Date().getTime() - Math.random() * 1000000000),
            text: 'A number in text ' + Math.random(),
            text2: 'A number in text ' + Math.random(),
            bool: Math.random() > 0.5,
            bool2: Math.random() > 0.5,
            state: getRandomStateAbbreviation(),
            state2: getRandomStateAbbreviation()
        });
    }
 
    return { items: typesData };
});