Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flame-development/nexusdb
Nexus.DB is a top-tier & open-source local database with JSON support designed to be easy to set-up and use.
https://github.com/flame-development/nexusdb
json nodejs npm-module npm-package npmjs yaml yml
Last synced: 4 months ago
JSON representation
Nexus.DB is a top-tier & open-source local database with JSON support designed to be easy to set-up and use.
- Host: GitHub
- URL: https://github.com/flame-development/nexusdb
- Owner: Flame-Development
- License: mit
- Created: 2023-05-05T13:54:12.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-08-01T14:30:17.000Z (over 1 year ago)
- Last Synced: 2024-10-13T22:41:52.086Z (4 months ago)
- Topics: json, nodejs, npm-module, npm-package, npmjs, yaml, yml
- Language: JavaScript
- Homepage: https://Flame-Development.github.io
- Size: 11.7 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## About
Nexus.DB is a top-tier & open-source local database for [JSON](https://en.wikipedia.org/wiki/JSON) support designed to be easy to set up and use
- Beginner friendly
- Easy to use
- Persistent Storage
- Key-Value like interface
- Database files inside and outside the project
- Supports [JSON](https://en.wikipedia.org/wiki/JSON)
- Quick respond## Installation
Install with [npm](https://www.npmjs.com/) / [yarn](https://yarnpkg.com) / [pnpm](https://pnpm.js.org/):
```sh
npm install nexus.db
yarn add nexus.db
pnpm add nexus.db
```## Examples
```js
// Create Database
const NexusDB = require("nexus.db");
const db = new NexusDB.Database({ path: "./Database/NexusDB.json" })// Data Set | Data Get
db.set("MyBalance", 50000)
db.set("users.aria.balance", 99000) // { users: { aria: { balance: 99000 } } }
db.set("AnObject", { ok: "ok" })
db.get("MyBalance")
db.get("users.aria") // { balance: 99000 }// Data Exists
db.has("MyBalance") // Boolean// Fetch All Database Data
db.all() // All Data
db.all(5) // All Data With "5" Limit// Get JSON'd Database
db.toJSON()
db.toJSON(5) // JSON Data With "5" Limit// Delete Data
db.delete("users")
db.delete("MyBalance")
db.clear() // Clear All Data// Data Type
db.type("MyData") // can be (string, number, object, null, array, etc.)// Data Math Operations
db.add("YourMoney", 10000) // 10000
db.substr("YourMoney", 3000) // 7000
db.add("YourMoney", 10000) /// 17000// Data Finding
db.includes("rMone") // YourMoney
db.startsWith("YourMo") // YourMoney
db.endsWith("oney") // YourMoney// Nexus Info
console.log(NexusDB.version)
```