Options
All
  • Public
  • Public/Protected
  • All
Menu

Add items to the Indexer that are known ahead of time. e.g. Shortcuts, urls, files, etc.

These are added to the global list of IndexedResult items and are searched automatically by Hain.

since

v0.6

Methods

  • Adds a set of results to the built-in indexer to be searchable, execute() is called with the id and payload provided.

    Parameters

    key:  string

    A unique ID which you can later use to remove or modify this addition

    value:  IndexedResult | IndexedResult[]

    The entry or entries to be added

  • set(key: string, callback: function): void
  • Adds a synchronous callback function to the built-in indexer, should return dynamic values to be used with the indexer

    Parameters

    key:  string

    A unique ID which you can later use to remove or modify this addition

    callback:  function

    The callback function, this will be called synchronously

  • unset(key: string): void
  • Removes the set of results added with the given key

    Parameters

    key:  string

    A unique ID which you can later use to remove or modify this addition

Generated using TypeDoc