npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

json-db-jdb

v3.0.2

Published

json database

Downloads

17

Readme

JDb-cropped

JDb - JSON Database

To get the concept, check: https://github.com/spuckhafte/JSON-Database

This is the latest version of the JSON Database. For contribution: Discord: spuckhafte#7109

Logs:

3 March 22Organized codeAssign() is asynchronous 5 March 22The morals are encrypted, makes it difficult to read the JSON file 8 March 22 ⭐ Morals of rGroup elements can be edited 3 May 22EncDenc module is handling the encryption 29 May 22 ⭐ Update the config (encdenc) from your main file, before: you had to update the node module itself in order to update the config 8 Nov 22 ⭐ You can now turn "off" data encryption for your project: jdb.Machine.dataEncryption = false

⚠️You should edit the config array and make it unique for the best use of EncDenc encryption module:

jdb.Machine.config = [ /* unique array */ ]

Read more at https://www.npmjs.com/package/encdenc

How To Use?

  1. Install the package
npm i json-db-jdb
  1. Import it
const jdb = require('json-db-jdb/jdb')
  1. Create database:
// Params: EntityType, EntityName
jdb.create('Db', 'myDatabase')
// run the file and comment out this command
  1. Create Groups
// Params: EntityType, EntityName
jdb.create('rGroup', 'test_users')
jdb.create('iGroup', 'test_init')
// run file and comment out these 2 lines
  1. Create elements in groups
// Params: EntityType, EntityGroup, EntityName
create('element', 'test_users', 'name');
create('element', 'test_users', 'pass');
create('element', 'test_init', 'test');
// run file and comment out these lines
  1. Assign data to iGroup element
// Params: GroupName, ElementName, Prime-Moral-Object 
assignI('test_init', 'test', {
     "test": "test",
     "test2": "255"
})
// run file and comment out these lines
  1. Get the data from iElement ; assign to rGroup elements
// Params: GroupName, ElementName
console.log(getEl('test_init', 'test'));

// Params: GroupName, Element-Moral-Object
assignR('test_users', {
     "name": "user232",
     "pass": "pass2"
})
// run file and comment out these lines
  1. Get whole elements as data or get bits of data from elements
// Params: GroupName, ElementName
console.log(getEl('test_users', 'name'));
console.log(getEl('test_users', 'pass'));

// Params: GroupName, GetWithRespectTo, Query
getR('test_users', 'entry', '1').then(data => console.log(data))
getR('test_users', 'moral', ['name', 'user232']).then(data => console.log(data));
// run file and comment out these lines
  1. Edit rGroup elements
// GroupName, Entry, Element-Moral-Object
editR('test_users', '1', {
     "name": "spuckhafte",
     "pass": "strong_password"
})
// run file and comment out these lines
  1. Get the edited data
// Params: GroupName, GetWithRespectTo, Query
getR('test_users', 'entry', '1').then(data => console.log(data));
getR('test_users', 'moral', ['name', 'spuckhafte']).then(data => console.log(data));
// run file and comment out these lines
  1. Get everything one last time
// Params: GroupName, ElementName
console.log(getEl('test_init', 'test'))
console.log(getEl('test_users', 'name'))
console.log(getEl('test_users', 'pass'))
// run file and comment out these lines