H5P NodeJS Library
    Preparing search index...

    Persists any arbitrarily nested objects to some kind storage. Used to store settings and temporary data that needs to be retrieved later.

    interface IKeyValueStorage {
        load(key: string): Promise<any>;
        save(key: string, value: any): Promise<any>;
    }

    Implemented by

    Index

    Methods

    Methods

    • Loads a value from the storage

      Parameters

      • key: string

        The key whose value should be returned.

      Returns Promise<any>

      the value or undefined

    • Save a value to the storage.

      Parameters

      • key: string

        The key for which the value should be stored.

      • value: any

        The value to store.

      Returns Promise<any>