tinybase 3.0.4 → 3.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/debug/ui-react.js +2 -2
- package/lib/{debug → types}/persisters.d.ts +2 -2
- package/lib/{debug → types}/store.d.ts +1 -1
- package/lib/{cjs-es6 → types}/ui-react.d.ts +4 -3
- package/package.json +21 -20
- package/readme.md +2 -2
- package/lib/cjs/checkpoints.d.ts +0 -959
- package/lib/cjs/common.d.ts +0 -115
- package/lib/cjs/indexes.d.ts +0 -966
- package/lib/cjs/metrics.d.ts +0 -827
- package/lib/cjs/persisters.d.ts +0 -727
- package/lib/cjs/queries.d.ts +0 -3024
- package/lib/cjs/relationships.d.ts +0 -1201
- package/lib/cjs/store.d.ts +0 -5244
- package/lib/cjs/tinybase.d.ts +0 -14
- package/lib/cjs/tools.d.ts +0 -512
- package/lib/cjs/ui-react.d.ts +0 -10921
- package/lib/cjs-es6/checkpoints.d.ts +0 -959
- package/lib/cjs-es6/persisters.d.ts +0 -727
- package/lib/cjs-es6/store.d.ts +0 -5244
- package/lib/common.d.ts +0 -115
- package/lib/debug/checkpoints.d.ts +0 -959
- package/lib/debug/common.d.ts +0 -115
- package/lib/debug/indexes.d.ts +0 -966
- package/lib/debug/metrics.d.ts +0 -827
- package/lib/debug/queries.d.ts +0 -3024
- package/lib/debug/relationships.d.ts +0 -1201
- package/lib/debug/tinybase.d.ts +0 -14
- package/lib/debug/tools.d.ts +0 -512
- package/lib/debug/ui-react.d.ts +0 -10921
- package/lib/es6/checkpoints.d.ts +0 -959
- package/lib/es6/common.d.ts +0 -115
- package/lib/es6/indexes.d.ts +0 -966
- package/lib/es6/metrics.d.ts +0 -827
- package/lib/es6/persisters.d.ts +0 -727
- package/lib/es6/queries.d.ts +0 -3024
- package/lib/es6/relationships.d.ts +0 -1201
- package/lib/es6/store.d.ts +0 -5244
- package/lib/es6/tinybase.d.ts +0 -14
- package/lib/es6/tools.d.ts +0 -512
- package/lib/es6/ui-react.d.ts +0 -10921
- package/lib/indexes.d.ts +0 -966
- package/lib/metrics.d.ts +0 -827
- package/lib/persisters.d.ts +0 -727
- package/lib/queries.d.ts +0 -3024
- package/lib/relationships.d.ts +0 -1201
- package/lib/store.d.ts +0 -5244
- package/lib/tinybase.d.ts +0 -14
- package/lib/tools.d.ts +0 -512
- package/lib/ui-react.d.ts +0 -10921
- package/lib/umd/checkpoints.d.ts +0 -959
- package/lib/umd/common.d.ts +0 -115
- package/lib/umd/indexes.d.ts +0 -966
- package/lib/umd/metrics.d.ts +0 -827
- package/lib/umd/persisters.d.ts +0 -727
- package/lib/umd/queries.d.ts +0 -3024
- package/lib/umd/relationships.d.ts +0 -1201
- package/lib/umd/store.d.ts +0 -5244
- package/lib/umd/tinybase.d.ts +0 -14
- package/lib/umd/tools.d.ts +0 -512
- package/lib/umd/ui-react.d.ts +0 -10921
- package/lib/umd-es6/checkpoints.d.ts +0 -959
- package/lib/umd-es6/common.d.ts +0 -115
- package/lib/umd-es6/indexes.d.ts +0 -966
- package/lib/umd-es6/metrics.d.ts +0 -827
- package/lib/umd-es6/persisters.d.ts +0 -727
- package/lib/umd-es6/queries.d.ts +0 -3024
- package/lib/umd-es6/relationships.d.ts +0 -1201
- package/lib/umd-es6/store.d.ts +0 -5244
- package/lib/umd-es6/tinybase.d.ts +0 -14
- package/lib/umd-es6/tools.d.ts +0 -512
- package/lib/umd-es6/ui-react.d.ts +0 -10921
- /package/lib/{checkpoints.d.ts → types/checkpoints.d.ts} +0 -0
- /package/lib/{cjs-es6 → types}/common.d.ts +0 -0
- /package/lib/{cjs-es6 → types}/indexes.d.ts +0 -0
- /package/lib/{cjs-es6 → types}/metrics.d.ts +0 -0
- /package/lib/{cjs-es6 → types}/queries.d.ts +0 -0
- /package/lib/{cjs-es6 → types}/relationships.d.ts +0 -0
- /package/lib/{cjs-es6 → types}/tinybase.d.ts +0 -0
- /package/lib/{cjs-es6 → types}/tools.d.ts +0 -0
package/lib/debug/ui-react.js
CHANGED
|
@@ -135,8 +135,8 @@ const useSetCallback = (
|
|
|
135
135
|
return useCallback(
|
|
136
136
|
(parameter) =>
|
|
137
137
|
ifNotUndefined(store, (store2) =>
|
|
138
|
-
ifNotUndefined(get(parameter, store2), (
|
|
139
|
-
then(store2['set' + settable](...args,
|
|
138
|
+
ifNotUndefined(get(parameter, store2), (thing) =>
|
|
139
|
+
then(store2['set' + settable](...args, thing), thing),
|
|
140
140
|
),
|
|
141
141
|
),
|
|
142
142
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -342,8 +342,8 @@ export interface Persister {
|
|
|
342
342
|
save(): Promise<Persister>;
|
|
343
343
|
|
|
344
344
|
/**
|
|
345
|
-
* The
|
|
346
|
-
* associated and persists it into storage, once, and then continuously.
|
|
345
|
+
* The startAutoSave method takes data from the Store with which the Persister
|
|
346
|
+
* is associated and persists it into storage, once, and then continuously.
|
|
347
347
|
*
|
|
348
348
|
* This method first runs a single call to the save method to ensure the data
|
|
349
349
|
* is in sync with the persisted storage. It then continues to watch for
|
|
@@ -1691,7 +1691,7 @@ export interface Store {
|
|
|
1691
1691
|
hasCell(tableId: Id, rowId: Id, cellId: Id): boolean;
|
|
1692
1692
|
|
|
1693
1693
|
/**
|
|
1694
|
-
* The
|
|
1694
|
+
* The hasValues method returns a boolean indicating whether any Values exist
|
|
1695
1695
|
* in the Store.
|
|
1696
1696
|
*
|
|
1697
1697
|
* @returns Whether any Values exist.
|
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
CellIdsListener,
|
|
30
30
|
CellListener,
|
|
31
31
|
MapCell,
|
|
32
|
+
MapValue,
|
|
32
33
|
Row,
|
|
33
34
|
RowIdsListener,
|
|
34
35
|
RowListener,
|
|
@@ -2088,10 +2089,10 @@ export function useSetPartialValuesCallback<Parameter>(
|
|
|
2088
2089
|
*/
|
|
2089
2090
|
export function useSetValueCallback<Parameter>(
|
|
2090
2091
|
valueId: Id,
|
|
2091
|
-
getValue: (parameter: Parameter, store: Store) => Value,
|
|
2092
|
+
getValue: (parameter: Parameter, store: Store) => Value | MapValue,
|
|
2092
2093
|
getValueDeps?: React.DependencyList,
|
|
2093
2094
|
storeOrStoreId?: StoreOrStoreId,
|
|
2094
|
-
then?: (store: Store, value: Value) => void,
|
|
2095
|
+
then?: (store: Store, value: Value | MapValue) => void,
|
|
2095
2096
|
thenDeps?: React.DependencyList,
|
|
2096
2097
|
): ParameterizedCallback<Parameter>;
|
|
2097
2098
|
|
|
@@ -7767,7 +7768,7 @@ export type IndexProps = {
|
|
|
7767
7768
|
};
|
|
7768
7769
|
|
|
7769
7770
|
/**
|
|
7770
|
-
*
|
|
7771
|
+
* SliceProps props are used for components that refer to a single Slice in an
|
|
7771
7772
|
* Index object, such as the SliceView component.
|
|
7772
7773
|
*
|
|
7773
7774
|
* @category Props
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinybase",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.6",
|
|
4
4
|
"author": "jamesgpearce",
|
|
5
5
|
"repository": "github:tinyplex/tinybase",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,50 +43,50 @@
|
|
|
43
43
|
"typesVersions": {
|
|
44
44
|
"*": {
|
|
45
45
|
"cjs": [
|
|
46
|
-
"./lib/tinybase.d.ts"
|
|
46
|
+
"./lib/types/tinybase.d.ts"
|
|
47
47
|
],
|
|
48
48
|
"cjs/*": [
|
|
49
|
-
"./lib/*.d.ts"
|
|
49
|
+
"./lib/types/*.d.ts"
|
|
50
50
|
],
|
|
51
51
|
"cjs-es6": [
|
|
52
|
-
"./lib/tinybase.d.ts"
|
|
52
|
+
"./lib/types/tinybase.d.ts"
|
|
53
53
|
],
|
|
54
54
|
"cjs-es6/*": [
|
|
55
|
-
"./lib/*.d.ts"
|
|
55
|
+
"./lib/types/*.d.ts"
|
|
56
56
|
],
|
|
57
57
|
"es6": [
|
|
58
|
-
"./lib/tinybase.d.ts"
|
|
58
|
+
"./lib/types/tinybase.d.ts"
|
|
59
59
|
],
|
|
60
60
|
"es6/*": [
|
|
61
|
-
"./lib/*.d.ts"
|
|
61
|
+
"./lib/types/*.d.ts"
|
|
62
62
|
],
|
|
63
63
|
"debug": [
|
|
64
|
-
"./lib/tinybase.d.ts"
|
|
64
|
+
"./lib/types/tinybase.d.ts"
|
|
65
65
|
],
|
|
66
66
|
"debug/*": [
|
|
67
|
-
"./lib/*.d.ts"
|
|
67
|
+
"./lib/types/*.d.ts"
|
|
68
68
|
],
|
|
69
69
|
"umd": [
|
|
70
|
-
"./lib/tinybase.d.ts"
|
|
70
|
+
"./lib/types/tinybase.d.ts"
|
|
71
71
|
],
|
|
72
72
|
"umd/*": [
|
|
73
|
-
"./lib/*.d.ts"
|
|
73
|
+
"./lib/types/*.d.ts"
|
|
74
74
|
],
|
|
75
75
|
"umd-es6": [
|
|
76
|
-
"./lib/tinybase.d.ts"
|
|
76
|
+
"./lib/types/tinybase.d.ts"
|
|
77
77
|
],
|
|
78
78
|
"umd-es6/*": [
|
|
79
|
-
"./lib/*.d.ts"
|
|
79
|
+
"./lib/types/*.d.ts"
|
|
80
80
|
],
|
|
81
81
|
"lib": [
|
|
82
|
-
"./lib/tinybase.d.ts"
|
|
82
|
+
"./lib/types/tinybase.d.ts"
|
|
83
83
|
],
|
|
84
84
|
"lib/*": [
|
|
85
|
-
"./lib/*.d.ts"
|
|
85
|
+
"./lib/types/*.d.ts"
|
|
86
86
|
],
|
|
87
87
|
"*": [
|
|
88
|
-
"./lib/*.d.ts",
|
|
89
|
-
"./lib/tinybase.d.ts"
|
|
88
|
+
"./lib/types/*.d.ts",
|
|
89
|
+
"./lib/types/tinybase.d.ts"
|
|
90
90
|
]
|
|
91
91
|
}
|
|
92
92
|
},
|
|
@@ -148,10 +148,10 @@
|
|
|
148
148
|
"country-flag-emoji-json": "^2.0.0",
|
|
149
149
|
"cspell": "^6.31.1",
|
|
150
150
|
"esbuild": "^0.17.15",
|
|
151
|
-
"eslint": "^8.
|
|
151
|
+
"eslint": "^8.38.0",
|
|
152
152
|
"eslint-config-prettier": "^8.8.0",
|
|
153
153
|
"eslint-plugin-jest": "^27.2.1",
|
|
154
|
-
"eslint-plugin-jsdoc": "^40.1.
|
|
154
|
+
"eslint-plugin-jsdoc": "^40.1.2",
|
|
155
155
|
"eslint-plugin-react": "^7.32.2",
|
|
156
156
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
157
157
|
"gulp": "^4.0.2",
|
|
@@ -172,10 +172,11 @@
|
|
|
172
172
|
"rollup-plugin-gzip": "^3.1.0",
|
|
173
173
|
"rollup-plugin-preserve-shebang": "^1.0.1",
|
|
174
174
|
"rollup-plugin-prettier": "^3.0.0",
|
|
175
|
+
"tinybase": "file:./",
|
|
175
176
|
"tinydocs": "^0.1.26",
|
|
176
177
|
"tmp": "^0.2.1",
|
|
177
178
|
"ts-unused-exports": "^9.0.4",
|
|
178
|
-
"typescript": "5.0.
|
|
179
|
+
"typescript": "5.0.4"
|
|
179
180
|
},
|
|
180
181
|
"peerDependencies": {
|
|
181
182
|
"prettier": "^2.0.0",
|
package/readme.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<section id="hero"><h2 id="the-reactive-data-store-for-local-first-apps">The <em>reactive</em> data store for <span>local-first apps</span>.</h2><p>Modern apps deserve better. Why trade reactive user experiences to be able to use relational data? Why sacrifice store features for bundle size? And why should the cloud do all the work <a href="https://localfirstweb.dev/" target="_blank">anyway</a>?</p><p><em>TinyBase is a smart new way to structure your local app data:</em></p><ul><li>Manage <a href="#start-with-a-simple-key-value-store">key-value data</a> (<em>new!</em>), <a href="#level-up-to-use-tabular-data">tabular data</a> - or both - with optional <a href="#apply-schemas-to-tables-and-values">schematization</a> to model it.</li><li><a href="#register-listeners-at-any-granularity">Flexibly reactive</a> to reconciled updates, so your UI only spends cycles on the data that changes.</li><li><a href="#build-complex-queries-with-tinyql">Powerful query engine</a> to select, join, filter, group, sort and paginate data - reactively.</li><li><a href="#create-indexes-for-fast-lookups">Indexing</a>, <a href="#define-metrics-and-aggregations">metrics</a>, <a href="#configure-relationships-between-tables">relationships</a> - and even an <a href="#use-checkpoints-for-an-easy-undo-stack">undo stack</a> for your app state! - out of the box.</li><li>Easily <a href="#persist-data-to-browser-file-or-server">sync your data</a> to local or remote storage, and use <a href="#call-hooks-to-bind-to-data">idiomatic bindings</a> to your UI.</li><li><a href="#generate-orm-like-apis">Generate ORM-like APIs</a> (<em>new!</em>) in TypeScript, based on a schema or inferred from actual data.</li></ul><p><em>Tiny by name, tiny by nature</em>, TinyBase only costs <a href="#did-we-say-tiny">4.2kB - 8.7kB</a> when compressed, and has zero dependencies. And of course it's <a href="#well-tested-and-documented">well tested</a>, <a href="https://tinybase.org/guides/the-basics/getting-started/">fully documented</a>, and <a href="https://github.com/tinyplex/tinybase">open source</a>. Other <a href="https://tinybase.org/guides/faq/">FAQs</a>?</p></section><p><a id="new" href="https://tinybase.org/guides/releases/#v3-0"><em>NEW!</em> v3.0 release</a></p><hr><p><a class="start" href="https://tinybase.org/guides/the-basics/getting-started/">Get started</a></p><p><a href="https://tinybase.org/demos/">Try the demos</a></p><p><a href="https://tinybase.org/api/store/interfaces/store/store/">Read the docs</a></p><hr><section><h2 id="start-with-a-simple-key-value-store">Start with a simple key-value store.</h2><p>Creating a <a href="https://tinybase.org/api/store/interfaces/store/store/"><code>Store</code></a> requires just a simple call to the <a href="https://tinybase.org/api/store/functions/creation/createstore/"><code>createStore</code></a> function. Once you have one, you can easily set <a href="https://tinybase.org/api/store/type-aliases/store/values/"><code>Values</code></a> in it by unique <a href="https://tinybase.org/api/common/type-aliases/identity/id/"><code>Id</code></a>. And of course you can easily get them back out again.</p><p>Read more about using keyed value data in <a href="https://tinybase.org/guides/the-basics/">The Basics</a> guide.</p></section>
|
|
1
|
+
<section id="hero"><h2 id="the-reactive-data-store-for-local-first-apps">The <em>reactive</em> data store for <span>local-first apps</span>.</h2><p>Modern apps deserve better. Why trade reactive user experiences to be able to use relational data? Why sacrifice store features for bundle size? And why should the cloud do all the work <a href="https://localfirstweb.dev/" target="_blank">anyway</a>?</p><p><em>TinyBase is a smart new way to structure your local app data:</em></p><ul><li>Manage <a href="#start-with-a-simple-key-value-store">key-value data</a> (<em>new!</em>), <a href="#level-up-to-use-tabular-data">tabular data</a> - or both - with optional <a href="#apply-schemas-to-tables-and-values">schematization</a> to model it.</li><li><a href="#register-listeners-at-any-granularity">Flexibly reactive</a> to reconciled updates, so your UI only spends cycles on the data that changes.</li><li><a href="#build-complex-queries-with-tinyql">Powerful query engine</a> to select, join, filter, group, sort and paginate data - reactively.</li><li><a href="#create-indexes-for-fast-lookups">Indexing</a>, <a href="#define-metrics-and-aggregations">metrics</a>, <a href="#configure-relationships-between-tables">relationships</a> - and even an <a href="#use-checkpoints-for-an-easy-undo-stack">undo stack</a> for your app state! - out of the box.</li><li>Easily <a href="#persist-data-to-browser-file-or-server">sync your data</a> to local or remote storage, and use <a href="#call-hooks-to-bind-to-data">idiomatic bindings</a> to your UI.</li><li><a href="#generate-orm-like-apis">Generate ORM-like APIs</a> (<em>new!</em>) in TypeScript, based on a schema or inferred from actual data.</li></ul><p><em>Tiny by name, tiny by nature</em>, TinyBase only costs <a href="#did-we-say-tiny">4.2kB - 8.7kB</a> when compressed, and has zero dependencies. And of course it's <a href="#well-tested-and-documented">well tested</a>, <a href="https://tinybase.org/guides/the-basics/getting-started/">fully documented</a>, and <a href="https://github.com/tinyplex/tinybase">open source</a>. Other <a href="https://tinybase.org/guides/faq/">FAQs</a>?</p></section><p><a id="new" href="https://tinybase.org/guides/releases/#v3-0"><em>NEW!</em> v3.0 release</a></p><hr><p><a class="start" href="https://tinybase.org/guides/the-basics/getting-started/">Get started</a></p><p><a href="https://tinybase.org/demos/">Try the demos</a></p><p><a href="https://tinybase.org/api/store/interfaces/store/store/">Read the docs</a></p><hr><section><h3 id="proud-to-be-sponsored-by">Proud to be sponsored by:</h3><p><a href="https://github.com/expo" target="_blank"><img title="expo" src="https://github.com/expo.png?size=48" width="48" height="48"></a><a href="https://github.com/WonderPanda" target="_blank"><img title="WonderPanda" src="https://github.com/WonderPanda.png?size=48" width="48" height="48"></a><a href="https://github.com/arpitBhalla" target="_blank"><img title="arpitBhalla" src="https://github.com/arpitBhalla.png?size=48" width="48" height="48"></a></p></section><section><h3 id="excited-to-be-used-by">Excited to be used by:</h3><p><a href="https://github.com/brentvatne" target="_blank"><img title="brentvatne" src="https://github.com/brentvatne.png?size=48" width="48" height="48"></a><a href="https://github.com/circadian-risk" target="_blank"><img title="circadian-risk" src="https://github.com/circadian-risk.png?size=48" width="48" height="48"></a><a href="https://github.com/WonderPanda" target="_blank"><img title="WonderPanda" src="https://github.com/WonderPanda.png?size=48" width="48" height="48"></a><a href="https://github.com/miking-the-viking" target="_blank"><img title="miking-the-viking" src="https://github.com/miking-the-viking.png?size=48" width="48" height="48"></a><a href="https://github.com/cubecull" target="_blank"><img title="cubecull" src="https://github.com/cubecull.png?size=48" width="48" height="48"></a><a href="https://github.com/Apocalypsor" target="_blank"><img title="Apocalypsor" src="https://github.com/Apocalypsor.png?size=48" width="48" height="48"></a><a href="https://github.com/uptonking" target="_blank"><img title="uptonking" src="https://github.com/uptonking.png?size=48" width="48" height="48"></a><a href="https://github.com/erwinkn" target="_blank"><img title="erwinkn" src="https://github.com/erwinkn.png?size=48" width="48" height="48"></a><a href="https://github.com/Kayoo-asso" target="_blank"><img title="Kayoo-asso" src="https://github.com/Kayoo-asso.png?size=48" width="48" height="48"></a><a href="https://github.com/shaneosullivan" target="_blank"><img title="shaneosullivan" src="https://github.com/shaneosullivan.png?size=48" width="48" height="48"></a><a href="https://github.com/generates" target="_blank"><img title="generates" src="https://github.com/generates.png?size=48" width="48" height="48"></a><a href="https://github.com/flaming-codes" target="_blank"><img title="flaming-codes" src="https://github.com/flaming-codes.png?size=48" width="48" height="48"></a><a href="https://github.com/jaysc" target="_blank"><img title="jaysc" src="https://github.com/jaysc.png?size=48" width="48" height="48"></a><a href="https://github.com/kotofurumiya" target="_blank"><img title="kotofurumiya" src="https://github.com/kotofurumiya.png?size=48" width="48" height="48"></a></p></section><hr><section><h2 id="start-with-a-simple-key-value-store">Start with a simple key-value store.</h2><p>Creating a <a href="https://tinybase.org/api/store/interfaces/store/store/"><code>Store</code></a> requires just a simple call to the <a href="https://tinybase.org/api/store/functions/creation/createstore/"><code>createStore</code></a> function. Once you have one, you can easily set <a href="https://tinybase.org/api/store/type-aliases/store/values/"><code>Values</code></a> in it by unique <a href="https://tinybase.org/api/common/type-aliases/identity/id/"><code>Id</code></a>. And of course you can easily get them back out again.</p><p>Read more about using keyed value data in <a href="https://tinybase.org/guides/the-basics/">The Basics</a> guide.</p></section>
|
|
2
2
|
|
|
3
3
|
```js
|
|
4
4
|
const store = createStore()
|
|
@@ -266,4 +266,4 @@ export const createShop: typeof createShopDecl = () => {
|
|
|
266
266
|
};
|
|
267
267
|
```
|
|
268
268
|
|
|
269
|
-
<section><h2 id="did-we-say-tiny">Did we say tiny?</h2><p>If you use the basic <a href="https://tinybase.org/api/store/"><code>store</code></a> module alone, you'll only add a gzipped <em>4.2kB</em> to your app. You can incrementally add the other modules as you need more functionality, or get it all for <em>8.7kB</em>.</p><p>The <a href="https://tinybase.org/api/ui-react/"><code>ui-react</code></a> module is just another <em>3.4kB</em>, the <a href="https://tinybase.org/api/tools/"><code>tools</code></a> module is <em>5.4kB</em>, and everything is fast. Life's easy when you have zero dependencies!</p><p>Read more about how TinyBase is structured in the <a href="https://tinybase.org/guides/how-tinybase-is-built/architecture/">Architecture</a> guide.</p></section><div class="table"><table class="fixed"><tbody><tr><th width="30%"> </th><th>.js.gz</th><th>.js</th><th>debug.js</th><th>.d.ts</th></tr><tr><th class="right"><a href="https://tinybase.org/api/store/">store</a></th><td>4.2kB</td><td>10.0kB</td><td>43.9kB</td><td>184.6kB</td></tr><tr><th class="right"><a href="https://tinybase.org/api/metrics/">metrics</a></th><td>1.8kB</td><td>3.6kB</td><td>14.8kB</td><td>29.1kB</td></tr><tr><th class="right"><a href="https://tinybase.org/api/indexes/">indexes</a></th><td>1.9kB</td><td>3.7kB</td><td>16.6kB</td><td>33.9kB</td></tr><tr><th class="right"><a href="https://tinybase.org/api/relationships/">relationships</a></th><td>1.8kB</td><td>3.6kB</td><td>16.8kB</td><td>42.1kB</td></tr><tr><th class="right"><a href="https://tinybase.org/api/queries/">queries</a></th><td>2.6kB</td><td>5.5kB</td><td>24.9kB</td><td>106.8kB</td></tr><tr><th class="right"><a href="https://tinybase.org/api/checkpoints/">checkpoints</a></th><td>1.5kB</td><td>3.0kB</td><td>12.5kB</td><td>33.4kB</td></tr><tr><th class="right"><a href="https://tinybase.org/api/persisters/">persisters</a></th><td>0.8kB</td><td>1.7kB</td><td>5.2kB</td><td>27.
|
|
269
|
+
<section><h2 id="did-we-say-tiny">Did we say tiny?</h2><p>If you use the basic <a href="https://tinybase.org/api/store/"><code>store</code></a> module alone, you'll only add a gzipped <em>4.2kB</em> to your app. You can incrementally add the other modules as you need more functionality, or get it all for <em>8.7kB</em>.</p><p>The <a href="https://tinybase.org/api/ui-react/"><code>ui-react</code></a> module is just another <em>3.4kB</em>, the <a href="https://tinybase.org/api/tools/"><code>tools</code></a> module is <em>5.4kB</em>, and everything is fast. Life's easy when you have zero dependencies!</p><p>Read more about how TinyBase is structured in the <a href="https://tinybase.org/guides/how-tinybase-is-built/architecture/">Architecture</a> guide.</p></section><div class="table"><table class="fixed"><tbody><tr><th width="30%"> </th><th>.js.gz</th><th>.js</th><th>debug.js</th><th>.d.ts</th></tr><tr><th class="right"><a href="https://tinybase.org/api/store/">store</a></th><td>4.2kB</td><td>10.0kB</td><td>43.9kB</td><td>184.6kB</td></tr><tr><th class="right"><a href="https://tinybase.org/api/metrics/">metrics</a></th><td>1.8kB</td><td>3.6kB</td><td>14.8kB</td><td>29.1kB</td></tr><tr><th class="right"><a href="https://tinybase.org/api/indexes/">indexes</a></th><td>1.9kB</td><td>3.7kB</td><td>16.6kB</td><td>33.9kB</td></tr><tr><th class="right"><a href="https://tinybase.org/api/relationships/">relationships</a></th><td>1.8kB</td><td>3.6kB</td><td>16.8kB</td><td>42.1kB</td></tr><tr><th class="right"><a href="https://tinybase.org/api/queries/">queries</a></th><td>2.6kB</td><td>5.5kB</td><td>24.9kB</td><td>106.8kB</td></tr><tr><th class="right"><a href="https://tinybase.org/api/checkpoints/">checkpoints</a></th><td>1.5kB</td><td>3.0kB</td><td>12.5kB</td><td>33.4kB</td></tr><tr><th class="right"><a href="https://tinybase.org/api/persisters/">persisters</a></th><td>0.8kB</td><td>1.7kB</td><td>5.2kB</td><td>27.3kB</td></tr><tr><th class="right"><a href="https://tinybase.org/api/common/">common</a></th><td>0.1kB</td><td>0.1kB</td><td>0.1kB</td><td>3.5kB</td></tr><tr><th class="right">tinybase (all)</th><td>8.7kB</td><td>21.1kB</td><td>92.8kB</td><td>0.3kB</td></tr></tbody></table></div><section><h2 id="well-tested-and-documented">Well tested and documented.</h2><p>TinyBase has <em>100.0%</em> test coverage, including the code throughout the documentation - even on this page! The guides, demos, and API examples are designed to make it as easy as possible to get up and running.</p><p>Read more about how TinyBase is tested in the Unit <a href="https://tinybase.org/guides/how-tinybase-is-built/testing/">Testing</a> guide.</p></section><div class="table"><table class="fixed"><tbody><tr><th width="30%"> </th><th>Total</th><th>Tested</th><th>Coverage</th></tr><tr><th class="right">Lines</th><td>1,792</td><td>1,792</td><td>100.0%</td></tr><tr><th class="right">Statements</th><td>1,930</td><td>1,930</td><td>100.0%</td></tr><tr><th class="right">Functions</th><td>768</td><td>768</td><td>100.0%</td></tr><tr><th class="right">Branches</th><td>630</td><td>630</td><td>100.0%</td></tr><tr><th class="right">Tests</th><td colspan="3">2,581</td></tr><tr><th class="right">Assertions</th><td colspan="3">12,421</td></tr></tbody></table></div><hr><p><a class="start" href="https://tinybase.org/guides/the-basics/getting-started/">Get started</a></p><p><a href="https://tinybase.org/demos/">Try the demos</a></p><p><a href="https://tinybase.org/api/store/interfaces/store/store/">Read the docs</a></p><hr><section><h2 id="follow">Follow</h2><ul><li>News and updates on <a href="https://twitter.com/tinybasejs">Twitter</a>, <a href="https://discord.com/invite/mGz3mevwP8">Discord</a>, and <a href="https://facebook.com/tinybasejs">Facebook</a>.</li><li><a href="https://github.com/tinyplex/tinybase/discussions">Discussions</a> and <a href="https://github.com/tinyplex/tinybase/issues">issues</a> on <a href="https://github.com/tinyplex/tinybase">GitHub</a>.</li><li><a href="https://tinybase.org/guides/releases/">Release notes</a> for each version.</li><li>Packages on <a href="https://www.npmjs.com/package/tinybase/v/3.0.6">NPM</a>.</li></ul></section><section><h2 id="about">About</h2><p>Building TinyBase was originally an interesting exercise for <a rel="me" href="https://hachyderm.io/@jamesgpearce">me</a> in API design, minification, and documentation. It could not have been built without these great <a href="https://tinybase.org/guides/how-tinybase-is-built/credits/#giants">projects</a> and <a href="https://tinybase.org/guides/how-tinybase-is-built/credits/#and-friends">friends</a>, and I hope you enjoy using it!</p></section>
|