Skip to content

Processors

Olena Orobei edited this page Jul 13, 2021 · 2 revisions

Processors are responsible for modifying the resulting data objects. In processors, you can implement any logic to modify, delete, create properties.

Processors

Available processors Description
Selected Labels Creates new property in data object based on filtered labels

Selected Labels

Configuration option Description
name Processor name
field Field that will be added to data object
labelRegExp Regexp to filter labels. If the label matches this regexp it will be added to the results array as a value of field property

Example

"processors": [
    {
        "name": "selected-labels",
        "field": "components",
        "labelRegExp": "(Component:)(.*)"
    },
    {
        "name": "selected-labels",
        "field": "partners",
        "labelRegExp": "(Partner:)(.*)"
    }
]

Custom Processors

  • Create a new <custom_name>.js file under the src/processors folder. Note: The name of the file will be used as the processor name.
  • Provide configuration for custom processor

Clone this wiki locally