mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
chore(repo): prune dead code and duplicate abstractions (#3413)
This commit is contained in:
1 parent
c17091768c
commit
c9fdf8fead
2937 files changed
+42233
-176793
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import {isRecord} from '@fluxer/record_utils/src/RecordGuards';
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import * as fs from 'node:fs';
|
||||
@@ -159,10 +160,6 @@ function normalizeEmailCatalog(source: EmailCatalog, existing: unknown): EmailCa
|
||||
return next;
|
||||
}
|
||||
|
||||
function isRecord(value: unknown): value is Record<string, unknown> {
|
||||
return Boolean(value) && typeof value === 'object' && !Array.isArray(value);
|
||||
}
|
||||
|
||||
function validateCatalog(kind: CatalogKind, catalog: unknown, label: string): Catalog {
|
||||
if (!isRecord(catalog)) {
|
||||
throw new Error(`${label} must be an object`);
|
||||
|
||||
Reference in new issue
Block a user