Skip to content

Type Alias: Options ​

ts
type Options = object;

Options types contain all the configuration options for Options that can be set in the constructor of KeyValues Class

Example ​

js
const kvs = new KeyValues({fileName: 'config.json'})

Properties ​

atomicSave ​

ts
atomicSave: boolean;

Whether or not to save the settings file atomically.

Default ​

ts
true

dir? ​

ts
optional dir: string;

The path to the settings directory. Defaults to your app's user data direcory.

Default ​

ts
"localdb"

fileName ​

ts
fileName: string;

The name of the settings file that will be saved to the disk.

Default ​

ts
"keyvalues.json"

numSpaces ​

ts
numSpaces: number;

The number of spaces to use when stringifying the data before saving to disk if prettify is set to true.

Default ​

ts
2

prettify ​

ts
prettify: boolean;

Whether or not to prettify the data when it's saved to disk.

Default ​

ts
false