UNPKG

wonder.js

Version:
26 lines (21 loc) 1.25 kB
'use strict'; 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"); var BufferDirectionLightService$Wonderjs = require("../../record/main/light/direction/BufferDirectionLightService.js"); function checkNotExceedMaxCount(count, maxCount) { Contract$WonderLog.requireCheck((function (param) { var maxCount = BufferDirectionLightService$Wonderjs.getBufferMaxCount(/* () */0); return Contract$WonderLog.test(Log$WonderLog.buildAssertMessage("light count: " + (String(count) + (" <= max count: " + (String(maxCount) + ""))), "not"), (function (param) { return Contract$WonderLog.assertLte(/* Int */0, count, maxCount); })); }), IsDebugMainService$Wonderjs.getIsDebug(StateDataMain$Wonderjs.stateData)); return count; } function getLightCount(renderLightArr) { return renderLightArr.length; } exports.checkNotExceedMaxCount = checkNotExceedMaxCount; exports.getLightCount = getLightCount; /* Log-WonderLog Not a pure module */