Skip to content
LogoLogo

Store.memory

Creates an in-memory store backed by a Map. It supports atomic compareAndSet and removes expired compare-and-set values when they are read within the current process.

Usage

import {  } from 'viem/tempo'
 
const  = .()
 
await .('key', 'value')
const  = await .('key')
'value'

Return Type

type ReturnType = Store.Atomic

A Store.Atomic instance backed by an in-memory Map.