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

acl-ioredis

v0.0.2

Published

Adapter that wraps an ioredis client so it works as node_acl's Redis backend client (adds batch() and normalizes pipeline/multi exec replies).

Readme

acl-ioredis

A tiny adapter that lets you use a modern ioredis client with node_acl's Redis backend.

node_acl's Redis backend was written against node_redis v2. ioredis is almost a drop-in replacement, but two things differ:

| node_acl expects (node_redis) | ioredis provides | | ----------------------------- | ---------------- | | client.batch() — non-atomic command queue | client.pipeline() | | exec() replies as a flat [result \| Error] array | [[err, result], ...] tuples |

This package wraps your ioredis client in a thin Proxy that bridges exactly those two gaps and forwards everything else untouched. No runtime dependencies.

Install

npm install acl-ioredis ioredis

ioredis is a peer dependency — you bring your own client (works with >=4, tested against the latest 5.x).

Usage

const Redis = require('ioredis');
const wrap = require('acl-ioredis');
const acl = require('acl');

// Wrap your ioredis client...
const client = wrap(new Redis({ host: '127.0.0.1', port: 6379 }));

// ...and hand it to node_acl's Redis backend as usual.
const myAcl = new acl(new acl.redisBackend(client, 'myprefix'));

myAcl.addUserRoles('user1', 'admin', function (err) {
  // ...
});

It also works with Redis.Cluster and with connection URLs:

const client = wrap(new Redis('redis://:[email protected]:6379/0'));

API

const wrap = require('acl-ioredis');

wrap(ioredisClient)        // → node_acl-compatible client (Proxy)
wrap.createClient(client)  // alias
wrap.normalizeReplies(r)   // exposed for testing: flattens ioredis exec tuples

The returned object is a transparent proxy over your ioredis client: every command (smembers, sunion, sadd, srem, del, keys, ...) passes straight through. Only batch() (→ pipeline()) and the exec() reply shape of batch()/multi() are adapted.

Why a separate package?

The Redis backend in node_acl stays unchanged. This adapter only touches the client, so you can upgrade to the latest ioredis without forking node_acl.

Tests

npm test

Unit tests run with no dependencies. The integration suite connects to a Redis on 127.0.0.1:6379 and is skipped automatically if none is reachable.

License

MIT