Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/fresh_store/mod.ts>StoreStack#addStoreAtPointer

Simple store for Deno Fresh, to pass state between islands
Go to Latest
method StoreStack.prototype.addStoreAtPointer
import { StoreStack } from "https://deno.land/x/fresh_store@v1.0.1/mod.ts";

Adds a store to the specified Pointer. If a store already exists at the address, an option can be passed to override it. If override is set to false, but the verbose option is set to true, and the memory is already allocated, the store will NOT be overrided, and an error message will output to the console.

Parameters

newItem: AnyStore

The Store to be added to the stack.

pointer: Pointer

The Pointer to the memory address where the store should be inserted.

optional
options: { override?: boolean; verbose?: boolean; }

Defines if a store should be overrided if it exists at the Pointer and if a verbose error should be returned if override is set to false.