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

@type-cacheable/lru-cache-adapter

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

@type-cacheable/lru-cache-adapter - npm Package Compare versions

Comparing version 15.0.0 to 16.0.0

4

dist/index.d.ts
import { LRUCache } from 'lru-cache';
import { CacheClient } from '@type-cacheable/core';
import { CacheClient, CacheManagerOptions } from '@type-cacheable/core';
export declare class LRUCacheAdapter<T extends {}> implements CacheClient {

@@ -13,2 +13,2 @@ constructor(lruClient: LRUCache<string, T>);

}
export declare const useAdapter: <T extends {} = {}>(client: LRUCache<string, T, unknown>, asFallback?: boolean) => LRUCacheAdapter<T>;
export declare const useAdapter: <T extends {} = {}>(client: LRUCache<string, T, unknown>, asFallback?: boolean, options?: CacheManagerOptions) => LRUCacheAdapter<T>;

@@ -11,5 +11,8 @@ "use strict";

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.useAdapter = exports.LRUCacheAdapter = void 0;
const core_1 = require("@type-cacheable/core");
const core_1 = __importDefault(require("@type-cacheable/core"));
class LRUCacheAdapter {

@@ -83,3 +86,3 @@ constructor(lruClient) {

exports.LRUCacheAdapter = LRUCacheAdapter;
const useAdapter = (client, asFallback) => {
const useAdapter = (client, asFallback, options) => {
const lruCacheAdapter = new LRUCacheAdapter(client);

@@ -92,2 +95,5 @@ if (asFallback) {

}
if (options) {
core_1.default.setOptions(options);
}
return lruCacheAdapter;

@@ -94,0 +100,0 @@ };

{
"name": "@type-cacheable/lru-cache-adapter",
"version": "15.0.0",
"version": "16.0.0",
"description": "Adapter for using lru-cache with type-cacheable",

@@ -41,3 +41,3 @@ "main": "dist/index.js",

"devDependencies": {
"@type-cacheable/core": "^12.0.1",
"@type-cacheable/core": "^13.0.0",
"lru-cache": "^10.0.0",

@@ -50,3 +50,3 @@ "typescript": "^5.0.2"

},
"gitHead": "2ada92dda969644761167f27f72a2711567eb0eb"
"gitHead": "51bce5aa53eb0190529ca308fbeb6ae69c04ef39"
}

@@ -29,3 +29,3 @@ # @type-cacheable/lru-cache-adapter

const client = new LRUCache();
const client = new LRUCache<string, any>();
const clientAdapter = useAdapter(client);

@@ -32,0 +32,0 @@ ```

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