Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ldbjs

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ldbjs - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

3

json.js

@@ -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.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc