UNPKG

assertthat

Version:
22 lines (21 loc) 1.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.assertActualIsNotContaining = void 0; const assertArrayIsNotContainingItem_1 = require("../../forArrays/assertArrayIsNotContainingItem"); const assertSetIsNotContainingItem_1 = require("../../forSets/assertSetIsNotContainingItem"); const assertStringIsNotContainingString_1 = require("../../forStrings/assertStringIsNotContainingString"); const errors_1 = require("../../../errors"); const typedescriptor_1 = require("typedescriptor"); const assertActualIsNotContaining = function (actual, expected) { if ((0, typedescriptor_1.isString)(actual)) { return (0, assertStringIsNotContainingString_1.assertStringIsNotContainingString)(actual, expected); } if ((0, typedescriptor_1.isArray)(actual)) { return (0, assertArrayIsNotContainingItem_1.assertArrayIsNotContainingItem)(actual, expected); } if ((0, typedescriptor_1.isSet)(actual)) { return (0, assertSetIsNotContainingItem_1.assertSetIsNotContainingItem)(actual, expected); } throw new errors_1.InvalidOperation(); }; exports.assertActualIsNotContaining = assertActualIsNotContaining;