init project

This commit is contained in:
NAS\NASPC
2026-05-26 14:40:48 +07:00
parent 75a146669b
commit 6bdc2aa18f
1523 changed files with 210234 additions and 60 deletions
+12
View File
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.enumToMap = enumToMap;
function enumToMap(obj, filter = [], exceptions = []) {
const emptyFilter = (filter?.length ?? 0) === 0;
const emptyExceptions = (exceptions?.length ?? 0) === 0;
return Object.fromEntries(Object.entries(obj).filter(([, value]) => {
return (typeof value === 'number' &&
(emptyFilter || filter.includes(value)) &&
(emptyExceptions || !exceptions.includes(value)));
}));
}