wonder.js
Version:
19 lines (15 loc) • 943 B
JavaScript
;
var Caml_option = require("bs-platform/lib/js/caml_option.js");
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 unsafeGetAndCheck(key, map) {
return Contract$WonderLog.ensureCheck((function (data) {
return Contract$WonderLog.test(Log$WonderLog.buildAssertMessage("data exist", "not"), (function (param) {
return Contract$WonderLog.assertExist((data == null) ? undefined : Caml_option.some(data));
}));
}), IsDebugMainService$Wonderjs.getIsDebug(StateDataMain$Wonderjs.stateData), map[key]);
}
exports.unsafeGetAndCheck = unsafeGetAndCheck;
/* Log-WonderLog Not a pure module */