Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
vicanso committed Sep 29, 2016
1 parent c71b22b commit c050494
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 22 deletions.
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "airbnb"
}
6 changes: 0 additions & 6 deletions .eslintrc.json

This file was deleted.

22 changes: 12 additions & 10 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
/* eslint strict:0 */

'use strict';

const pkg = require('./package');
const debug = require('debug')(pkg.name);
const EventEmitter = require('events');

const map = new WeakMap();
const redis = require('redis');

Expand All @@ -13,17 +17,15 @@ class Redis extends EventEmitter {
if (!options.client) {
debug('init redis new client');
client = redis.createClient(options);
} else if (options.duplicate) {
debug('Duplicating provided client with new options (if provided)');
const dupClient = options.client;
delete options.client;
delete options.duplicate;
client = dupClient.duplicate(options);
} else {
if (options.duplicate) {
debug('Duplicating provided client with new options (if provided)');
const dupClient = options.client;
delete options.client;
delete options.duplicate;
client = dupClient.duplicate(options);
} else {
debug('Using provided client');
client = options.client;
}
debug('Using provided client');
client = options.client;
}
const data = {
client,
Expand Down
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"name": "koa-simple-redis",
"description": "koa session with redis using koa-simple-session",
"version": "0.0.2",
"version": "1.0.0",
"author": "Tree Xie <vicansocanbico@gmail.com>",
"repository": {
"type": "git",
"url": "https://github.com/vicanso/koa-simple-redis"
},
"keywords": [
"koa",
"middleware",
Expand All @@ -18,13 +22,12 @@
"license": "MIT",
"dependencies": {
"debug": "^2.2.0",
"redis": "^2.6.0-2"
"redis": "^2.6.2"
},
"devDependencies": {
"eslint": "^2.10.2",
"eslint-config-airbnb": "^9.0.1",
"eslint-plugin-import": "^1.8.0",
"istanbul": "^0.4.3",
"eslint": "^3.6.1",
"eslint-config-airbnb": "^12.0.0",
"istanbul": "^0.4.5",
"mocha": "^2.5.3"
}
}

0 comments on commit c050494

Please sign in to comment.