UNPKG

class-validator-extended

Version:
14 lines (13 loc) 495 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.mapNotContainsKeys = mapNotContainsKeys; const is_map_1 = require("../../type/is-map"); /** * @category Predicates * @param value The value to validate. * @param forbidden List of forbidden key values for this map. * @typeParam Key The type of keys to check for. */ function mapNotContainsKeys(value, forbidden) { return (0, is_map_1.isMap)(value) && [...forbidden].every(item => !value.has(item)); }