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

trmorsel-ultra.db

v0.0.5

Published

Morsel için geliştirilmiş ultra hızlı database sistemi.

Readme

Morsel Ultra Database

Node.js projeleri için hızlı, kolay, JSON & SQLite destekli, TypeScript uyumlu gelişmiş bir veritabanı kütüphanesi.

morsel-ultra.db hem JSON dosyalarını hem SQLite veritabanını tek bir arayüzle kullanmanı sağlar.


🚀 Özellikler

  • ✔️ JSON ve SQLite desteği
  • ✔️ Kolay kurulum
  • ✔️ Map tabanlı cache sistemi
  • ✔️ Otomatik dosya oluşturma
  • ✔️ TypeScript desteği
  • ✔️ Basit & hızlı kullanım
  • ✔️ Event destekli (set, delete vs.)

📦 Kurulum

npm install morsel-ultra.db

yada

yarn add morsel-ultra.db

🛠️ Başlangıç – Hızlı Kullanım

const Database = require("morsel-ultra.db");

const db = new Database({
    backend: "json", // json | sqlite
    file: "morsel-ultra.db" // sqlite için .db dosyası, json için .json
});

// Değer kaydet
await db.set("kullanici.para", 1500);

// Değer çek
const para = await db.get("kullanici.para");
console.log(para); // 1500

// Veri sil
await db.delete("kullanici.para");

📁 Yapılandırma Seçenekleri

new Database({
    backend: "json" | "sqlite",
    file: "morsel-ultra.db",
    autosave: true,
    indent: 2
});

JSON modu için:

  • Dosya otomatik oluşturulur
  • Hızlı okuma / yazma
  • Küçük projeler için ideal

SQLite modu için:

  • Büyük projeler için daha stabil
  • Daha hızlı sorgular

🔥 Gelişmiş Kullanım

🔹 Nesne Kaydetme

await db.set("ayarlar", {
    prefix: "!",
    renk: "#8257e6"
});

🔹 Sadece Bir Alanı Güncelleme

await db.set("ayarlar.prefix", "?");

🔹 Tüm Veritabanını Çekme

const data = await db.all();
console.log(data);

🔹 Silme

await db.delete("ayarlar.prefix");

📡 Event Sistemi

db.on("set", (key, value) => {
    console.log(`Yeni veri: ${key} =`, value);
});

db.on("delete", (key) => {
    console.log(`Silindi: ${key}`);
});

📘 TypeScript Kullanımı

import Database from "morsel-ultra.db";

const db = new Database({ backend: "sqlite", file: "morsel-ultra.db" });

await db.set("user.balance", 100);
const x = await db.get<number>("user.balance");

⚠️ Key Notasyonu

  • Nesne yolları . ile ayrılır
  • kullanici.bilgi.yas

Örnek JSON:

{
  "kullanici": {
    "bilgi": {
      "yas": 16
    }
  }
}

📄 Lisans

MIT License


🙌 Katkıda Bulunma

Pull Request gönderebilir veya Issue açabilirsin.


⭐ Destek Ol

Beğendiysen bir ⭐ bırakmayı unutma!