Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ImageCache

Hierarchy

  • ImageCache

Index

Constructors

constructor

  • Creates a new instance of ImageCache with a list of presets.

    Parameters

    Returns ImageCache

    The new ImageCache instance

Properties

Private actions

actions: object

Private plugins

plugins: Plugin[]

Private presets

presets: Preset[]

Methods

actionList

  • actionList(): string[]
  • Returns a list of the available actions

    Returns string[]

    The list of available actions

getAction

  • getAction(name: string): Function
  • Gets an action

    Parameters

    • name: string

    Returns Function

pluginList

  • Returns a list of the available plugins

    Returns Plugin[]

    The list of available plugins

presetList

  • Returns a list of the available presets

    Returns Preset[]

    The list of available presets

registerAction

  • registerAction(name: string, callback: Function): void
  • Registers an action from a plugin

    Parameters

    • name: string
    • callback: Function

    Returns void

render

  • render(image: string, presetName: string): Promise<Sharp>
  • Renders an image using the supplied preset.

    Parameters

    • image: string

      The image to be rendered

    • presetName: string

      The preset to use

    Returns Promise<Sharp>

Generated using TypeDoc