The driver ObjectId constructor shape.
ObjectId
0.2.0
Constructs a new ObjectId.
Optional
A 24-hex string (or no argument, for a fresh random id)
Tests whether a value is a valid ObjectId — exactly a 24-hex string, so a 12-char value is rejected.
The candidate value
The driver
ObjectIdconstructor shape.Since
0.2.0