@@ -38,32 +38,32 @@ export function parseToElementsToArray(bytes: Uint8Array, offset?: number): BSON
3838 return Array . isArray ( res ) ? res : [ ...res ] ;
3939}
4040
41- export const getInt32LE = BSON . onDemand . NumberUtils . getInt32LE ;
42- export const getFloat64LE = BSON . onDemand . NumberUtils . getFloat64LE ;
43- export const getBigInt64LE = BSON . onDemand . NumberUtils . getBigInt64LE ;
44- export const toUTF8 = BSON . onDemand . ByteUtils . toUTF8 ;
41+ export const getInt32LE = BSON . NumberUtils . getInt32LE ;
42+ export const getFloat64LE = BSON . NumberUtils . getFloat64LE ;
43+ export const getBigInt64LE = BSON . NumberUtils . getBigInt64LE ;
44+ export const toUTF8 = BSON . ByteUtils . toUTF8 ;
4545
4646// BSON wrappers
4747
4848// writeInt32LE, same order of arguments as Buffer.writeInt32LE
4949export const writeInt32LE = ( destination : Uint8Array , value : number , offset : number ) =>
50- BSON . onDemand . NumberUtils . setInt32LE ( destination , offset , value ) ;
50+ BSON . NumberUtils . setInt32LE ( destination , offset , value ) ;
5151
5252// various wrappers that consume and return local buffer types
5353
5454export const fromUTF8 = ( text : string ) =>
55- ByteUtils . toLocalBufferType ( BSON . onDemand . ByteUtils . fromUTF8 ( text ) ) ;
55+ ByteUtils . toLocalBufferType ( BSON . ByteUtils . fromUTF8 ( text ) ) ;
5656export const fromBase64 = ( b64 : string ) =>
57- ByteUtils . toLocalBufferType ( BSON . onDemand . ByteUtils . fromBase64 ( b64 ) ) ;
57+ ByteUtils . toLocalBufferType ( BSON . ByteUtils . fromBase64 ( b64 ) ) ;
5858export const fromNumberArray = ( array : number [ ] ) =>
59- ByteUtils . toLocalBufferType ( BSON . onDemand . ByteUtils . fromNumberArray ( array ) ) ;
59+ ByteUtils . toLocalBufferType ( BSON . ByteUtils . fromNumberArray ( array ) ) ;
6060export const concatBuffers = ( list : Uint8Array [ ] ) => {
61- return ByteUtils . toLocalBufferType ( BSON . onDemand . ByteUtils . concat ( list ) ) ;
61+ return ByteUtils . toLocalBufferType ( BSON . ByteUtils . concat ( list ) ) ;
6262} ;
6363export const allocateBuffer = ( size : number ) =>
64- ByteUtils . toLocalBufferType ( BSON . onDemand . ByteUtils . allocate ( size ) ) ;
64+ ByteUtils . toLocalBufferType ( BSON . ByteUtils . allocate ( size ) ) ;
6565export const allocateUnsafeBuffer = ( size : number ) =>
66- ByteUtils . toLocalBufferType ( BSON . onDemand . ByteUtils . allocateUnsafe ( size ) ) ;
66+ ByteUtils . toLocalBufferType ( BSON . ByteUtils . allocateUnsafe ( size ) ) ;
6767
6868// validates buffer inputs, used for read operations
6969const validateBufferInputs = ( buffer : Uint8Array , offset : number , length : number ) => {
0 commit comments