https://github.com/fabiospampinato/uint8-to-hex
The fastest function to convert a Uint8Array to hexadecimal.
https://github.com/fabiospampinato/uint8-to-hex
buffer conversion convert hex hexadecimal uint8 uint8array
Last synced: about 1 year ago
JSON representation
The fastest function to convert a Uint8Array to hexadecimal.
- Host: GitHub
- URL: https://github.com/fabiospampinato/uint8-to-hex
- Owner: fabiospampinato
- License: mit
- Created: 2022-02-08T03:56:45.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-01-15T02:45:34.000Z (over 1 year ago)
- Last Synced: 2025-05-02T12:04:54.537Z (about 1 year ago)
- Topics: buffer, conversion, convert, hex, hexadecimal, uint8, uint8array
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# Uint8 To Hex
The fastest function to convert a Uint8Array to hexadecimal.
## Install
```sh
npm install uint8-to-hex
```
## Usage
```ts
import toHex from 'uint8-to-hex';
// Converting a Uint8Array to a hexadecimal string
const uint8 = new Uint8Array ( [72, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100, 33] );
const hex = toHex ( uint8 ); // => '48656c6c6f2c20776f726c6421'
```
## License
MIT © Fabio Spampinato