move to pkg

This commit is contained in:
2023-06-08 12:45:23 +02:00
parent 2b80109e3b
commit 81ccb95d82
256 changed files with 4856 additions and 529 deletions

23
packages/system/dist/RequestMatcher.js vendored Normal file
View File

@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.eventMatchesFilter = void 0;
function eventMatchesFilter(ev, filter) {
if (!(filter.ids?.includes(ev.id) ?? false)) {
return false;
}
if (!(filter.authors?.includes(ev.pubkey) ?? false)) {
return false;
}
if (!(filter.kinds?.includes(ev.kind) ?? false)) {
return false;
}
if (filter.since && ev.created_at < filter.since) {
return false;
}
if (filter.until && ev.created_at > filter.until) {
return false;
}
return true;
}
exports.eventMatchesFilter = eventMatchesFilter;
//# sourceMappingURL=RequestMatcher.js.map