@openvanilla/mcbopomofoweb
    Preparing search index...

    A class to store large objects in chrome.storage.sync.

    Index

    Constructors

    Properties

    maxBytes: number = chrome.storage.sync.QUOTA_BYTES
    maxBytesPerKey: number = chrome.storage.sync.QUOTA_BYTES_PER_ITEM
    version: "1.0"

    Methods

    • Gets an object from chrome.storage.sync.

      Parameters

      • keys: string[]

        The keys of the object to be retrieved.

      • callback: (arg: { [k: string]: any }) => void

        The callback function.

      Returns void

    • Reconstructs an object from its chunks.

      Parameters

      • splitObjects: any

        The object with the split chunks.

      • inKeys: string[] | undefined = undefined

        The keys of the object to be reconstructed.

      Returns { [k: string]: any }

      The reconstructed object.

    • Splits an object into smaller chunks to be stored in chrome.storage.sync.

      Parameters

      • obj: any

        The object to be stored.

      • maxLength: number

        The maximum length of each chunk.

      Returns object

      The object with the split chunks.