Options
All
  • Public
  • Public/Protected
  • All
Menu

Package storage

@typed/storage

Cross-platform functions for working with the Storage API

Index

Variables

Const setItem

setItem: { (key: string, value: string): Effects<StorageEnv, string>; (key: string): (value: string) => Effects<StorageEnv, string> } = curry((key: string, value: string) =>Effect.fromEnv(withEnv<StorageEnv, string>(({ storage }) => (storage.setItem(key, value), value)),),)

Set an item in Storage

param

:: string

param

:: string

returns

:: Env StorageEnv string

Type declaration

    • (key: string, value: string): Effects<StorageEnv, string>
    • (key: string): (value: string) => Effects<StorageEnv, string>
    • Parameters

      • key: string
      • value: string

      Returns Effects<StorageEnv, string>

    • Parameters

      • key: string

      Returns (value: string) => Effects<StorageEnv, string>

        • Parameters

          • value: string

          Returns Effects<StorageEnv, string>

Functions

Const clear

Const getItem

proxyStorage

  • proxyStorage(storage: Storage): Storage

Const removeItem

  • removeItem(key: string): Effects<StorageEnv, void>

scopeStorage

  • scopeStorage(scope: string, storage: Storage): Storage

serverStorage

  • serverStorage(map?: Map<string, string>): Storage

Generated using TypeDoc