UNPKG

offensive

Version:

Fast and boilerplate-free precondition checks for javascript.

21 lines (20 loc) 625 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EmptyAssertion = void 0; require("../Null"); require("../Undefined"); require("../../connectors"); require("../../operators/or"); /** * @author Maciej Chałapuk (maciej@chalapuk.pl) */ var EmptyAssertion = /** @class */ (function () { function EmptyAssertion() { } EmptyAssertion.prototype.assert = function (varName, testedValue, contract) { return contract(varName, testedValue).is.Null.or.Undefined; }; return EmptyAssertion; }()); exports.EmptyAssertion = EmptyAssertion; exports.default = EmptyAssertion;