mongo-seeding
Version:
The ultimate Node.js library for populating your MongoDB database.
16 lines (15 loc) • 486 B
TypeScript
import { ObjectId } from 'mongodb';
/**
* Constructs an ObjectId instance based on entity name.
* Helpful for database references between two collections.
*
* @param name Entity name
*/
export declare const getObjectId: (name: string) => ObjectId;
/**
* Constructs ObjectId instances based on entity names.
* Helpful for database references between two collections.
*
* @param names Array of object names
*/
export declare const getObjectIds: (names: string[]) => ObjectId[];