Hierarchy

  • Kvp

Constructors

Methods

  • Deletes the specified value for key, this is a blocking operation, if you're deleting a bunch of keys you should use deleteAsync

    Parameters

    • key: string

      the key of the value to delete

    Returns void

  • Deletes the specified resource keys value, this doesn't immediately write to disk and needs flush called afterwards.

    Parameters

    • key: string

      the key to delete

    Returns void

  • Ensures that any previous async call is flushed to disk

    Returns void

  • Gets the specified value for key

    Returns

    the value stored as a float, or 0.0 if there is no value

    Parameters

    • key: string

      the key of the value to get

    Returns number

  • Type Parameters

    • T

    Parameters

    • key: string

    Returns T

  • Gets the specified value for key

    Returns

    the value stored, as a number, or 0 if there is no value

    Parameters

    • key: string

      the key of the value to get

    Returns number

  • Gets the specified value for key

    Returns

    a string, or null if there is no value

    Parameters

    • key: string

      the key of the value to get

    Returns null | string

  • enumerates over any kvp prefixed with the prefix

    for (const value of Kvp.getKvpsAsFloat("native:")) {
    console.log(value);
    }

    Parameters

    • prefix: string

      the prefix to search for

    Returns IterableIterator<number>

  • enumerates over any kvp prefixed with the prefix

    for (const value of Kvp.getKvpsAsNumber("native:")) {
    console.log(value);
    }

    Parameters

    • prefix: string

      the prefix to search for

    Returns IterableIterator<number>

  • enumerates over any kvp prefixed with the prefix

    for (const value of Kvp.getKvpsAsString("native:")) {
    console.log(value);
    }

    Parameters

    • prefix: string

      the prefix to search for

    Returns IterableIterator<string>

  • Type Parameters

    • T = string | number

    Parameters

    • prefix: string
    • iterType: "string" | "number" | "float"

    Returns IterableIterator<T>

  • Sets the resource key to the specified value this is a blocking operation, if you're doing large write operations you should use setKvpAsync instead.

    Type Parameters

    • T = string | number

    Parameters

    • key: string

      the key string

    • value: T

      the value to set the key to

    Returns void

  • Sets the resource key to the specified value, this doesn't immediately write to disk and needs flush called afterwards.

    Type Parameters

    • T = string | number

    Parameters

    • key: string

      the key string

    • value: T

      the value to set the key to

    Returns void

  • Sets the specified key to the specified json value This can error if given an invalid object

    Parameters

    • key: string

      the key string

    • value: any

      the value to set the key to

    Returns void

Generated using TypeDoc