https://github.com/harukayamamoto0/appo-database
a simple database
https://github.com/harukayamamoto0/appo-database
Last synced: 6 months ago
JSON representation
a simple database
- Host: GitHub
- URL: https://github.com/harukayamamoto0/appo-database
- Owner: HarukaYamamoto0
- License: mit
- Created: 2022-04-10T22:27:27.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-27T22:26:24.000Z (about 3 years ago)
- Last Synced: 2023-03-09T22:56:49.642Z (about 2 years ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Appo-database.
Just a simple key and value style database.appo-datatabse is a challenge I made for myself, but I'm temporarily giving up as I still don't have enough knowledge to continue with it as I wanted to expand it to now similar to Mongoose.
I was inspired after seeing the package created by [5antos](https://github.com/5antos) the [Simpl.db](https://www.npmjs.com/package/simpl.db), a lightweight local database.
---
Example of use:
```js
const { Database } = require("appo-database");
const database = new Database();database.set("userId:0190109101", "userObject"); // undefined
database.has("userId:0190109101"); // true
database.has("foo"); // false
database.get("userId:0190109101"); // "userObject"
database.get("foo"); // null
database.show(); // undefined
database.clear(); // undefined```