Methods
read
- read(record: string, field: string): string | null
-
Parameters
-
record: string
-
field: string
Returns string | null
remove
- remove(record: string, field: string): void
-
Parameters
-
record: string
-
field: string
Returns void
write
- write(record: string, field: string, value: string): void
-
Parameters
-
record: string
-
field: string
-
value: string
Returns void
The LocalData class stores data locally on the end-user's hard drive.
The services of LocalData are accessed entirely through class (static) methods; the class cannot be instantiated.
To store a value on disk, use the write method, specifying the record for the value (i.e., the general namespace), the field for the value (i.e., a specific identifier), and the value itself.
To load a previously saved value from disk, use the read method, specifying the desired value's record and field.