Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace machinery

Index

Type aliases

Maybe

Maybe<T>: T | null

Type parameters

  • T

Opaque

Opaque<K, T>: T & { __TYPE__: K }

Type parameters

  • K

  • T

Variables

Const UCANS_STORAGE_KEY

UCANS_STORAGE_KEY: "webnative.auth_ucans" = "webnative.auth_ucans"

Const USERNAME_STORAGE_KEY

USERNAME_STORAGE_KEY: "webnative.auth_username" = "webnative.auth_username"

Const VERSION

VERSION: "0.24.0" = "0.24.0"

Const isBrowser

isBrowser: boolean = ...

Functions

Const arrContains

  • arrContains<T>(arr: T[], val: T): boolean
  • Type parameters

    • T

    Parameters

    • arr: T[]
    • val: T

    Returns boolean

Const assertBrowser

  • assertBrowser(method: string): void

Const asyncWaterfall

  • asyncWaterfall<T>(val: T, operations: ((val: T) => Promise<T>)[]): Promise<T>
  • Type parameters

    • T

    Parameters

    • val: T
    • operations: ((val: T) => Promise<T>)[]

    Returns Promise<T>

authenticatedUsername

  • authenticatedUsername(): Promise<string | null>
  • Retrieve the authenticated username.

    Returns Promise<string | null>

Const isBlob

  • isBlob(val: unknown): val is Blob

Const isBool

  • isBool(val: unknown): val is boolean

Const isDefined

  • isDefined<T>(val: undefined | T): val is T

Const isJust

  • isJust<T>(val: null | T): val is T

Const isNum

  • isNum(val: unknown): val is number

Const isObject

  • isObject<T>(val: unknown): val is Record<string, T>

Const isString

  • isString(val: unknown): val is string

Const isValue

  • isValue<T>(val: undefined | null | T): val is T

Const mapObj

  • mapObj<T, S>(obj: {}, fn: (val: T, key: string) => S): {}
  • Type parameters

    • T

    • S

    Parameters

    • obj: {}
      • [key: string]: T
    • fn: (val: T, key: string) => S
        • (val: T, key: string): S
        • Parameters

          • val: T
          • key: string

          Returns S

    Returns {}

    • [key: string]: S

Const mapObjAsync

  • mapObjAsync<T, S>(obj: {}, fn: (val: T, key: string) => Promise<S>): Promise<{}>
  • Type parameters

    • T

    • S

    Parameters

    • obj: {}
      • [key: string]: T
    • fn: (val: T, key: string) => Promise<S>
        • (val: T, key: string): Promise<S>
        • Parameters

          • val: T
          • key: string

          Returns Promise<S>

    Returns Promise<{}>

Const notNull

  • notNull<T>(val: null | T): val is T

Const removeKeyFromObj

  • removeKeyFromObj<T>(obj: {}, key: string): {}
  • Type parameters

    • T

    Parameters

    • obj: {}
      • [key: string]: T
    • key: string

    Returns {}

    • [key: string]: T

Const updateOrRemoveKeyFromObj

  • updateOrRemoveKeyFromObj<T>(obj: {}, key: string, val: Maybe<T>): {}
  • Type parameters

    • T

    Parameters

    • obj: {}
      • [key: string]: T
    • key: string
    • val: Maybe<T>

    Returns {}

    • [key: string]: T

Generated using TypeDoc