src/random_name.js
function () {
		let name = '';
		const scount = randomizer.getWeightedRandom(namedata.holmesian_scount.values, namedata.holmesian_scount.weights);
	
		for (let i = 1; i <= scount; i++) {
			name += randomizer.rollRandom(namedata.holmesian_syllables); // array
			if (i < scount) {
				name += randomizer.getWeightedRandom(['', ' ', '-'], [3, 2, 2]);
			}
		}
		name = name.toLowerCase() + ' ' + randomizer.rollRandom(namedata.holmesian_title);
		
		name = randomizer.findToken(name);
		
		name = name.replace(/[\s\-]([a-z]{1})/g, (match) => {
			return match.toUpperCase();
		});
		return name;
	}
function () {
		let name = '';
		const scount = randomizer.getWeightedRandom(namedata.holmesian_scount.values, namedata.holmesian_scount.weights);
	
		for (let i = 1; i <= scount; i++) {
			name += randomizer.rollRandom(namedata.holmesian_syllables); // array
			if (i < scount) {
				name += randomizer.getWeightedRandom(['', ' ', '-'], [3, 2, 2]);
			}
		}
		name = name.toLowerCase() + ' ' + randomizer.rollRandom(namedata.holmesian_title);
		
		name = randomizer.findToken(name);
		
		name = name.replace(/[\s\-]([a-z]{1})/g, (match) => {
			return match.toUpperCase();
		});
		return name;
	}
function ( ) { let name = '' ; const scount = randomizer . getWeightedRandom ( namedata . holmesian_scount . values , namedata . holmesian_scount . weights ) ; for ( let i = 1 ; i <= scount ; i ++ ) { name += randomizer . rollRandom ( namedata . holmesian_syllables ) ; // array if ( i < scount ) { name += randomizer . getWeightedRandom ( [ '' , ' ' , '-' ] , [ 3 , 2 , 2 ] ) ; } } name = name . toLowerCase ( ) + ' ' + randomizer . rollRandom ( namedata . holmesian_title ) ; name = randomizer . findToken ( name ) ; name = name . replace ( / [\s\-]([a-z]{1}) / g , ( match ) => { return match . toUpperCase ( ) ; } ) ; return name ; }
Generate a Holmes name
@returns {String} name
Generate a Holmes name