Comparing version 0.1.4 to 0.1.5
@@ -5,2 +5,3 @@ const fs = require('fs'); | ||
// create a json file | ||
json.createDBFile = (path, db, file, callback)=>{ | ||
@@ -26,3 +27,3 @@ fs.writeFile(`${path}/${db}/${file}.json`, '', (err)=>{ | ||
if(callback) callback();; | ||
if(callback) callback(); | ||
@@ -29,0 +30,0 @@ |
{ | ||
"name": "ldbjs", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Create and manage local db files and data", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -164,6 +164,8 @@ # ldb | ||
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.getDate('.', 'myJSONDBName', 'myJSONFileName'); | ||
``` | ||
While a data are getted a js obj are return, the api automatically convert the json to a js object for you. |
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
8776
95
170