Skip to main content
Home

Built and signed on GitHub Actions

TypeScript wrapper library for the Web Storage and IndexedDB APIs

This package works with Deno, Browsers
This package works with Deno
This package works with Browsers
JSR Score
100%
Published
a week ago (0.1.0)
class StorageNotAvailableError
extends Error

Error thrown when a WebStorage instance is requested for a StorageType that is not available.

Examples

Example 1

try {
  const storage = WebStorage.getLocal();
} catch (error) {
  if (error instanceof StorageNotAvailableError) {
    // Handle error
  }
}

Constructors

new
StorageNotAvailableError(storageType: StorageType)

Creates a new instance of StorageNotAvailableError.

Properties

Name of the error.

The storage type that was requested.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@bdavidson/browser-storage

Import symbol

import { StorageNotAvailableError } from "@bdavidson/browser-storage/web-storage";
or

Import directly with a jsr specifier

import { StorageNotAvailableError } from "jsr:@bdavidson/browser-storage/web-storage";