@justgage/reason-cookie
Version:
a simple way to use cross-browser cookies that contain JSON.
32 lines • 7.74 kB
JSON
[{"href": "./index.html", "title": "code block", "contents": "Cookie.setJsonConfig(\n \"hello\",\n obj,\n Cookie.makeConfig(~path=\"\", ~expires=2, ()),\n);", "rendered": "<pre><code>Cookie.setJsonConfig(\n \"hello\",\n obj,\n Cookie.makeConfig(~path=\"\", ~expires=2, ()),\n);</code></pre>", "breadcrumb": "Home"},
{"href": "./index.html#set-path-expiry", "title": "set path/expiry", "contents": "", "rendered": "", "breadcrumb": "Home"},
{"href": "./index.html", "title": "code block", "contents": "let obj = Js.Dict.empty();\nJs.Dict.set(obj, \"a\", Js.Json.number(2.));\nlet obj = Js.Json.object_(obj);\n\nCookie.setJson(\"hello\", obj);\n\nlet maybeCookie = Cookie.getAsJson(\"hello\");", "rendered": "<pre><code>let obj = Js.Dict.empty();\nJs.Dict.set(obj, \"a\", Js.Json.number(2.));\nlet obj = Js.Json.object_(obj);\n\nCookie.setJson(\"hello\", obj);\n\nlet maybeCookie = Cookie.getAsJson(\"hello\");</code></pre>", "breadcrumb": "Home"},
{"href": "./index.html#working-JSON", "title": "working JSON", "contents": "", "rendered": "", "breadcrumb": "Home"},
{"href": "./index.html", "title": "code block", "contents": "Cookie.getAsString(\"hello\") /* None */\nCookie.setString(\"hello\", \"test\");\nCookie.getAsString(\"hello\") /* Some(\"test\") */", "rendered": "<pre><code>Cookie.getAsString(\"hello\") /* None */\nCookie.setString(\"hello\", \"test\");\nCookie.getAsString(\"hello\") /* Some(\"test\") */</code></pre>", "breadcrumb": "Home"},
{"href": "./index.html#Working-with-string-values", "title": "Working with string values", "contents": "", "rendered": "", "breadcrumb": "Home"},
{"href": "./index.html#API", "title": "API", "contents": "", "rendered": "", "breadcrumb": "Home"},
{"href": "./index.html", "title": "code block", "contents": " \"bs-dependencies\": [\"@justgage/reason-cookie\"],", "rendered": "<pre><code> \"bs-dependencies\": [\"@justgage/reason-cookie\"],</code></pre>", "breadcrumb": "Home"},
{"href": "./index.html", "title": "Home", "contents": "Then in your bsconfig.json.", "rendered": "Then in your <code>bsconfig.json</code>.", "breadcrumb": "Home"},
{"href": "./index.html", "title": "code block", "contents": "npm install --save @justgage/reason-cookie", "rendered": "<pre><code>npm install --save @justgage/reason-cookie</code></pre>", "breadcrumb": "Home"},
{"href": "./index.html#Install", "title": "Install", "contents": "", "rendered": "", "breadcrumb": "Home"},
{"href": "./index.html", "title": "Home", "contents": "I use it on my side project. The library that's wrapped is pretty battle tested.", "rendered": "I use it on my side project. The library that's wrapped is pretty battle tested.", "breadcrumb": "Home"},
{"href": "./index.html#Is-it-ready-for-prime-time-", "title": "Is it ready for prime time?", "contents": "", "rendered": "", "breadcrumb": "Home"},
{"href": "./index.html", "title": "Home", "contents": "Note this wrapps js-cookie", "rendered": "Note this wrapps <a href=\"https://github.com/js-cookie/js-cookie\" target=\"_blank\" rel=\"noopener nofollow\" title=\"\" class=\"external-link\">js-cookie</a>", "breadcrumb": "Home"},
{"href": "./index.html", "title": "Home", "contents": "a simple way to use cross-browser cookies that contain JSON.", "rendered": "a simple way to use cross-browser cookies that contain JSON.", "breadcrumb": "Home"},
{"href": "./index.html#ReasonCookie", "title": "ReasonCookie", "contents": "", "rendered": "", "breadcrumb": "Home"},
{"href": "./api/Example-JustgageReasonCookie.html", "title": "Example-JustgageReasonCookie", "contents": "This module does not have a toplevel documentation block.", "rendered": "<span class='missing'>This module does not have a toplevel documentation block.</span>", "breadcrumb": "Example-JustgageReasonCookie"},
{"href": "./api/Example-JustgageReasonCookie.html#Example-JustgageReasonCookie", "title": "Example-JustgageReasonCookie", "contents": "", "rendered": "", "breadcrumb": "Example-JustgageReasonCookie"},
{"href": "./api/Cookie-JustgageReasonCookie.html#value-getAsJson", "title": "getAsJson", "contents": "getAsJson string option Js Json t ", "rendered": "<h4 class='item'>let getAsJson = (string) => option(Js.Json.t)</h4>", "breadcrumb": "Cookie-JustgageReasonCookie"},
{"href": "./api/Cookie-JustgageReasonCookie.html#value-getAsString", "title": "getAsString", "contents": "getAsString string option string ", "rendered": "<h4 class='item'>let getAsString = (string) => option(string)</h4>", "breadcrumb": "Cookie-JustgageReasonCookie"},
{"href": "./api/Cookie-JustgageReasonCookie.html#value-setString", "title": "setString", "contents": "setString string string unit ", "rendered": "<h4 class='item'>let setString = (string, string) => unit</h4>", "breadcrumb": "Cookie-JustgageReasonCookie"},
{"href": "./api/Cookie-JustgageReasonCookie.html#value-setJsonConfig", "title": "setJsonConfig", "contents": "setJsonConfig string Js Json t config unit ", "rendered": "<h4 class='item'>let setJsonConfig = (string, Js.Json.t, <a href=\"./api/Cookie-JustgageReasonCookie.html#type-config\">config</a>) => unit</h4>", "breadcrumb": "Cookie-JustgageReasonCookie"},
{"href": "./api/Cookie-JustgageReasonCookie.html#value-remove", "title": "remove", "contents": "remove string unit ", "rendered": "<h4 class='item'>let remove = (string) => unit</h4>", "breadcrumb": "Cookie-JustgageReasonCookie"},
{"href": "./api/Cookie-JustgageReasonCookie.html#value-makeConfig", "title": "makeConfig", "contents": "makeConfig option int option string unit config expires path ", "rendered": "<h4 class='item'>let makeConfig = (\n ~?expires: option(int),\n ~?path: option(string),\n unit\n) => <a href=\"./api/Cookie-JustgageReasonCookie.html#type-config\">config</a></h4>", "breadcrumb": "Cookie-JustgageReasonCookie"},
{"href": "./api/Cookie-JustgageReasonCookie.html#type-config", "title": "config", "contents": "config ", "rendered": "<h4 class='item'>type config</h4>", "breadcrumb": "Cookie-JustgageReasonCookie"},
{"href": "./api/Cookie-JustgageReasonCookie.html#value-setJson", "title": "setJson", "contents": "setJson string Js Json t unit ", "rendered": "<h4 class='item'>let setJson = (string, Js.Json.t) => unit</h4>", "breadcrumb": "Cookie-JustgageReasonCookie"},
{"href": "./api/Cookie-JustgageReasonCookie.html", "title": "Cookie-JustgageReasonCookie", "contents": "This module does not have a toplevel documentation block.", "rendered": "<span class='missing'>This module does not have a toplevel documentation block.</span>", "breadcrumb": "Cookie-JustgageReasonCookie"},
{"href": "./api/Cookie-JustgageReasonCookie.html#Cookie-JustgageReasonCookie", "title": "Cookie-JustgageReasonCookie", "contents": "", "rendered": "", "breadcrumb": "Cookie-JustgageReasonCookie"},
{"href": "./api/JustgageReasonCookie.html", "title": "JustgageReasonCookie", "contents": "This module does not have a toplevel documentation block.", "rendered": "<span class='missing'>This module does not have a toplevel documentation block.</span>", "breadcrumb": "JustgageReasonCookie"},
{"href": "./api/JustgageReasonCookie.html#JustgageReasonCookie", "title": "JustgageReasonCookie", "contents": "", "rendered": "", "breadcrumb": "JustgageReasonCookie"},
{"href": "./api/CookieTest-JustgageReasonCookie.html", "title": "CookieTest-JustgageReasonCookie", "contents": "This module does not have a toplevel documentation block.", "rendered": "<span class='missing'>This module does not have a toplevel documentation block.</span>", "breadcrumb": "CookieTest-JustgageReasonCookie"},
{"href": "./api/CookieTest-JustgageReasonCookie.html#CookieTest-JustgageReasonCookie", "title": "CookieTest-JustgageReasonCookie", "contents": "", "rendered": "", "breadcrumb": "CookieTest-JustgageReasonCookie"}]