New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

keyv

Package Overview
Dependencies
Maintainers
2
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

keyv - npm Package Compare versions

Comparing version 5.3.0 to 5.3.1

7

dist/index.d.ts

@@ -90,2 +90,7 @@ type EventListener = (...arguments_: any[]) => void;

set(key: string, value: any, ttl?: number): any;
setMany?(values: Array<{
key: string;
value: any;
ttl?: number;
}>): Promise<void>;
delete(key: string): Promise<boolean>;

@@ -98,3 +103,2 @@ clear(): Promise<void>;

deleteMany?(key: string[]): Promise<boolean>;
setMany?(data: KeyvEntry[]): Promise<boolean[]>;
iterator?<Value>(namespace?: string): AsyncGenerator<Array<string | Awaited<Value> | undefined>, void>;

@@ -269,3 +273,2 @@ } & IEventEmitter;

*/
set<Value = GenericValue>(key: KeyvEntry[]): Promise<boolean[]>;
set<Value = GenericValue>(key: string, value: Value, ttl?: number): Promise<boolean>;

@@ -272,0 +275,0 @@ /**

@@ -537,6 +537,10 @@ // src/index.ts

}
/**
* Set an item to the store
* @param {string | Array<KeyvEntry>} key the key to use. If you pass in an array of KeyvEntry it will set many items
* @param {Value} value the value of the key
* @param {number} [ttl] time to live in milliseconds
* @returns {boolean} if it sets then it will return a true. On failure will return false.
*/
async set(key, value, ttl) {
if (Array.isArray(key)) {
return this.setMany(key);
}
this.hooks.trigger("preSet" /* PRE_SET */, { key, value, ttl });

@@ -543,0 +547,0 @@ const keyPrefixed = this._getKeyPrefix(key);

{
"name": "keyv",
"version": "5.3.0",
"version": "5.3.1",
"description": "Simple key-value storage with support for multiple backends",

@@ -67,9 +67,9 @@ "type": "module",

"xo": "^0.60.0",
"@keyv/compress-gzip": "^2.0.2",
"@keyv/compress-brotli": "^2.0.3",
"@keyv/compress-gzip": "^2.0.2",
"@keyv/mongo": "^3.0.1",
"@keyv/compress-lz4": "^1.0.0",
"@keyv/test-suite": "^2.0.5",
"@keyv/memcache": "^2.0.1",
"@keyv/compress-lz4": "^1.0.0",
"@keyv/mongo": "^3.0.1",
"@keyv/sqlite": "^4.0.1",
"@keyv/test-suite": "^2.0.5"
"@keyv/sqlite": "^4.0.1"
},

@@ -76,0 +76,0 @@ "tsd": {

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