example/generateSampleData.js
function() {
        var firstName = Math.round((firstNames.length - 1) * randomFunc());
        var lastName = Math.round((lastNames.length - 1) * randomFunc());
        var pets = Math.round(10 * randomFunc());
        var birthyear = 1900 + Math.round(randomFunc() * 114);
        var birthmonth = Math.round(randomFunc() * 11);
        var birthday = Math.round(randomFunc() * 29);
        var birthstate = Math.round(randomFunc() * 49);
        var residencestate = Math.round(randomFunc() * 49);
        var travel = randomFunc() * 1000;
        var income = randomFunc() * 100000;
        var employed = Math.round(randomFunc());
        var person = {
            last_name: lastNames[lastName],
            //jshint ignore:line
            first_name: firstNames[firstName],
            //jshint ignore:line
            pets: pets,
            birthDate: birthyear + '-' + months[birthmonth] + '-' + days[birthday],
            birthState: states[birthstate],
            residenceState: states[residencestate],
            employed: employed === 1,
            income: income,
            travel: travel
        };
        return person;
    }
function() {
        var firstName = Math.round((firstNames.length - 1) * randomFunc());
        var lastName = Math.round((lastNames.length - 1) * randomFunc());
        var pets = Math.round(10 * randomFunc());
        var birthyear = 1900 + Math.round(randomFunc() * 114);
        var birthmonth = Math.round(randomFunc() * 11);
        var birthday = Math.round(randomFunc() * 29);
        var birthstate = Math.round(randomFunc() * 49);
        var residencestate = Math.round(randomFunc() * 49);
        var travel = randomFunc() * 1000;
        var income = randomFunc() * 100000;
        var employed = Math.round(randomFunc());
        var person = {
            last_name: lastNames[lastName],
            //jshint ignore:line
            first_name: firstNames[firstName],
            //jshint ignore:line
            pets: pets,
            birthDate: birthyear + '-' + months[birthmonth] + '-' + days[birthday],
            birthState: states[birthstate],
            residenceState: states[residencestate],
            employed: employed === 1,
            income: income,
            travel: travel
        };
        return person;
    }
function ( ) { var firstName = Math . round ( ( firstNames . length - 1 ) * randomFunc ( ) ) ; var lastName = Math . round ( ( lastNames . length - 1 ) * randomFunc ( ) ) ; var pets = Math . round ( 10 * randomFunc ( ) ) ; var birthyear = 1900 + Math . round ( randomFunc ( ) * 114 ) ; var birthmonth = Math . round ( randomFunc ( ) * 11 ) ; var birthday = Math . round ( randomFunc ( ) * 29 ) ; var birthstate = Math . round ( randomFunc ( ) * 49 ) ; var residencestate = Math . round ( randomFunc ( ) * 49 ) ; var travel = randomFunc ( ) * 1000 ; var income = randomFunc ( ) * 100000 ; var employed = Math . round ( randomFunc ( ) ) ; var person = { last_name : lastNames [ lastName ] , //jshint ignore:line first_name : firstNames [ firstName ] , //jshint ignore:line pets : pets , birthDate : birthyear + '-' + months [ birthmonth ] + '-' + days [ birthday ] , birthState : states [ birthstate ] , residenceState : states [ residencestate ] , employed : employed === 1 , income : income , travel : travel } ; return person ; }
var randomFunc = rnd;
var randomFunc = rnd ;