You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@keyv/mongo

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@keyv/mongo - npm Package Compare versions

Comparing version

to
2.1.8

30

package.json
{
"name": "@keyv/mongo",
"version": "2.1.6",
"version": "2.1.8",
"description": "MongoDB storage adapter for Keyv",
"main": "src/index.js",
"scripts": {
"test": "xo && nyc ava",
"test": "xo && nyc ava --serial",
"coverage": "nyc report --reporter=text-lcov > coverage.lcov",

@@ -16,3 +16,12 @@ "clean": "rm -rf node_modules && rm -rf .nyc_output && rm -rf coverage.lcov"

"unicorn/prefer-object-from-entries": 0,
"unicorn/prefer-node-protocol": 0
"unicorn/prefer-node-protocol": 0,
"ava/no-ignored-test-files": [
"error",
{
"extensions": [
"js",
"ts"
]
}
]
}

@@ -22,3 +31,8 @@ },

"require": [
"requirable"
"requirable",
"ts-node/register"
],
"extensions": [
"js",
"ts"
]

@@ -49,3 +63,3 @@ },

"dependencies": {
"mongodb": "^4.4.1",
"mongodb": "^4.5.0",
"pify": "^5.0.0"

@@ -55,3 +69,3 @@ },

"@keyv/test-suite": "*",
"ava": "^4.1.0",
"ava": "^4.2.0",
"keyv": "*",

@@ -61,4 +75,6 @@ "nyc": "^15.1.0",

"this": "^1.1.0",
"ts-node": "^10.8.2",
"@types/keyv": "^3.1.4",
"tsd": "^0.20.0",
"typescript": "^4.6.3",
"typescript": "^4.6.4",
"xo": "^0.48.0"

@@ -65,0 +81,0 @@ },

@@ -6,4 +6,5 @@ # @keyv/mongo [<img width="100" align="right" src="https://jaredwray.com/images/keyv.svg" alt="keyv">](https://github.com/jaredwra/keyv)

[![build](https://github.com/jaredwray/keyv/actions/workflows/tests.yaml/badge.svg)](https://github.com/jaredwray/keyv/actions/workflows/tests.yaml)
[![codecov](https://codecov.io/gh/jaredwray/keyv/branch/master/graph/badge.svg?token=bRzR3RyOXZ)](https://codecov.io/gh/jaredwray/keyv)
[![codecov](https://codecov.io/gh/jaredwray/keyv/branch/main/graph/badge.svg?token=bRzR3RyOXZ)](https://codecov.io/gh/jaredwray/keyv)
[![npm](https://img.shields.io/npm/v/@keyv/mongo.svg)](https://www.npmjs.com/package/@keyv/mongo)
[![npm](https://img.shields.io/npm/dm/@keyv/mongo)](https://npmjs.com/package/@keyv/mongo)

@@ -39,2 +40,2 @@ MongoDB storage adapter for [Keyv](https://github.com/jaredwray/keyv).

MIT © Jared Wray & Luke Childs
MIT © Jared Wray
import {EventEmitter} from 'events';
import GridFSBucket from 'mongodb';
import {Store, StoredData} from 'keyv';
declare class KeyvMongo extends EventEmitter {
declare class KeyvMongo<Value=any> extends EventEmitter implements Store<Value> {
readonly ttlSupport: false;

@@ -12,12 +13,14 @@ opts: Record<string, any>;

constructor(options?: string | KeyvMongo.Options);
get(key: string): Promise<string | undefined>;
getMany(keys: string[]): Promise<string[] | undefined>;
set(key: string, value: string | undefined): Promise<any>;
delete(key: string): boolean;
get(key: string): Promise<Value>;
getMany?(
keys: string[]
): Array<StoredData<Value>> | Promise<Array<StoredData<Value>>> | undefined;
set(key: string, value: Value, ttl?: number): any;
delete(key: string): boolean | Promise<boolean>;
deleteMany(keys: string[]): boolean;
clearExpired(): false | Promise<boolean>;
clearUnusedFor(seconds: any): false | Promise<boolean>;
clear(): Promise<void>;
clear(): void | Promise<void>;
iterator(namespace: string | undefined): AsyncGenerator<any, void, any>;
has(key: string): boolean;
has?(key: string): boolean | Promise<boolean>;
clearExpired(): boolean | Promise<boolean>;
clearUnusedFor(seconds: any): boolean | Promise<boolean>;
}

@@ -24,0 +27,0 @@

@@ -170,3 +170,3 @@ 'use strict';

return data.every(x => x === undefined) ? [] : data;
return data;
});

@@ -194,3 +194,3 @@ }

return results.every(x => x === undefined) ? [] : results;
return results;
}),

@@ -197,0 +197,0 @@ );