Type Parameters

Hierarchy (View Summary)

Constructors

  • Type Parameters

    • T extends object = object

    Parameters

    • obj: T

    Returns ObjectHasher<T>

Properties

obj: T
allowHashPooling: boolean = true
allowSubtle: boolean = true
createBrowserWorker?: (url?: URL) => undefined | Worker
createNodeWorker: (func?: () => unknown) => undefined | WorkerImplementation = createNodeWorker
initialized: void = ...
subtleHashWorkerUrl?: URL
warnIfUsingJsHash: boolean = true
wasmHashWorkerUrl?: URL
wasmInitialized: Promise<void> = ...
wasmSupport: WasmSupport = wasmSupportStatic

Accessors

  • get stringKeyObj(): StringKeyObject
  • Returns StringKeyObject

Methods

  • Type Parameters

    • T extends object

    Parameters

    • objs: T[] = []
    • hash: Lowercase<string> | Lowercase<string>[]

    Returns Promise<T[]>

  • Type Parameters

    • T extends object

    Parameters

    • objs: T[] = []
    • hash: Lowercase<string> | Lowercase<string>[]

    Returns Promise<T[]>

  • Creates an array of payload hashes based on the payloads passed in

    Type Parameters

    • T extends object

    Parameters

    • Optionalobjs: T[]

      Any array of payloads

    Returns Promise<undefined | Lowercase<string>[]>

    An array of payload hashes

  • Creates an array of payload/hash tuples based on the payloads passed in

    Type Parameters

    • T extends object

    Parameters

    • objs: T[]

      Any array of payloads

    Returns Promise<[T, Lowercase<string>][]>

    An array of payload/hash tuples

  • Returns a clone of the payload that is JSON safe

    Type Parameters

    • T extends object

    Parameters

    • payload: T
    • meta: boolean = false

      Keeps underscore (meta) fields if set to true

    Returns T

    Returns a clone of the payload that is JSON safe