@@ -203,6 +203,20 @@ See encoding.writeAny for more information.</p></dd>
203203<dd ><p >Decode an any-encoded value.</p ></dd >
204204</dl >
205205</details >
206+ <details ><summary ><b >[lib0/cached-map]</b > An implementation of a map which has keys that expire.</summary >
207+ <pre >import * as cached-map from 'lib0/cache'</pre >
208+ <dl >
209+ <b ><code >new cached-map.Cache(timeout: number)</code ></b ><br >
210+ <b ><code >cached-map.removeStale(cache: module: cache .Cache< ; K, V> ; ): number</code ></b ><br >
211+ <b ><code >cached-map.set(cache: module: cache .Cache< ; K, V> ; , key: K, value: V)</code ></b ><br >
212+ <b ><code >cached-map.get(cache: module: cache .Cache< ; K, V> ; , key: K): V | undefined</code ></b ><br >
213+ <b ><code >cached-map.getAsync(cache: module: cache .Cache< ; K, V> ; , key: K): V | Promise< ; V> ; | undefined</code ></b ><br >
214+ <dd ><p >Works well in conjunktion with setIfUndefined which has an async init function.
215+ Using getAsync & ; setIfUndefined ensures that the init function is only called once.</p ></dd >
216+ <b ><code >cached-map.setIfUndefined(cache: module: cache .Cache< ; K, V> ; , key: K, init: function(): Promise < ; V> ; ): Promise< ; V> ; | V</code ></b ><br >
217+ <b ><code >cached-map.create(timeout: number)</code ></b ><br >
218+ </dl >
219+ </details >
206220<details ><summary ><b >[lib0/component]</b > Web components.</summary >
207221<pre >import * as component from 'lib0/component'</pre >
208222<dl >
@@ -387,6 +401,8 @@ efficient, but not very sophisticated.</p></dd>
387401efficient, but not very sophisticated.</p >
388402<p >Note: This is basically the same function as above. Another function was created so that the runtime
389403can better optimize these function calls.</p ></dd >
404+ <b ><code >diff.simpleDiffStringWithCursor(a: string, b: string, cursor: number)</code ></b ><br >
405+ <dd ><p >Diff text and try to diff at the current cursor position.</p ></dd >
390406</dl >
391407</details >
392408<details ><summary ><b >[lib0/dom]</b > Utility module to work with the DOM.</summary >
@@ -787,6 +803,36 @@ In practice, when decoding several million small strings, the GC will kick in mo
787803<dd ><p >Parse JSON object.</p ></dd >
788804</dl >
789805</details >
806+ <details ><summary ><b >[lib0/list]</b > </summary >
807+ <pre >import * as list from 'lib0/list'</pre >
808+ <dl >
809+ <b ><code >new e#ListNode()</code ></b ><br >
810+ <b ><code >e#next: this|null</code ></b ><br >
811+ <b ><code >e#prev: this|null</code ></b ><br >
812+ <b ><code >new st()</code ></b ><br >
813+ <b ><code >art: N | null</code ></b ><br >
814+ <b ><code >d: N | null</code ></b ><br >
815+ <b ><code >(): module: list .List< ; N> ; </code ></b ><br >
816+ <b ><code >()</code ></b ><br >
817+ <b ><code >(queue: module: list .List< ; N> ; )</code ></b ><br >
818+ <b ><code >()</code ></b ><br >
819+ <b ><code >ode(queue: module: list .List< ; N> ; , node: N)</code ></b ><br >
820+ <dd ><p >Remove a single node from the queue. Only works with Queues that operate on Doubly-linked lists of nodes.</p ></dd >
821+ <b ><code >ode()</code ></b ><br >
822+ <b ><code >etween(queue: module: list .List< ; N> ; , left: N| null, right: N| null, node: N)</code ></b ><br >
823+ <b ><code >etween()</code ></b ><br >
824+ <b ><code >(queue: module: list .List< ; N> ; , n: N)</code ></b ><br >
825+ <b ><code >()</code ></b ><br >
826+ <b ><code >nt(queue: module: list .List< ; N> ; , n: N)</code ></b ><br >
827+ <b ><code >nt()</code ></b ><br >
828+ <b ><code >t(list: module: list .List< ; N> ; ): N| null</code ></b ><br >
829+ <b ><code >t()</code ></b ><br >
830+ <b ><code >(list: module: list .List< ; N> ; ): N| null</code ></b ><br >
831+ <b ><code >()</code ></b ><br >
832+ <b ><code >(list: module: list .List< ; N> ; , f: function(N): M ): Array< ; M> ; </code ></b ><br >
833+ <b ><code >()</code ></b ><br >
834+ </dl >
835+ </details >
790836<details ><summary ><b >[lib0/logging]</b > Isomorphic logging module with support for colors!</summary >
791837<pre >import * as logging from 'lib0/logging'</pre >
792838<dl >
@@ -1058,6 +1104,8 @@ library has some insane environment where global Promise objects are overwritten
10581104<dl >
10591105<b ><code >set.create</code ></b ><br >
10601106<b ><code >set.toArray(set: Set< ; T> ; ): Array< ; T> ; </code ></b ><br >
1107+ <b ><code >set.first(set: Set< ; T> ; ): T</code ></b ><br >
1108+ <b ><code >set.from(entries: Iterable< ; T> ; ): Set< ; T> ; </code ></b ><br >
10611109</dl >
10621110</details >
10631111<details ><summary ><b >[lib0/sort]</b > Efficient sort implementations.</summary >
@@ -1104,6 +1152,7 @@ integrate this algorithm.</p>
11041152<b ><code >string.utf8TextEncoder</code ></b ><br >
11051153<b ><code >string.encodeUtf8</code ></b ><br >
11061154<b ><code >string.decodeUtf8</code ></b ><br >
1155+ <b ><code >string.splice(str: string, index: number, remove: number, insert: string)</code ></b ><br >
11071156</dl >
11081157</details >
11091158<details ><summary ><b >[lib0/symbol]</b > Utility module to work with EcmaScript Symbols.</summary >
0 commit comments