hoshimi
    Preparing search index...

    Class PlayerMemoryStorage<K, V>

    Class representing a player storage. PlayerMemoryStorage

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    namespace: string = "hoshimiplayer"

    The namespace of the storage.

    "hoshimiplayer"
    
    console.log(storage.namespace); // "hoshimiplayer"
    

    Methods

    • Get all key-value pairs in the storage.

      Type Parameters

      • K extends (string & {})[]
      • V extends unknown

      Returns Awaitable<Record<K[number], V>>

      An object containing all key-value pairs in the storage, excluding internal keys.

      const all = await storage.all();
      console.log(all); // { key1: "value1", key2: "value2" }