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

nurdb

v1.0.5

Published

TR Database Module.

Readme

Here’s a clean, professional English README.md for your nurdb module — fully optimized for GitHub and npm.


# 📦 NurDB — Lightweight JSON File Database for Node.js

NurDB is a fast, dependency-free, file-based JSON database designed for small to medium Node.js applications. It offers a simple API for key–value storage, arrays, backups, numeric operations, and safe file handling.

✔ Zero dependencies ✔ Auto-file creation ✔ Push / Unpush support ✔ Array & number utilities ✔ Automatic JSON repair ✔ Smart error system (shows the caller file) ✔ Ideal for small apps, bots, and quick data storage


🚀 Installation

npm install nurdb

📁 Getting Started

const Database = require("nurdb");

const db = new Database({
    file: "data",      // creates/uses data.json
    autoFile: true,    // create file if missing
    jsonspaces: 2      // formatting
});

# ⭐ Basic Usage

🔹 Set a value

db.set("username", "Eren");

🔹 Get a value

db.get("username");
// "Eren"

🔹 Delete a key

db.delete("username");

🔹 Get all database content

db.all();

# 📚 Array Operations

Add an item (push)

db.push("logs", "Server started.");

Remove an item (unpush)

db.unpush("logs", "Server started.");

Delete the entire array

db.unpush("logs", "delete");

Get array safely (unique values)

db.getArray("tags"); 

# 🔢 Number Operations

Increase a number

db.add("coins", 5);

Decrease a number

db.down("coins", 2);

# 🔍 Find in Array

db.push("users", { id: 1, name: "Eren" });

const user = db.find("users", u => u.id === 1);
// { id: 1, name: "Eren" }

# 🗄 Create a Backup

db.backup("backup_1");
// => backup_1.json

# ⚠ Smart Error System

NurDB includes an enhanced error formatter. If you forget a value, the error will show the file that caused it:

Example:

/home/project/a.js: value is missing!

This makes debugging faster and cleaner.


# 📘 Constructor Options

| Option | Description | | ------------ | ----------------------------------- | | file | JSON filename without extension | | autoFile | Auto-create file if missing | | jsonspaces | Pretty format indentation |


# 🧪 Full Example

const Database = require("nurdb");
const db = new Database({ file: "app", autoFile: true });

// strings
db.set("owner", "Eren");

// numbers
db.set("coins", 10);
db.add("coins", 5);

// arrays
db.push("messages", "Hello!");
db.push("messages", "World!");

// objects
db.set("settings", { theme: "dark" });

console.log(db.all());

# 🧩 Features

  • 🎯 Zero dependencies
  • 🎯 File-based NoSQL structure
  • 🎯 Automatic JSON validation & repair
  • 🎯 Simple and intuitive API
  • 🎯 Array & numeric helpers
  • 🎯 Fast and lightweight
  • 🎯 Backup support
  • 🎯 Static file tracking (multiple instances)
  • 🎯 Meaningful error messages
  • 🎯 Perfect for Discord bots, small apps, prototypes

📜 License

This project is licensed under the ISC License.

You are free to use, modify, distribute, and sublicense this software, as long as the copyright notice and permission notice remain in all copies.

For more details, see the LICENSE file.


Made By Rexaly