XYO Platform SDK - v3.10.6
    Preparing search index...

    Class ObjectHasher<T>

    Type Parameters

    Hierarchy (View Summary)

    Index

    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) => Worker = 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