Socket
Socket
Sign inDemoInstall

redis-connection-pool

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redis-connection-pool - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

3

dist/index.d.ts

@@ -213,5 +213,6 @@ /**

* data - (string) - Value to assign to key
* ttl - (number) - TTL (Time to Live)
*
*/
set(key: any, data: any): Promise<any>;
set(key: any, data: any, ttl: any): Promise<any>;
/**

@@ -218,0 +219,0 @@ * Function: hset

@@ -317,8 +317,9 @@ "use strict";

* data - (string) - Value to assign to key
* ttl - (number) - TTL (Time to Live)
*
*/
set(key, data) {
set(key, data, ttl) {
return __awaiter(this, void 0, void 0, function* () {
const client = yield this.pool.acquire();
const res = client.SET(key, data);
const res = client.SET(key, data, ttl);
yield this.pool.release(client);

@@ -325,0 +326,0 @@ return res;

{
"name": "redis-connection-pool",
"version": "2.0.2",
"version": "2.0.3",
"description": "a redis client connection pool",

@@ -36,16 +36,16 @@ "license": "MIT",

"devDependencies": {
"@babel/cli": "7.17.6",
"@babel/core": "7.17.8",
"@babel/preset-env": "7.16.11",
"@babel/cli": "7.17.10",
"@babel/core": "7.17.10",
"@babel/preset-env": "7.17.10",
"@babel/preset-typescript": "7.16.7",
"@types/eslint": "8.4.1",
"@types/eslint": "8.4.2",
"@types/generic-pool": "3.1.10",
"@types/node": "17.0.23",
"@types/redis": "4.0.11",
"@typescript-eslint/parser": "5.16.0",
"eslint": "8.11.0",
"@typescript-eslint/parser": "5.23.0",
"eslint": "8.15.0",
"jaribu": "2.2.3",
"jsdoc-babel": "0.5.0",
"jsdoc-to-markdown": "7.1.1",
"typescript": "4.6.2"
"typescript": "4.6.4"
},

@@ -52,0 +52,0 @@ "repository": {

@@ -49,3 +49,3 @@ node-redis-connection-pool

```javascript
set(key, value)
set(key, value, ttl)
```

@@ -52,0 +52,0 @@

@@ -291,7 +291,8 @@ /**

* data - (string) - Value to assign to key
* ttl - (number) - TTL (Time to Live)
*
*/
async set(key, data) {
async set(key, data, ttl) {
const client = await this.pool.acquire();
const res = client.SET(key, data);
const res = client.SET(key, data, ttl);
await this.pool.release(client);

@@ -298,0 +299,0 @@ return res;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc