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

loyaldb

v1.0.0

Published

Dosya tabanlı NoSQL veritabanı kütüphanesi - MongoDB benzeri API ile JSON dosyasına veri saklama

Downloads

15

Readme

FlyDB 🚀

Hafif, hızlı ve kullanımı kolay dosya tabanlı NoSQL veritabanı kütüphanesi. MongoDB benzeri API ile JSON dosyasına veri saklama.

📦 Kurulum

NPM ile kurulum (gelecekte)

npm install flydb

Yerel kullanım

  1. flydb klasörünüzü projenizin içine kopyalayın
  2. Require ile dahil edin:
const db = require('./flydb');

🚀 Hızlı Başlangıç

const db = require('flydb');

// Koleksiyon seçimi
db.use('users');

// Veri ekleme
db.set('profile.name', 'Ali');
db.set('profile.age', 25);
db.set('profile.location.city', 'Istanbul');

// Array ile çalışma
db.push('hobbies', 'reading');
db.push('hobbies', 'coding');
db.push('hobbies', 'gaming');

// Veri okuma
console.log(db.get('profile.name')); // "Ali"
console.log(db.get('profile')); // {name: "Ali", age: 25, location: {city: "Istanbul"}}
console.log(db.all()); // Tüm koleksiyon

📚 API Dokümantasyonu

Koleksiyon Yönetimi

use(collectionName)

Aktif koleksiyonu seçer, yoksa oluşturur.

db.use('users');    // users koleksiyonunu seç
db.use('products'); // products koleksiyonuna geç

Veri İşlemleri

set(path, value)

Nested path'e değer atar.

db.set('user.profile.name', 'Ahmet');
db.set('settings.theme', 'dark');

get(path) / fetch(path)

Path'den değer alır.

db.get('user.profile.name'); // "Ahmet"
db.fetch('user.profile');    // {name: "Ahmet"}

all()

Aktif koleksiyonun tüm verilerini döndürür.

db.all(); // Koleksiyonun tüm verisi

has(path)

Path'in var olup olmadığını kontrol eder.

db.has('user.profile.name'); // true/false

delete(path)

Belirtilen path'i siler.

db.delete('user.profile.age'); // age alanını sil

deleteAll()

Aktif koleksiyonu tamamen temizler.

db.deleteAll(); // Koleksiyonu boşalt

Array İşlemleri

push(path, value)

Array'e eleman ekler, array yoksa oluşturur.

db.push('user.hobbies', 'swimming');

unpush(path, value)

Array'den belirli değeri siler.

db.unpush('user.hobbies', 'swimming');

delByPriority(path, index)

Array'den index'e göre eleman siler.

db.delByPriority('user.hobbies', 0); // İlk elemanı sil

setByPriority(path, value, index)

Array'deki belirli index'i günceller.

db.setByPriority('user.hobbies', 'reading', 0); // İlk elemanı güncelle

💾 Veri Yapısı

Veriler flydb.json dosyasında şu formatta tutulur:

{
  "users": {
    "profile": {
      "name": "Ali",
      "age": 25
    },
    "hobbies": ["reading", "coding"]
  },
  "products": {
    "list": [
      {"id": 1, "name": "Laptop"},
      {"id": 2, "name": "Mouse"}
    ]
  }
}

🔧 Gelişmiş Özellikler

İstatistik Bilgileri

db.stats(); // Veritabanı istatistikleri

Zincirleme İşlemler

db.use('users')
  .set('profile.name', 'Ali')
  .push('hobbies', 'reading')
  .push('hobbies', 'coding');

⚠️ Önemli Notlar

  • Tüm veriler otomatik olarak flydb.json dosyasına kaydedilir
  • Koleksiyonlar otomatik olarak oluşturulur
  • Array olmayan path'e push yapılırsa otomatik array oluşturulur
  • Hata durumlarında açıklayıcı mesajlar döner

📄 Lisans

MIT License - Detaylar için LICENSE dosyasına bakın.