MCPcopy Index your code
hub / github.com/freeCodeCamp/freeCodeCamp / isObjectID

Function isObjectID

api/src/utils/validation.ts:11–12  ·  view source on GitHub ↗
(id?: string)

Source from the content-addressed store, hash-verified

9 * @returns A boolean indicating if the string is a valid MongoDB ObjectID.
10 */
11export const isObjectID = (id?: string): boolean =>
12 id ? ObjectId.isValid(id) : false;
13
14// Refer : http://stackoverflow.com/a/430240/1932901
15/**

Callers 4

app.tsFile · 0.85
validation.test.tsFile · 0.85
tokenMetaHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected