Package Exports
- easydata
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (easydata) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
EasyData
A module created to save basic data easily and fast.
Example
const easydata = require('easydata');
let saver = new easydata(/* options */)
/* Options {
compress: true | false -- Whether or not it should compress data saved, defaults to "true"
ignoreErrors: true | false -- Will ignore errors, returns 'false' when doing .init() and null when using saving related methods, defaults to "true"
name: '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. Default is "./"
}*/
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')) // --> null
}
})