website etc

This commit is contained in:
Rasmus Andersson 2017-09-12 23:33:08 -07:00
parent 41c4fb5160
commit bb390dd2ae
4 changed files with 51 additions and 21 deletions

View file

@ -620,7 +620,7 @@ for (const ch of uniqueChars) {
},
})
samples.set(ch + ' combinations', {
samples.set(ch + ' combinations + words', {
_cachedHTMLResult: null,
toHTML() {
if (this._cachedHTMLResult) {
@ -649,6 +649,45 @@ for (const ch of uniqueChars) {
return html
}
})
samples.set(ch + ' combinations', {
_cachedHTMLResult: null,
toHTML() {
if (this._cachedHTMLResult) {
return this._cachedHTMLResult
}
let s = []
for (const comb of combs1) {
s.push(comb)
}
let html = s.join(' ')
this._cachedHTMLResult = html
return html
}
})
samples.set(ch + ' combinations (upper case)', {
_cachedHTMLResult: null,
toHTML() {
if (this._cachedHTMLResult) {
return this._cachedHTMLResult
}
let s = []
for (const comb of combs1) {
let p = comb.indexOf(ch)
if (p == 0) {
s.push(comb[0].toUpperCase() + comb[1])
} else if (p == 1) {
s.push(comb[0] + comb[1].toUpperCase())
} else {
s.push(comb)
}
}
let html = s.join(' ')
this._cachedHTMLResult = html
return html
}
})
}