1.0.0 • Published 6 years ago
simplysave v1.0.0
SimplySave
A module created to save basic data easily and fast.
Example
const simplySave = require('simplysave');
let saver = new simplySave(/* options */)
/* Options {
ignoreErrors: true | false -- Will ignore errors, returns 'false' when doing .init() and null when using saving related methods
dataName: 'Name of the data folder' -- The name of the data folder, default is 'data'
path: '/path/to/where/the/data/folder/will/be -- (*Optional*) the path to where the data folder will be
}*/
saver.init().then(async success=>{
if (success) {
await saver.save('myName', 'Martini');
console.log(await saver.get('myName')) // --> Martini
await saver.delete('myName')
console.log(await saver.get('myName')) // --> error
}
})
1.0.0
6 years ago