@asciidoctor/core
    Preparing search index...

    Class ConverterCustomFactory

    A factory that maps backend names to converter classes or instances. Use the global Converter instance (DefaultFactory) for typical use.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _catchAll: any
    _registry: {}

    Methods

    • Get the registered converters map.

      Returns object

      a shallow copy of the registry

    • Create a new converter instance for the given backend.

      Parameters

      • backend: string

        the backend name

      • Optionalopts: object

        options passed to the converter constructor

      Returns Promise<object>

      the converter instance, or null if not registered

    • Create a new converter instance for the given backend (synchronous). Requires the converter class to already be registered; does not support template dirs.

      Parameters

      • backend: string

        the backend name

      • Optionalopts: object

        options passed to the converter constructor

      Returns object

      the converter instance, or null if not registered

    • Retrieve the converter class registered for the given backend. Returns undefined (not null) when no match is found, mirroring the core API.

      Parameters

      • backend: string

        the backend name

      Returns object | Function

    • Register a converter class for one or more backend names. Backends may be passed as individual strings or as a single Array.

      Parameters

      • converter: object | Function

        the converter class or instance

      • ...backends: string[]

        backend names; use '*' as a catch-all

      Returns void

    • Unregister all converters.

      Returns void