JSPM

hex-to-uint8

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q44362F
  • License MIT

The fastest function to convert a hexadecimal string to a Uint8Array.

Package Exports

  • hex-to-uint8

Readme

Hex To Uint8

The fastest function to convert a hexadecimal string to a Uint8Array.

Install

npm install hex-to-uint8

Usage

import toUint8 from 'hex-to-uint8';

// Converting a hexadecimal string to a Uint8Array

const hex = '48656c6c6f2c20776f726c6421';
const uint8 = toUint8 ( hex ); // => Uint8Array(13) [ 72, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100, 33 ]

License

MIT © Fabio Spampinato