JS Valide MongoDB ID

//Validate MongoDB ID
const oid = 'abcd56789012345678901234'
return oid.length === 24 &&  !isNaN(Number('0x' + oid))
Tarik