1.1.3 • Published 6 months ago

cryptedjsondb v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

CryptedJSONdb

CryptedJSONdb is a module for Node.js that provides an easy and convenient way to open and retrieve JSON data. It includes methods for setting and discovering by keys and uses secure data encryption with crypto-js encryption. CryptedJSONdb can store configuration data, update settings, and any other data in JSON format.

Installing

npm install cryptedjsondb

Usage

const CryptedJSONdb = require("cryptedjsondb");
const db = new CryptedJSONdb('./data.json', {
    encryption: true,
    key: "your secret key",
    minify: true
});

// set a value
console.log(db.setValue(1000, 'users', 'scar17off', 'balance')); // returns true if set, returns false if it equals it already

// get a value
const value = db.getValue('users', 'scar17off', 'balance');
console.log(value); // 1000

// add a value to arraylist
db.setValue([], "1");
db.addKeyToArr(1, "1");

console.log(db.getPath("users", "scar17off"));
console.log(db.data);

console.log(db.getItemByIndex(0, "1"));
1.1.1

6 months ago

1.1.0

7 months ago

1.1.3

6 months ago

1.1.2

6 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.0

1 year ago