Socket
Socket
Sign inDemoInstall

lru-cache

Package Overview
Dependencies
0
Maintainers
1
Versions
134
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.18.2 to 7.18.3

55

index.js

@@ -499,3 +499,7 @@ const perf =

for (const i of this.indexes()) {
if (!this.isBackgroundFetch(this.valList[i])) {
if (
this.valList[i] !== undefined &&
this.keyList[i] !== undefined &&
!this.isBackgroundFetch(this.valList[i])
) {
yield [this.keyList[i], this.valList[i]]

@@ -507,3 +511,7 @@ }

for (const i of this.rindexes()) {
if (!this.isBackgroundFetch(this.valList[i])) {
if (
this.valList[i] !== undefined &&
this.keyList[i] !== undefined &&
!this.isBackgroundFetch(this.valList[i])
) {
yield [this.keyList[i], this.valList[i]]

@@ -516,3 +524,6 @@ }

for (const i of this.indexes()) {
if (!this.isBackgroundFetch(this.valList[i])) {
if (
this.keyList[i] !== undefined &&
!this.isBackgroundFetch(this.valList[i])
) {
yield this.keyList[i]

@@ -524,3 +535,6 @@ }

for (const i of this.rindexes()) {
if (!this.isBackgroundFetch(this.valList[i])) {
if (
this.keyList[i] !== undefined &&
!this.isBackgroundFetch(this.valList[i])
) {
yield this.keyList[i]

@@ -533,3 +547,6 @@ }

for (const i of this.indexes()) {
if (!this.isBackgroundFetch(this.valList[i])) {
if (
this.valList[i] !== undefined &&
!this.isBackgroundFetch(this.valList[i])
) {
yield this.valList[i]

@@ -541,3 +558,6 @@ }

for (const i of this.rindexes()) {
if (!this.isBackgroundFetch(this.valList[i])) {
if (
this.valList[i] !== undefined &&
!this.isBackgroundFetch(this.valList[i])
) {
yield this.valList[i]

@@ -552,5 +572,10 @@ }

find(fn, getOptions = {}) {
find(fn, getOptions) {
for (const i of this.indexes()) {
if (fn(this.valList[i], this.keyList[i], this)) {
const v = this.valList[i]
const value = this.isBackgroundFetch(v)
? v.__staleWhileFetching
: v
if (value === undefined) continue
if (fn(value, this.keyList[i], this)) {
return this.get(this.keyList[i], getOptions)

@@ -563,3 +588,8 @@ }

for (const i of this.indexes()) {
fn.call(thisp, this.valList[i], this.keyList[i], this)
const v = this.valList[i]
const value = this.isBackgroundFetch(v)
? v.__staleWhileFetching
: v
if (value === undefined) continue
fn.call(thisp, value, this.keyList[i], this)
}

@@ -570,3 +600,8 @@ }

for (const i of this.rindexes()) {
fn.call(thisp, this.valList[i], this.keyList[i], this)
const v = this.valList[i]
const value = this.isBackgroundFetch(v)
? v.__staleWhileFetching
: v
if (value === undefined) continue
fn.call(thisp, value, this.keyList[i], this)
}

@@ -573,0 +608,0 @@ }

2

package.json
{
"name": "lru-cache",
"description": "A cache object that deletes the least-recently-used items.",
"version": "7.18.2",
"version": "7.18.3",
"author": "Isaac Z. Schlueter <i@izs.me>",

@@ -6,0 +6,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc