[{"data":1,"prerenderedAt":506},["ShallowReactive",2],{"navigation":3,"-drivers-browser":137,"-drivers-browser-surround":502},[4,26],{"title":5,"path":6,"stem":7,"children":8,"icon":10},"Getting Started","\u002Fguide","1.guide\u002F1.index",[9,11,16,21],{"title":5,"path":6,"stem":7,"icon":10},"ph:book-open-duotone",{"title":12,"path":13,"stem":14,"icon":15},"Utilities","\u002Fguide\u002Futils","1.guide\u002F2.utils","et:tools-2",{"title":17,"path":18,"stem":19,"icon":20},"HTTP Server","\u002Fguide\u002Fhttp-server","1.guide\u002F3.http-server","ic:baseline-http",{"title":22,"path":23,"stem":24,"icon":25},"Custom Driver","\u002Fguide\u002Fcustom-driver","1.guide\u002F4.custom-driver","carbon:area-custom",{"title":27,"path":28,"stem":29,"children":30,"icon":32},"Drivers","\u002Fdrivers","2.drivers\u002F0.index",[31,33,38,43,48,53,58,63,68,73,77,82,87,92,97,102,107,112,117,122,127,132],{"title":27,"path":28,"stem":29,"icon":32},"icon-park-outline:hard-disk",{"title":34,"path":35,"stem":36,"icon":37},"Azure","\u002Fdrivers\u002Fazure","2.drivers\u002Fazure","mdi:microsoft-azure",{"title":39,"path":40,"stem":41,"icon":42},"Browser","\u002Fdrivers\u002Fbrowser","2.drivers\u002Fbrowser","ph:browser-thin",{"title":44,"path":45,"stem":46,"icon":47},"Capacitor Preferences","\u002Fdrivers\u002Fcapacitor-preferences","2.drivers\u002Fcapacitor-preferences","nonicons:capacitor-16",{"title":49,"path":50,"stem":51,"icon":52},"Cloudflare","\u002Fdrivers\u002Fcloudflare","2.drivers\u002Fcloudflare","devicon-plain:cloudflareworkers",{"title":54,"path":55,"stem":56,"icon":57},"SQL Database","\u002Fdrivers\u002Fdatabase","2.drivers\u002Fdatabase","ph:database",{"title":59,"path":60,"stem":61,"icon":62},"Deno KV","\u002Fdrivers\u002Fdeno","2.drivers\u002Fdeno","simple-icons:deno",{"title":64,"path":65,"stem":66,"icon":67},"Filesystem (Node.js)","\u002Fdrivers\u002Ffs","2.drivers\u002Ffs","ph:file-light",{"title":69,"path":70,"stem":71,"icon":72},"GitHub","\u002Fdrivers\u002Fgithub","2.drivers\u002Fgithub","mdi:github",{"title":74,"path":75,"stem":76,"icon":20},"HTTP","\u002Fdrivers\u002Fhttp","2.drivers\u002Fhttp",{"title":78,"path":79,"stem":80,"icon":81},"LRU Cache","\u002Fdrivers\u002Flru-cache","2.drivers\u002Flru-cache","material-symbols:cached-rounded",{"title":83,"path":84,"stem":85,"icon":86},"Memory","\u002Fdrivers\u002Fmemory","2.drivers\u002Fmemory","bi:memory",{"title":88,"path":89,"stem":90,"icon":91},"MongoDB","\u002Fdrivers\u002Fmongodb","2.drivers\u002Fmongodb","teenyicons:mongodb-outline",{"title":93,"path":94,"stem":95,"icon":96},"Netlify Blobs","\u002Fdrivers\u002Fnetlify","2.drivers\u002Fnetlify","teenyicons:netlify-solid",{"title":98,"path":99,"stem":100,"icon":101},"Null","\u002Fdrivers\u002Fnull","2.drivers\u002Fnull","bi:trash3-fill",{"title":103,"path":104,"stem":105,"icon":106},"Overlay","\u002Fdrivers\u002Foverlay","2.drivers\u002Foverlay","carbon:overlay",{"title":108,"path":109,"stem":110,"icon":111},"PlanetScale","\u002Fdrivers\u002Fplanetscale","2.drivers\u002Fplanetscale","simple-icons:planetscale",{"title":113,"path":114,"stem":115,"icon":116},"Redis","\u002Fdrivers\u002Fredis","2.drivers\u002Fredis","simple-icons:redis",{"title":118,"path":119,"stem":120,"icon":121},"S3","\u002Fdrivers\u002Fs3","2.drivers\u002Fs3","simple-icons:amazons3",{"title":123,"path":124,"stem":125,"icon":126},"UploadThing","\u002Fdrivers\u002Fuploadthing","2.drivers\u002Fuploadthing","qlementine-icons:cloud-16",{"title":128,"path":129,"stem":130,"icon":131},"Upstash","\u002Fdrivers\u002Fupstash","2.drivers\u002Fupstash","simple-icons:upstash",{"title":133,"path":134,"stem":135,"icon":136},"Vercel","\u002Fdrivers\u002Fvercel","2.drivers\u002Fvercel","gg:vercel",{"id":138,"title":39,"body":139,"description":496,"extension":497,"meta":498,"navigation":499,"path":40,"seo":500,"stem":41,"__hash__":501},"content\u002F2.drivers\u002Fbrowser.md",{"type":140,"value":141,"toc":488,"icon":42},"minimark",[142,147,152,168,183,281,286,328,332,335,338,344,351,362,365,368,432,446,450,479,484],[143,144,146],"h2",{"id":145},"localstorage-sessionstorage","LocalStorage \u002F SessionStorage",[148,149,151],"h3",{"id":150},"usage","Usage",[153,154,155,159,160,164,165],"p",{},[156,157,158],"strong",{},"Driver name:"," ",[161,162,163],"code",{},"localstorage"," or ",[161,166,167],{},"sessionstorage",[153,169,170,171,164,178],{},"Store data in ",[172,173,177],"a",{"href":174,"rel":175},"https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FWindow\u002FlocalStorage",[176],"nofollow","localStorage",[172,179,182],{"href":180,"rel":181},"https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FWindow\u002FsessionStorage.",[176],"sessionStorage",[184,185,190],"pre",{"className":186,"code":187,"language":188,"meta":189,"style":189},"language-js shiki shiki-themes github-light github-dark github-dark","import { createStorage } from \"unstorage\";\nimport localStorageDriver from \"unstorage\u002Fdrivers\u002Flocalstorage\";\n\nconst storage = createStorage({\n  driver: localStorageDriver({ base: \"app:\" }),\n});\n","js","",[161,191,192,215,230,237,257,275],{"__ignoreMap":189},[193,194,197,201,205,208,212],"span",{"class":195,"line":196},"line",1,[193,198,200],{"class":199},"so5gQ","import",[193,202,204],{"class":203},"slsVL"," { createStorage } ",[193,206,207],{"class":199},"from",[193,209,211],{"class":210},"sfrk1"," \"unstorage\"",[193,213,214],{"class":203},";\n",[193,216,218,220,223,225,228],{"class":195,"line":217},2,[193,219,200],{"class":199},[193,221,222],{"class":203}," localStorageDriver ",[193,224,207],{"class":199},[193,226,227],{"class":210}," \"unstorage\u002Fdrivers\u002Flocalstorage\"",[193,229,214],{"class":203},[193,231,233],{"class":195,"line":232},3,[193,234,236],{"emptyLinePlaceholder":235},true,"\n",[193,238,240,243,247,250,254],{"class":195,"line":239},4,[193,241,242],{"class":199},"const",[193,244,246],{"class":245},"suiK_"," storage",[193,248,249],{"class":199}," =",[193,251,253],{"class":252},"shcOC"," createStorage",[193,255,256],{"class":203},"({\n",[193,258,260,263,266,269,272],{"class":195,"line":259},5,[193,261,262],{"class":203},"  driver: ",[193,264,265],{"class":252},"localStorageDriver",[193,267,268],{"class":203},"({ base: ",[193,270,271],{"class":210},"\"app:\"",[193,273,274],{"class":203}," }),\n",[193,276,278],{"class":195,"line":277},6,[193,279,280],{"class":203},"});\n",[153,282,283],{},[156,284,285],{},"Options:",[287,288,289,296,307,320],"ul",{},[290,291,292,295],"li",{},[161,293,294],{},"base",": Add base to all keys to avoid collision",[290,297,298,301,302,164,304,306],{},[161,299,300],{},"storage",": (optional) provide ",[161,303,177],{},[161,305,182],{}," compatible object.",[290,308,309,312,313,316,317],{},[161,310,311],{},"windowKey",": (optional) Can be ",[161,314,315],{},"\"localStorage\""," (default) or ",[161,318,319],{},"\"sessionStorage\"",[290,321,322,301,325,327],{},[161,323,324],{},"window",[161,326,324],{}," object",[143,329,331],{"id":330},"indexeddb","IndexedDB",[153,333,334],{},"Store key-value in IndexedDB.",[148,336,151],{"id":337},"usage-1",[153,339,340,159,342],{},[156,341,158],{},[161,343,330],{},[345,346,348],"read-more",{"to":347},"https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FIndexedDB_API",[153,349,350],{},"Learn more about IndexedDB.",[153,352,353,354,361],{},"To use it, you will need to install ",[172,355,358],{"href":356,"rel":357},"https:\u002F\u002Fgithub.com\u002Fjakearchibald\u002Fidb-keyval",[176],[161,359,360],{},"idb-keyval"," in your project:",[363,364],"pm-install",{"name":360},[153,366,367],{},"Usage:",[184,369,371],{"className":186,"code":370,"language":188,"meta":189,"style":189},"import { createStorage } from \"unstorage\";\nimport indexedDbDriver from \"unstorage\u002Fdrivers\u002Findexedb\";\n\nconst storage = createStorage({\n  driver: indexedDbDriver({ base: \"app:\" }),\n});\n",[161,372,373,385,399,403,415,428],{"__ignoreMap":189},[193,374,375,377,379,381,383],{"class":195,"line":196},[193,376,200],{"class":199},[193,378,204],{"class":203},[193,380,207],{"class":199},[193,382,211],{"class":210},[193,384,214],{"class":203},[193,386,387,389,392,394,397],{"class":195,"line":217},[193,388,200],{"class":199},[193,390,391],{"class":203}," indexedDbDriver ",[193,393,207],{"class":199},[193,395,396],{"class":210}," \"unstorage\u002Fdrivers\u002Findexedb\"",[193,398,214],{"class":203},[193,400,401],{"class":195,"line":232},[193,402,236],{"emptyLinePlaceholder":235},[193,404,405,407,409,411,413],{"class":195,"line":239},[193,406,242],{"class":199},[193,408,246],{"class":245},[193,410,249],{"class":199},[193,412,253],{"class":252},[193,414,256],{"class":203},[193,416,417,419,422,424,426],{"class":195,"line":259},[193,418,262],{"class":203},[193,420,421],{"class":252},"indexedDbDriver",[193,423,268],{"class":203},[193,425,271],{"class":210},[193,427,274],{"class":203},[193,429,430],{"class":195,"line":277},[193,431,280],{"class":203},[433,434,435],"note",{},[153,436,437,438,441,442,445],{},"By default, unstorage will ",[161,439,440],{},"JSON.stringify"," the value before passing to IndexedDB. If you want objects to be stored \"as-is\", you can use ",[161,443,444],{},"storage.setItemRaw",".",[153,447,448],{},[156,449,285],{},[287,451,452,461,470],{},[290,453,454,456,457,460],{},[161,455,294],{},": Add ",[161,458,459],{},"${base}:"," to all keys to avoid collision",[290,462,463,466,467],{},[161,464,465],{},"dbName",": Custom name for database. Defaults to ",[161,468,469],{},"keyval-store",[290,471,472,475,476],{},[161,473,474],{},"storeName",": Custom name for store. Defaults to ",[161,477,478],{},"keyval",[433,480,481],{},[153,482,483],{},"IndexedDB is a browser database. Avoid using this preset on server environments.",[485,486,487],"style",{},"html pre.shiki code .so5gQ, html code.shiki .so5gQ{--shiki-light:#D73A49;--shiki-default:#F97583;--shiki-dark:#F97583}html pre.shiki code .slsVL, html code.shiki .slsVL{--shiki-light:#24292E;--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8}html pre.shiki code .sfrk1, html code.shiki .sfrk1{--shiki-light:#032F62;--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF}html pre.shiki code .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}html pre.shiki code .shcOC, html code.shiki .shcOC{--shiki-light:#6F42C1;--shiki-default:#B392F0;--shiki-dark:#B392F0}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":189,"searchDepth":217,"depth":217,"links":489},[490,493],{"id":145,"depth":217,"text":146,"children":491},[492],{"id":150,"depth":232,"text":151},{"id":330,"depth":217,"text":331,"children":494},[495],{"id":337,"depth":232,"text":151},"Store data in localStorage, sessionStorage or IndexedDB","md",{"icon":42},{"icon":42},{"title":39,"description":496},"V2lUwlYVNiCV8dgAa4Xoxb-Acz190n7u49hEKGz2SOM",[503,504],{"title":34,"path":35,"stem":36,"description":189,"icon":37,"children":-1},{"title":44,"path":45,"stem":46,"description":505,"icon":47,"children":-1},"Store data via Capacitor Preferences API on mobile devices or local storage on the web.",1781217588453]