async-redis
Advanced tools
Comparing version 1.0.0 to 1.1.0
{ | ||
"private": false, | ||
"name": "async-redis", | ||
"version": "1.0.0", | ||
"description": "A light wrapper over redis_node for first class promise support.", | ||
"main": "index.js", | ||
"version": "1.1.0", | ||
"description": "Light wrapper over redis_node with first class promise support.", | ||
"main": "src/index.js", | ||
"engines": { | ||
"node": ">=7.6.0" | ||
}, | ||
"scripts": { | ||
"test": "mocha test --recursive" | ||
"coveralls": "nyc yarn test && nyc report --reporter=text-lcov | coveralls", | ||
"lint": "eslint --fix --ext .js, src", | ||
"test": "mocha test --recursive", | ||
"version:patch": "npm --no-git-tag-version version patch", | ||
"version:minor": "npm --no-git-tag-version version minor", | ||
"version:major": "npm --no-git-tag-version version major" | ||
}, | ||
@@ -18,3 +27,3 @@ "keywords": [ | ||
"dependencies": { | ||
"redis": "^2.7.1", | ||
"redis": "^2.8.0", | ||
"redis-commands": "^1.3.1" | ||
@@ -24,4 +33,22 @@ }, | ||
"chai": "^3.5.0", | ||
"mocha": "^3.2.0" | ||
"coveralls": "^3.0.0", | ||
"eslint": "^4.17.0", | ||
"eslint-config-airbnb": "^16.1.0", | ||
"eslint-plugin-import": "^2.8.0", | ||
"eslint-plugin-jsx-a11y": "^6.0.3", | ||
"eslint-plugin-react": "^7.6.1", | ||
"mocha": "^3.2.0", | ||
"nyc": "^11.4.1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/moaxaca/async-redis.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/moaxaca/async-redis/issues" | ||
}, | ||
"directories": { | ||
"example": "examples", | ||
"test": "test" | ||
} | ||
} |
Async Redis | ||
=========================== | ||
This is a light weight wrapper over the node_redis library with first call promise support. Ideal for ES7 async functions. | ||
[![Build Status](https://travis-ci.org/moaxaca/async-redis.svg?branch=master)](https://travis-ci.org/moaxaca/async-redis) | ||
[![Coverage Status](https://coveralls.io/repos/github/moaxaca/async-redis/badge.svg)](https://coveralls.io/github/moaxaca/async-redis) | ||
This is a light weight wrapper over the node_redis library with first class promise support. Ideal for ES7 async functions. | ||
## Usage Example | ||
### Creating Connection | ||
```js | ||
@@ -16,19 +20,13 @@ const asyncRedis = require("async-redis"); | ||
const async fn() { | ||
const asyncBlock = async () => { | ||
return await client.set("string key", "string val"); | ||
}; | ||
fn() | ||
.then((results) => { | ||
// Handle Results | ||
}) | ||
.catch((error) => { | ||
// Handle Errors | ||
}); | ||
``` | ||
## Decorating Existing Connection | ||
### Decorating Existing Connections | ||
```js | ||
const redis = require("redis"); | ||
const client = redis.createClient(); | ||
const asyncRedis = require("async-redis"); | ||
const asyncClient = asyncRedis.decorate(redisClient); | ||
const asyncRedisClient = asyncRedis.decorate(client); | ||
``` | ||
@@ -35,0 +33,0 @@ |
"use strict"; | ||
const { assert } = require('chai'); | ||
const objectDecorator = require('../../lib/objectDecorator'); | ||
const objectDecorator = require('../../src/object-decorator'); | ||
@@ -44,2 +44,2 @@ const Mock = function () { | ||
}); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
101754
14
167
0
0
9
41
1
Updatedredis@^2.8.0