Current section
Files
Jump to
Current section
Files
src/utils/dict.ffi.mjs
// src/utils/dict.ffi.ts
import * as dict$ from "../../gleam_stdlib/gleam/dict.mjs";
function toObjectWithMap(dict, map) {
const acc = {};
dict$.each(dict, (key, value) => {
acc[key] = map(value);
});
return acc;
}
function toObject(dict) {
return toObjectWithMap(dict, (value) => value);
}
export {
toObject,
toObjectWithMap
};