UNPKG

timezonecomplete

Version:

DateTime, TimeZone, Duration and Period library aimed at providing a consistent and complete date-time interface, away from the original JavaScript Date class.

34 lines 1.15 kB
/** * Copyright(c) 2016 ABB Switzerland Ltd. */ "use strict"; var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { if (ar || !(i in from)) { if (!ar) ar = Array.prototype.slice.call(from, 0, i); ar[i] = from[i]; } } return to.concat(ar || Array.prototype.slice.call(from)); }; Object.defineProperty(exports, "__esModule", { value: true }); var error_1 = require("./error"); /** * Throws an Assertion error if the given condition is falsy * @param condition * @param name error name * @param format error message with percent-style placeholders * @param args arguments for error message format string * @throws [name] if `condition` is falsy */ function assert(condition, name, format) { var args = []; for (var _i = 3; _i < arguments.length; _i++) { args[_i - 3] = arguments[_i]; } if (!condition) { error_1.throwError.apply(void 0, __spreadArray([name, format], args, false)); } } exports.default = assert; //# sourceMappingURL=assert.js.map