iif.js 466 B

1234567891011
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var defer_1 = require("./defer");
  4. var empty_1 = require("./empty");
  5. function iif(condition, trueResult, falseResult) {
  6. if (trueResult === void 0) { trueResult = empty_1.EMPTY; }
  7. if (falseResult === void 0) { falseResult = empty_1.EMPTY; }
  8. return defer_1.defer(function () { return condition() ? trueResult : falseResult; });
  9. }
  10. exports.iif = iif;
  11. //# sourceMappingURL=iif.js.map