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

redis-json

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redis-json - npm Package Compare versions

Comparing version 6.0.0 to 6.0.1

3

CHANGELOG.md

@@ -0,1 +1,4 @@

# v6.0.1
* adds function overload definition for `get` as `get(key: string): Promise<T|undefined>`
# v6.0.0

@@ -2,0 +5,0 @@ * improves efficiency by combining multiple commands into one `multi` command

32

docs/api/classes/jsoncache.md

@@ -60,3 +60,3 @@ [redis-json](../README.md) › [JSONCache](jsoncache.md)

Defined in src/lib/jsonCache.ts:44
Defined in src/lib/jsonCache.ts:47

@@ -80,3 +80,3 @@ Intializes JSONCache instance

Defined in src/lib/jsonCache.ts:173
Defined in src/lib/jsonCache.ts:178

@@ -94,3 +94,3 @@ Removes/deletes all the keys in the JSON Cache,

Defined in src/lib/jsonCache.ts:200
Defined in src/lib/jsonCache.ts:205

@@ -119,5 +119,5 @@ Removes the given key from Redis

▸ **get**(`key`: string, ...`fields`: string[]): *Promise‹Partial‹T› | undefined›*
▸ **get**(`key`: string): *Promise‹T | undefined›*
Defined in src/lib/jsonCache.ts:114
Defined in src/lib/jsonCache.ts:117

@@ -132,8 +132,20 @@ Retrieves the hashset from redis and

`key` | string | Redis key |
`...fields` | string[] | List of fields to be retreived from redis. This helps reduce network latency incase only a few fields are needed. |
**Returns:** *Promise‹Partial‹T› | undefined›*
**Returns:** *Promise‹T | undefined›*
request object from the cache
▸ **get**(`key`: string, ...`fields`: string[]): *Promise‹Partial‹T› | undefined›*
Defined in src/lib/jsonCache.ts:118
**Parameters:**
Name | Type |
------ | ------ |
`key` | string |
`...fields` | string[] |
**Returns:** *Promise‹Partial‹T› | undefined›*
___

@@ -145,3 +157,3 @@

Defined in src/lib/jsonCache.ts:223
Defined in src/lib/jsonCache.ts:228

@@ -174,3 +186,3 @@ Increments the value of a variable in the JSON

Defined in src/lib/jsonCache.ts:160
Defined in src/lib/jsonCache.ts:165

@@ -195,3 +207,3 @@ Replace the entire hashset for the given key

Defined in src/lib/jsonCache.ts:87
Defined in src/lib/jsonCache.ts:90

@@ -198,0 +210,0 @@ Flattens the given json object and

@@ -437,13 +437,2 @@ import { promisify } from 'util';

}
/**
* Retrieves the hashset from redis and
* unflattens it back to the original Object
*
* @param key Redis key
* @param fields List of fields to be retreived from redis.
* This helps reduce network latency incase only a few fields are
* needed.
*
* @returns request object from the cache
*/
get(key, ...fields) {

@@ -450,0 +439,0 @@ return __awaiter(this, void 0, void 0, function* () {

@@ -439,13 +439,2 @@ 'use strict';

}
/**
* Retrieves the hashset from redis and
* unflattens it back to the original Object
*
* @param key Redis key
* @param fields List of fields to be retreived from redis.
* This helps reduce network latency incase only a few fields are
* needed.
*
* @returns request object from the cache
*/
get(key, ...fields) {

@@ -452,0 +441,0 @@ return __awaiter(this, void 0, void 0, function* () {

{
"name": "redis-json",
"version": "6.0.0",
"version": "6.0.1",
"description": "A wrapper library to store JSON Objects in redis-hashsets and retrieve it back as JSON objects",

@@ -5,0 +5,0 @@ "sideEffects": false,

@@ -5,2 +5,3 @@ import type { RecursivePartial } from '../interfaces';

set(key: string, obj: T, options: ISetOptions): Promise<any>;
get(key: string): Promise<T | undefined>;
get(key: string, ...fields: string[]): Promise<Partial<T> | undefined>;

@@ -68,2 +69,3 @@ rewrite(key: string, obj: T, options?: ISetOptions): Promise<any>;

*/
get(key: string): Promise<T | undefined>;
get(key: string, ...fields: string[]): Promise<Partial<T> | undefined>;

@@ -70,0 +72,0 @@ /**

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