array-buffer-to-hex
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

array-buffer-to-hex

Turn an ArrayBuffer into a string of hexadecimal characters.

Installation

npm install --save array-buffer-to-hex

Usage

const arrayBufferToHex = require('array-buffer-to-hex')
 
const randomData = crypto.getRandomValues(new Uint8Array(16)).buffer
 
const string = arrayBufferToHex(randomData)
 
console.log(string)
//=> "a2c57b9bc22056336ce5a3ec917819e0"

API

arrayBufferToHex(arrayBuffer: ArrayBuffer) => string

Returns a new string with the hexadecimal content from the array buffer.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.042,321latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.042,321

Package Sidebar

Install

npm i array-buffer-to-hex

Weekly Downloads

42,321

Version

1.0.0

License

MIT

Last publish

Collaborators

  • linusu