12345678910111213141516171819moduleJs=Js_of_ocaml.Jstype'at='aBrowser_js_types.recordJs.t(** [Object] is an ECMAScript API so it should be available on every JS environment. We
retrieve it here in order to avoid shadowing/reassignment *)letobject_constructor:'atJs.constr=Js.Unsafe.js_expr{|globalThis.Object|}letcreate()=(* The unsafe coercion is required because otherwise the ['a] doesn't line up with the
output type :( *)new%jsobject_constructor|>Js.Unsafe.coerce;;letgettkey=Js.Optdef.to_optionJs.(def(Unsafe.gett(stringkey)))letget'tkey=Js.Optdef.to_optionJs.(def(Unsafe.gettkey))letsettkeydata=Js.Unsafe.sett(Js.stringkey)dataletset'tkeydata=Js.Unsafe.settkeydataletdeletetdata=Js.Unsafe.deletetdata