🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

elegantdb

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elegantdb

✨ Faster and Useful Database and Database Group.

latest
Source
npmnpm
Version
2.0.2
Version published
Maintainers
1
Created
Source

Node.js Package Socket.dev CodeQL NPM

Elegant Database

Elegant Database is a JavaScript library that provides advanced features for managing and interacting with a database. It supports both JSON and Elegant (Custom Adaptor of ElegantDB) adaptors for storage.

Installation

You can install Elegant Database using npm:

npm install elegantdb

Usage

Import the necessary components from the library:

import { Database, JSONAdaptor, ElegantAdaptor } from 'elegantdb';

Create an instance of the Database class with appropriate options:

const db = new Database({
  adaptor: new JSONAdaptor(), // or new ElegantAdaptor()
  path: './my-database.json', // Optional, specify the path
  disableCheckUpdates: false, // Optional, disable update checks
  useExperimentalCaches: false // Optional
});

Database Adaptors

  • JSONAdaptor: JSON adaptor | database.json
  • ElegantAdaptor: Custom Adaptor of ElegantDB | database.elegant

Methods

  • set(key, value): Set a value in the database.
  • add(key, value): Add a value in the database.
  • get(key): Get a value from the database.
  • has(key): Check if a key exists in the database.
  • remove(key): Remove a key from the database.
  • clone(): Create a clone of the database instance.
  • all(): Get All Data from Adaptor.
  • getCache(): Get All Cache from Database

Contributing

If you encounter any issues or have suggestions for improvements, please feel free to open an issue on GitHub.

Versioning

We use Semantic Versioning for versioning. See the latest releases on npm.

License

This project is licensed under the ISC License.


Please feel free to copy and paste this template into your repository's README file. Make sure to review it and adjust any formatting or content as needed to fit your preferences.

Keywords

elegant

FAQs

Package last updated on 23 Aug 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