Registry / database / blinkdb

blinkdb

JSON →
library0.14.0jsnpmunverified

BlinkDB is an in-memory JavaScript database optimized for large-scale data on the client side. Current stable version is 0.14.0, released with a monthly cadence. It provides indexed queries, filtering, sorting, and pagination, serving as a high-performance alternative to Redux or MobX for SPAs. Key differentiator: database-like querying with an API inspired by Prisma, supporting both relational and non-relational data. Not yet production-ready (pre-1.0.0). Ships TypeScript types.

npm install blinkdb
INSTALL
IMPORT
SIG · BLINKDB
B
blinkdb
databasejavascriptv0.14.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

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

many
✓ import { many } from 'blinkdb'
✗ const { many } = require('blinkdb')
BlinkDB is ESM-only; CommonJS require is not supported.
first
✓ import { first } from 'blinkdb'
✗ import first from 'blinkdb'
Named import, not default export.
createTable
✓ import { createTable } from 'blinkdb'
✗ import { table } from 'blinkdb'
The function is named createTable, not table.
BlinkDB
✓ import { BlinkDB } from 'blinkdb'
✗ import BlinkDB from 'blinkdb'
Type-only class import; also available as a type for instance.
type Table
✓ import type { Table } from 'blinkdb'
✗ import { Table } from 'blinkdb'
Table is a type, not a value; use type import to avoid runtime inclusion.

Creates a table, inserts records, queries with filter, sort, and limit using BlinkDB.

import { createTable, many, insert, BlinkDB } from 'blinkdb'; const db = new BlinkDB(); const usersTable = createTable<User>(db, 'users')(); interface User { id: number; name: string; age: number; } await insert(usersTable, { id: 1, name: 'Alice', age: 30, id: 2, name: 'Bob', age: 25, id: 3, name: 'Charlie', age: 35 }); const result = await many(usersTable, { where: { age: { gt: 24 } }, sort: { age: 'asc' }, limit: 10 }); console.log(result);
Debug
Known issues
breakingBreaking change in v0.13.0: createTable no longer returns Table directly, but a function that must be called.
fix
Use createTable<T>(db, name)() with double parentheses or pass options as second argument.
affects: >=0.13.0
deprecatedDeprecated in v0.13.0: The 'update' function is deprecated in favor of 'upsert'.
fix
Replace update with upsert to update or insert a record.
affects: >=0.13.0
gotchaTypeScript: The 'Table' type is not exported as a value; attempting to import { Table } at runtime will be undefined.
fix
Use import type { Table } from 'blinkdb' for type-only imports.
affects: >=0.14.0
gotchaAll query functions (many, first, insert, etc.) are async and return Promises.
fix
Always await query results or use .then().
affects: >=0.10.0
deprecatedDeprecated in v0.11.0: 'query' function replaced by 'many' for consistency.
fix
Use many instead of query.
affects: >=0.11.0
Errors
Common errors & fixes
TypeError: (0 , blinkdb_1.createTable) is not a function
Using named import from default export; likely import createTable from 'blinkdb' instead of named import.
fix
Use import { createTable } from 'blinkdb' (named import).
Cannot find module 'blinkdb'
Package not installed or module system mismatch.
fix
Run 'npm install blinkdb' and ensure project is configured for ESM (use --type module in package.json or .mjs extension).
Error: BlinkDB is not a constructor
Importing class as default instead of named.
fix
Use import { BlinkDB } from 'blinkdb'.
Property 'in' does not exist on type 'WhereClause'
Using the 'in' operator is only supported in TypeScript with specific index types.
fix
Ensure table is created with an index on the 'name' field: createTable<User>(db, 'users')({ primary: 'id', indexes: ['name'] })
Upgrade
Version history
0.14.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
16
Anthropic
1
OpenAI (training)
1
Resources
blinkdb — npm install blinkdb · libregistry