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

@alt-javascript/jsnosqlc-redis

v1.1.1

Published

JSNOSLQC Redis driver via ioredis

Downloads

54

Readme

@alt-javascript/jsnosqlc-redis

Language npm version License: MIT CI

JSNOSLQC driver for Redis via ioredis.

Part of the @alt-javascript/jsnosqlc monorepo.

Install

npm install @alt-javascript/jsnosqlc-core @alt-javascript/jsnosqlc-redis

Usage

import { DriverManager, Filter } from '@alt-javascript/jsnosqlc-core';
import '@alt-javascript/jsnosqlc-redis'; // self-registers with DriverManager

const client = await DriverManager.getClient('jsnosqlc:redis://localhost:6379');
const sessions = client.getCollection('sessions');

// Store and retrieve
await sessions.store('sess-1', { userId: 'u1', token: 'abc123', active: true });
const sess = await sessions.get('sess-1');

// Insert with auto-assigned id
const id = await sessions.insert({ userId: 'u2', token: 'xyz789', active: true });

// Patch specific fields
await sessions.update('sess-1', { active: false });

// Query — full collection scan + in-memory filter (see note below)
const filter = Filter.where('active').eq(true).build();
const cursor = await sessions.find(filter);
const active = cursor.getDocuments();

await client.close();

find() performs a full collection scan. All documents in the collection are fetched and filtered in-memory. This is suitable for small datasets and development. For production filter queries, use RediSearch.

URL Scheme

jsnosqlc:redis://<host>:<port>[/<db>]

| URL | Description | |---|---| | jsnosqlc:redis://localhost:6379 | Default database (0) | | jsnosqlc:redis://localhost:6379/1 | Database index 1 | | jsnosqlc:redis://:password@host:6379 | With password |

The jsnosqlc: prefix is stripped and the remainder is passed to ioredis.

Storage Layout

Documents are stored as JSON strings under namespaced keys:

jsnosqlc:<collection>:<key>    → JSON string (document)
jsnosqlc:<collection>:_keys    → Redis Set (index of all keys in collection)

The _keys Set enables find() to fetch all collection documents without a global SCAN.

ClientDataSource

import { ClientDataSource } from '@alt-javascript/jsnosqlc-core';
import '@alt-javascript/jsnosqlc-redis';

const ds = new ClientDataSource({
  url: 'jsnosqlc:redis://localhost:6379',
  properties: { connectTimeout: 5000 },
});
const client = await ds.getClient();

Local Development with Docker

docker run --rm -d -p 6379:6379 redis:7

When to Use Redis as a Document Store

Redis is primarily a key-value and cache store. The JSNOSLQC Redis driver adds a thin document abstraction:

  • Suitable for: session state, ephemeral document storage, small collections where key-based access dominates
  • Not suitable for: large collections with complex filter queries, analytics, or data that outlives a Redis restart without persistence enabled

License

MIT