createCleanChunksInputProcessor

Type: Function

How to get createCleanChunksInputProcessor?

JavaScript

import createCleanChunksInputProcessor from 'fontoxml-pipelined-importer/src/createCleanChunksInputProcessor.js'

Create a clean-up step in the importing pipeline. This step will use the given transformation to transform a chunk. The reverseTransform is used to 'undo' the changes.

Arguments

  1. labelsToClean

    (Required)

    Type: Array<String> | NULL

    The labels which should be cleaned. Null signals all chunks should be transformed

  2. transform

    (Required)

    Type: Function

    The function which is called for every chunk. Should edit the chunk in-place

    Arguments

  3. reverseTransform

    (Optional)

    Type: Function

    The reverse of the transform. Should return the chunk to its previous state It is advised to place remarks of the metadata of the current label

Returns

A configured instance of a transformation step