Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@suspensive/cache

Package Overview
Dependencies
Maintainers
0
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@suspensive/cache - npm Package Compare versions

Comparing version 0.2.7 to 0.3.0

dist/chunk-UTDQZXTL.js

1

dist/CacheStore.d.ts

@@ -79,2 +79,3 @@ import { CacheKey, CacheOptions } from './types.js';

reset: (options?: Pick<CacheOptions<unknown, CacheKey>, "cacheKey">) => void;
remove: (options: Pick<CacheOptions<unknown, CacheKey>, "cacheKey">) => void;
clearError: (options?: Pick<CacheOptions<unknown, CacheKey>, "cacheKey">) => void;

@@ -81,0 +82,0 @@ suspend: <TData, TCacheKey extends CacheKey = CacheKey>({ cacheKey, cacheFn, }: CacheOptions<TData, TCacheKey>) => ResolvedCached<TData, TCacheKey>;

2

dist/CacheStore.js
"use client"
import {
CacheStore
} from "./chunk-KPMQITEL.js";
} from "./chunk-UTDQZXTL.js";
import "./chunk-QETBZSG5.js";

@@ -6,0 +6,0 @@ export {

@@ -7,3 +7,3 @@ "use client"

CacheStore
} from "./chunk-KPMQITEL.js";
} from "./chunk-UTDQZXTL.js";
import {

@@ -10,0 +10,0 @@ CacheStoreProvider

{
"name": "@suspensive/cache",
"version": "0.2.7",
"version": "0.3.0",
"description": "Useful interfaces for React Suspense",

@@ -48,5 +48,5 @@ "keywords": [

"react-dom": "^18.3.1",
"@suspensive/eslint-config": "0.0.0",
"@suspensive/react": "2.10.0",
"@suspensive/tsconfig": "0.0.0-development",
"@suspensive/eslint-config": "0.0.0",
"@suspensive/tsup": "0.0.0"

@@ -53,0 +53,0 @@ },

@@ -98,2 +98,10 @@ import type { CacheKey, CacheOptions } from './types'

public remove = (options: Pick<CacheOptions<unknown, CacheKey>, 'cacheKey'>) => {
const hashedCacheKey = hashCacheKey(options.cacheKey)
if (this.cacheStore.has(hashedCacheKey)) {
this.cacheStore.delete(hashedCacheKey)
}
}
public clearError = (options?: Pick<CacheOptions<unknown, CacheKey>, 'cacheKey'>) => {

@@ -100,0 +108,0 @@ if (options?.cacheKey === undefined || options.cacheKey.length === 0) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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