@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
38 lines (30 loc) • 524 B
JavaScript
var idMap = new Map();
function create(str) {
var v = idMap.get(str);
var id;
if (v !== undefined) {
var id$1 = v + 1 | 0;
idMap.set(str, id$1);
id = id$1;
} else {
idMap.set(str, 1);
id = 1;
}
return str + ("/" + id);
}
function is_extension(e) {
if (e == null) {
return false;
} else {
return typeof e.RE_EXN_ID === "string";
}
}
function exn_slot_name(x) {
return x.RE_EXN_ID;
}
export {
create ,
is_extension ,
exn_slot_name ,
}
/* idMap Not a pure module */