Optional
allowOptional
bsonreturn BSON regular expressions as BSONRegExp instances.
Optional
cachecache evaluated functions for reuse.
Optional
cacheuse a crc32 code for caching, otherwise use the string of the function.
this option to use the crc32 function never worked as intended due to the fact that the crc32 function itself was never implemented.
Optional
evalevaluate functions in the BSON document scoped to the object deserialized.
Optional
fieldsallow to specify if there what fields we wish to return as unserialized raw buffer.
Optional
indexOffset into buffer to begin reading document from
Optional
promotewhen deserializing a Binary will return it as a node.js Buffer instance.
Optional
promotewhen deserializing a Long will fit it into a Number if it's smaller than 53 bits
Optional
promotewhen deserializing will promote BSON values to their Node.js closest equivalent types.
Optional
rawOptional
validationAllows for opt-out utf-8 validation for all keys or specified keys. Must be all true or all false.
// disables validation on all keys
validation: { utf8: false }
// enables validation only on specified keys a, b, and c
validation: { utf8: { a: true, b: true, c: true } }
// disables validation only on specified keys a, b
validation: { utf8: { a: false, b: false } }
Generated using TypeDoc
allows the buffer to be larger than the parsed BSON object