Number of top-level config items.
Get or replace the full config object.
Reading this property loads and validates the config file from disk.
Validates value and persists the schema output. Missing top-level keys
are filled from the defaults option and schema defaults.
Close the file watcher if one exists.
Useful in tests to prevent the process from hanging.
Iterate over config entries as [key, value] pairs.
Append an item to an array config value.
Creates the array when the key does not exist.
Array key. Supports dot notation when enabled.
Item to append.
Reset the config to the defaults option and schema default values.
Delete a config item.
Item key. Supports dot notation when enabled.
Get a config item.
Item key. Supports dot notation when enabled.
Get a config item, falling back to a default value when missing.
Item key. Supports dot notation when enabled.
Value returned when the item does not exist.
Check whether a config item exists.
Item key. Supports dot notation when enabled.
Watch the entire config object for changes.
Called with (newValue, oldValue).
Unsubscribe function.
Watch a config key for changes.
Item key. Supports dot notation when enabled.
Called with (newValue, oldValue).
Unsubscribe function.
Reset items to their default values.
Values come from the defaults option first, then from the schema.
Keys without a default are left unchanged.
Keys to reset. Supports dot notation when enabled.
Set one or more config items.
Item key. Supports dot notation when enabled.
Value to set.
Set multiple config items.
Object of items to set.
Simple config handling for your app or module.
Template: Schema