hasValue
The hasValue method returns a boolean indicating whether a given Value exists in the Store.
hasValue(valueId: string): boolean| Type | Description | |
|---|---|---|
valueId | string | |
| returns | boolean |
Example
This example shows two simple Value existence checks.
import {createStore} from 'tinybase';
const store = createStore().setValues({open: true});
console.log(store.hasValue('open'));
// -> true
console.log(store.hasValue('employees'));
// -> false
Since
v3.0.0