bigbuffet-rw/app/soapbox/utils/nostr.ts
2023-03-08 19:56:24 -06:00

6 lines
No EOL
165 B
TypeScript

/** Check whether the given input is a valid Nostr hexidecimal pubkey. */
const isPubkey = (value: string) => /^[0-9a-f]{64}$/i.test(value);
export {
isPubkey,
};