Attachers are materialized plugins. An attacher is a function that can receive options and configures the processor.
- 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.
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.