Skip to main content
Module

x/storage_helpers/mod.ts>NoopStorage

A set of tools to manage localStorage, sessionStorage and more that run on browsers, node and deno. 💾
Latest
variable NoopStorage
import { NoopStorage } from "https://deno.land/x/storage_helpers@v0.5.0/mod.ts";

A dummy storage that does not store values:

  • length is always 0.
  • setItem and removeItem and clear have no effect.
  • getItem and key always return null.

Usage

 const noopStorage = NoopStorage.create();

noopStorage.setItem('key', '43');
noopStorage.getItem('key') // null