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

carrotdb

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

carrotdb

A JSON powered database

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

CarrotDB

npm version

a JSON based database for Node.js

carrotDB.create({ name: 'Antonio', surname: 'Erdeljac' });

Usage

npm install carrotdb
const carrotDB = require('carrotdb');

const app = async () => {
    try {
        await carrotDB.connect();

        const createdRecord = await carrotDB.create({ name: 'Antonio', surname: 'Erdeljac' });

        return console.log(createdRecord);
    } catch (error) {
        return console.log(error);
    }
}

app();

Data stored in JSON

[
  {
    "name": "Antonio",
    "surname": "Erdeljac",
  },
]

Install

npm install carrotdb

API

carrotDB.connect()

Checks for a database & creates an empty folder with empty database if non existent.

carrotDB.connect()

carrotDB.get()

Finds an existing object in the database using id.

carrotDB.get(id)

carrotDB.create()

Assigns a new object to database with generated id.

carrotDB.create({ fieldName: ... })

carrotDB.remove()

Removes an object from database using id.

carrotDB.remove(id)

carrotDB.update()

Updates an object from database using id.

carrotDB.update(id, { fieldName: ... })

Limits

I created it in 1 hour without testing so don't get any big ideas.

Keywords

FAQs

Package last updated on 18 Nov 2018

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