mirror of
https://github.com/dergigi/boris.git
synced 2025-12-26 02:54:29 +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.
38 lines
1.3 KiB
JavaScript
38 lines
1.3 KiB
JavaScript
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.hooks = void 0;
|
|
const hooks = exports.hooks = [function (self, parent) {
|
|
const removeParent = self.key === "test" && (parent.isWhile() || parent.isSwitchCase()) || self.key === "declaration" && parent.isExportDeclaration() || self.key === "body" && parent.isLabeledStatement() || self.listKey === "declarations" && parent.isVariableDeclaration() && parent.node.declarations.length === 1 || self.key === "expression" && parent.isExpressionStatement();
|
|
if (removeParent) {
|
|
parent.remove();
|
|
return true;
|
|
}
|
|
}, function (self, parent) {
|
|
if (parent.isSequenceExpression() && parent.node.expressions.length === 1) {
|
|
parent.replaceWith(parent.node.expressions[0]);
|
|
return true;
|
|
}
|
|
}, function (self, parent) {
|
|
if (parent.isBinary()) {
|
|
if (self.key === "left") {
|
|
parent.replaceWith(parent.node.right);
|
|
} else {
|
|
parent.replaceWith(parent.node.left);
|
|
}
|
|
return true;
|
|
}
|
|
}, function (self, parent) {
|
|
if (parent.isIfStatement() && self.key === "consequent" || self.key === "body" && (parent.isLoop() || parent.isArrowFunctionExpression())) {
|
|
self.replaceWith({
|
|
type: "BlockStatement",
|
|
body: []
|
|
});
|
|
return true;
|
|
}
|
|
}];
|
|
|
|
//# sourceMappingURL=removal-hooks.js.map
|