All Projects → khalby786 → jsoning

khalby786 / jsoning

Licence: MIT license
✨ A simple key-value JSON-based persistent lightweight database. ✨

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to jsoning

Pickledb
pickleDB is an open source key-value store using Python's json module.
Stars: ✭ 549 (+684.29%)
Mutual labels:  key-value, datastore
haro
Haro is a modern immutable DataStore
Stars: ✭ 24 (-65.71%)
Mutual labels:  key-value, datastore
keyv
Simple key-value storage with support for multiple backends.
Stars: ✭ 202 (+188.57%)
Mutual labels:  key-value
keyval-resource
a resource that passes key values between jobs
Stars: ✭ 39 (-44.29%)
Mutual labels:  key-value
redis-multi-programming-language-practice
🖖 Learn how to use Redis, from beginner basics to advanced techniques | 最新 Redis 底层原理分析与多语言应用实践
Stars: ✭ 28 (-60%)
Mutual labels:  key-value
okdbc
A fast, light-weight key/value store with http & memcache(TCP/UDP) interface.
Stars: ✭ 28 (-60%)
Mutual labels:  key-value
ansible-role-etcd
Ansible role for installing etcd cluster
Stars: ✭ 38 (-45.71%)
Mutual labels:  key-value
Dictionary
A dictionary data type with a fast b-tree based search
Stars: ✭ 39 (-44.29%)
Mutual labels:  key-value
trakeva
Transactions, Keys, and Values
Stars: ✭ 24 (-65.71%)
Mutual labels:  key-value
DailyDoc
Productivity Note App utilizing Jetpack Compose
Stars: ✭ 31 (-55.71%)
Mutual labels:  datastore
beryldb
BerylDB is a fully modular data structure data manager that can be used to store data as key-value entries. The server allows channel subscription and is optimized to be used as a cache repository. Supported structures include lists, sets, multimaps, and keys.
Stars: ✭ 201 (+187.14%)
Mutual labels:  key-value
AloeDB
Light, Embeddable, NoSQL database for Deno 🦕
Stars: ✭ 111 (+58.57%)
Mutual labels:  datastore
docs
Source code of the ArangoDB online documentation
Stars: ✭ 18 (-74.29%)
Mutual labels:  key-value
ate
Distributed immutable data store with strong encryption and authentication
Stars: ✭ 94 (+34.29%)
Mutual labels:  datastore
SwiftStore
Key-Value store for Swift backed by LevelDB
Stars: ✭ 119 (+70%)
Mutual labels:  key-value
react-keyevent
An easy-to-use keyboard event react component, Package size less than 3kb
Stars: ✭ 38 (-45.71%)
Mutual labels:  key-value
mysqly
Full-featured opensource small-overhead PHP data framework for Mysql built for fast and efficient development
Stars: ✭ 18 (-74.29%)
Mutual labels:  key-value
datastore-to-sql
Export and migrate your GAE Datastore data to SQL using Golang
Stars: ✭ 22 (-68.57%)
Mutual labels:  datastore
FastKV
FastKV is an efficient key-value storage library.
Stars: ✭ 275 (+292.86%)
Mutual labels:  key-value
quickmongo
Quick mongodb wrapper for beginners that provides key-value based interface.
Stars: ✭ 73 (+4.29%)
Mutual labels:  key-value

jsoning

A simple key-value JSON-based persistent lightweight database.


CodeCov Build Status Latest Stable Version NPM Downloads node-current FOSSA Status


View Demo · Report Bug · Request Feature

Loved the project? Please consider donating to help it improve!


🚨 Since v0.10.19, JSON files are generated in the current working directory, rather than within the node_modules which resulted in loss of the JSON files whenever packages were re-installed!

Features

  • Uses JSON files to modify and write key-value elements.
    • This allows for the usage of pre-existing JSON files by specifying the path when creating a new instance of Jsoning.
  • Easy to use, beginner-friendly and lightweight.
  • Writes atomically to prevent file corruption.

Install 💾

Node.js v12.x or greater is required for this package to work.

# npm
npm install jsoning

# or yarn if you're feeling fancy
yarn add jsoning

View the full documentation here.

Basic Usage 📑

let jsoning = require("jsoning");
let db = new jsoning("db.json");

(async () => {
	// set some values with a key
	await db.set("birthday", "07-aug");
	await db.set("age", "13");

	// push stuff to an array for a particular key
	await db.push("transformers", "optimus prime");
	await db.push("transformers", "bumblebee");
	await db.push("transformers", "iron hide");

	// simply log what get is (i forgot what the transformers were)
	console.log(await db.get("transformers")); // [ 'optimus prime', 'bumblebee', 'iron hide' ]

	// just want to see what all is there
	console.log(await db.all()); // { object of the whole database contents }

	// does such a value exist
	console.log(await db.has("value2")); // false

	// my age keeps changing, so I'm deleting it
	console.log(await db.delete("age")); // true

	// i got 100$ for my birthday
	await db.set("money", 100);

	// and someone gave me 200 more dollars xD
	await db.math("money", "add", 200);

	// just wanna make sure how much money I got
	console.log(await db.get("money")); // 300

	// rip iron hide, he died
	await db.remove("transformers", "iron hide");

	// i'm getting bored, so i'm clearing the whole database
	await db.clear();
})();

Contributing

Please see CONTRIBUTING.md for more details on contributing!

Contributors

All Contributors

Thanks goes to these wonderful people (emoji key):


Khaleel Gibran

💻 📖 🎨 🚇 ⚠️

David

📖

Jonyk56

💻

ayntee

💻

undefine

💻 🐛 🛡️

Aditya Gupta

💻

Manuel Maly

💻 🐛

wh0

💻

This project follows the all-contributors specification. Contributions of any kind are welcome!

License

This package is open sourced under the MIT License.

FOSSA Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].