# redis-async-wrapper

> redis data layer async wrapper

Latest version **0.1.0** (published 2019-09-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install redis-async-wrapper
pnpm add redis-async-wrapper
yarn add redis-async-wrapper
bun add redis-async-wrapper
```

## 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.1.0 |
| Published | 2019-09-05 |
| First published | 2018-01-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 123.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | devfans |
| Maintainers | devfans |
| Keywords | redis, async, wrapper |

## Links

- npm: https://www.npmjs.com/package/redis-async-wrapper
- Repository: https://github.com/devfans/redis-async-wrapper
- Homepage: https://github.com/devfans/redis-async-wrapper#readme
- Issues: https://github.com/devfans/redis-async-wrapper/issues
- npm.io page: https://npm.io/package/redis-async-wrapper

## Dependencies (3)

- [util](https://npm.io/package/util.md) ^0.10.3
- [redis](https://npm.io/package/redis.md) ^2.8.0
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.1

## 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.1.0 (latest) — 2019-09-05
- 0.0.12 — 2019-06-21
- 0.0.11 — 2018-10-26
- 0.0.10 — 2018-10-26
- 0.0.9 — 2018-09-04
- 0.0.8 — 2018-09-04
- 0.0.7 — 2018-09-04
- 0.0.6 — 2018-09-04
- 0.0.5 — 2018-05-14
- 0.0.4 — 2018-02-01
- 0.0.3 — 2018-01-05
- 0.0.2 — 2018-01-05
- 0.0.1 — 2018-01-05

## README

# redis-async-wrapper

[![Join the chat at https://gitter.im/devfans/redis-async-wrapper](https://badges.gitter.im/devfans/redis-async-wrapper.svg)](https://gitter.im/devfans/redis-async-wrapper?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Build Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]

Redis keys async wrapper

### Installation

```
npm install --save redis-async-wrapper
```

## NOTE
Only a part of redis commands added in this wrapper till now.

### Get Started

```
const dal = require('redis-async-wrapper')

// init with options
dal.init({url: "redis://host:port", keyPrefix: "app"})

// define keys conventions
const Templates = {
  user: "user:%s:%s" //  user:userId:type
}

// define model
const User = new dal.Redis_Hash({tpl:Templates.user})

User.save = async (id, type,  infoObject) => {
  await User.hmset([id, type], infoObject)
  const user = await User.hgetall([id, type])
  console.log(`user ${user.name} is saved`)
}

User.save(1, 1, {name: "stefan"})
```

### Contributors Wanted
Glad to get contributors to this library, contact me at stefanliu@outlook.com !

[npm-image]: https://img.shields.io/npm/v/redis-async-wrapper.svg
[npm-url]: https://npmjs.org/package/redis-async-wrapper
[travis-image]: https://img.shields.io/travis/devfans/redis-async-wrapper/master.svg
[travis-url]: https://travis-ci.org/devfans/redis-async-wrapper
[coveralls-image]: https://img.shields.io/coveralls/devfans/redis-async-wrapper/master.svg
[coveralls-url]: https://coveralls.io/r/devfans/redis-async-wrapper?branch=master
[downloads-image]: https://img.shields.io/npm/dm/redis-async-wrapper.svg
[downloads-url]: https://npmjs.org/package/redis-async-wrapper

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