Page MenuHomeDevCentral

No OneTemporary

diff --git a/app.js b/app.js
index df7f4f7..98f369f 100644
--- a/app.js
+++ b/app.js
@@ -1,90 +1,90 @@
/**
* Corporate name generator
*/
var corp = {
words: [
"cloud",
"tech",
"park",
"pole",
"section",
"sector",
"start",
"over",
"grey",
"infrared",
"forge",
"wolf",
"woods",
"aegis",
"flux",
"hyper",
"tribal",
"up",
"life",
"play",
"drake",
"river",
"pool",
"real",
"access",
"horizon",
"frequencies",
"center",
"forcefield",
"point",
"zone",
"area",
"blue",
"black",
"space",
],
suffixes: [
"services",
"solutions",
"universal",
"consulting",
"provider",
"core",
"network",
"integrated"
],
- // Determins how often suffixes shold be used
+ // Determines how often suffixes should be used
suffixesWeight: 0.4,
// Determines how often use three words
threeWordsWeight: 0.1,
pickOneAmongst: function (items) {
var indice = Math.floor(Math.random() * items.length);
return items[indice];
},
shouldUse: function (weight) {
return Math.random() < weight;
},
compose: function () {
var words = [
this.pickOneAmongst(this.words),
this.pickOneAmongst(this.words),
];
if (this.shouldUse(this.threeWordsWeight)) {
words.push(this.pickOneAmongst(this.words));
}
if (this.shouldUse(this.suffixesWeight)) {
words.push(this.pickOneAmongst(this.suffixes));
}
return words;
},
generateName: function () {
return this.compose().join(" ");
},
}
$("#content").html(corp.generateName());

File Metadata

Mime Type
text/x-diff
Expires
Tue, Jan 28, 08:21 (5 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2380177
Default Alt Text
(1 KB)

Event Timeline