Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nice lib, thanks a lot #505

Open
Janettest1 opened this issue Oct 12, 2022 · 0 comments
Open

Nice lib, thanks a lot #505

Janettest1 opened this issue Oct 12, 2022 · 0 comments

Comments

@Janettest1
Copy link

Janettest1 commented Oct 12, 2022

I was looking for a library that would keep my state consistent, this is my choice, i'm gonna recommend my friend using this library too, tsym.

Initial state:

{
	"admasd": {
		"12831": true
	}
}

await db.push('/acasd/-12831123123', true);

Final state:

{
	"admasd": {
		"12831": true,
		"-12831123123": true
	},
	"acasd": {
		"-12831123123": true
	}
}

image

Perfect, just like i expected.

"use strict";
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
const { JsonDB, Config } = require('node-json-db');
const db = new JsonDB(new Config("settings", true, false, '/'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant