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 🙏

© 2025 – Pkg Stats / Ryan Hefner

nahdb

v1.0.0

Published

NaHDB adalah solusi key-value database modern yang ringan, cepat, dan aman dengan dukungan enkripsi AES-256.

Readme

NaHDB

NaHDB adalah solusi key-value database modern yang 💨 ringan, ⚡ cepat, dan 🔒 aman dengan dukungan enkripsi AES-256. Dirancang untuk developer 🐍 Python, 🟦 Node.js, dan 🐘 PHP, NaHDB memudahkan Anda menyimpan data dengan tingkat keamanan tinggi tanpa harus bergantung pada sistem database yang kompleks.

☕ Dukung Pengembangan

Jika Anda merasa terbantu dengan proyek ini, Anda bisa mendukung pengembangan lebih lanjut dengan berdonasi melalui:

💳 Bank Transfer

  • 🏦 Bank Jago
    No. Rekening: 105361441776
    Atas Nama: ILMAN HENDRAWAN SAPUTRA

🌐 Cryptocurrency

  • 🪙 Litecoin (LTC): MSdWrJR8eHZEF9PFBKzyiSXcvAsTdrsg3D
  • ₿ Bitcoin (BTC): 3LDgRxf5sAky8ejJJE7tR4L6uvJzmwoH4k
  • 💵 Bitcoin Cash (BCH): bitcoincash:qrrqattarsej5m3v05rtgfulcqqlxy840yls0rh56w

📦 Instalasi

Salin file NaHDB.js ke dalam proyek Anda. atau

npm install nahdb

🚀 Contoh Kode Penggunaan

Inisialisasi

tambahkan "type": "module" kedalam package.json

{
  "name": "nahdb",
  "version": "1.0.0",
  "type": "module",
  "description": "NaHDB adalah solusi key-value database modern yang  ringan,  cepat, dan  aman dengan dukungan enkripsi AES-256.",
  "main": "app.js",
  "scripts": {
    "test": "node app.js"
  },
  "author": "Ilman Hendrawan Saputra",
  "license": "ISC"
}
import { NaHDB } from './NaHDB.js';

const db = new NaHDB('databasePath', Buffer.from('key', 'utf-8'));
await db.init();

Login

Default password root adalah '' dan mengembalikan boolean.

(async () => {
    await db.login('root', '');
})()

Create Table

(async () => {
    // Create Table
    await db.createTable("table",{"nameColom" : {"type": "str", "default": ""}});

    // Get List Table
    let listTable = db.listTable();
    console.log(listTable);
})()

Update Table

(async () => {
    // Update Table
    await db.updateTable("table",{"nameColom" : {"type": "str", "default": ""},"nameColom2" : {"type": "str", "default": ""}});

    // Get Schema Table
    let schemaTable = db.getSchema("table");
    console.log(schemaTable);
})()

Delete Table

(async () => {
    // Delete Table
    await db.deleteTable("table");
})()

Add Data

(async () => {
    // Add Data
    await db.create("table", {"nameColom":"value"});
})()

Update Data

(async () => {
    // Update Data
    await db.update("table", {"nameColom":"value"}, {"nameColom":"valueUpdate"});
})()

Delete Data

(async () => {
    // Delete Data
    db.delete("table", {"nameColom":"valueUpdate"});
})()

Join Table

