Options
All
  • Public
  • Public/Protected
  • All
Menu

@mavenomics/coreutils

Index

Variables

Let Buffer

Buffer: any

Let atob

atob: function | null = typeof window !== 'undefined' ? window.atob : null

Let btoa

btoa: function | null = typeof window !== 'undefined' ? window.btoa : null

Let registeredSerializers

registeredSerializers: object

Type declaration

  • [index: string]: any

Functions

StartTiming

  • StartTiming<T>(name: string, func: function): Promise<T>
  • Type parameters

    • T

    Parameters

    • name: string
    • func: function
        • (): Promise<T>
        • Returns Promise<T>

    Returns Promise<T>

StartTimingAsync

  • StartTimingAsync<T>(name: string, func: function): Promise<T>
  • Type parameters

    • T

    Parameters

    • name: string
    • func: function
        • (): Promise<T>
        • Returns Promise<T>

    Returns Promise<T>

StartTimingSync

  • StartTimingSync<T>(name: string, func: function): T
  • Type parameters

    • T

    Parameters

    • name: string
    • func: function
        • (): T
        • Returns T

    Returns T

StartTimingWithContext

  • StartTimingWithContext<T>(name: string, func: function): Promise<object | object>
  • Note: This doesn't expose a way of showing these timing trees to users, they only exist right now as a glorified form of console.log. When we find a thread-local storage mechanism we like, we can re-implement true timing trees

    Type parameters

    • T

    Parameters

    • name: string
    • func: function
        • (): Promise<T>
        • Returns Promise<T>

    Returns Promise<object | object>

deserialize

  • deserialize(obj: any): any

Let deserializeCachedTable

  • deserializeCachedTable(o: any, deserialize: function): any
  • Parameters

    • o: any
    • deserialize: function
        • (obj: any): any
        • Parameters

          • obj: any

          Returns any

    Returns any

Let deserializeDate

  • deserializeDate(o: any, deserialize: function): Date
  • Parameters

    • o: any
    • deserialize: function
        • (obj: any): any
        • Parameters

          • obj: any

          Returns any

    Returns Date

Let deserializeError

  • deserializeError(o: any, deserialize?: undefined | function): Error
  • Parameters

    • o: any
    • Optional deserialize: undefined | function

    Returns Error

Let deserializeTable

  • deserializeTable(o: any, deserialize: function): any
  • Parameters

    • o: any
    • deserialize: function
        • (obj: any): any
        • Parameters

          • obj: any

          Returns any

    Returns any

Let deserializeUint8Array

  • deserializeUint8Array(o: any, deserialize: function): Uint8Array
  • Parameters

    • o: any
    • deserialize: function
        • (obj: any): any
        • Parameters

          • obj: any

          Returns any

    Returns Uint8Array

registerType

  • registerType(name: string, serialize: function, deserialize: function): void
  • Parameters

    • name: string
    • serialize: function
        • (obj: any, serialize: function): any
        • Parameters

          • obj: any
          • serialize: function
              • (obj: any): any
              • Parameters

                • obj: any

                Returns any

          Returns any

    • deserialize: function
        • (obj: any, deserialize: function): any
        • Parameters

          • obj: any
          • deserialize: function
              • (obj: any): any
              • Parameters

                • obj: any

                Returns any

          Returns any

    Returns void

serialize

  • serialize(obj: any): any

Let serializeCachedTable

  • serializeCachedTable(o: any, serialize: function): null | JSONObject

Let serializeDate

  • serializeDate(o: any, serialize: function): null | JSONObject

Let serializeError

  • serializeError(o: any, serialize?: undefined | function): object
  • Parameters

    • o: any
    • Optional serialize: undefined | function

    Returns object

    • message: string
    • stack: undefined | string
    • typeName: string

Let serializeTable

  • serializeTable(o: any, serialize: function): null | JSONObject

Let serializeUint8Array

  • serializeUint8Array(o: any, serialize: function): object
  • Parameters

    • o: any
    • serialize: function
        • (obj: any): any
        • Parameters

          • obj: any

          Returns any

    Returns object

    • b64: string

Generated using TypeDoc