Comparing version 1.0.6 to 1.0.7
@@ -38,3 +38,5 @@ const fs = require('fs'); | ||
ldb.deleteDBFile = (path, db, file, callback)=>{ | ||
fs.unlink(`${path}/${db}/${file}.ldb`, ()=>{ | ||
fs.unlink(`${path}/${db}/${file}.ldb`, (err)=>{ | ||
if(err) throw err; | ||
if(callback) callback(); | ||
@@ -110,3 +112,2 @@ }); | ||
console.table(files); | ||
return files; | ||
}); | ||
@@ -113,0 +114,0 @@ } |
@@ -28,5 +28,2 @@ // json module | ||
if(callback) callback(JSON.parse(data)); | ||
return JSON.parse(data); | ||
}); | ||
@@ -33,0 +30,0 @@ } |
{ | ||
"author": { | ||
"name": "raisess-Danilo_Santana" | ||
}, | ||
"dependencies": { | ||
"base-64": "^0.1.0", | ||
"utf8": "^3.0.0" | ||
}, | ||
"name": "ldbjs", | ||
"version": "1.0.7", | ||
"description": "Create and manage local db files and data", | ||
"homepage": "https://github.com/Raisess/ldbjs", | ||
"main": "./index.js", | ||
"keywords": [ | ||
@@ -25,7 +20,10 @@ "backend", | ||
], | ||
"license": "MIT", | ||
"main": "./index.js", | ||
"name": "ldbjs", | ||
"author": "raisess-Danilo_Santana", | ||
"homepage": "https://github.com/Raisess/ldbjs", | ||
"preferGlobal": "true", | ||
"version": "1.0.6" | ||
} | ||
"dependencies": { | ||
"base-64": "^0.1.0", | ||
"utf8": "^3.0.0" | ||
}, | ||
"license": "MIT" | ||
} |
@@ -160,3 +160,3 @@ # ldbjs | ||
### Sendding and getting data from json | ||
### Sending and getting data from json | ||
@@ -183,4 +183,6 @@ ```javascript | ||
ldb.json.getData('.', 'myJSONDBName', 'myJSONFileName', (data)=>{ | ||
document.getElementById('demo').innerHTML = data; | ||
document.getElementById('demo').innerHTML = JSON.parse(data); | ||
}); | ||
// or to auto parse | ||
document.getElementById('demo').innerHTML = ldb.json.getData('.', 'myJSONDBName', 'myJSONFileName'); | ||
``` | ||
@@ -187,0 +189,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10197
206
125