{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Bun","colors":{"primary":"#ff73a8","light":"#ff73a8","dark":"#ff73a8"},"logo":{"light":"https://mintcdn.com/bun-1dd33a4e/JUhaF6Mf68z_zHyy/logo/logo-with-wordmark-dark.svg?fit=max\u0026auto=format\u0026n=JUhaF6Mf68z_zHyy\u0026q=85\u0026s=3f55cd23822028e40658b192c927f3e4","dark":"https://mintcdn.com/bun-1dd33a4e/JUhaF6Mf68z_zHyy/logo/logo-with-wordmark-light.svg?fit=max\u0026auto=format\u0026n=JUhaF6Mf68z_zHyy\u0026q=85\u0026s=8a0c5928d9dc3631f0d33e17c257e2ec"},"favicon":"https://mintcdn.com/bun-1dd33a4e/fU8ET1hSpIaJ6oEr/logo/bun.png?fit=max\u0026auto=format\u0026n=fU8ET1hSpIaJ6oEr\u0026q=85\u0026s=b8c01fba72c22f3094a710265a468e33","appearance":{"default":"system"},"background":{"decoration":"gradient"},"navbar":{"links":[{"icon":"download","href":"https://www.bun.com/docs/installation","label":"Install Bun"}]},"footer":{"socials":{"x":"https://x.com/bunjavascript","github":"https://github.com/oven-sh/bun","discord":"https://bun.com/discord","youtube":"https://www.youtube.com/@bunjs"}},"seo":{"metatags":{"canonical":"https://bun.com/docs"}},"fonts":{"heading":{"family":"Inter Display Bold","source":"https://mintlify-assets.b-cdn.net/fonts/InterDisplay-Bold.woff2","format":"woff2"}},"icons":{"library":"lucide"},"styling":{"codeblocks":{"theme":{"light":"github-light","dark":"dracula"}},"latex":false},"contextual":{"options":["copy","view","claude","mcp","vscode"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"bun-1dd33a4e","hasAudioNarration":false,"actualSubdomain":"bun-1dd33a4e","customDomains":["bun.com","bun.sh","bunjs.panticore.space"],"gitSource":{"type":"github","owner":"oven-sh","repo":"bun","deployBranch":"main","contentDirectory":"docs","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{},"buildId":"6ae93e9e453bdad3d9d54b1b:success","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"Guides","count":191},{"language":"default","tag":"Runtime","count":74},{"language":"default","tag":"Package Manager","count":44},{"language":"default","tag":"Test Runner","count":32},{"language":"default","tag":"Utilities","count":30},{"language":"default","tag":"Ecosystem \u0026 Frameworks","count":27},{"language":"default","tag":"Binary Data","count":22},{"language":"default","tag":"File System","count":21},{"language":"default","tag":"Bundler","count":13},{"language":"default","tag":"HTTP \u0026 Networking","count":13}]},"assistantConfig":{"askAiOnCodeBlock":false,"enableAskAiButton":false,"enableStarterQuestions":true,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@bun.com","showHelpButton":true}},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[{"_id":"68f7ce8d31e26413793acc35","deploymentId":"68a6511d649c76055d336e23","questionText":"How do I create a single-file executable with Bun?","status":"active","generatedBy":"manual","createdAt":"2025-10-21T18:18:53.168Z","updatedAt":"2025-10-21T18:18:53.168Z","__v":0},{"_id":"68f7cd1b31e26413793a5690","deploymentId":"68a6511d649c76055d336e23","questionText":"Does Bun's package manager support monorepos?","status":"active","generatedBy":"manual","createdAt":"2025-10-21T18:12:43.686Z","updatedAt":"2025-10-21T18:18:34.032Z","__v":0},{"_id":"68f7ccf531e26413793a4b79","deploymentId":"68a6511d649c76055d336e23","questionText":"How do I create an HTTP server with Bun?","status":"active","generatedBy":"manual","createdAt":"2025-10-21T18:12:05.087Z","updatedAt":"2025-10-21T18:12:05.087Z","__v":0}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".steps{margin-top:0}div[data-component-part=\"card-icon\"]>svg{mask-size:80%}.font-mono{font-weight:700!important}.nav-tabs .nav-tabs-item{font-size:0.8rem!important}.mdx-content>span[data-as=\"p\"]{margin-bottom:2rem!important}.dark\\:bg-white\\/5:is(.dark *){background-color:rgb(155 155 155 / 5%)}ul#sidebar-group>li>a{font-size:0.825rem;line-height:1rem;font-weight:500}pre.shiki{line-height:1.4rem;font-size:0.8rem}.dark\\:ring-white\\/\\[0\\.14\\]:is(.dark *){border:1px solid rgb(255 255 255/0.14)!important;--tw-ring-color: transparent}.ring-transparent{border:1px solid transparent!important}.code-block:has([data-component-part=\"code-block-header\"]) div[data-component-part=\"code-block-root\"]{border-top-right-radius:0px!important;border-top-left-radius:0px!important}.code-group:has([data-component-part=\"code-group-tab-bar\"]) div[data-component-part=\"code-block-root\"]{border-top-right-radius:0px!important;border-top-left-radius:0px!important}img.code-block-icon{background:transparent!important}div[data-component-part=\"card-icon\"] img{background:transparent!important}html.dark .card-group .card:not(:hover){border:1px solid rgb(255 255 255/0.1)!important}html:not(.dark) .card-group .card{border:1px solid rgb(var(--gray-200))!important}.dark div[data-component-part=\"card-content-container\"]{background:rgb(255 255 255/0.03)}.card:hover{border-color:rgb(var(--gray-400) / var(--tw-border-opacity))!important}html.dark .shiki,html.dark .shiki span{background-color:transparent!important}.prose :where(hr):not(:where([class~=\"not-prose\"],[class~=\"not-prose\"] *)){margin-top:2rem!important;margin-bottom:2rem!important}footer#footer a[href*=\"mintlify.com\"]{display:none}.nav-tabs{width:100%!important}a[href=\"/guides\"],a[href=\"/docs/guides\"]{margin-left:auto!important}div[data-component-part=\"card-content-container\"]{height:100%!important}div#guides-list div[data-component-part=\"card-content-container\"]>*:nth-child(2){height:100%;display:flex;flex-direction:column;justify-content:space-between!important}.code-block+.code-block[language=\"text\"]{margin-top:-32px;z-index:-1;border-top-right-radius:0px;border-top-left-radius:0px;border-top:none}.code-block+.code-block[language=\"text\"],.code-block+.code-block[language=\"text\"] div[data-component-part=\"code-block-root\"]{background-color:rgb(var(--gray-50))!important}html.dark .code-block+.code-block[language=\"text\"],html.dark .code-block+.code-block[language=\"text\"] div[data-component-part=\"code-block-root\"]{background-color:#16171e!important}.code-block+.code-block[language=\"text\"] div.absolute.top-3{display:none}.code-block:has(+.code-block[language=\"text\"]){border-bottom-right-radius:0px;border-bottom-left-radius:0px}.code-block:has(+.code-block[language=\"text\"]) div[data-component-part=\"code-block-root\"]{border-bottom-right-radius:0px;border-bottom-left-radius:0px}div.callout .code-block{margin-bottom:0px}[language=\"shellscript\"] code span.line:not(:empty):has(span)::before{content:\"$ \";color:#6272a4;user-select:none}[language=\"shellscript\"] code span.line:has(>span:first-child[style*=\"color: rgb(98, 114, 164)\"])::before,[language=\"shellscript\"] code span.line:has(>span:first-child[style*=\"#6272A4\"])::before{content:\"\"}[language=\"powershell\"] code span.line:not(:empty):has(span)::before{content:\"> \";color:#6272a4;user-select:none}[language=\"powershell\"] code span.line:has(>span:first-child[style*=\"color: rgb(98, 114, 164)\"])::before,[language=\"powershell\"] code span.line:has(>span:first-child[style*=\"#6272A4\"])::before{content:\"\"}.dark [data-component-part=\"code-block-root\"]:not(.has-line-numbers) .line-highlight,.dark [data-component-part=\"code-block-root\"]:not(.has-line-numbers) .line-highlight:after,.dark [data-component-part=\"code-block-root\"]:not(.has-line-numbers) .line-highlight:before{background:rgb(219 219 219 / 20%)!important}.dark[data-component-part=\"code-block-root\"]:not(.has-line-numbers) .line-highlight:before{border-color:white}[data-component-part=\"code-block-root\"]:not(.has-line-numbers) .line-highlight,[data-component-part=\"code-block-root\"]:not(.has-line-numbers) .line-highlight:after,[data-component-part=\"code-block-root\"]:not(.has-line-numbers) .line-highlight:before{background:rgb(var(--gray-200) / 0.5)!important}[data-component-part=\"code-block-root\"]:not(.has-line-numbers) .line-highlight:before{border-color:rgb(172, 172, 172)}"}]}
{"page":{"pagePath":"guides","slug":"/guides","pageMetadata":{"title":"Guides","description":"Code samples and walkthroughs for common tasks with Bun","contextual":false,"mode":"center","href":"/guides/index"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Code samples and walkthroughs for common tasks with Bun\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const GuidesList=()=>{const{Card,Columns}=_provideComponents()||{};if(!Card)_missingMdxReference(`Card`,true);if(!Columns)_missingMdxReference(`Columns`,true);const guidesData={hero:{title:`Guides`,blurb:`A collection of code samples and walkthroughs for performing common tasks with Bun.`},featured:[{category:`Ecosystem`,title:`Use Tanstack Start with Bun`,href:`/guides/ecosystem/tanstack-start`,cta:`View guide`},{category:`Ecosystem`,title:`Use Next.js with Bun`,href:`/guides/ecosystem/nextjs`,cta:`View guide`},{category:`Ecosystem`,title:`Build a frontend using Vite and Bun`,href:`/guides/ecosystem/vite`,cta:`View guide`},{category:`Runtime`,title:`Install TypeScript declarations for Bun`,href:`/guides/runtime/typescript`,cta:`View guide`},{category:`HTTP`,title:`Write a simple HTTP server`,href:`/guides/http/simple`,cta:`View guide`},{category:`WebSocket`,title:`Build a simple WebSocket server`,href:`/guides/websocket/simple`,cta:`View guide`}],categories:[{key:`deployment`,title:`Deployment`,icon:`rocket`,items:[{title:`Deploy Bun on Vercel`,href:`/guides/deployment/vercel`},{title:`Deploy Bun on Railway`,href:`/guides/deployment/railway`},{title:`Deploy Bun on Render`,href:`/guides/deployment/render`}]},{key:`binary`,title:`Binary data`,icon:`binary`,items:[{title:`Convert an ArrayBuffer to an array of numbers`,href:`/guides/binary/arraybuffer-to-array`},{title:`Convert an ArrayBuffer to a Blob`,href:`/guides/binary/arraybuffer-to-blob`},{title:`Convert an ArrayBuffer to a Buffer`,href:`/guides/binary/arraybuffer-to-buffer`},{title:`Convert an ArrayBuffer to a string`,href:`/guides/binary/arraybuffer-to-string`},{title:`Convert an ArrayBuffer to a Uint8Array`,href:`/guides/binary/arraybuffer-to-typedarray`},{title:`Convert a Blob to an ArrayBuffer`,href:`/guides/binary/blob-to-arraybuffer`},{title:`Convert a Blob to a DataView`,href:`/guides/binary/blob-to-dataview`},{title:`Convert a Blob to a ReadableStream`,href:`/guides/binary/blob-to-stream`},{title:`Convert a Blob to a string`,href:`/guides/binary/blob-to-string`},{title:`Convert a Blob to a Uint8Array`,href:`/guides/binary/blob-to-typedarray`},{title:`Convert a Buffer to an ArrayBuffer`,href:`/guides/binary/buffer-to-arraybuffer`},{title:`Convert a Buffer to a blob`,href:`/guides/binary/buffer-to-blob`},{title:`Convert a Buffer to a ReadableStream`,href:`/guides/binary/buffer-to-readablestream`},{title:`Convert a Buffer to a string`,href:`/guides/binary/buffer-to-string`},{title:`Convert a Buffer to a Uint8Array`,href:`/guides/binary/buffer-to-typedarray`},{title:`Convert a DataView to a string`,href:`/guides/binary/dataview-to-string`},{title:`Convert a Uint8Array to an ArrayBuffer`,href:`/guides/binary/typedarray-to-arraybuffer`},{title:`Convert a Uint8Array to a Blob`,href:`/guides/binary/typedarray-to-blob`},{title:`Convert a Uint8Array to a Buffer`,href:`/guides/binary/typedarray-to-buffer`},{title:`Convert a Uint8Array to a DataView`,href:`/guides/binary/typedarray-to-dataview`},{title:`Convert a Uint8Array to a ReadableStream`,href:`/guides/binary/typedarray-to-readablestream`},{title:`Convert a Uint8Array to a string`,href:`/guides/binary/typedarray-to-string`}]},{key:`ecosystem`,title:`Ecosystem`,icon:`puzzle`,items:[{title:`Use Gel with Bun`,href:`/guides/ecosystem/gel`},{title:`Use Prisma ORM with Bun`,href:`/guides/ecosystem/prisma`},{title:`Use Prisma Postgres with Bun`,href:`/guides/ecosystem/prisma-postgres`},{title:`Create a Discord bot`,href:`/guides/ecosystem/discordjs`},{title:`Add Sentry to a Bun app`,href:`/guides/ecosystem/sentry`},{title:`Use Drizzle ORM with Bun`,href:`/guides/ecosystem/drizzle`},{title:`Build a React app with Bun`,href:`/guides/ecosystem/react`},{title:`Run Bun as a daemon with PM2`,href:`/guides/ecosystem/pm2`},{title:`Build an app with Nuxt and Bun`,href:`/guides/ecosystem/nuxt`},{title:`Build an app with Qwik and Bun`,href:`/guides/ecosystem/qwik`},{title:`Build an app with Astro and Bun`,href:`/guides/ecosystem/astro`},{title:`Build an app with Remix and Bun`,href:`/guides/ecosystem/remix`},{title:`Use TanStack Start with Bun`,href:`/guides/ecosystem/tanstack-start`},{title:`Run Bun as a daemon with systemd`,href:`/guides/ecosystem/systemd`},{title:`Build an app with Next.js and Bun`,href:`/guides/ecosystem/nextjs`},{title:`Build an app with SvelteKit and Bun`,href:`/guides/ecosystem/sveltekit`},{title:`Build a frontend using Vite and Bun`,href:`/guides/ecosystem/vite`},{title:`Build an app with SolidStart and Bun`,href:`/guides/ecosystem/solidstart`},{title:`Use Neon Postgres through Drizzle ORM`,href:`/guides/ecosystem/neon-drizzle`},{title:`Build an HTTP server using Hono and Bun`,href:`/guides/ecosystem/hono`},{title:`Use Neon's Serverless Postgres with Bun`,href:`/guides/ecosystem/neon-serverless-postgres`},{title:`Build an HTTP server using Elysia and Bun`,href:`/guides/ecosystem/elysia`},{title:`Containerize a Bun application with Docker`,href:`/guides/ecosystem/docker`},{title:`Build an HTTP server using Express and Bun`,href:`/guides/ecosystem/express`},{title:`Server-side render (SSR) a React component`,href:`/guides/ecosystem/ssr-react`},{title:`Read and write data to MongoDB using Mongoose and Bun`,href:`/guides/ecosystem/mongoose`}]},{key:`htmlrewriter`,title:`HTMLRewriter`,icon:`file-code-2`,items:[{title:`Extract links from a webpage using HTMLRewriter`,href:`/guides/html-rewriter/extract-links`},{title:`Extract social share images and Open Graph tags`,href:`/guides/html-rewriter/extract-social-meta`}]},{key:`http`,title:`HTTP`,icon:`globe`,items:[{title:`Common HTTP server usage`,href:`/guides/http/server`},{title:`Hot reload an HTTP server`,href:`/guides/http/hot`},{title:`Write a simple HTTP server`,href:`/guides/http/simple`},{title:`Start a cluster of HTTP servers`,href:`/guides/http/cluster`},{title:`Configure TLS on an HTTP server`,href:`/guides/http/tls`},{title:`Send an HTTP request using fetch`,href:`/guides/http/fetch`},{title:`Proxy HTTP requests using fetch()`,href:`/guides/http/proxy`},{title:`Stream a file as an HTTP Response`,href:`/guides/http/stream-file`},{title:`Upload files via HTTP using FormData`,href:`/guides/http/file-uploads`},{title:`fetch with unix domain sockets in Bun`,href:`/guides/http/fetch-unix`},{title:`Streaming HTTP Server with Async Iterators`,href:`/guides/http/stream-iterator`},{title:`Server-Sent Events (SSE)`,href:`/guides/http/sse`},{title:`Streaming HTTP Server with Node.js Streams`,href:`/guides/http/stream-node-streams-in-bun`}]},{key:`install`,title:`Package manager`,icon:`package`,items:[{title:`Add a dependency`,href:`/guides/install/add`},{title:`Add a Git dependency`,href:`/guides/install/add-git`},{title:`Add a peer dependency`,href:`/guides/install/add-peer`},{title:`Add a tarball dependency`,href:`/guides/install/add-tarball`},{title:`Add a trusted dependency`,href:`/guides/install/trusted`},{title:`Add an optional dependency`,href:`/guides/install/add-optional`},{title:`Add a development dependency`,href:`/guides/install/add-dev`},{title:`Using bun install with Artifactory`,href:`/guides/install/jfrog-artifactory`},{title:`Generate a yarn-compatible lockfile`,href:`/guides/install/yarnlock`},{title:`Migrate from npm install to bun install`,href:`/guides/install/from-npm-install-to-bun-install`},{title:`Configuring a monorepo using workspaces`,href:`/guides/install/workspaces`},{title:`Install a package under a different name`,href:`/guides/install/npm-alias`},{title:`Configure git to diff Bun's lockb lockfile`,href:`/guides/install/git-diff-bun-lockfile`},{title:`Install dependencies with Bun in GitHub Actions`,href:`/guides/install/cicd`},{title:`Override the default npm registry for bun install`,href:`/guides/install/custom-registry`},{title:`Using bun install with an Azure Artifacts npm registry`,href:`/guides/install/azure-artifacts`},{title:`Configure a private registry for an organization scope with bun install`,href:`/guides/install/registry-scope`}]},{key:`processes`,title:`Processes`,icon:`cpu`,items:[{title:`Read from stdin`,href:`/guides/process/stdin`},{title:`Listen for CTRL+C`,href:`/guides/process/ctrl-c`},{title:`Listen to OS signals`,href:`/guides/process/os-signals`},{title:`Spawn a child process`,href:`/guides/process/spawn`},{title:`Parse command-line arguments`,href:`/guides/process/argv`},{title:`Read stderr from a child process`,href:`/guides/process/spawn-stderr`},{title:`Read stdout from a child process`,href:`/guides/process/spawn-stdout`},{title:`Get the process uptime in nanoseconds`,href:`/guides/process/nanoseconds`},{title:`Spawn a child process and communicate using IPC`,href:`/guides/process/ipc`}]},{key:`read-file`,title:`Reading files`,icon:`file`,items:[{title:`Read a JSON file`,href:`/guides/read-file/json`},{title:`Check if a file exists`,href:`/guides/read-file/exists`},{title:`Read a file to a Buffer`,href:`/guides/read-file/buffer`},{title:`Read a file as a string`,href:`/guides/read-file/string`},{title:`Get the MIME type of a file`,href:`/guides/read-file/mime`},{title:`Read a file to a Uint8Array`,href:`/guides/read-file/uint8array`},{title:`Read a file to an ArrayBuffer`,href:`/guides/read-file/arraybuffer`},{title:`Watch a directory for changes`,href:`/guides/read-file/watch`},{title:`Read a file as a ReadableStream`,href:`/guides/read-file/stream`}]},{key:`runtime`,title:`Runtime`,icon:`bot`,items:[{title:`Delete files`,href:`/guides/runtime/delete-file`},{title:`Delete directories`,href:`/guides/runtime/delete-directory`},{title:`Import a JSON file`,href:`/guides/runtime/import-json`},{title:`Import a TOML file`,href:`/guides/runtime/import-toml`},{title:`Import a YAML file`,href:`/guides/runtime/import-yaml`},{title:`Run a Shell Command`,href:`/guides/runtime/shell`},{title:`Re-map import paths`,href:`/guides/runtime/tsconfig-paths`},{title:`Set a time zone in Bun`,href:`/guides/runtime/timezone`},{title:`Set environment variables`,href:`/guides/runtime/set-env`},{title:`Import a HTML file as text`,href:`/guides/runtime/import-html`},{title:`Read environment variables`,href:`/guides/runtime/read-env`},{title:`Build-time constants with --define`,href:`/guides/runtime/build-time-constants`},{title:`Debugging Bun with the web debugger`,href:`/guides/runtime/web-debugger`},{title:`Install and run Bun in GitHub Actions`,href:`/guides/runtime/cicd`},{title:`Install TypeScript declarations for Bun`,href:`/guides/runtime/typescript`},{title:`Debugging Bun with the VS Code extension`,href:`/guides/runtime/vscode-debugger`},{title:`Inspect memory usage using V8 heap snapshots`,href:`/guides/runtime/heap-snapshot`},{title:`Define and replace static globals \u0026 constants`,href:`/guides/runtime/define-constant`},{title:`Codesign a single-file JavaScript executable on macOS`,href:`/guides/runtime/codesign-macos-executable`}]},{key:`streams`,title:`Streams`,icon:`waves`,items:[{title:`Convert a ReadableStream to JSON`,href:`/guides/streams/to-json`},{title:`Convert a Node.js Readable to JSON`,href:`/guides/streams/node-readable-to-json`},{title:`Convert a ReadableStream to a Blob`,href:`/guides/streams/to-blob`},{title:`Convert a Node.js Readable to a Blob`,href:`/guides/streams/node-readable-to-blob`},{title:`Convert a ReadableStream to a Buffer`,href:`/guides/streams/to-buffer`},{title:`Convert a ReadableStream to a string`,href:`/guides/streams/to-string`},{title:`Convert a Node.js Readable to a string`,href:`/guides/streams/node-readable-to-string`},{title:`Convert a ReadableStream to a Uint8Array`,href:`/guides/streams/to-typedarray`},{title:`Convert a ReadableStream to an ArrayBuffer`,href:`/guides/streams/to-arraybuffer`},{title:`Convert a Node.js Readable to an Uint8Array`,href:`/guides/streams/node-readable-to-uint8array`},{title:`Convert a Node.js Readable to an ArrayBuffer`,href:`/guides/streams/node-readable-to-arraybuffer`},{title:`Convert a ReadableStream to an array of chunks`,href:`/guides/streams/to-array`}]},{key:`test`,title:`Test runner`,icon:`test-tube`,items:[{title:`Mock functions in bun test`,href:`/guides/test/mock-functions`},{title:`Spy on methods in bun test`,href:`/guides/test/spy-on`},{title:`Using Testing Library with Bun`,href:`/guides/test/testing-library`},{title:`Update snapshots in bun test`,href:`/guides/test/update-snapshots`},{title:`Run tests in watch mode with Bun`,href:`/guides/test/watch-mode`},{title:`Use snapshot testing in bun test`,href:`/guides/test/snapshot`},{title:`Bail early with the Bun test runner`,href:`/guides/test/bail`},{title:`Skip tests with the Bun test runner`,href:`/guides/test/skip-tests`},{title:`Migrate from Jest to Bun's test runner`,href:`/guides/test/migrate-from-jest`},{title:`Run your tests with the Bun test runner`,href:`/guides/test/run-tests`},{title:`Set the system time in Bun's test runner`,href:`/guides/test/mock-clock`},{title:`Write browser DOM tests with Bun and happy-dom`,href:`/guides/test/happy-dom`},{title:`Set a per-test timeout with the Bun test runner`,href:`/guides/test/timeout`},{title:`Mark a test as a \"todo\" with the Bun test runner`,href:`/guides/test/todo-tests`},{title:`Re-run tests multiple times with the Bun test runner`,href:`/guides/test/rerun-each`},{title:`Set a code coverage threshold with the Bun test runner`,href:`/guides/test/coverage-threshold`},{title:`Selectively run tests concurrently with glob patterns`,href:`/guides/test/concurrent-test-glob`},{title:`Generate code coverage reports with the Bun test runner`,href:`/guides/test/coverage`},{title:`import, require, and test Svelte components with bun test`,href:`/guides/test/svelte-test`}]},{key:`utilities`,title:`Utilities`,icon:`wrench`,items:[{title:`Hash a password`,href:`/guides/util/hash-a-password`},{title:`Generate a UUID`,href:`/guides/util/javascript-uuid`},{title:`Escape an HTML string`,href:`/guides/util/escape-html`},{title:`Get the current Bun version`,href:`/guides/util/version`},{title:`Encode and decode base64 strings`,href:`/guides/util/base64`},{title:`Check if two objects are deeply equal`,href:`/guides/util/deep-equals`},{title:`Detect when code is executed with Bun`,href:`/guides/util/detect-bun`},{title:`Get the directory of the current file`,href:`/guides/util/import-meta-dir`},{title:`Get the file name of the current file`,href:`/guides/util/import-meta-file`},{title:`Convert a file URL to an absolute path`,href:`/guides/util/file-url-to-path`},{title:`Compress and decompress data with gzip`,href:`/guides/util/gzip`},{title:`Convert an absolute path to a file URL`,href:`/guides/util/path-to-file-url`},{title:`Get the path to an executable bin file`,href:`/guides/util/which-path-to-executable-bin`},{title:`Sleep for a fixed number of milliseconds`,href:`/guides/util/sleep`},{title:`Compress and decompress data with DEFLATE`,href:`/guides/util/deflate`},{title:`Get the absolute path of the current file`,href:`/guides/util/import-meta-path`},{title:`Check if the current file is the entrypoint`,href:`/guides/util/entrypoint`},{title:`Get the absolute path to the current entrypoint`,href:`/guides/util/main`}]},{key:`websocket`,title:`WebSocket`,icon:`radio`,items:[{title:`Build a simple WebSocket server`,href:`/guides/websocket/simple`},{title:`Enable compression for WebSocket messages`,href:`/guides/websocket/compression`},{title:`Build a publish-subscribe WebSocket server`,href:`/guides/websocket/pubsub`},{title:`Set per-socket contextual data on a WebSocket`,href:`/guides/websocket/context`}]},{key:`write-file`,title:`Writing files`,icon:`file-pen`,items:[{title:`Delete a file`,href:`/guides/write-file/unlink`},{title:`Write to stdout`,href:`/guides/write-file/stdout`},{title:`Write a Blob to a file`,href:`/guides/write-file/blob`},{title:`Write a file to stdout`,href:`/guides/write-file/cat`},{title:`Append content to a file`,href:`/guides/write-file/append`},{title:`Write a string to a file`,href:`/guides/write-file/basic`},{title:`Write a file incrementally`,href:`/guides/write-file/filesink`},{title:`Write a Response to a file`,href:`/guides/write-file/response`},{title:`Copy a file to another location`,href:`/guides/write-file/file-cp`},{title:`Write a ReadableStream to a file`,href:`/guides/write-file/stream`}]}]};return _jsxs(`div`,{id:`guides-list`,children:[_jsxs(`div`,{className:`mint-mb-12`,children:[_jsx(`h2`,{className:`mint-text-2xl mint-font-bold mint-mb-6`,children:`Featured`}),_jsx(Columns,{cols:3,children:guidesData.featured.map(g=>_jsx(Card,{title:g.title,href:g.href,cta:g.cta},g.href))})]}),_jsxs(`div`,{className:`mint-mb-8`,children:[_jsx(`h2`,{className:`mint-text-2xl mint-font-bold mint-mb-6`,children:`All Guides`}),guidesData.categories.map(category=>_jsxs(`div`,{className:`mint-mb-8`,children:[_jsx(`h3`,{className:`mint-text-xl mint-font-semibold mint-mb-4 mint-flex mint-items-center mint-gap-2`,children:category.title}),_jsx(Columns,{cols:3,children:category.items.map(guide=>_jsx(Card,{title:guide.title,description:` `,href:guide.href,cta:``},guide.href))})]},category.key))]})]})};function _createMdxContent(props){const{_MdxComponentBoundary}={..._provideComponents(),...props.components};if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsx(_MdxComponentBoundary,{name:`GuidesList`,children:_jsx(GuidesList,{})})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{GuidesList,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"github-light","dark":"dracula"}},"config":{},"pageMetadata":{"title":"Guides","description":"Code samples and walkthroughs for common tasks with Bun","contextual":false,"mode":"center","href":"/guides/index"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[27,38,""],[130,17143,"null;function _creat"]]},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/bun-1dd33a4e/71a8c2a91b354e86/normalize-internal-links.js"],"dynamicCss":".mint-mb-12 {\n margin-bottom: 3rem\n}\n.mint-mb-4 {\n margin-bottom: 1rem\n}\n.mint-mb-6 {\n margin-bottom: 1.5rem\n}\n.mint-mb-8 {\n margin-bottom: 2rem\n}\n.mint-flex {\n display: flex\n}\n.mint-items-center {\n align-items: center\n}\n.mint-gap-2 {\n gap: 0.5rem\n}\n.mint-text-2xl {\n font-size: 1.5rem;\n line-height: 2rem\n}\n.mint-text-xl {\n font-size: 1.25rem;\n line-height: 1.75rem\n}\n.mint-font-bold {\n font-weight: 700\n}\n.mint-font-semibold {\n font-weight: 600\n}","subdomain":"bun-1dd33a4e","siteName":"Bun","title":"Guides - Bun","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-14T17:11:53.436Z","originalFileLocation":"guides/index.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Code samples and walkthroughs for common tasks with Bun\">\u003cmeta data-mint-head name=\"application-name\" content=\"Bun\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/bun-1dd33a4e/EVjBxeJFWkPSAqAJ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/bun-1dd33a4e/EVjBxeJFWkPSAqAJ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/bun-1dd33a4e/EVjBxeJFWkPSAqAJ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/bun-1dd33a4e/EVjBxeJFWkPSAqAJ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/bun-1dd33a4e/EVjBxeJFWkPSAqAJ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/bun-1dd33a4e/EVjBxeJFWkPSAqAJ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/bun-1dd33a4e/EVjBxeJFWkPSAqAJ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/bun-1dd33a4e/EVjBxeJFWkPSAqAJ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/bun-1dd33a4e/EVjBxeJFWkPSAqAJ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Guides - Bun\">\u003cmeta data-mint-head property=\"og:description\" content=\"Code samples and walkthroughs for common tasks with Bun\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Bun\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://bun.com/docs/guides\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://bun-1dd33a4e.mintlify.site/docs/_mintlify/api/og/v2?division=Overview\u0026amp;title=Guides\u0026amp;description=Code+samples+and+walkthroughs+for+common+tasks+with+Bun\u0026amp;theme=8ab97d844146c836dfe47641\u0026amp;signature=7afaa99b1cd9ee797f40c3f17f5408bfa4a12a3fe692a55419fe7f5f6fed41d0\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Guides - Bun\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Code samples and walkthroughs for common tasks with Bun\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://bun-1dd33a4e.mintlify.site/docs/_mintlify/api/og/v2?division=Overview\u0026amp;title=Guides\u0026amp;description=Code+samples+and+walkthroughs+for+common+tasks+with+Bun\u0026amp;theme=8ab97d844146c836dfe47641\u0026amp;signature=7afaa99b1cd9ee797f40c3f17f5408bfa4a12a3fe692a55419fe7f5f6fed41d0\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/bun-1dd33a4e/EVjBxeJFWkPSAqAJ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Bun\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ff73a8\">\u003clink data-mint-head rel=\"canonical\" href=\"https://bun.com/docs/guides\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/guides.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://bun.com/#organization\",\"name\":\"Bun\",\"url\":\"https://bun.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/bun-1dd33a4e/JUhaF6Mf68z_zHyy/logo/logo-with-wordmark-dark.svg?fit=max\u0026auto=format\u0026n=JUhaF6Mf68z_zHyy\u0026q=85\u0026s=3f55cd23822028e40658b192c927f3e4\"}},{\"@type\":\"WebSite\",\"@id\":\"https://bun.com/docs#website\",\"name\":\"Bun\",\"url\":\"https://bun.com/docs\",\"publisher\":{\"@id\":\"https://bun.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://bun.com/docs/guides#webpage\",\"url\":\"https://bun.com/docs/guides\",\"name\":\"Guides\",\"description\":\"Code samples and walkthroughs for common tasks with Bun\",\"dateModified\":\"2026-08-14T17:11:53.436Z\",\"isPartOf\":{\"@id\":\"https://bun.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://bun.com/docs/guides#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://bun.com/docs/guides#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Bun\",\"item\":\"https://bun.com/docs\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Guides\",\"item\":\"https://bun.com/docs/guides\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://bun.com/docs/guides#article\",\"headline\":\"Guides\",\"name\":\"Guides\",\"description\":\"Code samples and walkthroughs for common tasks with Bun\",\"url\":\"https://bun.com/docs/guides\",\"mainEntityOfPage\":{\"@id\":\"https://bun.com/docs/guides#webpage\"},\"dateModified\":\"2026-08-14T17:11:53.436Z\",\"publisher\":{\"@id\":\"https://bun.com/#organization\"},\"isPartOf\":{\"@id\":\"https://bun.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Bun\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Bun\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/guides.md","siteName":"Bun","nav":{"global":null,"tabs":[{"tab":"Runtime","icon":"cog","pages":[{"title":"Runtime","href":""}]},{"tab":"Package Manager","icon":"box","pages":[{"title":"Package Manager","href":"/pm/cli/install"}]},{"tab":"Bundler","icon":"combine","pages":[{"title":"Bundler","href":"/bundler"}]},{"tab":"Test Runner","icon":"flask-conical","pages":[{"title":"Test Runner","href":"/test"}]},{"tab":"Guides","icon":"map","groups":[{"group":"Overview","icon":"globe","pages":[{"title":"Guides","mode":"center","href":"/guides"}]},{"group":"Deployment","icon":"rocket","pages":[{"title":"Deploy a Bun application on Vercel","sidebarTitle":"Deploy on Vercel","mode":"center","description":null,"href":"/guides/deployment/vercel"},{"title":"Deploy a Bun application on Railway","sidebarTitle":"Deploy on Railway","mode":"center","href":"/guides/deployment/railway"},{"title":"Deploy a Bun application on Render","sidebarTitle":"Deploy on Render","mode":"center","href":"/guides/deployment/render"},{"title":"Deploy a Bun application on AWS Lambda","sidebarTitle":"Deploy on AWS Lambda","mode":"center","href":"/guides/deployment/aws-lambda"},{"title":"Deploy a Bun application on DigitalOcean","sidebarTitle":"Deploy on DigitalOcean","mode":"center","href":"/guides/deployment/digital-ocean"},{"title":"Deploy a Bun application on Google Cloud Run","sidebarTitle":"Deploy on Google Cloud Run","mode":"center","href":"/guides/deployment/google-cloud-run"}]},{"group":"Runtime \u0026 Debugging","icon":"bug","pages":[{"title":"Install TypeScript declarations for Bun","sidebarTitle":"TypeScript types","mode":"center","href":"/guides/runtime/typescript"},{"title":"Re-map import paths","sidebarTitle":"Re-map import paths","mode":"center","href":"/guides/runtime/tsconfig-paths"},{"title":"Debugging Bun with the VS Code extension","sidebarTitle":"VS Code debugger","mode":"center","href":"/guides/runtime/vscode-debugger"},{"title":"Debugging Bun with the web debugger","sidebarTitle":"Web debugger","mode":"center","href":"/guides/runtime/web-debugger"},{"title":"Inspect memory usage using V8 heap snapshots","sidebarTitle":"Heap snapshots","mode":"center","href":"/guides/runtime/heap-snapshot"},{"title":"Build-time constants with --define","sidebarTitle":"Build-time constants","mode":"center","href":"/guides/runtime/build-time-constants"},{"title":"Define and replace static globals \u0026 constants","sidebarTitle":"Define constants","mode":"center","href":"/guides/runtime/define-constant"},{"title":"Install and run Bun in GitHub Actions","sidebarTitle":"GitHub Actions","mode":"center","href":"/guides/runtime/cicd"},{"title":"Codesign a single-file JavaScript executable on macOS","sidebarTitle":"Codesign on macOS","mode":"center","href":"/guides/runtime/codesign-macos-executable"}]},{"group":"Utilities","icon":"wrench","pages":[{"title":"Upgrade Bun to the latest version","sidebarTitle":"Upgrade Bun","mode":"center","href":"/guides/util/upgrade"},{"title":"Detect when code is executed with Bun","sidebarTitle":"Detect Bun","mode":"center","href":"/guides/util/detect-bun"},{"title":"Get the current Bun version","sidebarTitle":"Get Bun version","mode":"center","href":"/guides/util/version"},{"title":"Hash a password","sidebarTitle":"Hash password","mode":"center","href":"/guides/util/hash-a-password"},{"title":"Generate a UUID","sidebarTitle":"Generate UUID","mode":"center","href":"/guides/util/javascript-uuid"},{"title":"Encode and decode base64 data","sidebarTitle":"Base64 encoding","mode":"center","href":"/guides/util/base64"},{"title":"Compress and decompress data with gzip","sidebarTitle":"Gzip compression","mode":"center","href":"/guides/util/gzip"},{"title":"Compress and decompress data with DEFLATE","sidebarTitle":"DEFLATE compression","mode":"center","href":"/guides/util/deflate"},{"title":"Escape an HTML string","sidebarTitle":"Escape HTML","mode":"center","href":"/guides/util/escape-html"},{"title":"Check if two objects are deeply equal","sidebarTitle":"Deep equality","mode":"center","href":"/guides/util/deep-equals"},{"title":"Sleep for a fixed number of milliseconds","sidebarTitle":"Sleep","mode":"center","href":"/guides/util/sleep"},{"title":"Convert a file URL to an absolute path","sidebarTitle":"File URL to path","mode":"center","href":"/guides/util/file-url-to-path"},{"title":"Convert an absolute path to a file URL","sidebarTitle":"Path to file URL","mode":"center","href":"/guides/util/path-to-file-url"},{"title":"Get the path to an executable bin file","sidebarTitle":"Find executable path","mode":"center","href":"/guides/util/which-path-to-executable-bin"},{"title":"Get the directory of the current file","sidebarTitle":"import.meta.dir","mode":"center","href":"/guides/util/import-meta-dir"},{"title":"Get the file name of the current file","sidebarTitle":"import.meta.file","mode":"center","href":"/guides/util/import-meta-file"},{"title":"Get the absolute path of the current file","sidebarTitle":"import.meta.path","mode":"center","href":"/guides/util/import-meta-path"},{"title":"Check if the current file is the entrypoint","sidebarTitle":"Check entrypoint","mode":"center","href":"/guides/util/entrypoint"},{"title":"Get the absolute path to the current entrypoint","sidebarTitle":"Get entrypoint path","mode":"center","href":"/guides/util/main"}]},{"group":"Ecosystem \u0026 Frameworks","icon":"puzzle","pages":[{"title":"Build an app with Astro and Bun","sidebarTitle":"Astro with Bun","mode":"center","href":"/guides/ecosystem/astro"},{"title":"Create a Discord bot","sidebarTitle":"Discord.js with Bun","mode":"center","href":"/guides/ecosystem/discordjs"},{"title":"Containerize a Bun application with Docker","sidebarTitle":"Docker with Bun","mode":"center","href":"/guides/ecosystem/docker"},{"title":"Use Drizzle ORM with Bun","sidebarTitle":"Drizzle with Bun","mode":"center","href":"/guides/ecosystem/drizzle"},{"title":"Use Gel with Bun","sidebarTitle":"Gel with Bun","mode":"center","href":"/guides/ecosystem/gel"},{"title":"Build an HTTP server using Elysia and Bun","sidebarTitle":"Elysia with Bun","mode":"center","href":"/guides/ecosystem/elysia"},{"title":"Build an HTTP server using Express and Bun","sidebarTitle":"Express with Bun","mode":"center","href":"/guides/ecosystem/express"},{"title":"Build an HTTP server using Hono and Bun","sidebarTitle":"Hono with Bun","mode":"center","href":"/guides/ecosystem/hono"},{"title":"Read and write data to MongoDB using Mongoose and Bun","sidebarTitle":"Mongoose with Bun","mode":"center","href":"/guides/ecosystem/mongoose"},{"title":"Use Neon Postgres through Drizzle ORM","sidebarTitle":"Neon Drizzle with Bun","mode":"center","href":"/guides/ecosystem/neon-drizzle"},{"title":"Use Neon's Serverless Postgres with Bun","sidebarTitle":"Neon Serverless Postgres with Bun","mode":"center","href":"/guides/ecosystem/neon-serverless-postgres"},{"title":"Build an app with Next.js and Bun","sidebarTitle":"Next.js with Bun","mode":"center","href":"/guides/ecosystem/nextjs"},{"title":"Build an app with Nuxt and Bun","sidebarTitle":"Nuxt with Bun","mode":"center","href":"/guides/ecosystem/nuxt"},{"title":"Run Bun as a daemon with PM2","sidebarTitle":"PM2 with Bun","mode":"center","href":"/guides/ecosystem/pm2"},{"title":"Use Prisma with Bun","sidebarTitle":"Prisma ORM with Bun","mode":"center","href":"/guides/ecosystem/prisma"},{"title":"Use Prisma Postgres with Bun","sidebarTitle":"Prisma Postgres with Bun","mode":"center","href":"/guides/ecosystem/prisma-postgres"},{"title":"Build an app with Qwik and Bun","sidebarTitle":"Qwik with Bun","mode":"center","href":"/guides/ecosystem/qwik"},{"title":"Build a React app with Bun","sidebarTitle":"React with Bun","mode":"center","href":"/guides/ecosystem/react"},{"title":"Build an app with Remix and Bun","sidebarTitle":"Remix with Bun","mode":"center","href":"/guides/ecosystem/remix"},{"title":"Use TanStack Start with Bun","sidebarTitle":"TanStack Start with Bun","mode":"center","href":"/guides/ecosystem/tanstack-start"},{"title":"Add Sentry to a Bun app","sidebarTitle":"Sentry with Bun","mode":"center","href":"/guides/ecosystem/sentry"},{"title":"Build an app with SolidStart and Bun","sidebarTitle":"SolidStart with Bun","mode":"center","href":"/guides/ecosystem/solidstart"},{"title":"Server-side render (SSR) a React component","sidebarTitle":"SSR React with Bun","mode":"center","href":"/guides/ecosystem/ssr-react"},{"title":"Build an app with SvelteKit and Bun","sidebarTitle":"SvelteKit with Bun","mode":"center","href":"/guides/ecosystem/sveltekit"},{"title":"Run Bun as a daemon with systemd","sidebarTitle":"systemd with Bun","mode":"center","href":"/guides/ecosystem/systemd"},{"title":"Build a frontend using Vite and Bun","sidebarTitle":"Vite with Bun","mode":"center","href":"/guides/ecosystem/vite"},{"title":"Bun Redis with Upstash","sidebarTitle":"Upstash with Bun","mode":"center","href":"/guides/ecosystem/upstash"}]},{"group":"HTTP \u0026 Networking","icon":"globe","pages":[{"title":"Common HTTP server usage","sidebarTitle":"HTTP Server with Bun","mode":"center","href":"/guides/http/server"},{"title":"Write a simple HTTP server","sidebarTitle":"Simple HTTP Server with Bun","mode":"center","href":"/guides/http/simple"},{"title":"Send an HTTP request using fetch","sidebarTitle":"Fetch with Bun","mode":"center","href":"/guides/http/fetch"},{"title":"Hot reload an HTTP server","sidebarTitle":"Hot reload an HTTP server","mode":"center","href":"/guides/http/hot"},{"title":"Start a cluster of HTTP servers","sidebarTitle":"Start a cluster of HTTP servers","mode":"center","href":"/guides/http/cluster"},{"title":"Configure TLS on an HTTP server","sidebarTitle":"Configure TLS","mode":"center","href":"/guides/http/tls"},{"title":"Proxy HTTP requests using fetch()","sidebarTitle":"Proxy HTTP requests using fetch()","mode":"center","href":"/guides/http/proxy"},{"title":"Stream a file as an HTTP Response","sidebarTitle":"Stream file response","mode":"center","href":"/guides/http/stream-file"},{"title":"Upload files via HTTP using FormData","sidebarTitle":"Upload files via HTTP using FormData","mode":"center","href":"/guides/http/file-uploads"},{"title":"fetch with unix domain sockets in Bun","sidebarTitle":"Fetch with unix domain sockets","mode":"center","href":"/guides/http/fetch-unix"},{"title":"Streaming HTTP Server with Async Iterators","sidebarTitle":"Stream with iterators","mode":"center","href":"/guides/http/stream-iterator"},{"title":"Server-Sent Events (SSE) with Bun","sidebarTitle":"Server-Sent Events","mode":"center","href":"/guides/http/sse"},{"title":"Streaming HTTP Server with Node.js Streams","sidebarTitle":"Stream with Node.js","mode":"center","href":"/guides/http/stream-node-streams-in-bun"}]},{"group":"WebSocket","icon":"radio","pages":[{"title":"Build a simple WebSocket server","sidebarTitle":"Simple server","mode":"center","href":"/guides/websocket/simple"},{"title":"Build a publish-subscribe WebSocket server","sidebarTitle":"Pub-sub server","mode":"center","href":"/guides/websocket/pubsub"},{"title":"Set per-socket contextual data on a WebSocket","sidebarTitle":"Contextual data","mode":"center","href":"/guides/websocket/context"},{"title":"Enable compression for WebSocket messages","sidebarTitle":"Enable compression","mode":"center","href":"/guides/websocket/compression"}]},{"group":"Processes \u0026 System","icon":"cpu","pages":[{"title":"Spawn a child process","sidebarTitle":"Spawn child process","mode":"center","href":"/guides/process/spawn"},{"title":"Read stdout from a child process","sidebarTitle":"Read stdout","mode":"center","href":"/guides/process/spawn-stdout"},{"title":"Read stderr from a child process","sidebarTitle":"Read stderr","mode":"center","href":"/guides/process/spawn-stderr"},{"title":"Parse command-line arguments","sidebarTitle":"Parse command-line arguments","mode":"center","href":"/guides/process/argv"},{"title":"Read from stdin","sidebarTitle":"Read from stdin","mode":"center","href":"/guides/process/stdin"},{"title":"Spawn a child process and communicate using IPC","sidebarTitle":"Spawn a child process and communicate using IPC","mode":"center","href":"/guides/process/ipc"},{"title":"Listen for CTRL+C","sidebarTitle":"Listen for CTRL+C","mode":"center","href":"/guides/process/ctrl-c"},{"title":"Listen to OS signals","sidebarTitle":"OS signals","mode":"center","href":"/guides/process/os-signals"},{"title":"Get the process uptime in nanoseconds","sidebarTitle":"Process uptime","mode":"center","href":"/guides/process/nanoseconds"},{"title":"Run a Shell Command","sidebarTitle":"Run shell command","mode":"center","href":"/guides/runtime/shell"},{"title":"Set a time zone in Bun","sidebarTitle":"Set time zone","mode":"center","href":"/guides/runtime/timezone"},{"title":"Set environment variables","sidebarTitle":"Set env variables","mode":"center","href":"/guides/runtime/set-env"},{"title":"Read environment variables","sidebarTitle":"Read env variables","mode":"center","href":"/guides/runtime/read-env"}]},{"group":"Package Manager","icon":"package","pages":[{"title":"Add a dependency","sidebarTitle":"Add a dependency","mode":"center","href":"/guides/install/add"},{"title":"Add a development dependency","sidebarTitle":"Add a dev dependency","mode":"center","href":"/guides/install/add-dev"},{"title":"Add an optional dependency","sidebarTitle":"Add an optional dependency","mode":"center","href":"/guides/install/add-optional"},{"title":"Add a peer dependency","sidebarTitle":"Add a peer dependency","mode":"center","href":"/guides/install/add-peer"},{"title":"Add a Git dependency","sidebarTitle":"Add a Git dependency","mode":"center","href":"/guides/install/add-git"},{"title":"Add a tarball dependency","sidebarTitle":"Add a tarball dependency","mode":"center","href":"/guides/install/add-tarball"},{"title":"Install a package under a different name","sidebarTitle":"Install with alias","mode":"center","href":"/guides/install/npm-alias"},{"title":"Configuring a monorepo using workspaces","sidebarTitle":"Workspaces with Bun","mode":"center","href":"/guides/install/workspaces"},{"title":"Override the default npm registry for bun install","sidebarTitle":"Override the default npm registry","mode":"center","href":"/guides/install/custom-registry"},{"title":"Configure a private registry for an organization scope with bun install","sidebarTitle":"Configure a scoped registry","mode":"center","href":"/guides/install/registry-scope"},{"title":"Using bun install with an Azure Artifacts npm registry","sidebarTitle":"Azure Artifacts with Bun","mode":"center","href":"/guides/install/azure-artifacts"},{"title":"Using bun install with Artifactory","sidebarTitle":"JFrog Artifactory with Bun","mode":"center","href":"/guides/install/jfrog-artifactory"},{"title":"Add a trusted dependency","sidebarTitle":"Add a trusted dependency","mode":"center","href":"/guides/install/trusted"},{"title":"Generate a yarn-compatible lockfile","sidebarTitle":"Generate a yarn-compatible lockfile","mode":"center","href":"/guides/install/yarnlock"},{"title":"Migrate from npm install to bun install","sidebarTitle":"Migrate from npm to bun","mode":"center","href":"/guides/install/from-npm-install-to-bun-install"},{"title":"Configure git to diff Bun's lockb lockfile","sidebarTitle":"Configure git to diff Bun's lockfile","mode":"center","href":"/guides/install/git-diff-bun-lockfile"},{"title":"Install dependencies with Bun in GitHub Actions","sidebarTitle":"Install Bun in GitHub Actions","mode":"center","href":"/guides/install/cicd"}]},{"group":"Test Runner","icon":"flask-conical","pages":[{"title":"Run your tests with the Bun test runner","sidebarTitle":"Run tests","mode":"center","href":"/guides/test/run-tests"},{"title":"Run tests in watch mode with Bun","sidebarTitle":"Watch mode","mode":"center","href":"/guides/test/watch-mode"},{"title":"Migrate from Jest to Bun's test runner","sidebarTitle":"Migrate from Jest","mode":"center","href":"/guides/test/migrate-from-jest"},{"title":"Mock functions in `bun test`","sidebarTitle":"Mock functions","mode":"center","href":"/guides/test/mock-functions"},{"title":"Spy on methods in `bun test`","sidebarTitle":"Spy on methods","mode":"center","href":"/guides/test/spy-on"},{"title":"Set the system time in Bun's test runner","sidebarTitle":"Mock system time","mode":"center","href":"/guides/test/mock-clock"},{"title":"Use snapshot testing in `bun test`","sidebarTitle":"Snapshot testing","mode":"center","href":"/guides/test/snapshot"},{"title":"Update snapshots in `bun test`","sidebarTitle":"Update snapshots","mode":"center","href":"/guides/test/update-snapshots"},{"title":"Generate code coverage reports with the Bun test runner","sidebarTitle":"Coverage reports","mode":"center","href":"/guides/test/coverage"},{"title":"Set a code coverage threshold with the Bun test runner","sidebarTitle":"Coverage threshold","mode":"center","href":"/guides/test/coverage-threshold"},{"title":"Selectively run tests concurrently with glob patterns","sidebarTitle":"Concurrent test glob","mode":"center","href":"/guides/test/concurrent-test-glob"},{"title":"Skip tests with the Bun test runner","sidebarTitle":"Skip tests","mode":"center","href":"/guides/test/skip-tests"},{"title":"Mark a test as a \"todo\" with the Bun test runner","sidebarTitle":"Todo tests","mode":"center","href":"/guides/test/todo-tests"},{"title":"Set a per-test timeout with the Bun test runner","sidebarTitle":"Test timeout","mode":"center","href":"/guides/test/timeout"},{"title":"Bail early with the Bun test runner","sidebarTitle":"Bail early","mode":"center","href":"/guides/test/bail"},{"title":"Re-run tests multiple times with the Bun test runner","sidebarTitle":"Re-run tests","mode":"center","href":"/guides/test/rerun-each"},{"title":"Using Testing Library with Bun","sidebarTitle":"Testing Library","mode":"center","href":"/guides/test/testing-library"},{"title":"Write browser DOM tests with Bun and happy-dom","sidebarTitle":"DOM tests","mode":"center","href":"/guides/test/happy-dom"},{"title":"import, require, and test Svelte components with bun test","sidebarTitle":"Test Svelte","mode":"center","href":"/guides/test/svelte-test"}]},{"group":"Runtime \u0026 Debugging","icon":"bug","pages":[{"title":"Debugging Bun with the VS Code extension","sidebarTitle":"VS Code debugger","mode":"center","href":"/guides/runtime/vscode-debugger"},{"title":"Debugging Bun with the web debugger","sidebarTitle":"Web debugger","mode":"center","href":"/guides/runtime/web-debugger"},{"title":"Inspect memory usage using V8 heap snapshots","sidebarTitle":"Heap snapshots","mode":"center","href":"/guides/runtime/heap-snapshot"},{"title":"Build-time constants with --define","sidebarTitle":"Build-time constants","mode":"center","href":"/guides/runtime/build-time-constants"},{"title":"Define and replace static globals \u0026 constants","sidebarTitle":"Define constants","mode":"center","href":"/guides/runtime/define-constant"},{"title":"Install and run Bun in GitHub Actions","sidebarTitle":"GitHub Actions","mode":"center","href":"/guides/runtime/cicd"},{"title":"Codesign a single-file JavaScript executable on macOS","sidebarTitle":"Codesign on macOS","mode":"center","href":"/guides/runtime/codesign-macos-executable"}]},{"group":"Module System","icon":"box","pages":[{"title":"Import a JSON file","sidebarTitle":"Import JSON","mode":"center","href":"/guides/runtime/import-json"},{"title":"Import a TOML file","sidebarTitle":"Import TOML","mode":"center","href":"/guides/runtime/import-toml"},{"title":"Import a YAML file","sidebarTitle":"Import YAML","mode":"center","href":"/guides/runtime/import-yaml"},{"title":"Import a JSON5 file","sidebarTitle":"Import JSON5","mode":"center","href":"/guides/runtime/import-json5"},{"title":"Import an XML file","sidebarTitle":"Import XML","mode":"center","href":"/guides/runtime/import-xml"},{"title":"Import a HTML file as text","sidebarTitle":"Import HTML","mode":"center","href":"/guides/runtime/import-html"},{"title":"Get the directory of the current file","sidebarTitle":"import.meta.dir","mode":"center","href":"/guides/util/import-meta-dir"},{"title":"Get the file name of the current file","sidebarTitle":"import.meta.file","mode":"center","href":"/guides/util/import-meta-file"},{"title":"Get the absolute path of the current file","sidebarTitle":"import.meta.path","mode":"center","href":"/guides/util/import-meta-path"},{"title":"Check if the current file is the entrypoint","sidebarTitle":"Check entrypoint","mode":"center","href":"/guides/util/entrypoint"},{"title":"Get the absolute path to the current entrypoint","sidebarTitle":"Get entrypoint path","mode":"center","href":"/guides/util/main"}]},{"group":"File System","icon":"folder","pages":[{"title":"Read a file as a string","sidebarTitle":"Read as string","mode":"center","href":"/guides/read-file/string"},{"title":"Read a file to a Buffer","sidebarTitle":"Read to Buffer","mode":"center","href":"/guides/read-file/buffer"},{"title":"Read a file to a Uint8Array","sidebarTitle":"Read to Uint8Array","mode":"center","href":"/guides/read-file/uint8array"},{"title":"Read a file to an ArrayBuffer","sidebarTitle":"Read to ArrayBuffer","mode":"center","href":"/guides/read-file/arraybuffer"},{"title":"Read a JSON file","sidebarTitle":"Read JSON file","mode":"center","href":"/guides/read-file/json"},{"title":"Get the MIME type of a file","sidebarTitle":"Get MIME type","mode":"center","href":"/guides/read-file/mime"},{"title":"Check if a file exists","sidebarTitle":"Check file exists","mode":"center","href":"/guides/read-file/exists"},{"title":"Watch a directory for changes","sidebarTitle":"Watch directory","mode":"center","href":"/guides/read-file/watch"},{"title":"Read a file as a ReadableStream","sidebarTitle":"Read as stream","mode":"center","href":"/guides/read-file/stream"},{"title":"Write a string to a file","sidebarTitle":"Write string to file","mode":"center","href":"/guides/write-file/basic"},{"title":"Write a Blob to a file","sidebarTitle":"Write Blob","mode":"center","href":"/guides/write-file/blob"},{"title":"Write a Response to a file","sidebarTitle":"Write Response","mode":"center","href":"/guides/write-file/response"},{"title":"Append content to a file","sidebarTitle":"Append to file","mode":"center","href":"/guides/write-file/append"},{"title":"Write a file incrementally","sidebarTitle":"Incremental write","mode":"center","href":"/guides/write-file/filesink"},{"title":"Write a ReadableStream to a file","sidebarTitle":"Write stream","mode":"center","href":"/guides/write-file/stream"},{"title":"Write to stdout","sidebarTitle":"Write to stdout","mode":"center","href":"/guides/write-file/stdout"},{"title":"Write a file to stdout","sidebarTitle":"Write file to stdout","mode":"center","href":"/guides/write-file/cat"},{"title":"Copy a file to another location","sidebarTitle":"Copy file","mode":"center","href":"/guides/write-file/file-cp"},{"title":"Delete a file","sidebarTitle":"Delete file","mode":"center","href":"/guides/write-file/unlink"},{"title":"Delete files","sidebarTitle":"Delete files","mode":"center","href":"/guides/runtime/delete-file"},{"title":"Delete directories","sidebarTitle":"Delete directories","mode":"center","href":"/guides/runtime/delete-directory"}]},{"group":"Utilities","icon":"wrench","pages":[{"title":"Hash a password","sidebarTitle":"Hash password","mode":"center","href":"/guides/util/hash-a-password"},{"title":"Generate a UUID","sidebarTitle":"Generate UUID","mode":"center","href":"/guides/util/javascript-uuid"},{"title":"Encode and decode base64 data","sidebarTitle":"Base64 encoding","mode":"center","href":"/guides/util/base64"},{"title":"Compress and decompress data with gzip","sidebarTitle":"Gzip compression","mode":"center","href":"/guides/util/gzip"},{"title":"Compress and decompress data with DEFLATE","sidebarTitle":"DEFLATE compression","mode":"center","href":"/guides/util/deflate"},{"title":"Escape an HTML string","sidebarTitle":"Escape HTML","mode":"center","href":"/guides/util/escape-html"},{"title":"Check if two objects are deeply equal","sidebarTitle":"Deep equality","mode":"center","href":"/guides/util/deep-equals"},{"title":"Sleep for a fixed number of milliseconds","sidebarTitle":"Sleep","mode":"center","href":"/guides/util/sleep"},{"title":"Convert a file URL to an absolute path","sidebarTitle":"File URL to path","mode":"center","href":"/guides/util/file-url-to-path"},{"title":"Convert an absolute path to a file URL","sidebarTitle":"Path to file URL","mode":"center","href":"/guides/util/path-to-file-url"},{"title":"Get the path to an executable bin file","sidebarTitle":"Find executable path","mode":"center","href":"/guides/util/which-path-to-executable-bin"}]},{"group":"HTML Processing","icon":"file-code","pages":[{"title":"Extract links from a webpage using HTMLRewriter","sidebarTitle":"Extract links using HTMLRewriter","mode":"center","href":"/guides/html-rewriter/extract-links"},{"title":"Extract social share images and Open Graph tags","sidebarTitle":"OpenGraph tags","mode":"center","href":"/guides/html-rewriter/extract-social-meta"}]},{"group":"Binary Data","icon":"binary","pages":[{"title":"Convert an ArrayBuffer to a string","sidebarTitle":"ArrayBuffer to string","mode":"center","href":"/guides/binary/arraybuffer-to-string"},{"title":"Convert an ArrayBuffer to a Buffer","sidebarTitle":"ArrayBuffer to Buffer","mode":"center","href":"/guides/binary/arraybuffer-to-buffer"},{"title":"Convert an ArrayBuffer to a Blob","sidebarTitle":"ArrayBuffer to Blob","mode":"center","href":"/guides/binary/arraybuffer-to-blob"},{"title":"Convert an ArrayBuffer to an array of numbers","sidebarTitle":"ArrayBuffer to Array","mode":"center","href":"/guides/binary/arraybuffer-to-array"},{"title":"Convert an ArrayBuffer to a Uint8Array","sidebarTitle":"ArrayBuffer to Uint8Array","mode":"center","href":"/guides/binary/arraybuffer-to-typedarray"},{"title":"Convert a Buffer to a string","sidebarTitle":"Buffer to string","mode":"center","href":"/guides/binary/buffer-to-string"},{"title":"Convert a Buffer to an ArrayBuffer","sidebarTitle":"Buffer to ArrayBuffer","mode":"center","href":"/guides/binary/buffer-to-arraybuffer"},{"title":"Convert a Buffer to a blob","sidebarTitle":"Buffer to Blob","mode":"center","href":"/guides/binary/buffer-to-blob"},{"title":"Convert a Buffer to a Uint8Array","sidebarTitle":"Buffer to Uint8Array","mode":"center","href":"/guides/binary/buffer-to-typedarray"},{"title":"Convert a Buffer to a ReadableStream","sidebarTitle":"Buffer to ReadableStream","mode":"center","href":"/guides/binary/buffer-to-readablestream"},{"title":"Convert a Blob to a string","sidebarTitle":"Blob to string","mode":"center","href":"/guides/binary/blob-to-string"},{"title":"Convert a Blob to an ArrayBuffer","sidebarTitle":"Blob to ArrayBuffer","mode":"center","href":"/guides/binary/blob-to-arraybuffer"},{"title":"Convert a Blob to a Uint8Array","sidebarTitle":"Blob to Uint8Array","mode":"center","href":"/guides/binary/blob-to-typedarray"},{"title":"Convert a Blob to a DataView","sidebarTitle":"Blob to DataView","mode":"center","href":"/guides/binary/blob-to-dataview"},{"title":"Convert a Blob to a ReadableStream","sidebarTitle":"Blob to ReadableStream","mode":"center","href":"/guides/binary/blob-to-stream"},{"title":"Convert a Uint8Array to a string","sidebarTitle":"Uint8Array to string","mode":"center","href":"/guides/binary/typedarray-to-string"},{"title":"Convert a Uint8Array to an ArrayBuffer","sidebarTitle":"Uint8Array to ArrayBuffer","mode":"center","href":"/guides/binary/typedarray-to-arraybuffer"},{"title":"Convert a Uint8Array to a Buffer","sidebarTitle":"Uint8Array to Buffer","mode":"center","href":"/guides/binary/typedarray-to-buffer"},{"title":"Convert a Uint8Array to a Blob","sidebarTitle":"Uint8Array to Blob","mode":"center","href":"/guides/binary/typedarray-to-blob"},{"title":"Convert a Uint8Array to a DataView","sidebarTitle":"Uint8Array to DataView","mode":"center","href":"/guides/binary/typedarray-to-dataview"},{"title":"Convert a Uint8Array to a ReadableStream","sidebarTitle":"Uint8Array to ReadableStream","mode":"center","href":"/guides/binary/typedarray-to-readablestream"},{"title":"Convert a DataView to a string","sidebarTitle":"DataView to string","mode":"center","href":"/guides/binary/dataview-to-string"}]},{"group":"Streams","icon":"waves","pages":[{"title":"Convert a ReadableStream to a string","sidebarTitle":"Stream to string","mode":"center","href":"/guides/streams/to-string"},{"title":"Convert a ReadableStream to JSON","sidebarTitle":"Stream to JSON","mode":"center","href":"/guides/streams/to-json"},{"title":"Convert a ReadableStream to a Blob","sidebarTitle":"Stream to Blob","mode":"center","href":"/guides/streams/to-blob"},{"title":"Convert a ReadableStream to a Buffer","sidebarTitle":"Stream to Buffer","mode":"center","href":"/guides/streams/to-buffer"},{"title":"Convert a ReadableStream to an ArrayBuffer","sidebarTitle":"Stream to ArrayBuffer","mode":"center","href":"/guides/streams/to-arraybuffer"},{"title":"Convert a ReadableStream to a Uint8Array","sidebarTitle":"Stream to Uint8Array","mode":"center","href":"/guides/streams/to-typedarray"},{"title":"Convert a ReadableStream to an array of chunks","sidebarTitle":"Stream to array","mode":"center","href":"/guides/streams/to-array"},{"title":"Convert a Node.js Readable to a string","sidebarTitle":"Readable to string","mode":"center","href":"/guides/streams/node-readable-to-string"},{"title":"Convert a Node.js Readable to JSON","sidebarTitle":"Readable to JSON","mode":"center","href":"/guides/streams/node-readable-to-json"},{"title":"Convert a Node.js Readable to a Blob","sidebarTitle":"Readable to Blob","mode":"center","href":"/guides/streams/node-readable-to-blob"},{"title":"Convert a Node.js Readable to an Uint8Array","sidebarTitle":"Readable to Uint8Array","mode":"center","href":"/guides/streams/node-readable-to-uint8array"},{"title":"Convert a Node.js Readable to an ArrayBuffer","sidebarTitle":"Readable to ArrayBuffer","mode":"center","href":"/guides/streams/node-readable-to-arraybuffer"}]}]},{"tab":"Reference","icon":"book","href":"https://bun.com/reference"},{"tab":"Blog","icon":"newspaper","href":"https://bun.com/blog"},{"tab":"Feedback","icon":"lightbulb","pages":[{"title":"Feedback","href":"/feedback"}]}]},"basePath":"","title":"Guides - Bun","deploymentId":"dpl_53YqbBPsHdrqSGqXiWPGU7csRVod","buildId":"dpl_53YqbBPsHdrqSGqXiWPGU7csRVod","dynamics":[],"chunks":[]}