Socket
Socket
Sign inDemoInstall

simple-in-memory-cache

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-in-memory-cache - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

changelog.md

19

dist/cache.d.ts

@@ -1,14 +0,15 @@

export interface SimpleInMemoryCache {
export interface SimpleInMemoryCache<T> {
get: (key: string) => T | undefined;
set: (key: string, value: T, options?: {
secondsUntilExpiration?: number;
}) => void;
}
export interface SimpleInMemoryCacheState<T> {
[index: string]: {
value: any;
value: T;
expiresAtMse: number;
};
}
export declare const createCache: ({ defaultSecondsUntilExpiration }?: {
export declare const createCache: <T>({ defaultSecondsUntilExpiration }?: {
defaultSecondsUntilExpiration?: number | undefined;
}) => {
set: (key: string, value: any, { secondsUntilExpiration }?: {
secondsUntilExpiration?: number | undefined;
}) => void;
get: (key: string) => any;
};
}) => SimpleInMemoryCache<T>;
{
"name": "simple-in-memory-cache",
"version": "0.1.0",
"version": "0.2.0",
"description": "A simple in-memory cache, for nodejs and the browser, with time based expiration policies.",

@@ -8,3 +8,3 @@ "author": "UladKasach @uladkasach",

"repository": "uladkasach/simple-in-memory-cache",
"homepage": "https://github.com/uladkasach/simple-in-memory-cache",
"homepage": "https://github.com/ehmpathy/simple-in-memory-cache",
"keywords": [

@@ -24,3 +24,3 @@ "cache",

],
"bugs": "https://github.com/uladkasach/simple-in-memory-cache/issues",
"bugs": "https://github.com/ehmpathy/simple-in-memory-cache/issues",
"main": "dist/index.js",

@@ -27,0 +27,0 @@ "engines": {

# simple-in-memory-cache
![ci_on_commit](https://github.com/uladkasach/simple-in-memory-cache/workflows/ci_on_commit/badge.svg)
![deploy_on_tag](https://github.com/uladkasach/simple-in-memory-cache/workflows/deploy_on_tag/badge.svg)
![ci_on_commit](https://github.com/ehmpathy/simple-in-memory-cache/workflows/ci_on_commit/badge.svg)
![deploy_on_tag](https://github.com/ehmpathy/simple-in-memory-cache/workflows/deploy_on_tag/badge.svg)

@@ -6,0 +6,0 @@ A simple in-memory cache, for nodejs and the browser, with time based expiration policies.

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