Type Alias ByteUtilsExperimental Byte Utils : { allocate : ( ( size : number ) => Uint8Array ) ; allocateUnsafe : ( ( size : number ) => Uint8Array ) ; compare : ( ( buffer1 : Uint8Array , buffer2 : Uint8Array ) => -1 | 0 | 1 ) ; concat : ( ( list : Uint8Array [] ) => Uint8Array ) ; encodeUTF8Into : ( ( destination : Uint8Array , source : string , byteOffset : number ) => number ) ; equals : ( ( a : Uint8Array , b : Uint8Array ) => boolean ) ; fromBase64 : ( ( base64 : string ) => Uint8Array ) ; fromHex : ( ( hex : string ) => Uint8Array ) ; fromISO88591 : ( ( codePoints : string ) => Uint8Array ) ; fromNumberArray : ( ( array : number [] ) => Uint8Array ) ; fromUTF8 : ( ( utf8 : string ) => Uint8Array ) ; isUint8Array : ( ( value : unknown ) => value is Uint8Array ) ; randomBytes : ( ( byteLength : number ) => Uint8Array ) ; swap32 : ( ( buffer : Uint8Array ) => Uint8Array ) ; toBase64 : ( ( buffer : Uint8Array ) => string ) ; toHex : ( ( buffer : Uint8Array ) => string ) ; toISO88591 : ( ( buffer : Uint8Array ) => string ) ; toLocalBufferType : ( ( buffer : Uint8Array | ArrayBufferView | ArrayBuffer ) => Uint8Array ) ; toUTF8 : ( ( buffer : Uint8Array , start : number , end : number , fatal : boolean ) => string ) ; utf8ByteLength : ( ( input : string ) => number ) ; }
Type declaration allocate : ( ( size : number ) => Uint8Array ) ( size ) : Uint8Array Returns Uint8Array allocate Unsafe : ( ( size : number ) => Uint8Array ) ( size ) : Uint8Array Returns Uint8Array compare : ( ( buffer1 : Uint8Array , buffer2 : Uint8Array ) => -1 | 0 | 1 ) ( buffer1 , buffer2 ) : -1 | 0 | 1 Parameters buffer1 : Uint8Array buffer2 : Uint8Array Returns -1 | 0 | 1 concat : ( ( list : Uint8Array [] ) => Uint8Array ) ( list ) : Uint8Array Returns Uint8Array encodeUTF8 Into : ( ( destination : Uint8Array , source : string , byteOffset : number ) => number ) ( destination , source , byteOffset ) : number Parameters destination : Uint8Array source : string byteOffset : number Returns number equals : ( ( a : Uint8Array , b : Uint8Array ) => boolean ) ( a , b ) : boolean Parameters a : Uint8Array b : Uint8Array Returns boolean from Base64 : ( ( base64 : string ) => Uint8Array ) ( base64 ) : Uint8Array Returns Uint8Array from Hex : ( ( hex : string ) => Uint8Array ) ( hex ) : Uint8Array Returns Uint8Array fromISO88591 : ( ( codePoints : string ) => Uint8Array ) ( codePoints ) : Uint8Array Returns Uint8Array from Number Array : ( ( array : number [] ) => Uint8Array ) ( array ) : Uint8Array Returns Uint8Array fromUTF8 : ( ( utf8 : string ) => Uint8Array ) ( utf8 ) : Uint8Array Returns Uint8Array is Uint8 Array : ( ( value : unknown ) => value is Uint8Array ) ( value ) : value is Uint8Array Returns value is Uint8Array random Bytes : ( ( byteLength : number ) => Uint8Array ) ( byteLength ) : Uint8Array Returns Uint8Array swap32 : ( ( buffer : Uint8Array ) => Uint8Array ) ( buffer ) : Uint8Array Returns Uint8Array to Base64 : ( ( buffer : Uint8Array ) => string ) ( buffer ) : string Returns string to Hex : ( ( buffer : Uint8Array ) => string ) ( buffer ) : string Returns string toISO88591 : ( ( buffer : Uint8Array ) => string ) ( buffer ) : string Returns string to Local Buffer Type : ( ( buffer : Uint8Array | ArrayBufferView | ArrayBuffer ) => Uint8Array ) ( buffer ) : Uint8Array Parameters buffer : Uint8Array | ArrayBufferView | ArrayBuffer Returns Uint8Array toUTF8 : ( ( buffer : Uint8Array , start : number , end : number , fatal : boolean ) => string ) ( buffer , start , end , fatal ) : string Parameters buffer : Uint8Array start : number end : number fatal : boolean Returns string utf8 Byte Length : ( ( input : string ) => number ) ( input ) : number Returns number Defined in node_modules/bson/bson.d.ts:455 Defined in node_modules/bson/bson.d.ts:507
A collection of functions that help work with data in a Uint8Array. ByteUtils is configured at load time to use Node.js or Web based APIs for the internal implementations.