Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
StorageError codes and handling.
@brushy/storage
StorageError
onError
import { createStorage, StorageError } from "@brushy/storage"; const cache = createStorage({ maxKeys: 100, onError: (error) => { if (error.code === "QuotaExceeded") { cache.flushAll(); } }, });
class StorageError extends Error { readonly code: "QuotaExceeded" | "Serialize" | "Unavailable" | "MaxKeys"; readonly name = "StorageError"; }
MaxKeys
set
maxKeys
QuotaExceeded
localStorage
Serialize
JSON.stringify
Unavailable
false
ttl
import { resetStorageRegistry, resetBusRegistry } from "@brushy/storage"; afterEach(() => { resetStorageRegistry(); resetBusRegistry(); });