getValuesJson
The getValuesJson
method returns a string serialization of all of the keyed Values
in the Store
.
getValuesJson(): string
Examples
This example serializes the keyed value contents of a Store
.
import {createStore} from 'tinybase';
const store = createStore().setValues({open: true});
console.log(store.getValuesJson());
// -> '{"open":true}'
This example serializes the contents of an empty Store
.
import {createStore} from 'tinybase';
const store = createStore();
console.log(store.getValuesJson());
// -> '{}'
Since
v3.0.0