1.0.0 • Published 6 years ago
ubase-db v1.0.0
µBase
µBase is a simple NodeJS database intended specifically for small projects, prototypes, and anything that will never end up in production. If you don't have time to install and struggle with a complicated database, this is the tool for you.
It is essentially a wrapper atop a JSON file, adding autosave/load, a basic document-esque structure, and some helpers for filtering and manipulating lists of entries.
Use this for experiments. DO NOT use it for large-scale projects.
Features:
- Local JSON file-based storage.
- Multiple tables of data.
- Automatic saving.
- Pure JSON object structure.
- Simple functions for filtering, adding, removing, updating, etc.
Simple Usage (just read the source code comments for more methods):
// Load our database.
const db = await ub("hello.json")
// Get the "messages" document listing.
const messages = db("messages")
// Find the first message with the name field value "Delete the First of Me" and remove it.
messages.filter({ name: "Delete the First of Me" }).limit(1).remove()
License
Copyright © 2018 Ethan McTague.
Licensed under the MIT license. See LICENSE for more details.
1.0.0
6 years ago