MCPcopy
hub / github.com/faker-js/faker / mongodbObjectId

Method mongodbObjectId

src/modules/database/index.ts:77–83  ·  view source on GitHub ↗

* Returns a MongoDB [ObjectId](https://docs.mongodb.com/manual/reference/method/ObjectId/) string. * * @example * faker.database.mongodbObjectId() // 'e175cac316a79afdd0ad3afb' * * @since 6.2.0

()

Source from the content-addressed store, hash-verified

75 * @since 6.2.0
76 */
77 mongodbObjectId(): string {
78 return this.faker.string.hexadecimal({
79 length: 24,
80 casing: 'lower',
81 prefix: '',
82 });
83 }
84}

Callers 1

database.spec.tsFile · 0.80

Calls 1

hexadecimalMethod · 0.80

Tested by

no test coverage detected