New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

secure-store-redis

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

secure-store-redis - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

28

package.json
{
"name": "secure-store-redis",
"version": "3.0.2",
"version": "3.0.3",
"description": "A simple wrapper to encrypt and decrypt data stored in Redis",
"license": "MIT",
"private": false,
"packageManager": "pnpm@8.5.1",
"packageManager": "pnpm@8.15.5",
"engines": {

@@ -32,20 +32,20 @@ "node": ">=16",

"dependencies": {
"redis": "4.6.12"
"redis": "4.6.13"
},
"devDependencies": {
"@types/chai": "4.3.11",
"@types/chai": "4.3.14",
"@types/debug": "4.1.12",
"@types/eslint": "8.44.9",
"@types/eslint": "8.56.6",
"@types/mocha": "10.0.6",
"@types/node": "20.10.5",
"@typescript-eslint/eslint-plugin": "6.15.0",
"@typescript-eslint/parser": "6.15.0",
"chai": "4.3.10",
"@types/node": "20.12.2",
"@typescript-eslint/eslint-plugin": "7.4.0",
"@typescript-eslint/parser": "7.4.0",
"chai": "4.4.1",
"debug": "4.3.4",
"eslint": "8.56.0",
"eslint-plugin-security-node": "1.1.1",
"mocha": "10.2.0",
"prettier": "3.1.1",
"eslint": "8.57.0",
"eslint-plugin-security-node": "1.1.4",
"mocha": "10.4.0",
"prettier": "3.2.5",
"ts-node": "10.9.2",
"typescript": "5.3.3"
"typescript": "5.4.3"
},

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

@@ -7,4 +7,12 @@ # secure-store-redis

## Installation
```bash
npm install secure-store-redis
```
## Initialization
```javascript
const SecureStore = require("secure-store-redis").default;
import SecureStore from "secure-store-redis";

@@ -19,6 +27,20 @@ const store = new SecureStore({

await store.init();
```
## Save
```javascript
await store.save("quote", "hello world");
```
### Get
```javascript
let res = await store.get("quote");
// res: 'hello world'
```
## Delete
```javascript
const num = await store.delete("quote");

@@ -28,10 +50,15 @@ // num: 1

// res: null
```
## Attempt to fetch encrypted data from another store
```javascript
await store.save("quote", "hello world again");
const otherStore = new SecureStore({
uid: "myApp:store",
secret: "this is the wrong secret 32 char",
redis: {
url: 'redis://localhost:6379',
}
uid: "myApp:store",
secret: "this is the wrong secret 32 char",
redis: {
url: "redis://localhost:6379",
},
});

@@ -43,1 +70,8 @@ await otherStore.init();

```
## Disconnect from Redis
```javascript
await otherStore.disconnect();
await store.disconnect();
```
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