Skip to content

Commit dd0ec6f

Browse files
committed
v6.1.0-beta.3
1 parent 9dead73 commit dd0ec6f

136 files changed

Lines changed: 996 additions & 6084 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

coverage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"tests":7066,"assertions":32747,"lines":{"total":2300,"covered":2300,"skipped":0,"pct":100},"statements":{"total":2484,"covered":2484,"skipped":0,"pct":100},"functions":{"total":990,"covered":990,"skipped":0,"pct":100},"branches":{"total":858,"covered":858,"skipped":0,"pct":100},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":100}}
1+
{"tests":7069,"assertions":32756,"lines":{"total":2300,"covered":2300,"skipped":0,"pct":100},"statements":{"total":2484,"covered":2484,"skipped":0,"pct":100},"functions":{"total":990,"covered":990,"skipped":0,"pct":100},"branches":{"total":857,"covered":857,"skipped":0,"pct":100},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":100}}

docs/api/all.html

Lines changed: 6 additions & 3 deletions
Large diffs are not rendered by default.

docs/api/mergeable-store/functions/creation/createmergeablestore/article.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
<nav><ul><li><a href="/">TinyBase</a></li><li><a href="/api/">API</a></li><li><a href="/api/mergeable-store/"><code>mergeable-store</code></a></li><li><a href="/api/mergeable-store/functions/">Functions</a></li><li><a href="/api/mergeable-store/functions/creation/createmergeablestore/"><code>createMergeableStore</code></a></li></ul></nav><section class="s1" id="/api/mergeable-store/functions/creation/createmergeablestore/" data-id="cMS"><h1><code>createMergeableStore</code></h1><p>The <code>createMergeableStore</code> function creates a <a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/"><code>MergeableStore</code></a>, and is the main entry point into the <a href="/api/mergeable-store/"><code>mergeable-store</code></a> module.</p><pre><code><span class="function"><a href="/api/mergeable-store/functions/creation/createmergeablestore/">createMergeableStore</a></span><span class="punctuation">(</span>uniqueId<span class="operator">?</span><span class="operator">:</span> <span class="builtin">string</span><span class="punctuation">)</span><span class="operator">:</span> <span class="type"><a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/">MergeableStore</a></span></code></pre><div class="table"><table><tr><th></th><th>Type</th><th>Description</th></tr><tr><th><code>uniqueId<span class="operator">?</span></code></th><td><code><span class="builtin">string</span></code></td><td></td></tr><tr><th class="right">returns</th><td><code><span class="type"><a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/">MergeableStore</a></span></code></td><td><p></p><p>A reference to the new <a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/"><code>MergeableStore</code></a>.</p><p></p></td></tr></table></div><p>There is one optional parameter which is a uniqueId for the <a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/"><code>MergeableStore</code></a>. This is used to distinguish conflicting changes made in the same millisecond by two different <a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/"><code>MergeableStore</code></a> objects as its hash is added to the end of the HLC timestamps. Generally this can be omitted unless you have a need for deterministic HLCs, such as in a testing scenario. Otherwise, TinyBase will assign a unique <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a> to the <a href="/api/store/interfaces/store/store/"><code>Store</code></a> at the time of creation.</p><section class="s2"><h2>Examples</h2><p>This example creates a <a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/"><code>MergeableStore</code></a>.</p><pre><code><span class="keyword">import</span> <span class="punctuation">{</span>createMergeableStore<span class="punctuation">}</span> <span class="keyword">from</span> <span class="string">'tinybase'</span><span class="punctuation">;</span>
1+
<nav><ul><li><a href="/">TinyBase</a></li><li><a href="/api/">API</a></li><li><a href="/api/mergeable-store/"><code>mergeable-store</code></a></li><li><a href="/api/mergeable-store/functions/">Functions</a></li><li><a href="/api/mergeable-store/functions/creation/createmergeablestore/"><code>createMergeableStore</code></a></li></ul></nav><section class="s1" id="/api/mergeable-store/functions/creation/createmergeablestore/" data-id="cMS"><h1><code>createMergeableStore</code></h1><p>The <code>createMergeableStore</code> function creates a <a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/"><code>MergeableStore</code></a>, and is the main entry point into the <a href="/api/mergeable-store/"><code>mergeable-store</code></a> module.</p><pre><code><span class="function"><a href="/api/mergeable-store/functions/creation/createmergeablestore/">createMergeableStore</a></span><span class="punctuation">(</span>
2+
uniqueId<span class="operator">?</span><span class="operator">:</span> <span class="builtin">string</span><span class="punctuation">,</span>
3+
getNow<span class="operator">?</span><span class="operator">:</span> <span class="type"><a href="/api/mergeable-store/type-aliases/stamps/getnow/">GetNow</a></span><span class="punctuation">,</span>
4+
<span class="punctuation">)</span><span class="operator">:</span> <span class="type"><a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/">MergeableStore</a></span></code></pre><div class="table"><table><tr><th></th><th>Type</th><th>Description</th></tr><tr><th><code>uniqueId<span class="operator">?</span></code></th><td><code><span class="builtin">string</span></code></td><td><p>An optional unique <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a> for the <a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/"><code>MergeableStore</code></a>.</p></td></tr><tr><th><code>getNow<span class="operator">?</span></code></th><td><code><span class="type"><a href="/api/mergeable-store/type-aliases/stamps/getnow/">GetNow</a></span></code></td><td><p>An optional function that generates millisecond timestamps, since v6.1.0.</p></td></tr><tr><th class="right">returns</th><td><code><span class="type"><a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/">MergeableStore</a></span></code></td><td><p></p><p>A reference to the new <a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/"><code>MergeableStore</code></a>.</p><p></p></td></tr></table></div><p>There are two optional parameters which are only for testing and advanced usage.</p><p>The first is a uniqueId for the <a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/"><code>MergeableStore</code></a>, used to distinguish conflicting changes made in the same millisecond by two different <a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/"><code>MergeableStore</code></a> objects as its hash is added to the end of the HLC timestamps. Generally this can be omitted unless you have a need for deterministic HLCs, such as in a testing scenario. Otherwise, TinyBase will assign a unique <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a> to the <a href="/api/store/interfaces/store/store/"><code>Store</code></a> at the time of creation.</p><p>Since v6.1.0, the second is a function that can be used to replace the way the timestamp is generated for HLCs (by default JavaScript&#x27;s <code>Date.now()</code> method).</p><section class="s2"><h2>Examples</h2><p>This example creates a <a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/"><code>MergeableStore</code></a>.</p><pre><code><span class="keyword">import</span> <span class="punctuation">{</span>createMergeableStore<span class="punctuation">}</span> <span class="keyword">from</span> <span class="string">'tinybase'</span><span class="punctuation">;</span>
25

36
<span class="keyword">const</span> store <span class="operator">=</span> <span class="function"><a href="/api/mergeable-store/functions/creation/createmergeablestore/">createMergeableStore</a></span><span class="punctuation">(</span><span class="string">'store1'</span><span class="punctuation">)</span><span class="punctuation">;</span>
47

docs/api/mergeable-store/functions/creation/createmergeablestore/index.html

Lines changed: 4 additions & 1 deletion
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<nav><ul><li><a href="/">TinyBase</a></li><li><a href="/api/">API</a></li><li><a href="/api/mergeable-store/"><code>mergeable-store</code></a></li><li><a href="/api/mergeable-store/type-aliases/">Type Aliases</a></li></ul></nav><section class="s1" id="/api/mergeable-store/type-aliases/" data-id="m/TA9"><h1>Type Aliases</h1><section class="s2" id="/api/mergeable-store/type-aliases/mergeable/" data-id="m/TA9/M4"><h2>Mergeable type aliases</h2><ul><li><a href="/api/mergeable-store/type-aliases/mergeable/mergeablechanges/"><code>MergeableChanges</code></a></li><li><a href="/api/mergeable-store/type-aliases/mergeable/mergeablecontent/"><code>MergeableContent</code></a></li></ul></section><section class="s2" id="/api/mergeable-store/type-aliases/stamps/" data-id="m/TA9/S10"><h2>Stamps type aliases</h2><ul><li><a href="/api/mergeable-store/type-aliases/stamps/tablesstamp/"><code>TablesStamp</code></a></li><li><a href="/api/mergeable-store/type-aliases/stamps/tablestamp/"><code>TableStamp</code></a></li><li><a href="/api/mergeable-store/type-aliases/stamps/rowstamp/"><code>RowStamp</code></a></li><li><a href="/api/mergeable-store/type-aliases/stamps/cellstamp/"><code>CellStamp</code></a></li><li><a href="/api/mergeable-store/type-aliases/stamps/valuesstamp/"><code>ValuesStamp</code></a></li><li><a href="/api/mergeable-store/type-aliases/stamps/valuestamp/"><code>ValueStamp</code></a></li><li><a href="/api/mergeable-store/type-aliases/stamps/hash/"><code>Hash</code></a></li><li><a href="/api/mergeable-store/type-aliases/stamps/stamp/"><code>Stamp</code></a></li><li><a href="/api/mergeable-store/type-aliases/stamps/time/"><code>Time</code></a></li></ul></section><section class="s2" id="/api/mergeable-store/type-aliases/syncing/" data-id="m/TA9/S12"><h2>Syncing type aliases</h2><ul><li><a href="/api/mergeable-store/type-aliases/syncing/tablehashes/"><code>TableHashes</code></a></li><li><a href="/api/mergeable-store/type-aliases/syncing/rowhashes/"><code>RowHashes</code></a></li><li><a href="/api/mergeable-store/type-aliases/syncing/cellhashes/"><code>CellHashes</code></a></li><li><a href="/api/mergeable-store/type-aliases/syncing/valuehashes/"><code>ValueHashes</code></a></li><li><a href="/api/mergeable-store/type-aliases/syncing/contenthashes/"><code>ContentHashes</code></a></li></ul></section></section>
1+
<nav><ul><li><a href="/">TinyBase</a></li><li><a href="/api/">API</a></li><li><a href="/api/mergeable-store/"><code>mergeable-store</code></a></li><li><a href="/api/mergeable-store/type-aliases/">Type Aliases</a></li></ul></nav><section class="s1" id="/api/mergeable-store/type-aliases/" data-id="m/TA9"><h1>Type Aliases</h1><section class="s2" id="/api/mergeable-store/type-aliases/mergeable/" data-id="m/TA9/M4"><h2>Mergeable type aliases</h2><ul><li><a href="/api/mergeable-store/type-aliases/mergeable/mergeablechanges/"><code>MergeableChanges</code></a></li><li><a href="/api/mergeable-store/type-aliases/mergeable/mergeablecontent/"><code>MergeableContent</code></a></li></ul></section><section class="s2" id="/api/mergeable-store/type-aliases/stamps/" data-id="m/TA9/S10"><h2>Stamps type aliases</h2><ul><li><a href="/api/mergeable-store/type-aliases/stamps/tablesstamp/"><code>TablesStamp</code></a></li><li><a href="/api/mergeable-store/type-aliases/stamps/tablestamp/"><code>TableStamp</code></a></li><li><a href="/api/mergeable-store/type-aliases/stamps/rowstamp/"><code>RowStamp</code></a></li><li><a href="/api/mergeable-store/type-aliases/stamps/cellstamp/"><code>CellStamp</code></a></li><li><a href="/api/mergeable-store/type-aliases/stamps/valuesstamp/"><code>ValuesStamp</code></a></li><li><a href="/api/mergeable-store/type-aliases/stamps/valuestamp/"><code>ValueStamp</code></a></li><li><a href="/api/mergeable-store/type-aliases/stamps/getnow/"><code>GetNow</code></a></li><li><a href="/api/mergeable-store/type-aliases/stamps/hash/"><code>Hash</code></a></li><li><a href="/api/mergeable-store/type-aliases/stamps/stamp/"><code>Stamp</code></a></li><li><a href="/api/mergeable-store/type-aliases/stamps/time/"><code>Time</code></a></li></ul></section><section class="s2" id="/api/mergeable-store/type-aliases/syncing/" data-id="m/TA9/S12"><h2>Syncing type aliases</h2><ul><li><a href="/api/mergeable-store/type-aliases/syncing/tablehashes/"><code>TableHashes</code></a></li><li><a href="/api/mergeable-store/type-aliases/syncing/rowhashes/"><code>RowHashes</code></a></li><li><a href="/api/mergeable-store/type-aliases/syncing/cellhashes/"><code>CellHashes</code></a></li><li><a href="/api/mergeable-store/type-aliases/syncing/valuehashes/"><code>ValueHashes</code></a></li><li><a href="/api/mergeable-store/type-aliases/syncing/contenthashes/"><code>ContentHashes</code></a></li></ul></section></section>

0 commit comments

Comments
 (0)