feat: biome check
This commit is contained in:
@@ -46,6 +46,9 @@ function bufferToHex(buffer: ArrayBuffer): string {
|
||||
}
|
||||
|
||||
function hexToBuffer(hex: string): ArrayBuffer {
|
||||
const bytes = new Uint8Array(hex.match(/.{1,2}/g)!.map((byte) => parseInt(byte, 16)));
|
||||
return bytes.buffer;
|
||||
const match = hex.match(/.{1,2}/g);
|
||||
if (match === null) {
|
||||
return new Uint8Array().buffer;
|
||||
}
|
||||
return new Uint8Array(match.map((byte) => parseInt(byte, 16))).buffer;
|
||||
}
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
"jose": "6.1.0",
|
||||
"nanoid": "5.1.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
import * as Jose from "jose";
|
||||
|
||||
import { createKeyPair, ExportedKeyPair, importPrivateKey, importPublicKey, KeyPair, loadKeyPair } from "./key-pair.ts";
|
||||
import {
|
||||
createKeyPair,
|
||||
type ExportedKeyPair,
|
||||
importPrivateKey,
|
||||
importPublicKey,
|
||||
type KeyPair,
|
||||
loadKeyPair,
|
||||
} from "./key-pair.ts";
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user