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