Skip to content

Type Casters Utility ​

TypeCasters provides utility functions for converting strings or other types into MongoDB-compatible types (like ObjectId).

API Reference ​

const TypeCasters: object

Type casting functions for MongoDB types

Type declaration ​

NameType
Date()(dateValue) => Date
ObjectId()(value) => ObjectId