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

teste-ourdb

v0.0.1

Published

A Database Library

Downloads

4

Readme

باستخدام npm | Using npm

npm install ourdb

باستخدام yarn | Using yarn

yarn add ourdb

باستخدام pnpm | Using pnpm

pnpm add ourdb


## 🚀 المميزات الرئيسية | Main Features

### التوزيع الأفقي والتكرار | Sharding & Replication
- ⚖️ توزيع البيانات تلقائياً | Automatic data distribution
- 🔄 تكرار البيانات للموثوقية | Data replication for reliability
- 🔁 إعادة توازن تلقائية | Automatic rebalancing

### تحليلات متقدمة | Advanced Analytics
- 📊 دعم التجميع المتقدم | Advanced aggregation support
- 📈 تحليل البيانات الزمنية | Time-series analysis
- 🔍 استعلامات معقدة | Complex queries

### أداء عالي | High Performance
- ⚡ تخزين في الذاكرة | In-memory storage
- 💾 تخزين مؤقت ذكي | Smart caching
- 🚄 تحسين الاستعلامات | Query optimization

## 📚 أمثلة الاستخدام | Usage Examples

### إعداد قاعدة بيانات موزعة | Setting up a Sharded Database

```javascript
const { Database } = require('ourdb');

const db = new Database('myapp', {
    sharding: {
        enabled: true,
        numShards: 3,
        replicationFactor: 2
    },
    cache: {
        maxSize: 10000,
        maxAge: 300000 // 5 minutes
    }
});

// إنشاء مجموعة موزعة | Create a sharded collection
const users = db.createCollection('users', {
    schema: userSchema,
    shardKey: 'userId'
});

تحليلات متقدمة | Advanced Analytics

// استعلام تجميعي | Aggregation query
const result = await db.query('sales', [
    { $match: { date: { $gte: new Date('2024-01-01') } } },
    { $group: {
        _id: '$category',
        totalSales: { $sum: '$amount' },
        avgOrder: { $avg: '$amount' }
    }}
]);

بيانات زمنية | Time Series Data

// إنشاء مجموعة زمنية | Create time series collection
const metrics = db.createCollection('metrics', {
    timeSeries: true,
    retention: {
        duration: 1000 * 60 * 60 * 24 * 30, // 30 days
        precision: 'minute'
    }
});

// إدخال قياسات | Insert measurements
metrics.insert({
    sensor: 'temp_1',
    value: 23.5,
    timestamp: new Date()
});

// استعلام عن فترة زمنية | Query time range
const data = metrics.queryRange(
    '2024-02-01',
    '2024-02-16',
    { sensor: 'temp_1' }
);

استعلامات بيانية | Graph Queries

// إنشاء فهرس بياني | Create graph index
db.createGraphIndex('users', 'follows', 'followedBy');

// تتبع العلاقات | Traverse relationships
const network = await db.traverseGraph('users', 
    startUser,
    'follows',
    { maxDepth: 3 }
);

⚡ الأداء | Performance

  • معالجة +100,000 عملية/الثانية | 100,000+ operations/second
  • دعم ملايين السجلات | Millions of records support
  • تأخير منخفض | Low latency
  • توسع أفقي سلس | Seamless horizontal scaling

🛠️ الإعداد للتطوير | Development Setup

git clone https://github.com/yourusername/ourdb.git
cd ourdb
npm install
npm test