feross / feross/safe-buffer

For Uint8Array in Type script

Open
#31 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
345
Forks
47
PR merge metrics
No merged PRs in 30d

Description

This took me way to long to figure out. In order to pass a Uint8Array to functions that need the normal node Buffer Uint8Array Type you must convert to unknown type and then Uint8Array type.

```
let hexstring = "572f3c5e8167f8b2cacba8036b9b37c3cc48b6a349ebbac561eec0089d222451";
let uint8arraytype = Buffer.from(hexstring, 'hex');
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.