Class: PersistentSettings

util/PersistentSettings~ PersistentSettings


new PersistentSettings(file_name, settings)

Parameters:
Name Type Description
file_name

The file name of the config file (ie. 'advanced-settings'). This is used as the prefix to its keys

settings

The contents of the config object. These are used to generate the key-value pairs that are saved in settings

Source:

Members


default_settings

Properties:
Name Type Description
default_settings Hash

The original default settings that are stored from the config objects.

Source:

file_name

Properties:
Name Type Description
file_name string

The stored file name. Usually not used externally

Source:

Methods


get(key)

Parameters:
Name Type Description
key string

The key to retrieve the value of

Source:
Returns:

The value that is stored in the key. The object type stays intact (so if its defined as an array in the config object, it will return an array)

Type
Object

set(key, value)

Parameters:
Name Type Description
key string

The key to set

value Object

The value to set

Source: