time-to-botec/squiggle/node_modules/@rescript/std/lib/es6/js_null.js
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

50 lines
609 B
JavaScript

import * as Caml_option from "./caml_option.js";
function test(x) {
return x === null;
}
function getExn(f) {
if (f !== null) {
return f;
}
throw new Error("Js.Null.getExn");
}
function bind(x, f) {
if (x !== null) {
return f(x);
} else {
return null;
}
}
function iter(x, f) {
if (x !== null) {
return f(x);
}
}
function fromOption(x) {
if (x !== undefined) {
return Caml_option.valFromOption(x);
} else {
return null;
}
}
var from_opt = fromOption;
export {
test ,
getExn ,
bind ,
iter ,
fromOption ,
from_opt ,
}
/* No side effect */