Registry / database / inflames.db

inflames.db

JSON →
library5.1.1jsnpmunverified

SQLite and BSON database module for Node.js by InFlames. Version 5.1.1 provides a quick, simple API with functions like set, get, fetch, push, pull, add, sub, delete, deleteValue, deleteAll, and has. Supports both SQLite (.db) and BSON (.bson) backends, automatically creating database files. The package is primarily documented in Turkish. It ships TypeScript types. Release cadence is irregular. Alternatives like better-sqlite3 or lowdb offer more mature ecosystems, but inflames.db focuses on ease of use with a unified API similar to quick.db.

npm install inflames.db
INSTALL
IMPORT
SIG · INFLAMES.DB
I
inflames.db
databasejavascriptv5.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

sqlite
✓ const db = require('inflames.db').sqlite('database')
✗ import db from 'inflames.db'
Use CommonJS require. ESM import is not supported. The function is exported as a property of the default export.
bson
✓ const db = require('inflames.db').bson('databases')
✗ const db = require('inflames.db').bson()
The bson adapter uses a file with .bson extension. If no filename provided, defaults to 'inflames.bson'.
default
✓ const db = require('inflames.db').sqlite()
✗ const db = new (require('inflames.db'))()
Do not use constructor. Directly call .sqlite() or .bson() on the required module.

Demonstrates basic set, get, push, add, and all operations using the SQLite adapter.

const db = require('inflames.db').sqlite('mydb'); db.set('prefix', '!'); const prefix = db.get('prefix'); console.log(prefix); // '!' db.push('users', { name: 'Alice' }); db.add('count', 1); console.log(db.all());
Debug
Known issues
gotchaDo not include file extensions when specifying database name. The module automatically appends '.db' or '.bson'.
fix
Use 'database' instead of 'database.db' or 'database.bson'.
affects: *
gotchaThe package does not support ES modules (ESM). Attempting import will result in error.
fix
Use CommonJS require(). If you must use ESM, wrap with createRequire.
affects: *
gotchaThe 'delete' method returns true even if the key doesn't exist. Check existence with has() first.
fix
Use db.has('key') before db.delete('key') if you need to verify deletion.
affects: *
deprecatedThe 'fetch' method is an alias for 'get' and may be removed in future versions.
fix
Use db.get() instead of db.fetch().
affects: >=5.0.0
gotchaThe all() method returns an array of objects with 'ID' and 'value' properties, not a map.
fix
Iterate over array: db.all().forEach(entry => console.log(entry.ID, entry.value)).
affects: *
Errors
Common errors & fixes
TypeError: db.set is not a function
Importing incorrectly as default instead of calling .sqlite() or .bson().
fix
Replace `const db = require('inflames.db')` with `const db = require('inflames.db').sqlite('mydb')`.
Cannot find module 'better-sqlite3'
The optional dependency better-sqlite3 is not installed when using SQLite.
fix
Run `npm install better-sqlite3` or install inflames.db with the SQLite adapter: the package should list it as a dependency, but if missing, install manually.
ENOENT: no such file or directory, open '.../inflames.db'
The module tried to create the database file but the directory is not writable or the path is invalid.
fix
Ensure the script has write permissions to the directory. Use an absolute path if needed.
Upgrade
Version history
5.1.1latest on npm
Audit
Dependencies
better-sqlite3requiredSQLite engine for database operations. Required when using .sqlite() adapter.
Agent activity
11 hits · last 30 days
node
10
Resources
inflames.db — npm install inflames.db · libregistry