(async () => {
    // Create Table Users
    await db.createTable("users", {
        "user_id": {"type": "int", "default": 0},
        "name": {"type": "str", "default": ""},
        "email": {"type": "str", "default": ""}
    })

    // Add Data Users
    await db.create("users", {"user_id": 1, "name": "Alice", "email": "[email protected]"})
    await db.create("users", {"user_id": 2, "name": "Bob", "email": "[email protected]"})
    await db.create("users", {"user_id": 3, "name": "Charlie", "email": "[email protected]"})

    // Create Table Orders
    await db.createTable("orders", {
        "order_id": {"type": "int", "default": 0},
        "user_id": {"type": "int", "default": 0},
        "order_date": {"type": "str", "default": ""}
    })

    // Add Data Orders
    await db.create("orders", {"order_id": 101, "user_id": 1, "order_date": "2025-07-08"})
    await db.create("orders", {"order_id": 102, "user_id": 2, "order_date": "2025-07-09"})
    await db.create("orders", {"order_id": 103, "user_id": 1, "order_date": "2025-07-10"})

    // Create Table Products
    await db.createTable("products", {
        "product_id": {"type": "int", "default": 0},
        "order_id": {"type": "int", "default": 0},
        "product_name": {"type": "str", "default": ""},
        "price": {"type": "float", "default": 0.0}
    })

    // Add Data Products
    await db.create("products", {"product_id": 1001, "order_id": 101, "product_name": "Laptop", "price": 1200.0})
    await db.create("products", {"product_id": 1002, "order_id": 101, "product_name": "Mouse", "price": 25.0})
    await db.create("products", {"product_id": 1003, "order_id": 102, "product_name": "Keyboard", "price": 45.0})
    await db.create("products", {"product_id": 1004, "order_id": 103, "product_name": "Monitor", "price": 300.0})

    // Get Data Join Table Singgle Kolom
    data = db.join("orders", "user_id", [{"table": "users", "on": "user_id", "as": "user"}])
    console.log(data)

    // Get Data Join Table Multiple Colomn
    data = db.joinField([
        { "table": "users"},
        {"table": "orders","on": "user_id","where": {"table": "users", "on": "user_id"},"as": "orders"},
        {"table": "products","on": "order_id","where": {"table": "orders", "on": "order_id"},"as": "products"}
    ])
    console.log(data)
})()

Flush Table

(async () => {
    // Flush Table
    await db.flushTable("users")
})()

Add User

Permision:

  1. __user__ :
    • get_users
    • get_user_id_by_username
    • add_user
    • update_permission
    • forget_password
    • change_password
    • get_username_by_id
    • get_user_by_id
    • update_username
  2. table :
    • select
    • create
    • update
    • delete
    • flush
    • get_schema
    • list
    • update_table
    • delete_table
    • create_table
(async () => {
    // Add Users
    await db.addUser("username","password", "role" , { users: ['select', 'create'] })

    // Get Users
    let users = db.getUsers()
    console.log(users)
})()

Forget Password

(async () => {
    // Forget Password
    await db.forgetPassword("username","passwordNew")
})()

Update Username

(async () => {
    // Get ID by Username
    let idUser = await db.getUserIdByUsername('username')

    // Update Username
    await db.updateUsername('usernameNew', idUser)
})()

Forget Password

(async () => {
    // Forget Password
    await db.forgetPassword("username","passwordNew")
})()

Update Password

(async () => {
    // Update Password
    await db.changePassword("passwordNew",idUser)
})()

Update Permision

(async () => {
    // Get Username by ID
    let username = db.getUsernameById(idUser)

    // Update Permision User
    await db.updatePermission(username, {"users":["select","create","update","delete"]})

    // Get Users
    users = db.getUsers()
    console.log(users)
})()

Check Login

(async () => {
    // Check Login
    let isLogin = db.isLogin()
    console.log(isLogin)
})()

Get User by ID

(async () => {
    // Get User by ID
    let user = db.getUserById(idUser)
    console.log(user)
})()

🔒 Fitur

  • AES-256 Encryption untuk semua data.
  • Cepat & ringan tanpa dependensi eksternal.
  • Lintas platform: Python, Node.js, PHP.
  • Penyimpanan berbasis file.

📜 Lisensi

MIT License.

☕ Dukung Pengembangan

Jika Anda merasa terbantu dengan proyek ini, Anda bisa mendukung pengembangan lebih lanjut dengan berdonasi melalui:

💳 Bank Transfer

  • 🏦 Bank Jago
    No. Rekening: 105361441776
    Atas Nama: ILMAN HENDRAWAN SAPUTRA

🌐 Cryptocurrency

  • 🪙 Litecoin (LTC): MSdWrJR8eHZEF9PFBKzyiSXcvAsTdrsg3D
  • ₿ Bitcoin (BTC): 3LDgRxf5sAky8ejJJE7tR4L6uvJzmwoH4k
  • 💵 Bitcoin Cash (BCH): bitcoincash:qrrqattarsej5m3v05rtgfulcqqlxy840yls0rh56w

🙏 Terima kasih atas dukungan Anda!