🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

req-caching

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

req-caching - npm Package Compare versions

Comparing version

to
1.1.7

6

lib/driver.js

@@ -65,3 +65,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

value = {
value: v,
value: v !== null && v !== void 0 ? v : null,
expires: after_time(opts === null || opts === void 0 ? void 0 : opts.maxAge),

@@ -123,3 +123,3 @@ };

value = {
value: v,
value: v !== null && v !== void 0 ? v : null,
expires: after_time(opts === null || opts === void 0 ? void 0 : opts.maxAge),

@@ -141,3 +141,3 @@ };

value = JSON.parse((_a = localStorage.getItem(key)) !== null && _a !== void 0 ? _a : "{\"value\":null, \"expires\":0}");
if (value.value === undefined && value.value === null) {
if (value.value === null) {
return [2 /*return*/, null];

@@ -144,0 +144,0 @@ }

{
"name": "req-caching",
"version": "1.1.6",
"version": "1.1.7",
"type": "module",

@@ -5,0 +5,0 @@ "types": "lib",

@@ -27,3 +27,3 @@ import { CACHE_VALUE, CACHE_DRIVER, after_time, CACHE_OPTS } from "./defined.js"

let value: CACHE_VALUE = {
value: v,
value: v ?? null,
expires: after_time(opts?.maxAge),

@@ -76,3 +76,3 @@ }

let value: CACHE_VALUE = {
value: v,
value: v ?? null,
expires: after_time(opts?.maxAge),

@@ -91,3 +91,3 @@ }

)
if (value.value === undefined && value.value === null) {
if (value.value === null) {
return null

@@ -94,0 +94,0 @@ }

@@ -54,3 +54,3 @@ import {

let temp = await this.driver.get(key)
if (temp === undefined || temp === null) {
if (temp === null) {
let indexer: CACHE_ELEMENT | undefined = this.bunch.find(

@@ -57,0 +57,0 @@ (item) => item.key === key

Sorry, the diff of this file is not supported yet