UNPKG

@rescript/std

Version:

The motiviation of this repo is that when ReScript users want to share their library with JS users, the JS users don't need have ReScript toolchain installed, this makes sharing code with JS users easier (more details on that topic can be found in our [Ex

48 lines (38 loc) 693 B
'use strict'; var Caml_option = require("./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; exports.test = test; exports.getExn = getExn; exports.bind = bind; exports.iter = iter; exports.fromOption = fromOption; exports.from_opt = from_opt; /* No side effect */