Files
boris/node_modules/rxjs/dist/esm5/internal/observable/generate.js
Gigi 5d53a827e0 feat: initialize markr nostr bookmark client
- 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.
2025-10-02 07:17:07 +02:00

49 lines
1.8 KiB
JavaScript

import { __generator } from "tslib";
import { identity } from '../util/identity';
import { isScheduler } from '../util/isScheduler';
import { defer } from './defer';
import { scheduleIterable } from '../scheduled/scheduleIterable';
export function generate(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler) {
var _a, _b;
var resultSelector;
var initialState;
if (arguments.length === 1) {
(_a = initialStateOrOptions, initialState = _a.initialState, condition = _a.condition, iterate = _a.iterate, _b = _a.resultSelector, resultSelector = _b === void 0 ? identity : _b, scheduler = _a.scheduler);
}
else {
initialState = initialStateOrOptions;
if (!resultSelectorOrScheduler || isScheduler(resultSelectorOrScheduler)) {
resultSelector = identity;
scheduler = resultSelectorOrScheduler;
}
else {
resultSelector = resultSelectorOrScheduler;
}
}
function gen() {
var state;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
state = initialState;
_a.label = 1;
case 1:
if (!(!condition || condition(state))) return [3, 4];
return [4, resultSelector(state)];
case 2:
_a.sent();
_a.label = 3;
case 3:
state = iterate(state);
return [3, 1];
case 4: return [2];
}
});
}
return defer((scheduler
?
function () { return scheduleIterable(gen(), scheduler); }
:
gen));
}
//# sourceMappingURL=generate.js.map