wonder.js
Version:
25 lines (20 loc) • 1.21 kB
JavaScript
;
var Log$WonderLog = require("wonder-log/lib/js/src/Log.js");
var Contract$WonderLog = require("wonder-log/lib/js/src/Contract.js");
var StateDataMain$Wonderjs = require("../../state/main/data/StateDataMain.js");
var IsDebugMainService$Wonderjs = require("../../state/main/state/IsDebugMainService.js");
function checkNotExceedMaxCountByIndex(maxCount, index) {
return Contract$WonderLog.ensureCheck((function (index) {
var maxIndex = maxCount - 1 | 0;
return Contract$WonderLog.test(Log$WonderLog.buildAssertMessage("index: " + (String(index) + (" <= maxIndex: " + (String(maxIndex) + ""))), "not"), (function (param) {
return Contract$WonderLog.Operators[/* <= */11](index, maxIndex);
}));
}), IsDebugMainService$Wonderjs.getIsDebug(StateDataMain$Wonderjs.stateData), index);
}
function checkNotExceedMaxCount(maxCount, resultTuple) {
checkNotExceedMaxCountByIndex(maxCount, resultTuple[1]);
return resultTuple;
}
exports.checkNotExceedMaxCountByIndex = checkNotExceedMaxCountByIndex;
exports.checkNotExceedMaxCount = checkNotExceedMaxCount;
/* Log-WonderLog Not a pure module */