Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return function(random: Random) {
let primaryColorCollection = random.pickone(colorsCollection);
let secondaryColorCollection = random.pickone(colorsCollection);
let primaryColor = new Color(primaryColorCollection[options.primaryColorLevel]);
let secondaryColor = new Color(primaryColorCollection[options.secondaryColorLevel]);
if (options.colorful) {
secondaryColor = new Color(secondaryColorCollection[options.secondaryColorLevel]);
}
let eyes = random.pickone(eyesCollection);
let face = random.pickone(faceCollection);
let mouth = random.pickone(mouthCollection);
let sides = random.pickone(sidesCollection);
let texture = random.pickone(textureCollection);
let top = random.pickone(topCollection);
// prettier-ignore
return [
'<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 180 180">',
group(random, sides(secondaryColor), options.sidesChance, 0, 66),</svg>
return function(random: Random) {
let primaryColorCollection = random.pickone(colorsCollection);
let secondaryColorCollection = random.pickone(colorsCollection);
let primaryColor = new Color(primaryColorCollection[options.primaryColorLevel]);
let secondaryColor = new Color(primaryColorCollection[options.secondaryColorLevel]);
if (options.colorful) {
secondaryColor = new Color(secondaryColorCollection[options.secondaryColorLevel]);
}
let eyes = random.pickone(eyesCollection);
let face = random.pickone(faceCollection);
let mouth = random.pickone(mouthCollection);
let sides = random.pickone(sidesCollection);
let texture = random.pickone(textureCollection);
let top = random.pickone(topCollection);
// prettier-ignore
return [
'<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 180 180">',</svg>
return function(random: Random) {
let primaryColorCollection = random.pickone(colorsCollection);
let secondaryColorCollection = random.pickone(colorsCollection);
let primaryColor = new Color(primaryColorCollection[options.primaryColorLevel]);
let secondaryColor = new Color(primaryColorCollection[options.secondaryColorLevel]);
if (options.colorful) {
secondaryColor = new Color(secondaryColorCollection[options.secondaryColorLevel]);
}
let eyes = random.pickone(eyesCollection);
let face = random.pickone(faceCollection);
let mouth = random.pickone(mouthCollection);
let sides = random.pickone(sidesCollection);
let texture = random.pickone(textureCollection);
let top = random.pickone(topCollection);
// prettier-ignore
return [
'<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 180 180">',
group(random, sides(secondaryColor), options.sidesChance, 0, 66),
group(random, top(secondaryColor), options.topChange, 41, 0),
group(random, face(primaryColor, random.bool(options.textureChance) ? texture() : undefined), 100, 25, 44),
group(random, mouth(), options.mouthChance, 52, 124),</svg>