Options
All
  • Public
  • Public/Protected
  • All
Menu

Class export=

Hierarchy

  • export=

Index

Constructors

constructor

  • new export=(chainLocation?: string, output?: string): export=
  • Parameters

    • chainLocation: string = 'chainfile'
    • output: string = 'NORMAL'

    Returns export=

Properties

Private chain

chain: undefined | Chainfile

Private chainLocation

chainLocation: string

Private chainQueue

chainQueue: ChainQueue

Private output

output: string

Methods

add

  • add(key: string, value: any): void
  • Add a link to the chain

    Parameters

    • key: string

      key

    • value: any

      data

    Returns void

contains

  • contains(key: any): boolean

delete

  • delete(key: any): void
  • Remove a value from the chain

    Parameters

    • key: any

      key

    Returns void

forceStore

  • forceStore(): void
  • Forcefully adds the memory chain to the disk

    Returns void

full

  • full(): Map<string, any>
  • Returns the full chain as a map

    Returns Map<string, any>

get

  • get(key: string): any
  • Get the value from the chain

    Parameters

    • key: string

      key

    Returns any

has

  • has(key: string): boolean
  • Check if the chain contains a certain key

    Parameters

    • key: string

      key

    Returns boolean

Private init

  • init(): Promise<void>
  • Initializes the database, runs checks and sets everything up.

    Returns Promise<void>

remove

  • remove(key: any): void

set

  • set(key: any, value: any): void
  • Update a value in the chain

    Parameters

    • key: any

      key

    • value: any

      value

    Returns void

Private store

  • store(): void
  • Add the updated chain to the queue to be made persistan

    Returns void

update

  • update(key: any, value: any): void
  • Update item in the chain, only if it exists

    Parameters

    • key: any

      key

    • value: any

      value

    Returns void

Generated using TypeDoc