2019-02-03 04:31:03 +09:00
|
|
|
import { ObjectID } from 'mongodb';
|
|
|
|
|
|
|
|
export default function(x: any): x is ObjectID {
|
2019-02-15 23:42:44 +09:00
|
|
|
return x && typeof x === 'object' && (x.hasOwnProperty('toHexString') || x.hasOwnProperty('_bsontype'));
|
2018-10-16 11:38:09 +09:00
|
|
|
}
|