xpress-mongo
Advanced tools
Comparing version 2.10.3 to 2.11.0
@@ -1,6 +0,1 @@ | ||
/** | ||
* Convert array of keys to object of keys and value. | ||
* @param keys | ||
* @param value | ||
*/ | ||
export declare const keysToObject: <T extends string | string[] | readonly string[], V>(keys: T, value: V) => T extends readonly string[] ? Record<T[number], V> : Record<string, V>; | ||
@@ -13,3 +8,3 @@ /** | ||
*/ | ||
export declare const omitKeys: (keys: string | string[], returnObject?: boolean) => Record<string, any>; | ||
export declare const omitKeys: <Key extends string>(keys: Key | Key[], returnObject?: boolean) => Record<string, any>; | ||
/** | ||
@@ -21,3 +16,3 @@ * Pick keys | ||
*/ | ||
export declare const pickKeys: (keys: string | string[], returnObject?: boolean) => Record<string, any>; | ||
export declare const pickKeys: <Key extends string>(keys: Key | Key[], returnObject?: boolean) => Record<string, any>; | ||
/** | ||
@@ -32,3 +27,3 @@ * Omits _id and keys passed. | ||
*/ | ||
export declare const omitIdAnd: (omit?: string | string[]) => Record<string, any>; | ||
export declare const omitIdAnd: <Key extends string>(omit?: Key | Key[]) => Record<string, any>; | ||
/** | ||
@@ -44,2 +39,2 @@ * Omits _id and pick keys passed. | ||
*/ | ||
export declare const omitIdAndPick: (pick?: string | string[]) => Record<string, any>; | ||
export declare const omitIdAndPick: <Key extends string>(pick?: Key | Key[]) => Record<string, any>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.omitIdAndPick = exports.omitIdAnd = exports.pickKeys = exports.omitKeys = exports.keysToObject = void 0; | ||
/** | ||
* Convert array of keys to object of keys and value. | ||
* @param keys | ||
* @param value | ||
*/ | ||
const keysToObject = (keys, value) => { | ||
@@ -10,0 +5,0 @@ if (typeof keys === "string") |
@@ -9,3 +9,3 @@ import { MongoClient, MongoClientOptions, ObjectId } from "mongodb"; | ||
import * as Joi from "joi"; | ||
declare const omitIdAndPick: (pick?: string | string[]) => Record<string, any>, omitIdAnd: (omit?: string | string[]) => Record<string, any>, omitKeys: (keys: string | string[], returnObject?: boolean) => Record<string, any>, pickKeys: (keys: string | string[], returnObject?: boolean) => Record<string, any>; | ||
declare const omitIdAndPick: <Key extends string>(pick?: Key | Key[]) => Record<string, any>, omitIdAnd: <Key extends string>(omit?: Key | Key[]) => Record<string, any>, omitKeys: <Key extends string>(keys: Key | Key[], returnObject?: boolean) => Record<string, any>, pickKeys: <Key extends string>(keys: Key | Key[], returnObject?: boolean) => Record<string, any>; | ||
/** | ||
@@ -12,0 +12,0 @@ * Get connected to a client |
{ | ||
"name": "xpress-mongo", | ||
"version": "2.10.3", | ||
"version": "2.11.0", | ||
"description": "Light Weight ODM for mongoDb NodeJs", | ||
@@ -36,3 +36,3 @@ "main": "index.js", | ||
"joi": "^17.6.0", | ||
"mongodb": "4.7.0", | ||
"mongodb": "4.8.1", | ||
"object-collection": "^3.0.1", | ||
@@ -43,8 +43,8 @@ "uuid": "^8.3.2" | ||
"@types/chance": "^1.1.3", | ||
"@types/node": "^17.0.31", | ||
"@types/node": "^18.6.2", | ||
"@types/uuid": "^8.3.4", | ||
"chance": "^1.1.8", | ||
"japa": "^4.0.0", | ||
"nodemon": "^2.0.18", | ||
"ts-node": "^10.8.2", | ||
"nodemon": "^2.0.19", | ||
"ts-node": "^10.9.1", | ||
"ts-node-dev": "^2.0.0", | ||
@@ -51,0 +51,0 @@ "typescript": "^4.7.4" |
112979
3472
+ Addedmongodb@4.8.1(transitive)
- Removedmongodb@4.7.0(transitive)
Updatedmongodb@4.8.1