
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
@xylabs/mongo
Advanced tools
Base functionality used throughout XYO TypeScript/JavaScript libraries that access Mongo DB
Base functionality used throughout XYO TypeScript/JavaScript libraries that access Mongo DB
@xylabs/mongo
T extends Document
new BaseMongoSdk<T>(config): BaseMongoSdk<T>;
BaseMongoSdk<T>
config: BaseMongoSdkConfig;
get uri(): string;
string
deleteMany(filter): Promise<DeleteResult>;
Filter<T>
Promise<DeleteResult>
deleteOne(filter): Promise<DeleteResult>;
Filter<T>
Promise<DeleteResult>
find(filter): Promise<FindCursor<WithId<T>>>;
Filter<T>
Promise<FindCursor<WithId<T>>>
findOne(filter): Promise<null | WithId<T>>;
Filter<T>
Promise<null | WithId<T>>
insertMany(items, options?): Promise<InsertManyResult<T>>;
OptionalUnlessRequiredId<T>[]
BulkWriteOptions
Promise<InsertManyResult<T>>
insertOne(item, options?): Promise<InsertOneResult<T>>;
OptionalUnlessRequiredId<T>
InsertOneOptions
Promise<InsertOneResult<T>>
replaceOne(
filter,
item,
options?): Promise<UpdateResult<T>>;
Filter<T>
OptionalUnlessRequiredId<T>
ReplaceOptions
Promise<UpdateResult<T>>
updateOne(filter, fields): Promise<UpdateResult<T>>;
Filter<T>
UpdateFilter<T>
Promise<UpdateResult<T>>
upsertOne(filter, fields): Promise<UpdateResult<T>>;
Filter<T>
UpdateFilter<T>
Promise<UpdateResult<T>>
useCollection<R>(func): Promise<R>;
R
(collection) => R | Promise<R>
Promise<R>
useMongo<R>(func): Promise<R>;
R
(client) => R | Promise<R>
Promise<R>
new MongoClientWrapper(
uri,
maxPoolSize?,
closeDelay?): MongoClientWrapper;
string
number
number
MongoClientWrapper
readonly static clients: Map<string, MongoClientWrapper>;
static get(
uri,
poolSize?,
closeDelay?): MongoClientWrapper;
string
number
number
MongoClientWrapper
connect(): Promise<MongoClient>;
Promise<MongoClient>
disconnect(): Promise<number>;
Promise<number>
initiateClose(): Promise<void>;
Promise<void>
optional dbConnectionString: string;
optional dbDomain: string;
optional dbName: string;
optional dbPassword: string;
optional dbUserName: string;
optional closeDelay: number;
collection: string;
optional maxPoolSize: number;
type BaseMongoSdkConfig = BaseMongoSdkPublicConfig & BaseMongoSdkPrivateConfig;
Part of sdk-js
See the LICENSE file for license details
FAQs
Base functionality used throughout XYO TypeScript/JavaScript libraries that access Mongo DB
The npm package @xylabs/mongo receives a total of 172 weekly downloads. As such, @xylabs/mongo popularity was classified as not popular.
We found that @xylabs/mongo demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.