@springtree/eva-sdk-core-settings
v10.0.0
Published
The shared settings repository implementation for the EVA SDK
Keywords
Readme
@springtree/eva-sdk-core-settings
Centralised settings manager for all EVA sdk modules. Module can register their own settings group. Updating a setting will return a change event that can be picked up and peristend by add-on libraries voor local storage or mobile platform properties
Usage
import { settings } from "@springtree/eva-sdk-core-settings";
const coreSettings = settinges.getCoreSettings();
const defaultlanguage = settings.get("core", "language");
settings.set("core", "appName", "my EVA app");
settings.set("core", "appVersion", "0.1.0");
// Register your own setting group
// If an existing group exists an error will be thrown
//
const groupName = "example";
const testValues = {
example: "setting",
};
settings.register(groupName, testValues);
const exampleSettings = settings.getGroup(groupName);