Pulled ALL skills from 15 source repositories: - anthropics/skills: 16 (docs, design, MCP, testing) - obra/superpowers: 14 (TDD, debugging, agents, planning) - coreyhaines31/marketingskills: 25 (marketing, CRO, SEO, growth) - better-auth/skills: 5 (auth patterns) - vercel-labs/agent-skills: 5 (React, design, Vercel) - antfu/skills: 16 (Vue, Vite, Vitest, pnpm, Turborepo) - Plus 13 individual skills from various repos Mosaic Stack is not limited to coding — the Orchestrator and subagents serve coding, business, design, marketing, writing, logistics, analysis, and more. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
57 lines
1.1 KiB
Markdown
57 lines
1.1 KiB
Markdown
---
|
|
category: Browser
|
|
---
|
|
|
|
# useMemory
|
|
|
|
Reactive Memory Info.
|
|
|
|
## Usage
|
|
|
|
```ts
|
|
import { useMemory } from '@vueuse/core'
|
|
|
|
const { isSupported, memory } = useMemory()
|
|
```
|
|
|
|
## Type Declarations
|
|
|
|
```ts
|
|
/**
|
|
* Performance.memory
|
|
*
|
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Performance/memory
|
|
*/
|
|
export interface MemoryInfo {
|
|
/**
|
|
* The maximum size of the heap, in bytes, that is available to the context.
|
|
*/
|
|
readonly jsHeapSizeLimit: number
|
|
/**
|
|
* The total allocated heap size, in bytes.
|
|
*/
|
|
readonly totalJSHeapSize: number
|
|
/**
|
|
* The currently active segment of JS heap, in bytes.
|
|
*/
|
|
readonly usedJSHeapSize: number
|
|
[Symbol.toStringTag]: "MemoryInfo"
|
|
}
|
|
export interface UseMemoryOptions extends UseIntervalFnOptions {
|
|
interval?: number
|
|
}
|
|
/**
|
|
* Reactive Memory Info.
|
|
*
|
|
* @see https://vueuse.org/useMemory
|
|
* @param options
|
|
*
|
|
* @__NO_SIDE_EFFECTS__
|
|
*/
|
|
export declare function useMemory(options?: UseMemoryOptions): {
|
|
isSupported: ComputedRef<boolean>
|
|
memory: Ref<MemoryInfo | undefined, MemoryInfo | undefined>
|
|
}
|
|
export type UseMemoryReturn = ReturnType<typeof useMemory>
|
|
```
|