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

andrew.db

v1.0.1

Published

Professional, MongoDB-like JSON database for Node.js with advanced querying, indexing, and transaction support

Downloads

30

Readme

andrew.db

kankam bu mongo mantığıyla çalışan ama much simpler bi lokal json veritabanı. şişik setup'lar yok, kur ve kullan. transaction falan da var merak etme.

indirme

npm i andrew.db

ufak bi giriş

const Database = require('andrew.db');

// db başlatalım / db start
const db = new Database({
    path: './mydata',
    autoSave: true, 
    saveInterval: 5000
});

const users = db.collection('users');

// kişi ekle / add user
users.insertOne({
    name: 'Ege',
    age: 22,
    email: '[email protected]'
});

// filtrele getir / filter and fetch
const result = users.find({ age: { $gte: 20 } }).execute();
console.log(result);

docs

data ekleme

const users = db.collection('users');

// single
users.insertOne({ name: 'Halil', age: 25, email: '[email protected]' });

// toplu add / ++ add
users.insertMany([
    { name: 'Halil', age: 30 },
    { name: 'Mert', age: 35 }
]);

data çekme (find)

klasik mongo db çalışır $gt, $lt, $in, $or vs.

// hepsini çek / fetch all
const everyone = users.find().execute();

// kişiyi bul / find one
const dude = users.findOne({ name: 'Halil' });

// karmaşık query / complex query
users.find({ $or: [{ age: { $lt: 20 } }, { age: { $gt: 30 } }] }).execute();

data editleme

users.updateOne({ name: 'Halil' }, { $set: { age: 26 } });

// multiple doc update
users.updateMany({ age: { $lt: 18 } }, { $set: { status: 'minor' } });

// sayıyı artır fln
users.updateOne({ name: 'Ege' }, { $inc: { age: 1 } });

silme (delete)

users.deleteOne({ name: 'Halil' });
users.deleteMany({ status: 'minor' });

// sil hepsini / delete all
users.clear(); 

schema

tipleri zorunlu kıl / make it mandatory for the correct types

users.setSchema({
    name: { type: 'string', required: true },
    age: { type: 'number', required: true }
});

users.insertOne({ name: 'Mert' }); // age missing error verir

transactions

para gönderirken falan yarı yolda patlarsa db bozulmasın diye. (avoid db corruption during money transfer)

db.startTransaction();

try {
    users.insertOne({ name: 'Halil', balance: 100 });
    users.updateOne({ name: 'Ege' }, { $inc: { balance: -100 } });
    
    await db.commit();
    console.log('transaction yes bibies');
} catch (error) {
    await db.rollback();
    console.error('Transaction salak failed:', error);
}

backup

const backupFile = await db.backup('./backups');
console.log('backup create:', backupFile);

iletişim

  • bug reports: @egeiwz or discord.gg/spacedev

made by egeiwz