diff options
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 + } + }) } |