# node-redis-scanner

> A Redis scanner for Node.js

Latest version **0.2.0** (published 2015-04-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-redis-scanner
pnpm add node-redis-scanner
yarn add node-redis-scanner
bun add node-redis-scanner
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2015-04-14 |
| First published | 2014-12-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Adriano Di Giovanni |
| Maintainers | adriano.digiovanni |
| Keywords | redis, scan, scanner, stream |

## Links

- npm: https://www.npmjs.com/package/node-redis-scanner
- Repository: https://github.com/adriano-di-giovanni/node-redis-scanner
- Issues: https://github.com/adriano-di-giovanni/node-redis-scanner/issues
- npm.io page: https://npm.io/package/node-redis-scanner

## Dependencies (5)

- [async](https://npm.io/package/async.md) ^0.9.0
- [redis](https://npm.io/package/redis.md) ^0.12.1
- [hiredis](https://npm.io/package/hiredis.md) ^0.1.17
- [underscore](https://npm.io/package/underscore.md) ^1.7.0
- [node-redis-streamify](https://npm.io/package/node-redis-streamify.md) ^0.1.2

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2015-04-14
- 0.1.1 — 2014-12-13
- 0.1.0 — 2014-12-10

## README

# node-redis-scanner

A Redis scanner for Node.js.

## Installation

```
npm install node-redis-scanner --save
```

## Usage

```javascript
var
	RedisScanner = require('node-redis-scanner');

var
	// see https://github.com/mranney/node_redis#rediscreateclient
	// for RedisScanner arguments
	scanner = new RedisScanner();

var
	counterByPattern = {};

scanner
	.onMatch('path:to:key:*', function (pattern, match, client, done) {
		if ( ! counterByPattern[pattern]) {
			counterByPattern[pattern] = 0;
		}
		counterByPattern[pattern] += 1;
		done();
	})
	.onMatch('path:to:another-key:*', function (pattern, match, client, done) {
		client.del(match, function (error) {
			done(error);
		});
	})
	.onError(function (error) {
		// your code here
	})
	.onEnd(function () {
		// your code here
	})
	.start(); // let's scan
```

---
_Source: https://npm.io/package/node-redis-scanner · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
