diff options
author | Rasmus Andersson <rasmus@notion.se> | 2017-09-13 09:33:08 +0300 |
---|---|---|
committer | Rasmus Andersson <rasmus@notion.se> | 2017-09-13 09:33:08 +0300 |
commit | bb390dd2ae73c35af84ff8f8bd75172a37aa9063 (patch) | |
tree | 17c8988ce4dc4e6660831ac4aa1e6f4c36b771f1 /docs/lab/index.html | |
parent | 41c4fb51609725a01684ee6bab9dc9007fac99e0 (diff) | |
download | inter-bb390dd2ae73c35af84ff8f8bd75172a37aa9063.tar.xz |
website etc
Diffstat (limited to 'docs/lab/index.html')
-rw-r--r-- | docs/lab/index.html | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/docs/lab/index.html b/docs/lab/index.html index f7479b2f4..4602bf9af 100644 --- a/docs/lab/index.html +++ b/docs/lab/index.html @@ -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 + } + }) } |