Class for accessing Fastly Edge Dictionaries.

Note: Can only be used when processing requests, not during build-time initialization.

Example

In this example we have an Edge Dictionary named 'animals' and we return the 'cat' entry as the response body to the client.

Hierarchy

  • Dictionary

Constructors

Methods

Constructors

  • Creates a new Dictionary object, and opens an edge dictionary to query

    Throws

    Throws an Error if no Dictionary exists with the provided name

    Parameters

    • name: string

    Returns Dictionary

Methods

  • Get a value for a key in the dictionary. If the provided key does not exist in the Dictionary then this returns null.

    Throws

    Throws an TypeError if the provided key is longer than 256 characters.

    Parameters

    • key: string

    Returns null | string

Generated using TypeDoc