ark.db
Small and fast JSON database for Node and browser.
Installation
Warning: ark.db
is requires node.js version greater than 12!
npm i ark.db
Or, if you're using yarn
yarn add ark.db
Also, if you want to use ark.db
in browser
<script src="https://unpkg.com/ark.db@2.6.0/dist/LocalStorage.min.js"></script>
<script>
const db = new LocalStorage();
</script>
Features
- Fast
- Lightweight
- Easy to use
- Simple
- Beginner friendly
- Dot notation
- Relative path support
- Browser support
- MongoDB support
Usage
MongoDB Usage
const { MongoDB } = require("ark.db");
const db = new MongoDB("your mongo connect url", "your schema name");
await db.set("example", "test");
await db.get("example");
await db.delete("example");
await db.add("example", 2);
await db.subtract("example", 1);
await db.has("example");
await db.push("example", "test");
await db.pull("example", "test");
await db.all();
await db.clear();
await db.createCollection("collection name");
await db.dropCollection();
db.uptime();
db.updateModel("new schema name");
db.createSchema("schema name");
JSON Database Usage
const { Database } = require("ark.db");
const db = new Database();
db.set("example", "test");
db.get("example");
db.delete("example");
db.add("example", 2);
db.subtract("example", 1);
db.has("example");
db.push("example", "test");
db.pull("example", "test");
db.all();
db.clear();
db.ping();
Thanks
Thanks to Stark and hmal for his helpings.
Contact
Discord Server, Theark, Stark
Changelog
### 2.7.0, 2.7.1
2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.6.5, 2.6.6, 2.6.7, 2.6.8, 2.6.9
2.6.0
2.4.4, 2.4., 2.4.6, 2.5.0
2.4.3
- Fixed some bugs.
- Added
options
parameter while connecting to MongoDB.
2.4.2
- Added
MongoDB
adapter. - Added MongoDB support.
2.4.1
- Added
LocalStorage
adapter. - Added browser support.
2.4.0
- Added
pretty
and write
properties to some methods. - Added
relative path
feature.
2.3.1
2.1.1, 2.0.0, 2.3.0
2.1.0
- Added pull method.
- Get and set methods are accelerated.
2.0.0
- Large-scale optimizations have been made.
- All methods are synchronous.
1.1.2
1.1.1
1.1.0
- All methods are asynchronous.