@parzh/retryable
Version:
Convenience function to retry an action
15 lines • 623 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var assert_non_negative_impl_1 = __importDefault(require("./assert-non-negative.impl"));
/** @internal */
function assertNatural(value, role) {
if (role === void 0) { role = "value"; }
assert_non_negative_impl_1.default(value);
if (value % 1 !== 0)
throw new Error(role + " is not an integer: " + value);
}
exports.default = assertNatural;
//# sourceMappingURL=assert-natural.impl.js.map