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 🙏

© 2026 – Pkg Stats / Ryan Hefner

usemidb

v0.1.5

Published

Basit, güvenli ve TTL destekli JSON tabanlı Node.js veritabanı

Readme

UsemiDB 🚀

UsemiDB, Node.js projeleri için hafif, yüksek performanslı ve JSON tabanlı bir key-value database sistemidir.

v0.1.4 Güncellemesi ile artık Nokta Notasyonu (Dot Notation) destekliyor! 🎯 İç içe geçmiş verileri (Nested Objects) yönetmek, matematiksel işlemler yapmak, yedek almak ve gelişmiş aramalar yapmak hiç bu kadar kolay olmamıştı.


⚡ Özellikler

  • 🎯 Dot Notation: user.settings.theme gibi iç içe verilere doğrudan erişim ve güncelleme.
  • 🛡️ Snapshot & Restore: İstediğiniz an veritabanının yedeğini alın (backup) ve geri dönün (restore).
  • 🔎 Gelişmiş Arama: find ve findOne ile obje özelliklerine göre hızlıca veri bulun.
  • ✖️➗ Matematik Seti: add, subtract, multiply, divide işlemlerini nokta notasyonu ile yapın.
  • ✨ Akıllı Listeler: pushUnique ile tekrarsız ekleme ve pull ile listeden silme.
  • 🎲 Random: Veritabanından rastgele veri çekme.
  • ⚡ Performans: writeDelay (Debounce) sistemi ile diski yormadan toplu yazma.
  • ⏳ TTL Desteği: Verilere ömür biçin, süresi dolunca otomatik silinsin.
  • 📁 Collections: Verilerinizi namespace (koleksiyon) bazlı gruplandırın.

🔹 Kullanım Örnekleri

  1. Kurulum & Ayarlar
const UsemiDB = require("usemidb");

const db = new UsemiDB({
  filePath: "./database/data.json", // Veri dosyası
  backupPath: "./database/backups", // Yedek klasörü
  writeDelay: 100,                  // Performans için yazma gecikmesi (ms)
  autoCleanInterval: 60000          // TTL kontrol aralığı (ms)
});
  1. 🎯 Dot Notation (Nokta Notasyonu) - YENİ!
// İç içe veri kaydetme
await db.set("user_1.settings.theme", "dark");
await db.set("user_1.settings.notifications", true);

// Veriyi okuma
const theme = db.get("user_1.settings.theme");
console.log(theme); // "dark"

// Tüm objeyi de çekebilirsiniz
console.log(db.get("user_1"));
// { settings: { theme: "dark", notifications: true } }
  1. ✖️ Matematiksel İşlemler
await db.set("user_1.stats.xp", 100);

// Ekleme & Çıkarma
await db.add("user_1.stats.xp", 50);       // 150
await db.subtract("user_1.stats.xp", 10);  // 140

// Çarpma & Bölme
await db.multiply("user_1.stats.xp", 2);   // 280
await db.divide("user_1.stats.xp", 2);     // 140
  1. ✨ Akıllı Liste (Array) Yönetimi
// Normal Ekleme
await db.push("etiketler", "nodejs");

// ⭐️ Unique Push (Tekrarsız Ekleme)
// Eğer "nodejs" listede varsa tekrar eklemez!
await db.pushUnique("etiketler", "nodejs");

// İç içe listelere erişim
await db.push("user_1.inventory", "sword");

// Listeden Silme (Pull)
await db.pull("user_1.inventory", "sword");
  1. 🛡️ Yedekleme & Geri Yükleme (Snapshot)
// Kritik bir işlemden önce yedek al
await db.backup("guvenli-nokta-v1");
console.log("Yedek alındı!");

// ...Veriler bozulursa veya silinirse...

// Yedeği geri yükle
await db.restore("guvenli-nokta-v1");
console.log("Veriler kurtarıldı.");
  1. 🔎 Arama & Rastgele Veri
// Obje özelliklerine göre arama
const admins = db.find({ role: "admin" });

// İsme göre tek kişi bul
const user = db.findOne({ username: "Lorely" });

// Rastgele veri çek (Çekilişler için)
const winner = await db.random();
  1. 🗂️ Koleksiyonlar (Namespaces)
const economy = db.collection("economy");

// Sadece 'economy' koleksiyonuna yazar
await economy.set("user_1", 500);

// Koleksiyon içinde de nokta notasyonu çalışır
await economy.add("user_1", 50);

📡 Event Sistemi

db.on("set", (key, value) => {
  console.log(`[KAYIT] ${key} = ${JSON.stringify(value)}`);
});

db.on("expired", (key) => {
  console.log(`[TTL] ${key} süresi doldu ve silindi.`);
});

💻 Kurulum

npm install usemidb

🔗 Linkler

📦 NPM Sayfası

UsemiDB NPM Paketi


🐈 Github Sayfası

UsemiDB Github