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

aikodb

v1.1.9

Published

AikoDB, JSON database module for simple and easy use, ideal for Discord bots.

Downloads

48

Readme

Downloads DownloadPerMonth

AikoDB

AikoDB is a lightweight, fast, and easy-to-use database module based on JSON. It's perfect for use in small projects, prototyping, or even Discord bots where a full-scale database system is overkill.


📦 Installation

Install via npm:

![DownloadPerMonth](https://img.shields.io/npm/dm/aikodb?style=for-the-badge)

# AikoDB

**AikoDB** is a lightweight, fast, and secure JSON-based database system.  
Now with **AES-256 encryption** and **automatic backup recovery**!

---

## 📦 Installation

```bash
npm install aikodb

🚀 Basic Usage

const AikoDB = require('aikodb');
const db = new AikoDB('json', 'database.json', { encryptionKey: 'MySecretKey123!' });

(async () => {
  await db.set('user1', { xp: 50 });
  console.log(db.get('user1'));
})();

🔐 Encryption & Backup System

  • AES-256 encryption keeps your data secure.
  • If your JSON file becomes corrupted or unreadable, AikoDB will automatically restore the latest backup.

Example:

const db = new AikoDB('json', 'secure.json', { encryptionKey: 'superSecretKey' });

📚 API Reference

(same as before)


🆕 Latest Update (v1.2.0)

  • Added AES-256 encryption for secure data storage.
  • Added auto-restore from backup if JSON file is corrupted.
  • Minor performance optimizations.

🌍 Language Versions

AikoDB

AikoDB, hafif, hızlı ve güvenli bir JSON tabanlı veri tabanı sistemidir.
Artık AES-256 şifreleme ve otomatik yedekten geri yükleme desteği ile!


📦 Kurulum

npm install aikodb

🚀 Basit Kullanım

const AikoDB = require('aikodb');
const db = new AikoDB('json', 'veritabani.json', { encryptionKey: 'BenimGizliAnahtarim' });

(async () => {
  await db.set('kullanici1', { xp: 50 });
  console.log(db.get('kullanici1'));
})();

🔐 Şifreleme ve Yedekleme Sistemi

  • AES-256 şifreleme ile verileriniz güvenle saklanır.
  • JSON dosyanız bozulur veya okunamaz hale gelirse, AikoDB otomatik olarak en son yedeği geri yükler.

Örnek:

const db = new AikoDB('json', 'guvenli.json', { encryptionKey: 'superGizliAnahtar' });

🆕 Son Güncelleme (v1.1.9a)

  • AES-256 şifreleme desteği eklendi.
  • JSON bozulduğunda otomatik yedek geri yükleme sistemi aktif.
  • Performans iyileştirmeleri yapıldı.

✨ Support

Need help? Join our Discord server
or reach me on Discord.

npm install aikodb


---

## 🚀 Basic Usage

Using AikoDB is extremely simple. You can start using it with just a few lines:

```js
const AikoDB = require('aikodb');
const db = new AikoDB('json', 'database.json');

(async () => {
  await db.set('user1', { xp: 50 });
  console.log(db.get('user1'));

  await db.push('logs', 'Login Users.');
  console.log(db.get('logs'));

  console.log(db.has('user1')); // true
  console.log(db.size());       // database entry count

  await db.removeFromArray('logs', 'Login Users.');
  console.log(db.get('logs'));

  await db.clear(); // clears all data
})();

📚 API Reference

📥 add(key, value)

Adds a key with the given value to the database. Alias of set().

📤 get(key)

Returns the value of the given key.

📝 set(key, value)

Creates or updates a key with the specified value.

delete(key)

Deletes the specified key from the database.

📄 all()

Returns the entire database object.

🔁 push(key, value, allowDuplicates = true)

Pushes a value to an array stored under the key.
Creates the array if it doesn't exist.
You can prevent duplicates by setting allowDuplicates to false.

await db.push('logs', 'Login', false); // won't add if already exists

removeFromArray(key, value)

Removes the given value from the array stored under the key.

🧹 clear()

Clears the entire database.

🔎 has(key)

Returns true if the key exists in the database.

📊 size()

Returns the number of entries in the database.

🔑 keys()

Returns an array of all keys.

🎯 values()

Returns an array of all values.

🧪 filter(callback)

Filters entries based on a function.

db.filter(item => item.age > 20);

🔍 find(property, value)

Returns entries where object[property] === value.

db.find("username", "furkan");

📈 sort(byKey, order)

Sorts data by key and order (asc or desc).

db.sort("xp", "desc");

🔄 reload()

Reloads the data from the file.

💾 save()

Manually saves the current state to the file.


📌 Latest Update (v1.1.9)

  • push(key, value, allowDuplicates = true) now supports preventing duplicate entries.
  • Stability improvements for array and object handling.

🤖 Example: With Discord Bot

const AikoDB = require('aikodb');
const db = new AikoDB('json', 'data.json');

client.on('messageCreate', async message => {
  if (message.author.bot) return;

  const userId = message.author.id;
  const user = db.get(userId) || { xp: 0 };

  user.xp += 10;
  await db.set(userId, user);
});

✨ Support

Need help? Join our Discord server
Get help on the #support channel.
Or DM me directly via my Discord profile.