Link Search Menu Expand Document
  • source 1

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.


var unified = require('unified')

var processor = unified().data('alpha', 'bravo')'alpha') // => 'bravo' // {alpha: 'bravo'}{charlie: 'delta'}) // {charlie: 'delta'}

Copyright © 2020 Thence LLC