Skip to content

arrayBufferToHex

Official

Converts an ArrayBuffer to a hex string.

Import:

import { arrayBufferToHex } from 'obsidian';

Example:

console.log(arrayBufferToHex(new Uint8Array([1,2,3]).buffer)); // 010203

Signature:

function arrayBufferToHex(data: ArrayBuffer): string

Parameters:

ParameterTypeDescription
dataArrayBuffer

Returns: string — The hex string.

Example:

console.log(arrayBufferToHex(new Uint8Array([1,2,3]).buffer)); // 010203