DuSettings(namespaceopt, fileopt)

A class to manage settings.

new DuSettings(namespaceopt, fileopt)

Constructs a new DuSettings instance
Parameters:
Name Type Attributes Default Description
namespace string <optional>
DuAEF.scriptName A namespace to group your settings.
file File | string <optional>
Folder.myDocuments/namespace/namespace_settings.json The file to store the settings
Properties:
Name Type Description
namespace string A namespace to group your settings.
file File The file to store the settings
data Object The settings as a js object

Methods

load()

loads data from the settings file

save(name) → {boolean}

Saves data to the file
Parameters:
Name Type Description
name string The name of the setting
Returns:
boolean - true if the file has been correctly written