TinyBase logoTinyBase β

hasValues

The hasValues method returns a boolean indicating whether any Values exist in the Store.

hasValues(): boolean
returnsboolean

Whether any Values exist.

Example

This example shows simple existence checks.

import {createStore} from 'tinybase';

const store = createStore();
console.log(store.hasValues());
// -> false
store.setValues({open: true});
console.log(store.hasValues());
// -> true

Since

v3.0.0