UNPKG

wonder.js

Version:
25 lines (19 loc) 1.21 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 MutableSparseMapService$WonderCommonlib = require("wonder-commonlib/lib/js/src/MutableSparseMapService.js"); var getPoints = MutableSparseMapService$WonderCommonlib.get; function unsafeGetPoints(index, pointsMap) { return Contract$WonderLog.ensureCheck((function (points) { return Contract$WonderLog.test(Log$WonderLog.buildAssertMessage("points exist", "not"), (function (param) { return Contract$WonderLog.assertNullableExist(points); })); }), IsDebugMainService$Wonderjs.getIsDebug(StateDataMain$Wonderjs.stateData), MutableSparseMapService$WonderCommonlib.unsafeGet(index, pointsMap)); } var setPoints = MutableSparseMapService$WonderCommonlib.set; exports.getPoints = getPoints; exports.unsafeGetPoints = unsafeGetPoints; exports.setPoints = setPoints; /* Log-WonderLog Not a pure module */