You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

filodb

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filodb

A lightweight easy to use database for your Node.js project.

0.0.1
latest
npmnpm
Version published
Weekly downloads
72
Maintainers
0
Weekly downloads
 
Created
Source

FiloDB

FiloDB is a lightweight JSON file-based database built with Node.js. It’s ideal for small projects, prototyping, CLI tools, or educational purposes where a full database engine is not necessary.

📦 Installation

npm install filodb

🚀 Usage

import FiloDB from 'filodb';

const db = new FiloDB('./myDB.json'); // Relative to the project root (where package.json is)

await db.insert({ name: 'Alice' }, { name: 'Bob' });

const result = await db.get({ name: 'Alice' });
console.log(result);

await db.update({ name: 'Alice' }, { name: 'Eve' });

await db.delete({ name: 'Bob' });

📚 API

🔁 Return Values

Keep in mind that every method, except for Zenith.prototype.get returns the FiloDB instance, allowing method chaining.

new FiloDB(path?: string)

Creates a new instance. If the file doesn't exist, it will be automatically created.

insert(...data: Record<string, any>[])

Inserts one or more records.

get(query: Record<string, any>, limit?: number)

Returns an array of records matching the query. Optionally limit the number of results.

update(query: Record<string, any>, updatedData: Record<string, any>)

Updates all records matching the query with the given data.

delete(query: Record<string, any>)

Deletes all records matching the query.

📄 License

This project is licensed under the MIT License. See LICENSE for details.

Keywords

json

FAQs

Package last updated on 23 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts