Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
flux.DynamicX.into = function(a,f) {
return f(a);
}
flux.DynamicX.isInstanceOf = function(o,c) {
return js.Boot.__instanceof(o,c);
}
flux.DynamicX.toThunk = function(t) {
return function() {
return t;
};
}
flux.DynamicX.stringify = function(o) {
return JSON.stringify(o);
}
flux.BoolX = function() { }
$hxClasses["flux.BoolX"] = flux.BoolX;
flux.BoolX.__name__ = ["flux","BoolX"];
flux.BoolX.toInt = function(v) {
return v?1:0;
}
flux.BoolX.ifTrue = function(v,f) {
return v?flux.Option.Some(f()):flux.Option.None;
}
flux.BoolX.ifFalse = function(v,f) {
return !v?flux.Option.Some(f()):flux.Option.None;
}
flux.BoolX.ifElse = function(v,f1,f2) {
return v?f1():f2();
}
flux.BoolX.compare = function(v1,v2) {
return !v1 && v2?-1:v1 && !v2?1:0;
}