Link Search Menu Expand Document

Attacher

  • source1

Attachers are materialized plugins. An attacher is a function that can receive options and configures the processor.

Data

  • source 2

Configure the processor with information available to all plugins. Information is stored in an in-memory key-value store.

Typically, options can be given to a specific plugin, but sometimes it makes sense to have information shared with several plugins. For example, a list of HTML elements that are self-closing, which is needed during all phases of the process.

  • NOTE: Setting information cannot occur on frozen processors. Call the processor first to create a new unfrozen processor.

Frozen

Freeze a processor. Frozen processors are meant to be extended and not to be configured directly.

It’s possible to freeze processors explicitly by calling .freeze(). Processors freeze implicitly when .parse(), .run(), .runSync(), .stringify(), .process(), or .processSync() are called.

  1. https://github.com/unifiedjs/unified#function-attacheroptions 

  2. https://github.com/unifiedjs/unified#processordatakey-value 


Copyright © 2020 Thence LLC