API/api.medcify.app/node_modules/validator/es/lib/isMongoId.js
2022-09-26 11:41:44 +05:30

6 lines
206 B
JavaScript

import assertString from './util/assertString';
import isHexadecimal from './isHexadecimal';
export default function isMongoId(str) {
assertString(str);
return isHexadecimal(str) && str.length === 24;
}