From cdca0cac24fa184e4f16fbe91c24139f3935b58f Mon Sep 17 00:00:00 2001
From: Kevin Jahns
Decode an any-encoded value.
import * as cached-map from 'lib0/cache'+
new cached-map.Cache(timeout: number)
cached-map.removeStale(cache: module:cache.Cache<K, V>): number
cached-map.set(cache: module:cache.Cache<K, V>, key: K, value: V)
cached-map.get(cache: module:cache.Cache<K, V>, key: K): V | undefined
cached-map.getAsync(cache: module:cache.Cache<K, V>, key: K): V | Promise<V> | undefined
Works well in conjunktion with setIfUndefined which has an async init function. +Using getAsync & setIfUndefined ensures that the init function is only called once.
cached-map.setIfUndefined(cache: module:cache.Cache<K, V>, key: K, init: function():Promise<V>): Promise<V> | V
cached-map.create(timeout: number)
import * as component from 'lib0/component'
Note: This is basically the same function as above. Another function was created so that the runtime can better optimize these function calls.
+diff.simpleDiffStringWithCursor(a: string, b: string, cursor: number)
Diff text and try to diff at the current cursor position.
Parse JSON object.
import * as list from 'lib0/list'+
new e#ListNode()
e#next: this|null
e#prev: this|null
new st()
art: N | null
d: N | null
(): module:list.List<N>
()
(queue: module:list.List<N>)
()
ode(queue: module:list.List<N>, node: N)
Remove a single node from the queue. Only works with Queues that operate on Doubly-linked lists of nodes.
ode()
etween(queue: module:list.List<N>, left: N| null, right: N| null, node: N)
etween()
(queue: module:list.List<N>, n: N)
()
nt(queue: module:list.List<N>, n: N)
nt()
t(list: module:list.List<N>): N| null
t()
(list: module:list.List<N>): N| null
()
(list: module:list.List<N>, f: function(N):M): Array<M>
()
import * as logging from 'lib0/logging'
set.create
set.toArray(set: Set<T>): Array<T>
set.first(set: Set<T>): T
set.from(entries: Iterable<T>): Set<T>
string.utf8TextEncoder
string.encodeUtf8
string.decodeUtf8
string.splice(str: string, index: number, remove: number, insert: string)