mirror of
https://github.com/dergigi/boris.git
synced 2025-12-18 15:14:20 +01:00
- Add project structure with TypeScript, React, and Vite - Implement nostr authentication using browser extension (NIP-07) - Add NIP-51 compliant bookmark fetching and display - Create minimal UI with login and bookmark components - Integrate applesauce-core and applesauce-react libraries - Add responsive styling with dark/light mode support - Include comprehensive README with setup instructions This is a minimal MVP for a nostr bookmark client that allows users to view their bookmarks according to NIP-51 specification.
23 lines
868 B
JavaScript
Executable File
23 lines
868 B
JavaScript
Executable File
const UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
|
|
const UUID_PARSE = /^[0-9A-Fa-f\-]{36}/;
|
|
//RFC 4122
|
|
const handler = {
|
|
scheme: "urn:uuid",
|
|
parse: function (urnComponents, options) {
|
|
const uuidComponents = urnComponents;
|
|
uuidComponents.uuid = uuidComponents.nss;
|
|
uuidComponents.nss = undefined;
|
|
if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {
|
|
uuidComponents.error = uuidComponents.error || "UUID is not valid.";
|
|
}
|
|
return uuidComponents;
|
|
},
|
|
serialize: function (uuidComponents, options) {
|
|
const urnComponents = uuidComponents;
|
|
//normalize UUID
|
|
urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
|
|
return urnComponents;
|
|
},
|
|
};
|
|
export default handler;
|
|
//# sourceMappingURL=urn-uuid.js.map
|