mirror of
https://github.com/meshcore-dev/meshcore.js.git
synced 2026-04-20 22:13:49 +00:00
implement path tracing
This commit is contained in:
parent
85d82b13c1
commit
9e3171bd78
5 changed files with 131 additions and 0 deletions
|
|
@ -6,6 +6,10 @@ class BufferUtils {
|
|||
}).join('');
|
||||
}
|
||||
|
||||
static hexToBytes(hex) {
|
||||
return Uint8Array.from(hex.match(/.{1,2}/g).map((byte) => parseInt(byte, 16)));
|
||||
}
|
||||
|
||||
static base64ToBytes(base64) {
|
||||
return Uint8Array.from(atob(base64), (c) => {
|
||||
return c.charCodeAt(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue