JSPM

array-buffer-to-hex

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 68691
  • Score
    100M100P100Q167581F
  • License MIT

Package Exports

  • array-buffer-to-hex

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (array-buffer-to-hex) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.