[{"data":1,"prerenderedAt":428},["ShallowReactive",2],{"navigation":3,"-guide-utils":137,"-guide-utils-surround":423},[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":12,"body":139,"description":417,"extension":418,"meta":419,"navigation":420,"path":13,"seo":421,"stem":14,"__hash__":422},"content\u002F1.guide\u002F2.utils.md",{"type":140,"value":141,"toc":413,"icon":15},"minimark",[142,147,151,168,281,285,305,308,354,370,377,409],[143,144,146],"h2",{"id":145},"namespace","Namespace",[148,149,150],"p",{},"Create a namespaced instance of the main storage. All operations are virtually prefixed, which is useful for creating shorcuts and limiting access.",[148,152,153],{},[154,155,159,164],"code",{"className":156,"language":157,"style":158},"language-ts shiki shiki-themes github-light github-dark github-dark","ts","",[160,161,163],"span",{"class":162},"shcOC","prefixStorage",[160,165,167],{"class":166},"slsVL","(storage, prefix)",[169,170,172],"pre",{"className":156,"code":171,"language":157,"meta":158,"style":158},"import { createStorage, prefixStorage } from \"unstorage\";\n\nconst storage = createStorage();\nconst assetsStorage = prefixStorage(storage, \"assets\");\n\n\u002F\u002F Same as storage.setItem('assets:x', 'hello!')\nawait assetsStorage.setItem(\"x\", \"hello!\");\n",[154,173,174,195,202,221,243,248,255],{"__ignoreMap":158},[160,175,178,182,185,188,192],{"class":176,"line":177},"line",1,[160,179,181],{"class":180},"so5gQ","import",[160,183,184],{"class":166}," { createStorage, prefixStorage } ",[160,186,187],{"class":180},"from",[160,189,191],{"class":190},"sfrk1"," \"unstorage\"",[160,193,194],{"class":166},";\n",[160,196,198],{"class":176,"line":197},2,[160,199,201],{"emptyLinePlaceholder":200},true,"\n",[160,203,205,208,212,215,218],{"class":176,"line":204},3,[160,206,207],{"class":180},"const",[160,209,211],{"class":210},"suiK_"," storage",[160,213,214],{"class":180}," =",[160,216,217],{"class":162}," createStorage",[160,219,220],{"class":166},"();\n",[160,222,224,226,229,231,234,237,240],{"class":176,"line":223},4,[160,225,207],{"class":180},[160,227,228],{"class":210}," assetsStorage",[160,230,214],{"class":180},[160,232,233],{"class":162}," prefixStorage",[160,235,236],{"class":166},"(storage, ",[160,238,239],{"class":190},"\"assets\"",[160,241,242],{"class":166},");\n",[160,244,246],{"class":176,"line":245},5,[160,247,201],{"emptyLinePlaceholder":200},[160,249,251],{"class":176,"line":250},6,[160,252,254],{"class":253},"sCsY4","\u002F\u002F Same as storage.setItem('assets:x', 'hello!')\n",[160,256,258,261,264,267,270,273,276,279],{"class":176,"line":257},7,[160,259,260],{"class":180},"await",[160,262,263],{"class":166}," assetsStorage.",[160,265,266],{"class":162},"setItem",[160,268,269],{"class":166},"(",[160,271,272],{"class":190},"\"x\"",[160,274,275],{"class":166},", ",[160,277,278],{"class":190},"\"hello!\"",[160,280,242],{"class":166},[143,282,284],{"id":283},"snapshots","Snapshots",[286,287,288],"ul",{},[289,290,291],"li",{},[154,292,293,296,299,302],{"className":156,"language":157,"style":158},[160,294,295],{"class":162},"snapshot",[160,297,298],{"class":166},"(storage, base",[160,300,301],{"class":180},"?",[160,303,304],{"class":166},")",[148,306,307],{},"Takes a snapshot from all keys in the specified base and stores them in a plain JavaScript object (string: string). Base is removed from keys.",[169,309,313],{"className":310,"code":311,"language":312,"meta":158,"style":158},"language-js shiki shiki-themes github-light github-dark github-dark","import { snapshot } from \"unstorage\";\n\nconst data = await snapshot(storage, \"\u002Fetc\");\n","js",[154,314,315,328,332],{"__ignoreMap":158},[160,316,317,319,322,324,326],{"class":176,"line":177},[160,318,181],{"class":180},[160,320,321],{"class":166}," { snapshot } ",[160,323,187],{"class":180},[160,325,191],{"class":190},[160,327,194],{"class":166},[160,329,330],{"class":176,"line":197},[160,331,201],{"emptyLinePlaceholder":200},[160,333,334,336,339,341,344,347,349,352],{"class":176,"line":204},[160,335,207],{"class":180},[160,337,338],{"class":210}," data",[160,340,214],{"class":180},[160,342,343],{"class":180}," await",[160,345,346],{"class":162}," snapshot",[160,348,236],{"class":166},[160,350,351],{"class":190},"\"\u002Fetc\"",[160,353,242],{"class":166},[286,355,356],{},[289,357,358],{},[154,359,360,363,366,368],{"className":156,"language":157,"style":158},[160,361,362],{"class":162},"restoreSnapshot",[160,364,365],{"class":166},"(storage, data, base",[160,367,301],{"class":180},[160,369,304],{"class":166},[148,371,372,373,376],{},"Restore a snapshot created by ",[154,374,375],{},"snapshot()",".",[169,378,380],{"className":310,"code":379,"language":312,"meta":158,"style":158},"await restoreSnapshot(storage, { \"foo:bar\": \"baz\" }, \"\u002Fetc2\");\n",[154,381,382],{"__ignoreMap":158},[160,383,384,386,389,392,395,398,401,404,407],{"class":176,"line":177},[160,385,260],{"class":180},[160,387,388],{"class":162}," restoreSnapshot",[160,390,391],{"class":166},"(storage, { ",[160,393,394],{"class":190},"\"foo:bar\"",[160,396,397],{"class":166},": ",[160,399,400],{"class":190},"\"baz\"",[160,402,403],{"class":166}," }, ",[160,405,406],{"class":190},"\"\u002Fetc2\"",[160,408,242],{"class":166},[410,411,412],"style",{},"html pre.shiki code .shcOC, html code.shiki .shcOC{--shiki-light:#6F42C1;--shiki-default:#B392F0;--shiki-dark:#B392F0}html pre.shiki code .slsVL, html code.shiki .slsVL{--shiki-light:#24292E;--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8}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);}html pre.shiki code .so5gQ, html code.shiki .so5gQ{--shiki-light:#D73A49;--shiki-default:#F97583;--shiki-dark:#F97583}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 .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":158,"searchDepth":197,"depth":197,"links":414},[415,416],{"id":145,"depth":197,"text":146},{"id":283,"depth":197,"text":284},"Unstorage exposes several utilities. You can individually import them and add only the needed bytes to your bundle.","md",{"icon":15},{"icon":15},{"title":12,"description":417},"2eJUQFVr7gx0GCeRhgICayTljlkzS3pL_7chpbg7sGw",[424,426],{"title":5,"path":6,"stem":7,"description":425,"icon":10,"children":-1},"Learn how to setup and use unstorage in your project.",{"title":17,"path":18,"stem":19,"description":427,"icon":20,"children":-1},"We can expose unstorage's instance to an HTTP server to allow remote connections.",1781217592748]