yhj
5 天以前 ea5c60a0ac52216b22d6096d2d0394c2480f5bc3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.objFilter = void 0;
const common_types_1 = require("./common-types");
function objFilter(original = {}, filter = () => true) {
    const obj = {};
    common_types_1.objectKeys(original).forEach((key) => {
        if (filter(key, original[key])) {
            obj[key] = original[key];
        }
    });
    return obj;
}
exports.objFilter = objFilter;