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

storage-manager-ts

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

storage-manager-ts - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

lib/index.d.ts

9

package.json
{
"name": "storage-manager-ts",
"version": "1.0.2",
"version": "1.0.3",
"description": "A storage manager that supports storage managing with local and Redis storages",

@@ -9,4 +9,4 @@ "main": "lib/index.js",

"build": "tsc",
"test-redis": "mocha -r ts-node/register tests/redis-storage.ts",
"test-local": "mocha -r ts-node/register tests/local-storage.ts"
"test": "mocha -r ts-node/register",
"local-storage-testing": "npm run test tests/local-storage.ts"
},

@@ -20,4 +20,3 @@ "repository": {

"local storage",
"redis storage",
"redis"
"storage utils"
],

@@ -24,0 +23,0 @@ "author": "Dani Tseiltin",

# storage-manager-ts
A storage manager that supports storage managing in local-storage and redis
## Initialize your storage manager:
## Local Storage
### Initialize your storage manager:
```

@@ -10,9 +11,7 @@ import { LocalStorage } from 'storage-manager-ts';

## Get a key:
### Get a key:
```
const keyAsString = storage.get('myKey', false);
//by default the response is in json form
const keyAsJson = storage.get('myKey');
//or you could give it a true value

@@ -22,3 +21,3 @@ const keyAsJson2 = storage.get('myKey', true);

## Set a key:
### Set a key:
The value type is any and that means you have the flexibily to set any value you want!

@@ -28,6 +27,4 @@ ```

storage.set('myKey', 'myValue');
//Set a key with number as value
storage.set('myKey', 5);
//Set a key with JSON as value

@@ -37,9 +34,9 @@ storage.set('myKey', { 'arg1': 'value1' });

## Remove a key:
### Remove a key:
```
//Removing the key from the storage
storage.remove('myKey');
storage.delete('myKey');
```
## Filtering keys by regex:
### Filtering keys by regex:
```

@@ -54,3 +51,3 @@ storage.set('myKey1', '1');

## Getting key values by list:
### Getting key values by list:
```

@@ -66,3 +63,3 @@ storage.set('myKey1', '1');

## Comparing keys by regex:
### Comparing keys by regex:
```

@@ -82,2 +79,2 @@ storage.set('myKey1', '1');

![Unit testing](https://github.com/danitseitlin/storage-manager-ts/workflows/Unit%20testing/badge.svg)
![Unit testing](https://github.com/danitseitlin/storage-manager-ts/workflows/Unit%20testing/badge.svg)
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