chore: update deps
This commit is contained in:
18
node_modules/undici/lib/llhttp/utils.js
generated
vendored
18
node_modules/undici/lib/llhttp/utils.js
generated
vendored
@ -1,15 +1,15 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.enumToMap = void 0;
|
||||
function enumToMap(obj) {
|
||||
const res = {};
|
||||
Object.keys(obj).forEach((key) => {
|
||||
const value = obj[key];
|
||||
if (typeof value === 'number') {
|
||||
res[key] = value;
|
||||
}
|
||||
});
|
||||
return res;
|
||||
function enumToMap(obj, filter = [], exceptions = []) {
|
||||
var _a, _b;
|
||||
const emptyFilter = ((_a = filter === null || filter === void 0 ? void 0 : filter.length) !== null && _a !== void 0 ? _a : 0) === 0;
|
||||
const emptyExceptions = ((_b = exceptions === null || exceptions === void 0 ? void 0 : exceptions.length) !== null && _b !== void 0 ? _b : 0) === 0;
|
||||
return Object.fromEntries(Object.entries(obj).filter(([, value]) => {
|
||||
return (typeof value === 'number' &&
|
||||
(emptyFilter || filter.includes(value)) &&
|
||||
(emptyExceptions || !exceptions.includes(value)));
|
||||
}));
|
||||
}
|
||||
exports.enumToMap = enumToMap;
|
||||
//# sourceMappingURL=utils.js.map
|
Reference in New Issue
Block a user