Table of Contents
copyright: Copyright (c) 2020 Volker Böhm
author: Volker Böhm
license: This software is licensed under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. It is furnished "as is", without any support, and with no warranty, express or implied, as to its usefulness for any purpose.
Creates a new persistance support class
configurationObject configuration options (optional, default
configuration.keepFilesnumber amount of file versions to keep (including the recently written file)
const persist = keepFiles: 5persistconst dataRead = persist// prints 'hello world'console
Stringifies a JSON and writes it to a file. It will automatically add a timestamp to the provided "base" filename It does not throws errors, but logs write errors to the console
directorystring directory to delete file
filenameBasisstring basis filename of the file. The
objectToSaveObject object to save as JSON
Returns any undefined
Reads data from a file
Returns Object the object read.