New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jsondbnode

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsondbnode

Json database mede for nodejs

  • 1.3.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Simple database made with JSON.

Install

npm install jsondbnode

Limitations

  • You may have problems with create and edit at the same time.
  • There is no backup, if the db.json get corrupted it's over

Usage

var DB = require("jsondbnode");
const Books = DB.model // example model
const DBCONFIG = DB.manager

// set DB.json path
DBCONFIG.configDB({ dbPath: "./db.json" }) 

// delete all data from DB.json
DBCONFIG.resetDB().then(console.log).catch(console.error)

new Books({
    name: "The lord of the rings",
    create_at: new Date(1954, 6, 28)
}).save().then((newBook) => {
    console.log(newBook)
    newBook.create_at = new Date(1954, 6, 29)
    newBook.save().then(console.log).catch(console.error)
}).catch(console.error)

Se more at Example

Keywords

FAQs

Package last updated on 25 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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