paricafe/src/misc/is-objectid.ts

6 lines
162 B
TypeScript
Raw Normal View History

2019-02-02 13:31:03 -06:00
import { ObjectID } from 'mongodb';
export default function(x: any): x is ObjectID {
2018-10-15 21:38:09 -05:00
return x.hasOwnProperty('toHexString') || x.hasOwnProperty('_bsontype');
}