This commit is contained in:
2023-09-21 22:01:39 +01:00
parent 8244441929
commit 96d4e4bcc5
16 changed files with 480 additions and 384 deletions

View File

@ -6,8 +6,8 @@ import { ReqFilter } from "nostr";
export function trimFilters(filters: Array<ReqFilter>) {
const fNew = [];
for (const f of filters) {
const ent = Object.entries(f).filter(([,v]) => Array.isArray(v));
if(ent.every(([,v]) => (v as Array<string | number>).length > 0)) {
const ent = Object.entries(f).filter(([, v]) => Array.isArray(v));
if (ent.every(([, v]) => (v as Array<string | number>).length > 0)) {
fNew.push(f);
}
}